[gtk+] Revert "tests: use GdkRGBA instead GdkColor"



commit 28311514053a3dfba5531297649923095b79eb66
Author: Christian Persch <chpe gnome org>
Date:   Mon Nov 21 14:03:01 2011 +0100

    Revert "tests: use GdkRGBA instead GdkColor"
    
    This reverts commit 85747da97238dc101f92cd8241aa7aea44f35789.
    
    Conflicts:
    
    	tests/prop-editor.c
    
    Bug #664467.

 tests/prop-editor.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/tests/prop-editor.c b/tests/prop-editor.c
index 22a6c89..de996fd 100644
--- a/tests/prop-editor.c
+++ b/tests/prop-editor.c
@@ -664,9 +664,9 @@ static void
 color_modified (GtkColorButton *cb, gpointer data)
 {
   ObjectProperty *p = data;
-  GdkRGBA rgba;
+  GdkColor color;
 
-  gtk_color_button_get_rgba (cb, &rgba);
+  gtk_color_button_get_color (cb, &color);
 
   if (is_child_property (p->spec))
     {
@@ -674,10 +674,10 @@ color_modified (GtkColorButton *cb, gpointer data)
       GtkWidget *parent = gtk_widget_get_parent (widget);
 
       gtk_container_child_set (GTK_CONTAINER (parent),
-                               widget, p->spec->name, &rgba, NULL);
+			       widget, p->spec->name, &color, NULL);
     }
   else
-    g_object_set (p->obj, p->spec->name, &rgba, NULL);
+    g_object_set (p->obj, p->spec->name, &color, NULL);
 }
 
 static void
@@ -685,19 +685,19 @@ color_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
   GtkColorButton *cb = GTK_COLOR_BUTTON (data);
   GValue val = G_VALUE_INIT;
-  GdkRGBA *color;
-  GdkRGBA cb_color;
+  GdkColor *color;
+  GdkColor cb_color;
 
-  g_value_init (&val, GDK_TYPE_RGBA);
+  g_value_init (&val, GDK_TYPE_COLOR);
   get_property_value (object, pspec, &val);
 
   color = g_value_get_boxed (&val);
-  gtk_color_button_get_rgba (cb, &cb_color);
+  gtk_color_button_get_color (cb, &cb_color);
 
-  if (color != NULL && !gdk_rgba_equal (color, &cb_color))
+  if (color != NULL && !gdk_color_equal (color, &cb_color))
     {
       block_controller (G_OBJECT (cb));
-      gtk_color_button_set_rgba (cb, color);
+      gtk_color_button_set_color (cb, color);
       unblock_controller (G_OBJECT (cb));
     }
 



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