summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2019-02-21 21:22:59 +0100
committerBastien Nocera <hadess@hadess.net>2019-02-21 22:03:30 +0100
commite9b4ac5006ea1a4d84478765ef2d72fdbe07b7e2 (patch)
tree3d83c4f25517a29d152f5b095350d15f6ffd6d0d
parent736dbfef42681864dfecbb72baf1d0f6fa2d3bb8 (diff)
downloadgtk+-wip/hadess/disabled-submenu.tar.gz
menusectionbox: Don't force submenu items to be sensitivewip/hadess/disabled-submenu
When the widget for the submenu ("List of things here >") is created from a GtkMenuTrackerItem, don't bind the "sensitive" property, as there is no way to change the GtkMenuTrackerItem's sensitivity from its default set in _gtk_menu_tracker_item_new(). We want to be able to change the widget's appearance and sensitivity based on the presence or absence of items inside the submenu, something easily done in the application, but we need to be able to change the sensitivity without it being changed again by the property binding. See: https://bugzilla.gnome.org/show_bug.cgi?id=171424 for the GtkUIManager version of that bug
-rw-r--r--gtk/gtkmenusectionbox.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/gtk/gtkmenusectionbox.c b/gtk/gtkmenusectionbox.c
index b790825a64..b590f6db88 100644
--- a/gtk/gtkmenusectionbox.c
+++ b/gtk/gtkmenusectionbox.c
@@ -297,7 +297,6 @@ gtk_menu_section_box_insert_func (GtkMenuTrackerItem *item,
NULL);
g_object_bind_property (item, "label", widget, "text", G_BINDING_SYNC_CREATE);
g_object_bind_property (item, "icon", widget, "icon", G_BINDING_SYNC_CREATE);
- g_object_bind_property (item, "sensitive", widget, "sensitive", G_BINDING_SYNC_CREATE);
get_ancestors (GTK_WIDGET (box->toplevel), GTK_TYPE_STACK, &stack, &parent);
gtk_container_child_get (GTK_CONTAINER (stack), parent, "name", &name, NULL);