[gtk+/gtk-3-18] Fix method to update menu sensitivity of combo box



commit 09727d7a62009cb535e674402097fb31a0596a99
Author: Adam Reichold <adam reichold t-online de>
Date:   Sun Dec 6 11:30:58 2015 +0100

    Fix method to update menu sensitivity of combo box
    
    After removal of the selectable header and separator from the combo box,
    the method to update the menu sensitivity must be changed as it assumes
    at least two items within each sub menu and contains special handling
    for the separator. Removing this fixes bug #759079.

 gtk/gtkcombobox.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index c9962ba..ab9394e 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -2082,7 +2082,7 @@ update_menu_sensitivity (GtkComboBox *combo_box,
 {
   GtkComboBoxPrivate *priv = combo_box->priv;
   GList *children, *child;
-  GtkWidget *item, *submenu, *separator;
+  GtkWidget *item, *submenu;
   GtkWidget *cell_view;
   gboolean sensitive;
 
@@ -2108,15 +2108,7 @@ update_menu_sensitivity (GtkComboBox *combo_box,
       else
         {
           sensitive = cell_layout_is_sensitive (GTK_CELL_LAYOUT (cell_view));
-
-          if (menu != priv->popup_widget && child == children)
-            {
-              separator = GTK_WIDGET (child->next->data);
-              g_object_set (item, "visible", sensitive, NULL);
-              g_object_set (separator, "visible", sensitive, NULL);
-            }
-          else
-            gtk_widget_set_sensitive (item, sensitive);
+          gtk_widget_set_sensitive (item, sensitive);
         }
     }
 


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