]> Pileus Git - ~andy/gtk/commitdiff
radiobutton: exclude states we set manually from the previous state
authorCosimo Cecchi <cosimoc@gnome.org>
Fri, 18 Mar 2011 19:14:25 +0000 (15:14 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Fri, 18 Mar 2011 19:16:02 +0000 (15:16 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=645172

gtk/gtkradiobutton.c

index 590a085e5444cb0a32b74198e80e2f2559f07a43..b080dc29f9ade42794f34a477644a31f0ae080d5 100644 (file)
@@ -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))
     {