From 35209f098b51e328e500c505851c5e53464b1c5d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 28 Oct 2016 17:04:24 -0400 Subject: [PATCH] Stop supporting GdkColor in text buffer serialization GdkColor is going away soon. --- gtk/gtktextbufferserialize.c | 45 ------------------------------------ 1 file changed, 45 deletions(-) diff --git a/gtk/gtktextbufferserialize.c b/gtk/gtktextbufferserialize.c index 961d809c34..49ce9b8905 100644 --- a/gtk/gtktextbufferserialize.c +++ b/gtk/gtktextbufferserialize.c @@ -64,12 +64,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS return tmp; } - else if (value->g_type == GDK_TYPE_COLOR) - { - GdkColor *color = g_value_get_boxed (value); - - return g_strdup_printf ("%x:%x:%x", color->red, color->green, color->blue); - } else { g_warning ("Type %s is not serializable", g_type_name (value->g_type)); @@ -134,45 +128,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_value_set_double (value, v); - return TRUE; - } - else if (value->g_type == GDK_TYPE_COLOR) - { - GdkColor color; - const gchar *old; - gchar *tmp; - - old = str; - tmp = NULL; - errno = 0; - color.red = g_ascii_strtoll (old, &tmp, 16); - - if (errno || tmp == old) - return FALSE; - - old = tmp; - if (*old++ != ':') - return FALSE; - - tmp = NULL; - errno = 0; - color.green = g_ascii_strtoll (old, &tmp, 16); - if (errno || tmp == old) - return FALSE; - - old = tmp; - if (*old++ != ':') - return FALSE; - - tmp = NULL; - errno = 0; - color.blue = g_ascii_strtoll (old, &tmp, 16); - - if (errno || tmp == old || *tmp != '\0') - return FALSE; - - g_value_set_boxed (value, &color); - return TRUE; } else if (G_VALUE_HOLDS_ENUM (value))