<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/103790/">http://git.reviewboard.kde.org/r/103790/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 26th, 2012, 2:46 p.m., <b>Kurt Hindenburg</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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. </pre>
<br />
<p>- Jekyll</p>
<br />
<p>On January 25th, 2012, 9:18 a.m., Jekyll Wu wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Konsole.</div>
<div>By Jekyll Wu.</div>
<p style="color: grey;"><i>Updated Jan. 25, 2012, 9:18 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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,
</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=276912">276912</a>,
<a href="http://bugs.kde.org/show_bug.cgi?id=281513">281513</a>,
<a href="http://bugs.kde.org/show_bug.cgi?id=292309">292309</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/Application.cpp <span style="color: grey">(646cd4b)</span></li>
<li>src/Session.h <span style="color: grey">(e58476b)</span></li>
<li>src/Session.cpp <span style="color: grey">(a172b8c)</span></li>
<li>src/ViewManager.h <span style="color: grey">(9b85358)</span></li>
<li>src/ViewManager.cpp <span style="color: grey">(a9fb193)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/103790/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>