From 4d79affe53b5c0e7dbc67014aee9be5251dc56df Mon Sep 17 00:00:00 2001 From: buliabyak Date: Wed, 27 Jun 2007 01:43:23 +0000 Subject: [PATCH] more unreffing temporary styles properly --- src/dialogs/fill-style.cpp | 4 ++-- src/dialogs/object-properties.cpp | 2 +- src/dialogs/stroke-style.cpp | 6 +++--- src/dialogs/text-edit.cpp | 2 +- src/selection-chemistry.cpp | 2 +- src/ui/dialog/fill-and-stroke.cpp | 2 +- src/ui/widget/selected-style.cpp | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/dialogs/fill-style.cpp b/src/dialogs/fill-style.cpp index 9933887f3..086838727 100644 --- a/src/dialogs/fill-style.cpp +++ b/src/dialogs/fill-style.cpp @@ -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 diff --git a/src/dialogs/object-properties.cpp b/src/dialogs/object-properties.cpp index b4358e5e5..7aa33fc5b 100644 --- a/src/dialogs/object-properties.cpp +++ b/src/dialogs/object-properties.cpp @@ -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)); } diff --git a/src/dialogs/stroke-style.cpp b/src/dialogs/stroke-style.cpp index e1640e6af..ed1082e26 100644 --- a/src/dialogs/stroke-style.cpp +++ b/src/dialogs/stroke-style.cpp @@ -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; diff --git a/src/dialogs/text-edit.cpp b/src/dialogs/text-edit.cpp index b0ba2c2f0..b23023721 100644 --- a/src/dialogs/text-edit.cpp +++ b/src/dialogs/text-edit.cpp @@ -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); diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index fc0bb5a10..ed8d6379e 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -1095,7 +1095,7 @@ void sp_selection_copy() style_clipboard = css; } } - g_free (query); + sp_style_unref(query); } size_clipboard = selection->bounds(); diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp index 3559e3685..2967cf151 100644 --- a/src/ui/dialog/fill-and-stroke.cpp +++ b/src/ui/dialog/fill-and-stroke.cpp @@ -277,7 +277,7 @@ FillAndStroke::selectionChanged(Inkscape::Application *inkscape, break; } - g_free (query); + sp_style_unref(query); _blocked = false; } diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index eca474ea7..2c5da4380 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -1041,7 +1041,7 @@ SelectedStyle::update() break; } - g_free (query); + sp_style_unref(query); } void SelectedStyle::opacity_0(void) {_opacity_sb.set_value(0);} -- 2.30.2