summaryrefslogtreecommitdiff
path: root/gtk/gtkbuilder.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-07-31 12:00:45 +0200
committerBenjamin Otte <otte@redhat.com>2010-08-10 21:02:30 +0200
commita50843e1603abe4bf68ae830d3e8005e2e117186 (patch)
tree1d7b052b5ba1bd511e29629d5ff7e3944e0a66c2 /gtk/gtkbuilder.c
parent25fc4d97f853b459836a1999a65832697897b728 (diff)
downloadgtk+-a50843e1603abe4bf68ae830d3e8005e2e117186.tar.gz
gtkbuilder: Do not allocate colors when parsing GtkBuilder files
Diffstat (limited to 'gtk/gtkbuilder.c')
-rw-r--r--gtk/gtkbuilder.c8
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,