[Konsole-devel] Review Request: Create dbus object for each Konsole Window respectively
Jekyll Wu
adaptee at gmail.com
Thu Jan 26 16:58:32 UTC 2012
> On Jan. 26, 2012, 2:46 p.m., Kurt Hindenburg wrote:
> > The idea is fine. Off hand I'm not sure what to do with the old /Konsole.
> >
> > A side note, detaching a tab should put that tab in its own /Windows/# and reset the Sessions/ to 1.
Yes, $KONSOLE_DBUS_WINDOW fails with the detaching example since there is no way to change session's environment variable after it starts running.
As for "reset the Sessions/ to 1", I don't get it. Detaching does not change one session's identity, So if it was /Sessions/3, it should still be /Sessions/3 after detaching. And sessions are identified in the whole process, not within its current window.
- Jekyll
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103790/#review10095
-----------------------------------------------------------
On Jan. 25, 2012, 9:18 a.m., Jekyll Wu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103790/
> -----------------------------------------------------------
>
> (Updated Jan. 25, 2012, 9:18 a.m.)
>
>
> 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/20120126/d6418095/attachment.html>
More information about the konsole-devel
mailing list