[gtk+/rendering-cleanup: 72/75] gtkbuilder: Do not allocate colors when parsing GtkBuilder files



commit d13a388b15b38632c79d850a079ac50f334a6307
Author: Benjamin Otte <otte redhat com>
Date:   Sat Jul 31 12:00:45 2010 +0200

    gtkbuilder: Do not allocate colors when parsing GtkBuilder files

 gtk/gtkbuilder.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index c8918b4..cad61d3 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -1545,12 +1545,10 @@ gtk_builder_value_from_string_type (GtkBuilder   *builder,
     case G_TYPE_BOXED:
       if (G_VALUE_HOLDS (value, GDK_TYPE_COLOR))
         {
-          GdkColor colour = { 0, };
+          GdkColor color = { 0, };
 
-          if (gdk_color_parse (string, &colour) &&
-              gdk_colormap_alloc_color (gtk_widget_get_default_colormap (),
-                                        &colour, FALSE, TRUE))
-            g_value_set_boxed (value, &colour);
+          if (gdk_color_parse (string, &color))
+            g_value_set_boxed (value, &color);
           else
             {
 	      g_set_error (error,



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