Merge lp://qastaging/~a-j-buxton/libdbusmenu/gtk2signalfix into lp://qastaging/libdbusmenu/14.04

Proposed by Alistair Buxton
Status: Merged
Approved by: Ted Gould
Approved revision: 462
Merged at revision: 462
Proposed branch: lp://qastaging/~a-j-buxton/libdbusmenu/gtk2signalfix
Merge into: lp://qastaging/libdbusmenu/14.04
Diff against target: 35 lines (+0/-8)
1 file modified
libdbusmenu-gtk/parser.c (+0/-8)
To merge this branch: bzr merge lp://qastaging/~a-j-buxton/libdbusmenu/gtk2signalfix
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Ted Gould (community) Approve
Review via email: mp+193690@code.qastaging.launchpad.net

Commit message

Use "insert" signal instead of "child-added" (LP: #1203888)

In recent Gtk+2 versions, the "insert" signal has been backported from
Gtk+3. This replaces the "child-added" signal, which was carried in an
Ubuntu-specific patch and was dropped in Saucy.

Description of the change

This change removes the special case logic for "insert"/"child-added" since it is no longer needed on current Gtk2.

The full details are in https://bugs.launchpad.net/ubuntu/+source/glipper/+bug/1203888

For a test case see https://bugs.launchpad.net/libdbusmenu/+bug/1203888/comments/8

If libdbusmenu is broken, you will only see "One" in the appindicator menu, and the warning about "child-added". If it is working you will see "One" and "Two".

The tl;dr version:

 * libdbusmenu needed to know when items were added to a GtkMenu. There was no signal for this in Gtk2, so Ubuntu invented one called "child-added" and carried it in a patch called 072_indicator_menu_update.patch:
https://build.opensuse.org/package/view_file/GNOME:Ayatana/gtk2/072_indicator_menu_update.patch?rev=1f0c7b36faaa82554bb480026061409c

 * Gtk3 came out, and it had a signal for this purpose called "insert", so libdbusmenu was patched with a piece of logic to detect Gtk2/3 and use the appropriate signal name:
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/libdbusmenu/trusty/view/head:/libdbusmenu-gtk/parser.c#L434

 * Later, the "insert" signal was backported to Gtk2:
https://git.gnome.org/browse/gtk+/commit/?h=gtk-2-24&id=5ada51d3c7d3b476d954c4fdddb4895c3de00220

 * The Ubuntu "child-added" patch was subsequently dropped in Saucy, but libdbusmenu was not updated to use the "insert" signal with Gtk2.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Cool. Great investigation!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

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