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



commit 89b48286f8a3ab3ea42395d75a5275de969fdb1e
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]