[gtk+] Do not unset sensitivity mistakenly in gtk_widget_set_state_flags()



commit 0c7772f0cf39b2f09ddc55e0d8134c437d87004e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Jan 23 18:21:32 2011 +0100

    Do not unset sensitivity mistakenly in gtk_widget_set_state_flags()
    
    together with commit 8903615a34, this finally fixes bug #640282.
    Insensitivity is handled separatedly in _gtk_widget_update_state_flags(),
    but the insensitive flag is mistakenly unset afterwards if clear is TRUE
    in gtk_widget_set_state_flags().

 gtk/gtkwidget.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index c195089..7090dc6 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -6969,7 +6969,8 @@ _gtk_widget_update_state_flags (GtkWidget     *widget,
     gtk_widget_set_sensitive (widget,
                               operation != STATE_CHANGE_UNSET);
 
-  flags &= ~(GTK_STATE_FLAG_INSENSITIVE);
+  if (operation != STATE_CHANGE_REPLACE)
+    flags &= ~(GTK_STATE_FLAG_INSENSITIVE);
 
   /* Focused state is meant to be set only on the widget
    * being changed itself, not on the children */



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