[gtk+/wip/baedert/drawing: 174/183] inspector: Fix togglebutton/checkbutton API mixup



commit d1476e43f6e3ec0f78f0d049812eaa42788f9010
Author: Timm Bäder <mail baedert org>
Date:   Mon May 15 23:10:55 2017 +0200

    inspector: Fix togglebutton/checkbutton API mixup

 gtk/inspector/prop-editor.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c
index c963a8d..69c2315 100644
--- a/gtk/inspector/prop-editor.c
+++ b/gtk/inspector/prop-editor.c
@@ -503,7 +503,7 @@ enum_modified (GtkToggleButton *button, ObjectProperty *p)
   GEnumClass *eclass;
   GValue val = G_VALUE_INIT;
 
-  if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
+  if (!gtk_check_button_get_active (GTK_CHECK_BUTTON (button)))
     return;
 
   eclass = G_ENUM_CLASS (g_type_class_peek (p->spec->value_type));
@@ -549,7 +549,7 @@ enum_changed (GObject *object, GParamSpec *pspec, gpointer data)
   for (c = children, j = 0; c; c = c->next, j++)
     {
       if (j == i)
-        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (c->data), TRUE);
+        gtk_check_button_set_active (GTK_CHECK_BUTTON (c->data), TRUE);
     }
 
   for (c = children; c; c = c->next)
@@ -565,7 +565,7 @@ flags_modified (GtkCheckButton *button, ObjectProperty *p)
   gint i;
   GValue val = G_VALUE_INIT;
 
-  active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+  active = gtk_check_button_get_active (GTK_CHECK_BUTTON (button));
   i = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "index"));
   fclass = G_FLAGS_CLASS (g_type_class_peek (p->spec->value_type));
 
@@ -607,8 +607,8 @@ flags_changed (GObject *object, GParamSpec *pspec, gpointer data)
     block_controller (G_OBJECT (c->data));
 
   for (c = children, i = 0; c; c = c->next, i++)
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (c->data),
-                                  (fclass->values[i].value & flags) != 0);
+    gtk_check_button_set_active (GTK_CHECK_BUTTON (c->data),
+                                 (fclass->values[i].value & flags) != 0);
 
   for (c = children; c; c = c->next)
     unblock_controller (G_OBJECT (c->data));


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