[Konsole-devel] Review Request: Create dbus object for each Konsole Window respectively

Jekyll Wu adaptee at gmail.com
Wed Jan 25 09:18:03 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103790/
-----------------------------------------------------------

Review request for Konsole.


Description
-------

The existing problem is Konsole tries to create dbus object /Konsole for each Konsole window, and clearly only the all attempt except the first fail. So all dbus methods on /Konsole work in the context the first window.

I believe this is a mistake or omission in design/coding. Since Konsole support multiple windows, the logical choice is we should created one dbus object for each Konsole window respectively.

The patch is mininal for prototyping. It creates dbus object /Windows/N for each Konsole window in the same way as /Session/N for each session. Now users can use "qdbus org.kde.konsole /Windows/N ..." to perform action in the context specified Konsole window. For convenience, a environment variable $KONSOLE_DBUS_WINDOW is added for recording the dbus object of current Konsole window, just like $KONSOLE_DBUS_SESSION for the dbus object of current sesstion/tab.

The main problem of the patch is it 'breaks' compatibility. The old /Konsole dbus object is no longer available. In general, I think compatibility makes sense only when the old interfaces work. Nevertheless, it's  a good idea to deal with /Konsole in a more careful and user-friendly way. I just don't know how.

Some possible further improvement:

a). After applying this patch, dbus object /Windows/N corredsponds to one ViewManager instance. Although there is nothing wrong here since the relationship between MainWindow and ViewManager is one-to-one, maybe it is more natural to move those dbus code into MainWindow.  

b). In the future, we can use the /Konsole dbus object to represent the whole Konsole process. It can be used to query some global information about the konsole process, for example defaultProfile() for the default profile, 


This addresses bugs 276912, 281513 and 292309.
    http://bugs.kde.org/show_bug.cgi?id=276912
    http://bugs.kde.org/show_bug.cgi?id=281513
    http://bugs.kde.org/show_bug.cgi?id=292309


Diffs
-----

  src/Application.cpp 646cd4b 
  src/Session.h e58476b 
  src/Session.cpp a172b8c 
  src/ViewManager.h 9b85358 
  src/ViewManager.cpp a9fb193 

Diff: http://git.reviewboard.kde.org/r/103790/diff/diff


Testing
-------


Thanks,

Jekyll Wu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20120125/bf4b2615/attachment.html>


More information about the konsole-devel mailing list