[gtk/wip/hadess/disabled-submenu] menusectionbox: Don't force submenu items to be sensitive



commit e9b4ac5006ea1a4d84478765ef2d72fdbe07b7e2
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Feb 21 21:22:59 2019 +0100

    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

 gtk/gtkmenusectionbox.c | 1 -
 1 file changed, 1 deletion(-)
---
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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]