summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2012-09-03 06:35:01 +0000
committerKris <Kris.De.Gussem@hotmail.com>2012-09-03 06:35:01 +0000
commitd4f5006264e2e19a9fe50968a2e422b83785821c (patch)
tree934174c6829e8a96dbffa5f6207d462723fbedca /src/ui/widget
parentFix for 422644 : Show filename in statusbar on saving (diff)
downloadinkscape-d4f5006264e2e19a9fe50968a2e422b83785821c.tar.gz
inkscape-d4f5006264e2e19a9fe50968a2e422b83785821c.zip
revert rev 11646: build issue with dbus (forgot to adapt some more, dbus was not enabled) and other issues
(bzr r11649)
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/style-swatch.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp
index 857ae7019..1ee26e803 100644
--- a/src/ui/widget/style-swatch.cpp
+++ b/src/ui/widget/style-swatch.cpp
@@ -227,7 +227,8 @@ StyleSwatch::setWatchedTool(const char *path, bool synthesize)
}
-void StyleSwatch::setStyle(SPCSSAttr *css)
+void
+StyleSwatch::setStyle(SPCSSAttr *css)
{
if (_css)
sp_repr_css_attr_unref (_css);
@@ -238,18 +239,18 @@ void StyleSwatch::setStyle(SPCSSAttr *css)
_css = sp_repr_css_attr_new();
sp_repr_css_merge(_css, css);
- Glib::ustring css_string;
- sp_repr_css_write_string (_css, css_string);
+ gchar const *css_string = sp_repr_css_write_string (_css);
SPStyle *temp_spstyle = sp_style_new(SP_ACTIVE_DOCUMENT);
- if (~css_string.empty()) {
- sp_style_merge_from_style_string (temp_spstyle, css_string.c_str());
- }
-
+ if (css_string)
+ sp_style_merge_from_style_string (temp_spstyle, css_string);
+
setStyle (temp_spstyle);
+
sp_style_unref (temp_spstyle);
}
-void StyleSwatch::setStyle(SPStyle *query)
+void
+StyleSwatch::setStyle(SPStyle *query)
{
_place[SS_FILL].remove();
_place[SS_STROKE].remove();