From: buliabyak Date: Wed, 27 Jun 2007 01:14:33 +0000 (+0000) Subject: unref temporary styles properly X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9809f5e447c26e18673f01981991ee2b935bf7ce;p=inkscape.git unref temporary styles properly --- diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 0ae1c812c..c15337e0d 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -3155,7 +3155,6 @@ bool visible = false; void sp_text_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl) { - SPStyle *query = sp_style_new (); @@ -3303,6 +3302,8 @@ sp_text_toolbox_selection_changed (Inkscape::Selection *selection, GObject *tbl) g_object_set_data (G_OBJECT (button), "block", gpointer(0)); g_object_set_data (G_OBJECT (button1), "block", gpointer(0)); } + + sp_style_unref(query); } void @@ -3368,6 +3369,8 @@ sp_text_toolbox_family_changed (GtkTreeSelection *selection, sp_desktop_set_style (desktop, css, true, true); } + sp_style_unref(query); + sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, _("Text: Change font family")); sp_repr_css_attr_unref (css); @@ -3450,6 +3453,8 @@ sp_text_toolbox_anchoring_toggled (GtkRadioButton *button, sp_repr_css_change (inkscape_get_repr (INKSCAPE, "tools.text"), css, "style"); } + sp_style_unref(query); + sp_desktop_set_style (desktop, css, true, true); sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, _("Text: Change alignment")); @@ -3496,6 +3501,8 @@ sp_text_toolbox_style_toggled (GtkToggleButton *button, sp_repr_css_change (inkscape_get_repr (INKSCAPE, "tools.text"), css, "style"); } + sp_style_unref(query); + sp_desktop_set_style (desktop, css, true, true); sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT, _("Text: Change font style")); @@ -3639,6 +3646,8 @@ sp_text_toolbox_size_changed (GtkComboBox *cbox, sp_repr_css_change (inkscape_get_repr (INKSCAPE, "tools.text"), css, "style"); } + sp_style_unref(query); + sp_desktop_set_style (desktop, css, true, true); sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "ttb:size", SP_VERB_NONE, _("Text: Change font size"));