diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-02-20 09:46:42 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-02-20 09:49:04 -0500 |
commit | 1fb88120824d2fd21b3d073462a5eaaee43542f9 (patch) | |
tree | 4bfbbdb6abbfb06157bfd6c3c5f85695e36ec6c9 /modules/other | |
parent | 5e5f232e789c55af7500588ccee12b58ef124b9c (diff) | |
download | gtk+-1fb88120824d2fd21b3d073462a5eaaee43542f9.tar.gz |
Correctly treat GdkColor properties
Noticed by Daniel Garcia,
https://bugzilla.gnome.org/show_bug.cgi?id=642782
Diffstat (limited to 'modules/other')
-rw-r--r-- | modules/other/gail/libgail-util/gailmisc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/other/gail/libgail-util/gailmisc.c b/modules/other/gail/libgail-util/gailmisc.c index 5f4268df03..e1ad192df3 100644 --- a/modules/other/gail/libgail-util/gailmisc.c +++ b/modules/other/gail/libgail-util/gailmisc.c @@ -720,11 +720,12 @@ gail_misc_buffer_get_run_attributes (GtkTextBuffer *buffer, g_object_get (tag, "foreground-set", &val_set, NULL); if (val_set) { - GdkColor c; + GdkColor *c; gchar *value; g_object_get (tag, "foreground-gdk", &c, NULL); - value = g_strdup_printf ("%u,%u,%u", c.red, c.green, c.blue); + value = g_strdup_printf ("%u,%u,%u", c->red, c->green, c->blue); + gdk_color_free (c); attrib_set = gail_misc_add_attribute (attrib_set, ATK_TEXT_ATTR_FG_COLOR, value); } temp_tags = temp_tags->next; @@ -739,11 +740,12 @@ gail_misc_buffer_get_run_attributes (GtkTextBuffer *buffer, g_object_get (tag, "background-set", &val_set, NULL); if (val_set) { - GdkColor c; + GdkColor *c; gchar *value; g_object_get (tag, "background-gdk", &c, NULL); - value = g_strdup_printf ("%u,%u,%u", c.red, c.green, c.blue); + value = g_strdup_printf ("%u,%u,%u", c->red, c->green, c->blue); + gdk_color_free (c); attrib_set = gail_misc_add_attribute (attrib_set, ATK_TEXT_ATTR_BG_COLOR, value); } temp_tags = temp_tags->next; |