[gtk+/wip/colorchooser-v2: 75/77] prop-editor: don't use GtkColorButton deprecated API



commit 1831c76b38eff847f46bee30f69a927185d79ac2
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Feb 9 16:23:05 2012 -0500

    prop-editor: don't use GtkColorButton deprecated API

 tests/prop-editor.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/prop-editor.c b/tests/prop-editor.c
index b15e41a..dc284ca 100644
--- a/tests/prop-editor.c
+++ b/tests/prop-editor.c
@@ -666,7 +666,7 @@ rgba_modified (GtkColorButton *cb, gpointer data)
   ObjectProperty *p = data;
   GdkRGBA color;
 
-  gtk_color_button_get_rgba (cb, &color);
+  gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (cb), &color);
 
   if (is_child_property (p->spec))
     {
@@ -692,12 +692,12 @@ rgba_changed (GObject *object, GParamSpec *pspec, gpointer data)
   get_property_value (object, pspec, &val);
 
   color = g_value_get_boxed (&val);
-  gtk_color_button_get_rgba (cb, &cb_color);
+  gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (cb), &cb_color);
 
   if (color != NULL && !gdk_rgba_equal (color, &cb_color))
     {
       block_controller (G_OBJECT (cb));
-      gtk_color_button_set_rgba (cb, color);
+      gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (cb), color);
       unblock_controller (G_OBJECT (cb));
     }
 
@@ -1013,7 +1013,7 @@ property_widget (GObject    *object,
            G_PARAM_SPEC_VALUE_TYPE (spec) == GDK_TYPE_RGBA)
     {
       prop_edit = gtk_color_button_new ();
-      gtk_color_button_set_use_alpha (GTK_COLOR_BUTTON (prop_edit), TRUE);
+      gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER (prop_edit), TRUE);
 
       g_object_connect_property (object, spec,
                                  G_CALLBACK (rgba_changed),



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