summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2014-08-20 15:43:09 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-12-14 18:36:42 -0500
commitbd6608036a3bec20abf6ca6b6477f23cea2547f3 (patch)
tree41cb9bbc90383ec8a4f883fe8003ec91ce889440
parent3c745d6f7a8d6544d35b56e7e782192a4bb68666 (diff)
downloadgtk+-bd6608036a3bec20abf6ca6b6477f23cea2547f3.tar.gz
GtkMenuTrackerItem: fix submenu visibility flag
We were only properly setting the "is-visible" flag to TRUE for menu items with associated actions and not (for example) on submenus. This was fine because the code for building GtkMenus from models (correctly) assumed that submenus should always be visible and never checked the property. This is not true for the Mac OS code, which actually checked the property and found it to be false for submenus. Initialise the property to TRUE so that we get the correct value reported for items that don't have actions. https://bugzilla.gnome.org/show_bug.cgi?id=735122
-rw-r--r--gtk/gtkmenutrackeritem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkmenutrackeritem.c b/gtk/gtkmenutrackeritem.c
index 56b914f428..a815d330c4 100644
--- a/gtk/gtkmenutrackeritem.c
+++ b/gtk/gtkmenutrackeritem.c
@@ -556,7 +556,10 @@ _gtk_menu_tracker_item_new (GtkActionObservable *observable,
g_variant_unref (state);
}
else
- self->sensitive = TRUE;
+ {
+ gtk_menu_tracker_item_update_visibility (self);
+ self->sensitive = TRUE;
+ }
return self;
}