Merge lp:~desrt/appmenu-gtk/ignore-gtkmodelmenu into lp:appmenu-gtk/12.10

Proposed by Allison Karlitskaya
Status: Merged
Approved by: Charles Kerr
Approved revision: 157
Merged at revision: 157
Proposed branch: lp:~desrt/appmenu-gtk/ignore-gtkmodelmenu
Merge into: lp:appmenu-gtk/12.10
Diff against target: 24 lines (+8/-0)
1 file modified
src/bridge.c (+8/-0)
To merge this branch: bzr merge lp:~desrt/appmenu-gtk/ignore-gtkmodelmenu
Reviewer Review Type Date Requested Status
jenkins (community) continuous-integration Approve
Ted Gould (community) Approve
Review via email: mp+124947@code.launchpad.net

Commit message

Ignore menus from gtkmodelmenu, in two ways:

    - if we notice a GtkMenuShell from a gtkmodelmenu then don't try to
      monitor its toplevel

    - when searching for menubars inside of toplevels, ignore ones created
      by gtkmodelmenu

Description of the change

  Ignore menus from gtkmodelmenu, in two ways:

    - if we notice a GtkMenuShell from a gtkmodelmenu then don't try to
      monitor its toplevel

    - when searching for menubars inside of toplevels, ignore ones created
      by gtkmodelmenu

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) :
review: Approve
Revision history for this message
jenkins (martin-mrazik+qa) wrote :

FAILED: Autolanding.
No commit message was specified.
http://jenkins.qa.ubuntu.com/job/appmenu-gtk-autolanding/6/

review: Needs Fixing (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Copying description to commit message to trigger autolanding

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/bridge.c'
2--- src/bridge.c 2012-08-22 06:56:22 +0000
3+++ src/bridge.c 2012-09-18 14:59:19 +0000
4@@ -585,6 +585,10 @@
5 find_menu_bar (GtkWidget * widget)
6 {
7 if (GTK_IS_MENU_BAR(widget) || GTK_IS_MENU_ITEM(widget)) {
8+ /* If this is from gtkmodelmenu ignore it */
9+ if (g_object_get_data (G_OBJECT (widget), "gtk-model-menu-binding"))
10+ return NULL;
11+
12 return dbusmenu_gtk_parse_menu_structure(widget);
13 }
14
15@@ -839,6 +843,10 @@
16 AppMenuBridge *bridge;
17 GtkWidget *toplevel = NULL;
18
19+ /* If this is from gtkmodelmenu, don't bother... */
20+ if (g_object_get_data (G_OBJECT (parent), "gtk-model-menu-binding"))
21+ return;
22+
23 if (GTK_IS_TEAROFF_MENU_ITEM (child))
24 return;
25

Subscribers

People subscribed via source and target branches