Secondary activate (i.e. middle click) support for indicators advanced usage

Reported by Marco Trevisan (Treviño) on 2011-07-19
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Application Indicators
Undecided
Marco Trevisan (Treviño)
Unity
Undecided
Marco Trevisan (Treviño)
libappindicator
Undecided
Marco Trevisan (Treviño)
libindicator
Undecided
Marco Trevisan (Treviño)
unity-2d
Undecided
Marco Trevisan (Treviño)
unity-2d (Ubuntu)
Undecided
Marco Trevisan (Treviño)
unity (Ubuntu)
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-activate" signal support.
 * unity (unityshell and unity-panel-service): catches a middle-click release over an
          indicator, and emits the secondary-activate signal (via the panel service)
 * 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::secondary-activate, stating how developers should safely use it.

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-based indicators is available in my branches too:

 * indicator-application: redirects the libindicator secondary-activate event to the
                          called indicator via the standard "SecondaryActivate".
 * libappindicator: emits a "secondary-activate" signal to the application using this
                    event.

/* NEW DESCRIPTION */
The libappindicator code now contains a new API:
 * app_indicator_set_secondary_activate_target

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://www.notmart.org/misc/statusnotifieritem/statusnotifieritem.html#SecondaryActivate
[2] https://lists.launchpad.net/ayatana/msg01230.html
[3] http://piratepad.net/WepMYIaQbx

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
Didier Roche (didrocks) on 2011-07-20
Changed in unity-2d (Ubuntu):
status: New → Fix Committed
Changed in unity-2d (Ubuntu):
assignee: nobody → Treviño (Marco Trevisan) (3v1n0)
Mirco Müller (macslow) wrote :

Marco, why is this marked as "Fix Committed" for Unity? It is still in the merge-proposal queue and not in unity trunk yet.

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
Ted Gould (ted) on 2011-07-21
Changed in libindicator:
milestone: none → 0.3.92
status: Fix Committed → Fix Released
Ted Gould (ted) on 2011-07-22
Changed in libappindicator:
status: In Progress → Fix Committed
milestone: none → 0.3.91
Ted Gould (ted) on 2011-07-22
Changed in indicator-application:
status: In Progress → Fix Committed
milestone: none → 0.3.92
Neil J. Patel (njpatel) on 2011-08-01
Changed in unity:
milestone: none → 4.6.0
status: In Progress → Fix Committed
Didier Roche (didrocks) on 2011-08-01
Changed in unity:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

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::PlacesHomeView leaks memory (LP: #818450)
    - PluginAdapter::MaximizeIfBigEnough leaks memory (LP: #818477)
    - 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-desktop-3-dev
  * 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/patches/01_revert_removed_function_for_unity2d_to_build.patch:
    - revert a removed API making unity-2d not building
 -- Didier Roche <email address hidden> Mon, 01 Aug 2011 19:53:15 +0200

Changed in unity (Ubuntu):
status: In Progress → 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
Didier Roche (didrocks) on 2011-08-11
Changed in unity-2d:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

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-core-4.0-dev, libnux-1.0-dev
    - recommends lenses and not places anymore. Adding music lens
 -- Didier Roche <email address hidden> Thu, 11 Aug 2011 21:22:18 +0200

Changed in unity-2d (Ubuntu):
status: Fix Committed → Fix Released
Ted Gould (ted) on 2011-08-11
Changed in libappindicator:
status: Fix Committed → Fix Released
Ted Gould (ted) on 2011-08-11
Changed in indicator-application:
status: Fix Committed → Fix Released
Changed in unity-2d:
status: Fix Released → Fix Committed
Gerry Boland (gerboland) on 2011-11-14
Changed in unity-2d:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints