From 61407c6935ecd5730d4d7bef6034ae493e778367 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Fri, 24 Jul 2015 22:18:26 +0200 Subject: [PATCH] [glib] Remove code for no longer supported gtk versions https://bugs.freedesktop.org/show_bug.cgi?id=88788 --- glib/demo/annots.c | 8 -------- glib/demo/selections.c | 16 ---------------- 2 files changed, 24 deletions(-) diff --git a/glib/demo/annots.c b/glib/demo/annots.c index 13f1bc8..7f2e861 100644 --- a/glib/demo/annots.c +++ b/glib/demo/annots.c @@ -458,11 +458,7 @@ pgd_annot_color_changed (GtkButton *button, GParamSpec *pspec, PgdAnnotsDemo *demo) { -#if GTK_CHECK_VERSION(3,4,0) gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (button), &demo->annot_color); -#else - gtk_color_button_get_rgba (GTK_COLOR_BUTTON (button), &demo->annot_color); -#endif } static void @@ -1336,11 +1332,7 @@ pgd_annots_create_widget (PopplerDocument *document) button = gtk_color_button_new (); demo->annot_color.red = 65535; demo->annot_color.alpha = 1.0; -#if GTK_CHECK_VERSION(3,4,0) gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (button), &demo->annot_color); -#else - gtk_color_button_set_rgba (GTK_COLOR_BUTTON (button), &demo->annot_color); -#endif g_signal_connect (button, "notify::color", G_CALLBACK (pgd_annot_color_changed), (gpointer)demo); diff --git a/glib/demo/selections.c b/glib/demo/selections.c index 567a880..dc6c672 100644 --- a/glib/demo/selections.c +++ b/glib/demo/selections.c @@ -336,17 +336,9 @@ pgd_selections_drawing_area_realize (GtkWidget *area, g_object_set (area, "has-tooltip", TRUE, NULL); gtk_style_context_get_color (style_context, GTK_STATE_FLAG_SELECTED, &rgba); -#if GTK_CHECK_VERSION(3,4,0) gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (demo->fg_color_button), &rgba); -#else - gtk_color_button_set_rgba (GTK_COLOR_BUTTON (demo->fg_color_button), &rgba); -#endif gtk_style_context_get_background_color (style_context, GTK_STATE_FLAG_SELECTED, &rgba); -#if GTK_CHECK_VERSION(3,4,0) gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (demo->bg_color_button), &rgba); -#else - gtk_color_button_set_rgba (GTK_COLOR_BUTTON (demo->bg_color_button), &rgba); -#endif } static gboolean @@ -465,11 +457,7 @@ pgd_selections_fg_color_changed (GtkColorButton *button, { GdkRGBA color; -#if GTK_CHECK_VERSION(3,4,0) gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (button), &color); -#else - gtk_color_button_get_rgba (GTK_COLOR_BUTTON (button), &color); -#endif demo->glyph_color.red = CLAMP ((guint) (color.red * 65535), 0, 65535); demo->glyph_color.green = CLAMP ((guint) (color.green * 65535), 0, 65535); demo->glyph_color.blue = CLAMP ((guint) (color.blue * 65535), 0, 65535); @@ -482,11 +470,7 @@ pgd_selections_bg_color_changed (GtkColorButton *button, { GdkRGBA color; -#if GTK_CHECK_VERSION(3,4,0) gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (button), &color); -#else - gtk_color_button_get_rgba (GTK_COLOR_BUTTON (button), &color); -#endif demo->background_color.red = CLAMP ((guint) (color.red * 65535), 0, 65535); demo->background_color.green = CLAMP ((guint) (color.green * 65535), 0, 65535); demo->background_color.blue = CLAMP ((guint) (color.blue * 65535), 0, 65535); -- 2.1.4