From kde-bindings Fri Feb 05 19:43:45 2010 From: Arno Rehn Date: Fri, 05 Feb 2010 19:43:45 +0000 To: kde-bindings Subject: Re: [Kde-bindings] get libkonsolepart working within ruby Message-Id: <201002052043.45481.arno () arnorehn ! de> X-MARC-Message: https://marc.info/?l=kde-bindings&m=126539905508178 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_xTHbLXYc0Iudp6G" --Boundary-00=_xTHbLXYc0Iudp6G Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Friday 05 February 2010 00:44:09 Robert Riemann wrote: > Hi Arno, > > really cool news. Maybe we can think about introducing an extra class. > Creating an konsolepart by konsolewidget = KParts::KonsolePart.new parent > would be really nice. > > Can you write some notes (for dummies) down how to apply > the patch on my opensuse 11.2 buildservice kde 4.4 rc3. > If I get it working I will blog about the easy usage of the > konsolepart with korundum4 > and add some additinal text to the techbase wiki. See here for the patch http://websvn.kde.org/?view=revision&revision=1085699 it's really only very small changes. I won't backport it to branch yet, because it's currently frozen. I attached an updated version of your ruby script which casts the part to the terminal interface. Works fine here. -- Arno Rehn arno@arnorehn.de --Boundary-00=_xTHbLXYc0Iudp6G Content-Type: application/x-ruby; name="test.rb" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="test.rb" #!/usr/bin/ruby require 'korundum4' about = KDE::AboutData.new( "part_test", "Load KPart", KDE.ki18n("Test loading KParts"), "0.1") KDE::CmdLineArgs.init(ARGV, about) a = KDE::Application.new window = KDE::MainWindow.new factory = KDE::PluginLoader.new("libkonsolepart").factory part = factory.create("KParts::ReadOnlyPart", window, nil, [], "") terminal = part.qobject_cast(KDE::TerminalInterfaceV2) if terminal.nil? terminal = part.qobject_cast(KDE::TerminalInterface) end if terminal.nil? p 'unknown terminal interface' end terminal.show_shell_in_dir '' part.widget.show window.show a.exec --Boundary-00=_xTHbLXYc0Iudp6G Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kde-bindings mailing list Kde-bindings@kde.org https://mail.kde.org/mailman/listinfo/kde-bindings --Boundary-00=_xTHbLXYc0Iudp6G--