Compare commits

...

1 Commits

Author SHA1 Message Date
Bastien Nocera
e9b4ac5006 menusectionbox: Don't force submenu items to be sensitive
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
2019-02-21 22:03:30 +01:00

View File

@@ -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);