[Konsole-devel] Review Request: Allow applications hosting the Konsole KPart to monitor for silence and activity

Eike Hein hein at kde.org
Fri Aug 5 13:35:05 UTC 2011


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

(Updated Aug. 5, 2011, 1:35 p.m.)


Review request for Konsole.


Changes
-------

Sorry, the first version turned out to be slightly wrong - enabling monitoring for all sessions enables it for all sessions in all KPart instances hosted by the app, i.e. the setting doesn't stay within the single KPart instance. I've changed it now to operate on activeSession() instead after all, similar to other methods in Part.

I've written the corresponding Yakuake feature in the meantime as well (as-yet uncommitted), and it's working quite well for me.


Summary
-------

The purpose of this patch is to allow applications hosting the Konsole KPart to tap into Konsole's ability to monitor terminals for silence or activity.

To accomplish this, Part has seen the addition of two slots, each taking a bool argument, to toggle the monitoring for silence or activity, respectively. Once and only if monitoring is enabled for an event type, a corresponding newly-added signal is emitted by Part.

Repeated calls to enable monitoring are handled by means of Qt::UniqueConnection. As the KPart internally has the notion of supporting multiple sessions, but this is not exposed in its API or user interface, the code has been written to toggle monitoring on all sessions by getting the list from SessionManager.

The use of signals and slots instead of extending the TerminalInterface class may seem strange, but this has ample precedent - there are several such slots and one signal already, which are in active use by applications (e.g. Yakuake).

The addition of this interface will allow the implementation of a long-standing feature wish by Yakuake users (monitoring for silence/activity).

Should this patch be accepted I can commit it myself.


This addresses bug 169650.
    http://bugs.kde.org/show_bug.cgi?id=169650


Diffs (updated)
-----

  src/Part.h f1262dd 
  src/Part.cpp e70b7e3 

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


Testing
-------


Thanks,

Eike

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


More information about the konsole-devel mailing list