Merge lp://staging/~larsu/libindicator/ng-add-scrolling into lp://staging/libindicator/13.10

Proposed by Lars Karlitski
Status: Merged
Approved by: Charles Kerr
Approved revision: 513
Merged at revision: 511
Proposed branch: lp://staging/~larsu/libindicator/ng-add-scrolling
Merge into: lp://staging/libindicator/13.10
Diff against target: 115 lines (+58/-6)
1 file modified
libindicator/indicator-ng.c (+58/-6)
To merge this branch: bzr merge lp://staging/~larsu/libindicator/ng-add-scrolling
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+184567@code.staging.launchpad.net

Commit message

Expose scrolling and middle clicking to fix bug #1221242 and #1204036 (make scrolling and middle clicking work on the sound indicator)

Description of the change

Fixes bug #1221242 and #1204036 (make scrolling and middle clicking work on the sound indicator)

indicator already supported scrolling and secondary actions, but IndicatorNg never exposed them in any way. This patch does that, by supporting two additional attributes on the root menu item:

x-canonical-scroll-action: contains an action name of an action with an int32 parameter. Whenever the user scrolls the mouse wheel over an indicator, the associated action gets activated with the magnitude and direction (< 0 means scrolling down, > 0 means scrolling up).

x-canonical-secondary-action: contains an action name of a parameterless action. That action gets activated on middle clicking the indicator.

Both of these attributes are optional. I plan to document them on http://wiki.ubuntu.com/SystemComponents when everyone thinks they are a good idea (i.e., this gets merged).

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

I like the idea behind this addition to the root menu action dict.

The patch is fine too. If I'm reading the diff right, it even fixes a potential (unlikely) leak we missed before, leaking G_MENU_ATTRIBUTE_ACTION strings that don't begin with "indicator."

looks like a g_message() snuck in by accident. Marking as "needs fixing" for that small issue only -- the rest is great.

review: Needs Fixing
513. By Lars Karlitski

Remove debug message

Revision history for this message
Charles Kerr (charlesk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches