diff options
author | Benjamin Otte <otte@redhat.com> | 2010-07-31 12:00:45 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-08-10 21:02:30 +0200 |
commit | a50843e1603abe4bf68ae830d3e8005e2e117186 (patch) | |
tree | 1d7b052b5ba1bd511e29629d5ff7e3944e0a66c2 /gtk/gtkbuilder.c | |
parent | 25fc4d97f853b459836a1999a65832697897b728 (diff) | |
download | gtk+-a50843e1603abe4bf68ae830d3e8005e2e117186.tar.gz |
gtkbuilder: Do not allocate colors when parsing GtkBuilder files
Diffstat (limited to 'gtk/gtkbuilder.c')
-rw-r--r-- | gtk/gtkbuilder.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index c8918b4d13..cad61d36ac 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, |