Use new 2.14 GtkColorSelection API in testgtk

This commit is contained in:
Christian Dywan 2010-04-06 17:45:56 +02:00 committed by Javier Jardón
parent eaf3ccfba0
commit 6536ad7299

View File

@ -5692,24 +5692,25 @@ void
color_selection_ok (GtkWidget *w, color_selection_ok (GtkWidget *w,
GtkColorSelectionDialog *cs) GtkColorSelectionDialog *cs)
{ {
GtkColorSelection *colorsel; GtkWidget *colorsel;
gdouble color[4]; 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_get_current_color (GTK_COLOR_SELECTION (colorsel), &color);
gtk_color_selection_set_color(colorsel,color); gtk_color_selection_set_current_color (GTK_COLOR_SELECTION (colorsel), &color);
} }
void void
color_selection_changed (GtkWidget *w, color_selection_changed (GtkWidget *w,
GtkColorSelectionDialog *cs) GtkColorSelectionDialog *cs)
{ {
GtkColorSelection *colorsel; GtkWidget *colorsel;
gdouble color[4]; 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_get_current_color (GTK_COLOR_SELECTION (colorsel), &color);
gtk_color_selection_set_current_color (GTK_COLOR_SELECTION (colorsel), &color);
} }
#if 0 /* unused */ #if 0 /* unused */