diff options
author | Sven Neumann <sven@gimp.org> | 2002-03-25 20:11:27 +0000 |
---|---|---|
committer | Sven Neumann <neo@src.gnome.org> | 2002-03-25 20:11:27 +0000 |
commit | 94168cf8452d787a171c69ad5a25b97f7ca0530f (patch) | |
tree | 2648c408e1dfa494bd52c5ed27a85c2c435f9287 | |
parent | cef7907ddd4a5254d564f9686a395d574630ddf1 (diff) | |
download | gdk-pixbuf-94168cf8452d787a171c69ad5a25b97f7ca0530f.tar.gz |
free the style's font_description before accessing a new one.
2002-03-25 Sven Neumann <sven@gimp.org>
* gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's
font_description before accessing a new one.
(gtk_rc_parse_stock): always unref the created icon_set. #76289
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 6 | ||||
-rw-r--r-- | gtk/gtkrc.c | 17 |
7 files changed, 47 insertions, 6 deletions
@@ -1,3 +1,9 @@ +2002-03-25 Sven Neumann <sven@gimp.org> + + * gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's + font_description before accessing a new one. + (gtk_rc_parse_stock): always unref the created icon_set. #76289 + 2002-03-25 Mark McLoughlin <mark@skynet.ie> * gtk/gtkbindings.c: (gtk_binding_entry_add_signal), diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c3f002d42..5a0500cd9 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2002-03-25 Sven Neumann <sven@gimp.org> + + * gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's + font_description before accessing a new one. + (gtk_rc_parse_stock): always unref the created icon_set. #76289 + 2002-03-25 Mark McLoughlin <mark@skynet.ie> * gtk/gtkbindings.c: (gtk_binding_entry_add_signal), diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index c3f002d42..5a0500cd9 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2002-03-25 Sven Neumann <sven@gimp.org> + + * gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's + font_description before accessing a new one. + (gtk_rc_parse_stock): always unref the created icon_set. #76289 + 2002-03-25 Mark McLoughlin <mark@skynet.ie> * gtk/gtkbindings.c: (gtk_binding_entry_add_signal), diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c3f002d42..5a0500cd9 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2002-03-25 Sven Neumann <sven@gimp.org> + + * gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's + font_description before accessing a new one. + (gtk_rc_parse_stock): always unref the created icon_set. #76289 + 2002-03-25 Mark McLoughlin <mark@skynet.ie> * gtk/gtkbindings.c: (gtk_binding_entry_add_signal), diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c3f002d42..5a0500cd9 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2002-03-25 Sven Neumann <sven@gimp.org> + + * gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's + font_description before accessing a new one. + (gtk_rc_parse_stock): always unref the created icon_set. #76289 + 2002-03-25 Mark McLoughlin <mark@skynet.ie> * gtk/gtkbindings.c: (gtk_binding_entry_add_signal), diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c3f002d42..5a0500cd9 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2002-03-25 Sven Neumann <sven@gimp.org> + + * gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's + font_description before accessing a new one. + (gtk_rc_parse_stock): always unref the created icon_set. #76289 + 2002-03-25 Mark McLoughlin <mark@skynet.ie> * gtk/gtkbindings.c: (gtk_binding_entry_add_signal), diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 7f400b765..8c479b496 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -2998,7 +2998,11 @@ gtk_rc_parse_font_name (GScanner *scanner, if (token != G_TOKEN_STRING) return G_TOKEN_STRING; - rc_style->font_desc = pango_font_description_from_string (scanner->value.v_string); + if (rc_style->font_desc) + pango_font_description_free (rc_style->font_desc); + + rc_style->font_desc = + pango_font_description_from_string (scanner->value.v_string); return G_TOKEN_NONE; } @@ -3752,12 +3756,13 @@ gtk_rc_parse_stock (GtkRcContext *context, } } - if (icon_set && icon_set_valid) + if (icon_set) { - gtk_icon_factory_add (factory, - stock_id, - icon_set); - + if (icon_set_valid) + gtk_icon_factory_add (factory, + stock_id, + icon_set); + gtk_icon_set_unref (icon_set); } |