My main concern is that there are a lot of GTK+ apps out there and, if 
that's not a KDE-specific extension, then it may require convincing each 
developer to buy into using something other than libindicate since it 
doesn't seem to provide a way to access it in the manner you described.

The AppIndicator class does provide a scroll-event signal but, as far as 
I can tell from the API docs, it imposes these rules on toggling main 
window visibility:

1. The indicator won't be visible unless you register a menu for things 
like Unity to display on left-click and right-click using set_menu()

2. set_menu() ONLY accepts a GtkMenu object.

3. You can register a "secondary acctivate target" which things like 
Unity will bind to middle-click using set_secondary_activate_target()

4. The secondary activate target will only be called if it's a visible 
and active child of the GtkMenu you passed via set_menu().

5. I can see no way to swap the actions so the menu is the secondary 
action and the visibility toggle is the primary one. My best guess is 
that ItemIsMenu is a KDE-specific extension.

bind a non-menu to left-click using libindicate, so I'm guessing that's 
a KDE-specific extension. (However, if anyone can demonstrate that 
Amarok's indicator works as expected in Unity, then that would indicate 
that the restriction is being enforced in libindicator rather than the 
panel host)

Source: 
http://developer.ubuntu.com/api/ubuntu-12.04/c/appindicator/libappindicator-app-indicator.html

The KStatusNotifierItem API docs seem to bear this out, since, unlike 
AppIndicator, it provides a rich API with methods like 
setAssociatedWidget and ordinary signals like activateRequested and 
secondaryActivateRequested alongside the more ordinary setContextMenu 
method and scrollRequested signal.

In fact, given the documentation for setContextMenu and 
setStandardActionsEnabled, it looks like KStatusNotifierItem is designed 
around the idea that most applications will want to bind a window to 
left-click and just let KDE itself auto-generate a context menu with 
actions like "Quit" for the right-click.

Source: 
http://api.kde.org/4.5-api/kdelibs-apidocs/kdeui/html/classKStatusNotifierItem.html

On 13-08-11 06:33 AM, Kevin Krammer wrote:
> On Sunday, 2013-08-11, Stephan Sokolow wrote:
>> On 13-08-10 01:07 PM, Kevin Krammer wrote:
>>> I am not sure how it does it exactly but it definitely does it.
>>> E.g. left clicking the Amarok icon toggles main window visiblity and
>>> Amarok is using KSystemNotifierItem for its tray integration.
>>>
>>> I did a quick code search and it seems this is communicated via a
>>> property on the D-Bus object.  If the property "ItemIsMenu" is true,
>>> left click will call the ContextMenu D-Bus method, otherwise (propery is
>>> false or missing) it will call the Activate D-Bus method.
>>
>> Ok, that's a relief. I checked all of my tray icons and it looks like
>> the developers could implement something comfortably sane with that kind
>> of "one action, but you choose which one" limitation, should they choose
>> to drop the XEmbed implementation.
>
> There are separate calls for "Activate" and "ContextMenu". An application can
> provide both. The host can call Activate on left-click and ContextMenu on
> right-click.
>
>> 1. Pidgin (I don't mind only having "toggle visibility" and the context
>> menu does have a lot of stuff that is used infrequently enough to be
>> only accessed via the main window (eg. shortcuts to the accounts and
>> preferences dialogs), but I can see people complaining about needing an
>> extra click to do things like changing their status to/from Away/Busy/etc.)
>
> Kopete uses both.
>
>> 2. Audacious Media Player (Not everyone uses the global keybindings
>> plugin to toggle main window visibility like I do, I wouldn't want to
>> HAVE to take my hand off the mouse to toggle visibility, and the context
>> menu has useful options like Play/Pause and "quit the damn application
>> so I can re-launch it to get the playlist responding to keystrokes again")
>
> Amarok does both as well.
>
> Just examples of programs I use that offer different functions for different
> mouse button clicks.
>
> Cheers,
> Kevin
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
>
>
>


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Lxde-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxde-list

Reply via email to