diff options
author | Stuart Parmenter <pavlov@src.gnome.org> | 1999-03-17 03:32:11 +0000 |
---|---|---|
committer | Stuart Parmenter <pavlov@src.gnome.org> | 1999-03-17 03:32:11 +0000 |
commit | f880eba7cd72302ffa34cc938a3a3085ed3e7848 (patch) | |
tree | 8140d17493f84d9426797acad094c37034c51b1a | |
parent | ac8d845b3dafc7bfebe53d2c8630152d8a736598 (diff) | |
download | gdk-pixbuf-f880eba7cd72302ffa34cc938a3a3085ed3e7848.tar.gz |
make sure gtk_style_copy copies theme information
-rw-r--r-- | gtk/gtkstyle.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 30a60363f..f3984b9c5 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -365,7 +365,20 @@ gtk_style_copy (GtkStyle *style) gdk_font_unref (new_style->font); new_style->font = style->font; gdk_font_ref (new_style->font); + + if (style->rc_style) + { + new_style->rc_style = style->rc_style; + gtk_rc_style_ref (style->rc_style); + } + if (style->engine) + { + new_style->engine = style->engine; + gtk_theme_engine_ref(new_style->engine); + new_style->engine->duplicate_style (new_style, style); + } + return new_style; } @@ -381,18 +394,6 @@ gtk_style_duplicate (GtkStyle *style) style->styles = g_slist_append (style->styles, new_style); new_style->styles = style->styles; - if (style->rc_style) - { - new_style->rc_style = style->rc_style; - gtk_rc_style_ref (style->rc_style); - } - - if (style->engine) - { - new_style->engine = style->engine; - new_style->engine->duplicate_style (new_style, style); - } - return new_style; } |