Merge lp:~aacid/libdbusmenu/call_set_active_on_menus into lp:libdbusmenu/13.04

Proposed by Albert Astals Cid
Status: Merged
Approved by: Ted Gould
Approved revision: 430
Merged at revision: 429
Proposed branch: lp:~aacid/libdbusmenu/call_set_active_on_menus
Merge into: lp:libdbusmenu/13.04
Diff against target: 18 lines (+8/-0)
1 file modified
libdbusmenu-gtk/parser.c (+8/-0)
To merge this branch: bzr merge lp:~aacid/libdbusmenu/call_set_active_on_menus
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+129851@code.launchpad.net

Commit message

Call gtk_menu_set_active with the position of the activated menu item

Fixes interaction with GtkRecentChooserMenu (bug 752674)

Description of the change

Call gtk_menu_set_active with the position of the activated menu item

Fixes interaction with GtkRecentChooserMenu (bug 752674)

To post a comment you must log in.
430. By Albert Astals Cid

spacing

Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libdbusmenu-gtk/parser.c'
2--- libdbusmenu-gtk/parser.c 2012-09-24 16:06:38 +0000
3+++ libdbusmenu-gtk/parser.c 2012-10-16 11:24:20 +0000
4@@ -1121,6 +1121,14 @@
5
6 if (GTK_IS_MENU_ITEM (child))
7 {
8+ GtkWidget *parent = gtk_widget_get_parent(child);
9+ if (GTK_IS_MENU (parent))
10+ {
11+ gint pos = get_child_position (child);
12+ if (pos >= 0)
13+ gtk_menu_set_active (GTK_MENU(parent), pos);
14+ }
15+
16 gdk_threads_enter ();
17 gtk_menu_item_activate (GTK_MENU_ITEM (child));
18 gdk_threads_leave ();

Subscribers

People subscribed via source and target branches