From f7236b261b9d74b311888954349534face432b1c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 19 Dec 2015 21:56:05 -0500 Subject: [PATCH] modelbutton: Fix state confusion Checked buttons were getting the wrong image. --- gtk/gtkmodelbutton.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c index 32ef333abf..5bea5af8a1 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; } }