[gtk+/gtk-2-90] Use new 2.14 GtkColorSelection API in testgtk



commit c41d7f5e941da03cb4e434f65958e2cf9df4a435
Author: Christian Dywan <christian twotoasts de>
Date:   Tue Apr 6 17:45:56 2010 +0200

    Use new 2.14 GtkColorSelection API in testgtk

 tests/testgtk.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/tests/testgtk.c b/tests/testgtk.c
index dc65301..26a9a23 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -5692,24 +5692,25 @@ void
 color_selection_ok (GtkWidget               *w,
                     GtkColorSelectionDialog *cs)
 {
-  GtkColorSelection *colorsel;
-  gdouble color[4];
+  GtkWidget *colorsel;
+  GdkColor color;
 
-  colorsel=GTK_COLOR_SELECTION(cs->colorsel);
+  colorsel = gtk_color_selection_dialog_get_color_selection (cs);
 
-  gtk_color_selection_get_color(colorsel,color);
-  gtk_color_selection_set_color(colorsel,color);
+  gtk_color_selection_get_current_color (GTK_COLOR_SELECTION (colorsel), &color);
+  gtk_color_selection_set_current_color (GTK_COLOR_SELECTION (colorsel), &color);
 }
 
 void
 color_selection_changed (GtkWidget *w,
                          GtkColorSelectionDialog *cs)
 {
-  GtkColorSelection *colorsel;
-  gdouble color[4];
+  GtkWidget *colorsel;
+  GdkColor color;
 
-  colorsel=GTK_COLOR_SELECTION(cs->colorsel);
-  gtk_color_selection_get_color(colorsel,color);
+  colorsel = gtk_color_selection_dialog_get_color_selection (cs);
+  gtk_color_selection_get_current_color (GTK_COLOR_SELECTION (colorsel), &color);
+  gtk_color_selection_set_current_color (GTK_COLOR_SELECTION (colorsel), &color);
 }
 
 #if 0 /* unused */



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