[gtk+] Stop supporting GdkColor in text buffer serialization



commit 35209f098b51e328e500c505851c5e53464b1c5d
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 28 17:04:24 2016 -0400

    Stop supporting GdkColor in text buffer serialization
    
    GdkColor is going away soon.

 gtk/gtktextbufferserialize.c |   45 ------------------------------------------
 1 files changed, 0 insertions(+), 45 deletions(-)
---
diff --git a/gtk/gtktextbufferserialize.c b/gtk/gtktextbufferserialize.c
index 961d809..49ce9b8 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));
@@ -136,45 +130,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 
       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))
     {
       GEnumClass *class = G_ENUM_CLASS (g_type_class_peek (value->g_type));


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