Make color scheme update properly when changing themes. (#402131, Benjamin

2007-02-28  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtksettings.c: Make color scheme update properly
        when changing themes.  (#402131, Benjamin Berg)



svn path=/trunk/; revision=17366
This commit is contained in:
Matthias Clasen 2007-02-28 19:37:08 +00:00 committed by Matthias Clasen
parent 2b029759c7
commit c955072b67
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2007-02-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtksettings.c: Make color scheme update properly
when changing themes. (#402131, Benjamin Berg)
2007-02-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrc.c: Don't leak references to the color-hash

View File

@ -1926,13 +1926,12 @@ add_color_to_hash (gchar *name,
GdkColor *color,
GHashTable *target)
{
GdkColor *old, *new;
GdkColor *old;
old = g_hash_table_lookup (target, name);
if (!old || !gdk_color_equal (old, color))
{
new = gdk_color_copy (color);
g_hash_table_insert (target, g_strdup (name), new);
g_hash_table_insert (target, g_strdup (name), gdk_color_copy (color));
return TRUE;
}
@ -1979,7 +1978,7 @@ add_colors_to_hash_from_string (GHashTable *hash,
}
if (gdk_color_parse (p, &color))
changed = add_color_to_hash (name, &color, hash);
changed |= add_color_to_hash (name, &color, hash);
}
g_free (copy);