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 modifiedlibunity-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 modifiedUnityCore/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 modifiedsrc/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 modifiedlibindicator/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 modifiedbindings/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 modifiedpanel/applets/common/indicatorentrywidget.cpp (+7/-3)
Changed in libindicator: | |
status: | New → Fix Committed |
assignee: | nobody → Treviño (Marco Trevisan) (3v1n0) |
Changed in unity: | |
assignee: | nobody → Treviño (Marco Trevisan) (3v1n0) |
status: | New → Fix Committed |
Changed in libappindicator: | |
assignee: | nobody → Treviño (Marco Trevisan) (3v1n0) |
status: | New → Fix Committed |
Changed in unity-2d: | |
status: | New → Fix Committed |
assignee: | nobody → Treviño (Marco Trevisan) (3v1n0) |
Changed in indicator-application: | |
status: | New → Fix Committed |
assignee: | nobody → Treviño (Marco Trevisan) (3v1n0) |
Changed in unity (Ubuntu): | |
status: | New → Fix Committed |
assignee: | nobody → Treviño (Marco Trevisan) (3v1n0) |
description: | updated |
Changed in unity-2d (Ubuntu): | |
status: | New → Fix Committed |
Changed in unity-2d (Ubuntu): | |
assignee: | nobody → Treviño (Marco Trevisan) (3v1n0) |
Changed in unity-2d: | |
status: | Fix Committed → In Progress |
Changed in indicator-application: | |
status: | Fix Committed → In Progress |
Changed in libappindicator: | |
status: | Fix Committed → In Progress |
Changed in libindicator: | |
status: | Fix Committed → In Progress |
Changed in unity: | |
status: | Fix Committed → In Progress |
Changed in unity-2d (Ubuntu): | |
status: | Fix Committed → In Progress |
Changed in unity (Ubuntu): | |
status: | Fix Committed → In Progress |
Changed in libindicator: | |
status: | In Progress → Fix Committed |
Changed in libindicator: | |
milestone: | none → 0.3.92 |
status: | Fix Committed → Fix Released |
Changed in libappindicator: | |
status: | In Progress → Fix Committed |
milestone: | none → 0.3.91 |
Changed in indicator-application: | |
status: | In Progress → Fix Committed |
milestone: | none → 0.3.92 |
Changed in unity: | |
milestone: | none → 4.6.0 |
status: | In Progress → Fix Committed |
Changed in unity: | |
status: | Fix Committed → Fix Released |
Changed in unity-2d: | |
milestone: | none → 3.8.16 |
status: | In Progress → Fix Committed |
Changed in unity-2d (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in unity-2d: | |
status: | Fix Committed → Fix Released |
Changed in libappindicator: | |
status: | Fix Committed → Fix Released |
Changed in indicator-application: | |
status: | Fix Committed → Fix Released |
Changed in unity-2d: | |
status: | Fix Released → Fix Committed |
Changed in unity-2d: | |
status: | Fix Committed → Fix Released |
Marco, why is this marked as "Fix Committed" for Unity? It is still in the merge-proposal queue and not in unity trunk yet.