[gtk+] radiobutton: exclude states we set manually from the previous state



commit 9cd4a1b622814fb0a036eedb3e792c337b034586
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Mar 18 15:14:25 2011 -0400

    radiobutton: exclude states we set manually from the previous state
    
    https://bugzilla.gnome.org/show_bug.cgi?id=645172

 gtk/gtkradiobutton.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index 590a085..b080dc2 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -800,7 +800,9 @@ gtk_radio_button_clicked (GtkButton *button)
 
   g_object_ref (GTK_WIDGET (button));
 
-  new_state = gtk_widget_get_state_flags (GTK_WIDGET (button));
+  new_state = gtk_widget_get_state_flags (GTK_WIDGET (button)) &
+    ~(GTK_STATE_FLAG_PRELIGHT |
+      GTK_STATE_FLAG_ACTIVE);
 
   if (gtk_toggle_button_get_active (toggle_button))
     {



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