detection if applet is running

Andriy Rysin arysin at gmail.com
Fri Oct 28 04:35:52 BST 2011


I need to detect if keyboard layout indicator applet is running and show 
the keyboard layout button in the screen lock dialog (bug 276692 
<https://bugs.kde.org/show_bug.cgi?id=276692>). Currently it only checks 
if "indicator" option is on which turns on systray icon but user can 
bypass that option by just dragging applet on the screen.

I did a quick research and I see two ways to solve this in 
keyboard_layout_widget (embedded component used in lockdlg):
1) link plasma libs and do something like (in pseudo-code)
foreach(containment, new Corona()->containments()) {
  foreach(applet, containment->applets()) {
    if( applet->pluginName() == "..." ) {
         // show indicator
    }
  }
}

2) make keyboard layout applet exposes some dbus to make it detectable 
when running (feels a bit too "heavy")

It felt like there must be a way currently to use dbus on plasma to 
query running applets (which would the easiest way to implement what I 
need) but could not find anything like that in org.kde.plasma-desktop

I would appreciate any help on this
Thanks
Andriy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20111027/6bf75347/attachment.htm>


More information about the kde-core-devel mailing list