[gtk+] modelbutton: Fix state confusion



commit f7236b261b9d74b311888954349534face432b1c
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Dec 19 21:56:05 2015 -0500

    modelbutton: Fix state confusion
    
    Checked buttons were getting the wrong image.

 gtk/gtkmodelbutton.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 32ef333..5bea5af 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -207,12 +207,12 @@ gtk_model_button_update_state (GtkModelButton *button)
     {
       if (button->active && !button->menu_name)
         {
-          state &= ~GTK_STATE_FLAG_CHECKED;
+          state |= GTK_STATE_FLAG_CHECKED;
           image_type = GTK_CSS_IMAGE_BUILTIN_CHECK_CHECKED;
         }
       else
         {
-          state |= GTK_STATE_FLAG_CHECKED;
+          state &= ~GTK_STATE_FLAG_CHECKED;
           image_type = GTK_CSS_IMAGE_BUILTIN_CHECK;
         }
     }
@@ -220,12 +220,12 @@ gtk_model_button_update_state (GtkModelButton *button)
     {
       if (button->active && !button->menu_name)
         {
-          state &= ~GTK_STATE_FLAG_CHECKED;
+          state |= GTK_STATE_FLAG_CHECKED;
           image_type = GTK_CSS_IMAGE_BUILTIN_OPTION_CHECKED;
         }
       else
         {
-          state |= GTK_STATE_FLAG_CHECKED;
+          state &= ~GTK_STATE_FLAG_CHECKED;
           image_type = GTK_CSS_IMAGE_BUILTIN_OPTION;
         }
     }


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