detection if applet is running

Andriy Rysin arysin at gmail.com
Fri Oct 28 16:37:36 BST 2011


On 10/28/2011 02:38 AM, Aaron J. Seigo wrote:
> On Thursday, October 27, 2011 23:35:52 Andriy Rysin wrote:
>> 2) make keyboard layout applet exposes some dbus to make it detectable
>> when running (feels a bit too "heavy")
> that would be a preferred way ... note, however, that one can have multiple
> instances of the same applet. this is why we really recommend and encourage a
> separation between visualization and business logic, where the various
> visualizations (e.g. applets, tray icons, etc) all share the same business
> logic code (e.g. a DataEngine) which can then take care of things like
> registering a unique dbus interface.
there's no business logic in the applet, its "data engine" is x.org
it feels to me that adding a data engine just to be able to tell if 
applet is running is an overkill
> it is much easier and safer to simply expose a dbus service from your 
> DataEngine, or whatever the DataEngine uses to get keyboard 
> information from, than any other approach. it guarantees it works with 
> multiple widgets and doesn't care which shell the user is running. in 
> this particular case, why don't you just check the keyboard layout 
> settings to see if more than one keyboard layout is active? does it 
> matter that there is or isn't a keyboard layout switcher applet or 
> icon? note that in plasma active, it is very likely that this 
> functionality will end up integrated into the virtual keyboard and not 
> reside as a separate applet in the containments running in 
> plasma-active ... 
At first I thought it might be a bit inconsistent if user didn't set and 
indicator to see in the desktop but will see it in the lock dialog, but 
that's probably an edge case and most of the time user wants some 
indication of current layout in the lock dialog. That's what I'll do - 
always show indicator if layout count > 1.

Thanks for the suggestion,
Andriy





More information about the kde-core-devel mailing list