summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2006-09-22 20:47:23 +0000
committerMichael Natterer <mitch@src.gnome.org>2006-09-22 20:47:23 +0000
commit43dd82ff0e9ff5e607902ca3818ba505c101e7dd (patch)
tree34ae6430abb79008eaf3d12c69fc6eabeeb29c35
parent6323f98da868f79e383dc008c166623a629e57ee (diff)
downloadgtk+-43dd82ff0e9ff5e607902ca3818ba505c101e7dd.tar.gz
also copy icon factories and color hashes. Fixes bug #357132.
2006-09-22 Michael Natterer <mitch@imendio.com> * gtk/gtkstyle.c (gtk_style_real_copy): also copy icon factories and color hashes. Fixes bug #357132.
-rw-r--r--ChangeLog7
-rw-r--r--gtk/gtkstyle.c12
2 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0ae3fb3642..9f41cf2bfd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-22 Michael Natterer <mitch@imendio.com>
+
+ * gtk/gtkstyle.c (gtk_style_real_copy): also copy icon factories
+ and color hashes. Fixes bug #357132.
+
2006-09-22 Matthias Clasen <mclasen@redhat.com>
Make remote bookmarks work better (#354887)
@@ -42,7 +47,7 @@
over the FG and BG colors (they can't be set separately any more).
The stipple mask part of the patch doesn't work but seems to take
- the right approach and doesn't make things worse, so i applied it.
+ the right approach and doesn't make things worse, so I applied it.
Did *not* apply the clipping part of the patch since I don't
understand it (I don't understand the version in CVS either, but
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index fed5bf7a89..0b56a0bbc4 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -1583,6 +1583,8 @@ static void
gtk_style_real_copy (GtkStyle *style,
GtkStyle *src)
{
+ GtkStylePrivate *priv = GTK_STYLE_GET_PRIVATE (style);
+ GtkStylePrivate *src_priv = GTK_STYLE_GET_PRIVATE (src);
gint i;
for (i = 0; i < 5; i++)
@@ -1621,6 +1623,16 @@ gtk_style_real_copy (GtkStyle *style,
if (src->rc_style)
g_object_ref (src->rc_style);
+ g_slist_foreach (style->icon_factories, (GFunc) g_object_unref, NULL);
+ g_slist_free (style->icon_factories);
+ style->icon_factories = g_slist_copy (src->icon_factories);
+ g_slist_foreach (style->icon_factories, (GFunc) g_object_ref, NULL);
+
+ g_slist_foreach (priv->color_hashes, (GFunc) g_hash_table_unref, NULL);
+ g_slist_free (priv->color_hashes);
+ priv->color_hashes = g_slist_copy (src_priv->color_hashes);
+ g_slist_foreach (priv->color_hashes, (GFunc) g_hash_table_ref, NULL);
+
/* don't copy, just clear cache */
clear_property_cache (style);
}