Secondary activate (i.e. middle click) support for indicators advanced usage
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Application Indicators |
Fix Released
|
Undecided
|
Marco Trevisan (Treviño) | ||
| Unity |
Fix Released
|
Undecided
|
Marco Trevisan (Treviño) | ||
| libappindicator |
Fix Released
|
Undecided
|
Marco Trevisan (Treviño) | ||
| libindicator |
Fix Released
|
Undecided
|
Marco Trevisan (Treviño) | ||
| unity-2d |
Fix Released
|
Undecided
|
Marco Trevisan (Treviño) | ||
| unity (Ubuntu) |
Fix Released
|
Undecided
|
Marco Trevisan (Treviño) | ||
| unity-2d (Ubuntu) |
Fix Released
|
Undecided
|
Marco Trevisan (Treviño) | ||
Bug Description
As partly discussed in the UDS-O Blueprint "Desktop DX Indicators Review", as defined by the StatusNotifierItem specifications [1], and as requested by indicator-sound bug #609860 indicators need to support a secondary_activate signal, that can be fired by middle-click to perform advanced operations.
So, I've made some branches for the affected projects to get this implemented both in unity and unity-2d:
* libindicator: added the "secondary-
* unity (unityshell and unity-panel-
* unity-2d (unity-2d-panel): like unity.
/* OLD DESCRIPTION */
Now, these changes are just needed for "standard" indicators, which directly uses libindicator. For the userland indicators, there are more things to consider... In fact as already discussed in ayatana list, we should avoid that developers would use the secondary-activate event to perform actions that can't be done otherwise using standard menu items (as not all the platforms can do middle-click and not all users would use it anyway). The problem is that for libappindicator could be quite complicated to check if the event associated to the secondary-activate signal can be done via another menuitem, especially when using complex menu-items (like the one based on ido); so I guess that we can only fallback to the developers responsibilities.
The only thing I've done to limit then is to provide a documentation for the AppIndicator:
From the other side, an advanced way to quickly control some operations is often needed by advanced users (that I guess are the most part of the ubuntu userland) and, as already said, is also required by the StatusNotifierItem specifications [1].
Of course, while in the official ubuntu indicators we must always guarantee that a secondary-activate is used only to perform operations that can be also done via menu items, we can't control how this API will be used by all the external developers. By the way in my opinion, not to implement features because someone could use them in a bad way is not the right decision, since it will limit too much who wants to use it in the right way.
Plus, some ideas about possible implementations of this feature for third-party indicators where provided by comunity also on this etherpad [3].
However, the code to get the secondary-event support in libappindicator
* indicator-
* libappindicator: emits a "secondary-
/* NEW DESCRIPTION */
The libappindicator code now contains a new API:
* app_indicator_
With it, an appindicator writer can simply define a new GtkWidget that will be activated when a secondary activation will occur.
The GtkWidget must be a sensitive and visible inner child of the appindicator MenuItem. When a middle-click is done over the appindicator, if the linked menu-item is visible and sensitive then it's directly activated.
Speaking of the affected indicators, I've already done the work for indicator-sound in bug #609860, and for indicator-messaging in lp:~3v1n0/indicator-messages/clear-notifications-on-secondary-activate (also if this maybe would need more work, and support by libindicate to be discussed in a separated bug).
[1] http://
[2] https:/
[3] http://
Related branches
- Aurélien Gâteau (community): Disapprove
-
Diff: 123 lines (+44/-11) 3 files modifiedapilibunity-2d-private/Unity2d/CMakeLists.txt (+1/-1)
panel/applets/CMakeLists.txt (+3/-3)
panel/applets/indicator/indicator.c (+40/-7)
- Mirco Müller (community): Approve
-
Diff: 290 lines (+91/-6) 12 files modifiedapiUnityCore/DBusIndicators.cpp (+16/-0)
UnityCore/DBusIndicators.h (+2/-0)
UnityCore/Indicator.cpp (+7/-0)
UnityCore/Indicator.h (+2/-0)
UnityCore/IndicatorEntry.cpp (+5/-0)
UnityCore/IndicatorEntry.h (+2/-0)
UnityCore/Indicators.cpp (+1/-0)
UnityCore/Indicators.h (+2/-0)
plugins/unityshell/src/PanelIndicatorObjectEntryView.cpp (+19/-4)
services/panel-main.c (+16/-0)
services/panel-service.c (+15/-2)
services/panel-service.h (+4/-0)
- Indicator Applet Developers: Pending requested
-
Diff: 186 lines (+78/-21) 3 files modifiedapisrc/application-service-appstore.c (+41/-16)
src/application-service.xml (+5/-0)
src/indicator-application.c (+32/-5)
- Indicator Applet Developers: Pending requested
-
Diff: 94 lines (+27/-3) 3 files modifiedapilibindicator/indicator-object-marshal.list (+1/-0)
libindicator/indicator-object.c (+22/-2)
libindicator/indicator-object.h (+4/-1)
- Ted Gould (community): Approve
- Indicator Applet Developers: Pending requested
-
Diff: 590 lines (+232/-64) 8 files modifiedapibindings/mono/examples/IndicatorExample.cs (+8/-1)
bindings/vala/examples/indicator-example.vala (+3/-2)
example/simple-client-vala.vala (+12/-1)
example/simple-client.c (+55/-54)
src/app-indicator.c (+146/-6)
src/app-indicator.h (+3/-0)
src/application-service-marshal.list (+1/-0)
src/notification-item.xml (+4/-0)
- Florian Boucault (community): Approve
-
Diff: 27 lines (+7/-3) 1 file modifiedapipanel/applets/common/indicatorentrywidget.cpp (+7/-3)
Marco, why is this marked as "Fix Committed" for Unity? It is still in the merge-proposal queue and not in unity trunk yet.
My reply is here: https:/
This bug was fixed in the package unity - 4.6.0-0ubuntu1
---------------
unity (4.6.0-0ubuntu1) oneiric; urgency=low
* New upstream release.
- compiz crashed with SIGSEGV in __strlen_sse2() (LP: #814619)
- PlacesHomeView:
- PluginAdapter:
- Launcher - Make Launcher left of screen reveal more responsive and less
prone to false positives (LP: #765819)
- Launcher - clicking on a App launcher icon incorrectly un-minimizes
windows (LP: #783434)
- Unity doesn't get any mouse wheel scroll event in Indicators InputArea
(LP: #814574)
- Unity launcher gets cluttered when having multiple partitions and/or
external volumes attached (LP: #713423)
- Unity panel menus and indicators slow to respond. Too much lag.
(LP: #742664)
- In Unity the distinction between GVolume, GDrive and GMount is a bit
confusing. (LP: #799890)
- Launcher - When a item is deleted by dragging to Trash, the trash should
pulse once before the Launcher disappears (LP: #750311)
- ccsm needs an option to change launcher opacity (LP: #815032)
- add a ccsm option to hide volumes in launcher (LP: #794707)
- scale plugin doesn't work as desired when "Click Desktop To Show
Desktop" is true (LP: #810315)
- mute/unmute sound when user clicks on sound applet using scroll button
or middle mouse button (LP: #609860)
- Secondary activate (i.e. middle click) support for indicators advanced
usage (LP: #812933)
* debian/control:
- dep on latest libunity-misc
- dep on latest nux
- add build-dep on libgnome-
* debian/rules:
- bump libunity-core-4.0-4 shlib for ABI break
- don't ship unity dialogs right now. Not ready for alpha quality
* distro-patch the grey to darker grey (until the blur is done in nux)
* Switch to dpkg-source 3.0 (quilt) format
* debian/
- revert a removed API making unity-2d not building
-- Didier Roche <email address hidden> 2011年8月01日 19:53:15 +0200
This bug was fixed in the package unity-2d - 4.0.0-0ubuntu1
---------------
unity-2d (4.0.0-0ubuntu1) oneiric; urgency=low
* New upstream release:
- [launcher] Impossible to keep KDE Apps in Launcher (LP: #741129)
- [dash] Background should be blurred (LP: #823326)
- No 'safely remove' option is present in the unity menu when a usb disk
is inserted (LP: #660010)
- Quicklist item "Keep In Launcher" should be "Keep in launcher" as design
(LP: #795422)
- [launcher] ESC doesn't dismiss launcher when activated with Alt+F1
(LP: #812792)
- [dash] Background wallpaper shifted when using a non compositing window
manager (LP: #823295)
- [launcher] Bottom gradient appears too early (LP: #823877)
- mute/unmute sound when user clicks on sound applet using scroll button
or middle mouse button (LP: #609860)
- Secondary activate (i.e. middle click) support for indicators advanced
usage (LP: #812933)
- Unused GConfItemQmlWrapper dep found (LP: #821880)
* debian/control:
- bump libunity-
- recommends lenses and not places anymore. Adding music lens
-- Didier Roche <email address hidden> 2011年8月11日 21:22:18 +0200