summaryrefslogtreecommitdiffstats
path: root/src/preferences.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-09-23 17:24:25 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-09-23 17:24:25 +0000
commitac16411f213f98407fc42c1d04eb4ae6c187e4a6 (patch)
treeb8fd94caee6b202043810a7366ab3f032882a48f /src/preferences.cpp
parentadd newly linked-in m4 files to .bzrignore (diff)
parentFix for 170395 : Add Trace Bitmap to context menu of images : Focus fix (diff)
downloadinkscape-ac16411f213f98407fc42c1d04eb4ae6c187e4a6.tar.gz
inkscape-ac16411f213f98407fc42c1d04eb4ae6c187e4a6.zip
merge from trunk (r11698)
(bzr r11668.1.10)
Diffstat (limited to 'src/preferences.cpp')
-rw-r--r--src/preferences.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/preferences.cpp b/src/preferences.cpp
index 4615fd6e1..1f985a629 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -489,18 +489,18 @@ void Preferences::setString(Glib::ustring const &pref_path, Glib::ustring const
void Preferences::setStyle(Glib::ustring const &pref_path, SPCSSAttr *style)
{
- gchar *css_str = sp_repr_css_write_string(style);
- _setRawValue(pref_path, css_str);
- g_free(css_str);
+ Glib::ustring css_str;
+ sp_repr_css_write_string(style, css_str);
+ _setRawValue(pref_path, css_str.c_str());
}
void Preferences::mergeStyle(Glib::ustring const &pref_path, SPCSSAttr *style)
{
SPCSSAttr *current = getStyle(pref_path);
sp_repr_css_merge(current, style);
- gchar *css_str = sp_repr_css_write_string(current);
- _setRawValue(pref_path, css_str);
- g_free(css_str);
+ Glib::ustring css_str;
+ sp_repr_css_write_string(current, css_str);
+ _setRawValue(pref_path, css_str.c_str());
sp_repr_css_attr_unref(current);
}