Code

more unreffing temporary styles properly
authorbuliabyak <buliabyak@users.sourceforge.net>
Wed, 27 Jun 2007 01:43:23 +0000 (01:43 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Wed, 27 Jun 2007 01:43:23 +0000 (01:43 +0000)
src/dialogs/fill-style.cpp
src/dialogs/object-properties.cpp
src/dialogs/stroke-style.cpp
src/dialogs/text-edit.cpp
src/selection-chemistry.cpp
src/ui/dialog/fill-and-stroke.cpp
src/ui/widget/selected-style.cpp

index 9933887f31f6e7f9d0e045e308c2339c6514ded6..086838727a83566fcd3ab94c40b6adafff8c70f8 100644 (file)
@@ -249,7 +249,7 @@ sp_fill_style_widget_update (SPWidget *spw)
         }
     }
 
-    g_free (query);
+    sp_style_unref(query);
 
     g_object_set_data (G_OBJECT (spw), "update", GINT_TO_POINTER (FALSE));
 
@@ -441,7 +441,7 @@ sp_fill_style_widget_paint_changed ( SPPaintSelector *psel,
                         }
                         vector = sp_document_default_gradient_vector(document, common_rgb);
                     }
-                    g_free (query);
+                    sp_style_unref(query);
 
                     for (GSList const *i = items; i != NULL; i = i->next) {
                         //FIXME: see above
index b4358e5e54960e60a012edd5870728bceb1590da..7aa33fc5b9f72d0ea3aab33dcfd947cc1905f641 100644 (file)
@@ -361,7 +361,7 @@ sp_fillstroke_selection_changed ( Inkscape::Application *inkscape,
         }
     }
     
-    g_free (query);
+    sp_style_unref(query);
     gtk_object_set_data (GTK_OBJECT (dlg), "blocked", GUINT_TO_POINTER (FALSE));
 }
 
index e1640e6afe422431284582baf98fa3bf66aaa5de..ed1082e26ef0d3b365fd082247bdf48cbf6661d0 100644 (file)
@@ -261,7 +261,7 @@ sp_stroke_style_paint_update (SPWidget *spw)
         }
     }
 
-    g_free (query);
+    sp_style_unref(query);
 
     gtk_object_set_data(GTK_OBJECT(spw), "update", GINT_TO_POINTER(FALSE));
 }
@@ -397,7 +397,7 @@ sp_stroke_style_paint_changed(SPPaintSelector *psel, SPWidget *spw)
                         }
                         vector = sp_document_default_gradient_vector(document, common_rgb);
                     }
-                    g_free (query);
+                    sp_style_unref(query);
 
                     for (GSList const *i = items; i != NULL; i = i->next) {
                         if (!vector) {
@@ -1469,7 +1469,7 @@ sp_stroke_style_line_update(SPWidget *spw, Inkscape::Selection *sel)
         sp_stroke_style_set_cap_buttons(spw, NULL);
     }
 
-    g_free (query);
+    sp_style_unref(query);
 
     if (!sel || sel->isEmpty())
         return;
index b0ba2c2f00d4e172ca6e973fc9b2dcc502cbc28f..b2302372144f7e62814d5cb3ab00ef590295ae2f 100644 (file)
@@ -792,7 +792,7 @@ sp_text_edit_dialog_read_selection ( GtkWidget *dlg,
         gtk_entry_set_text ((GtkEntry *) ((GtkCombo *) (combo))->entry, sstr);
         g_free(sstr);
 
-        g_free (query);
+        sp_style_unref(query);
     }
 
     g_object_set_data (G_OBJECT (dlg), "blocked", NULL);
index fc0bb5a107586378d78dc232d6762bf63044bf75..ed8d6379e4aaae48dd74060d3f0a0cf6b029abd3 100644 (file)
@@ -1095,7 +1095,7 @@ void sp_selection_copy()
                 style_clipboard = css;
             }
         }
-        g_free (query);
+        sp_style_unref(query);
     }
 
     size_clipboard = selection->bounds();
index 3559e3685433a74f986fc9dd628a2fa0f907efcb..2967cf15164b782987cfd687961b250c44ae03c2 100644 (file)
@@ -277,7 +277,7 @@ FillAndStroke::selectionChanged(Inkscape::Application *inkscape,
             break;
     }
     
-    g_free (query);
+    sp_style_unref(query);
 
     _blocked = false;
 }
index eca474ea78bf9ca772d2a5021d9f1c6d246b1f8e..2c5da4380130dbfeb411552ebfa534990f717c29 100644 (file)
@@ -1041,7 +1041,7 @@ SelectedStyle::update()
         break;
     }
 
-    g_free (query);
+    sp_style_unref(query);
 }
 
 void SelectedStyle::opacity_0(void) {_opacity_sb.set_value(0);}