]> Pileus Git - ~andy/gtk/commitdiff
free the style's font_description before accessing a new one.
authorSven Neumann <sven@gimp.org>
Mon, 25 Mar 2002 20:11:27 +0000 (20:11 +0000)
committerSven Neumann <neo@src.gnome.org>
Mon, 25 Mar 2002 20:11:27 +0000 (20:11 +0000)
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

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkrc.c

index c3f002d424cf2912864101aa7566c157b4f91570..5a0500cd9c80c1c602ab1e4770bca4463e991aae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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),
index c3f002d424cf2912864101aa7566c157b4f91570..5a0500cd9c80c1c602ab1e4770bca4463e991aae 100644 (file)
@@ -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),
index c3f002d424cf2912864101aa7566c157b4f91570..5a0500cd9c80c1c602ab1e4770bca4463e991aae 100644 (file)
@@ -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),
index c3f002d424cf2912864101aa7566c157b4f91570..5a0500cd9c80c1c602ab1e4770bca4463e991aae 100644 (file)
@@ -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),
index c3f002d424cf2912864101aa7566c157b4f91570..5a0500cd9c80c1c602ab1e4770bca4463e991aae 100644 (file)
@@ -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),
index c3f002d424cf2912864101aa7566c157b4f91570..5a0500cd9c80c1c602ab1e4770bca4463e991aae 100644 (file)
@@ -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),
index 7f400b765da271293adc536ad600260fc4b96732..8c479b496fea66708378fedfb083481f7e5236d3 100644 (file)
@@ -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);
     }