summaryrefslogtreecommitdiffstats
path: root/src/sp-path.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2013-09-20 04:45:16 +0000
committerMartin Owens <doctormo@gmail.com>2013-09-20 04:45:16 +0000
commiteb3598e7e27619c759ef33bb9ec4ffb8898523de (patch)
tree3793d7310b4cdea6ffaea3fe7ee837b3ede065cf /src/sp-path.cpp
parentFix make check after merge of cppify branch (diff)
downloadinkscape-eb3598e7e27619c759ef33bb9ec4ffb8898523de.tar.gz
inkscape-eb3598e7e27619c759ef33bb9ec4ffb8898523de.zip
Refactor status-bar text for multiple items, was very broken
Fixed bugs: - https://launchpad.net/bugs/1199192 (bzr r12550)
Diffstat (limited to 'src/sp-path.cpp')
-rw-r--r--src/sp-path.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/sp-path.cpp b/src/sp-path.cpp
index 105506d6e..49e40fd24 100644
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
@@ -66,8 +66,13 @@ gint SPPath::nodesInPath() const
return _curve ? _curve->nodes_in_path() : 0;
}
+const char* SPPath::display_name() {
+ return _("Path");
+}
+
gchar* SPPath::description() {
int count = this->nodesInPath();
+ char *lpe_desc = g_strdup("");
if (sp_lpe_item_has_path_effect(this)) {
Glib::ustring s;
@@ -87,13 +92,12 @@ gchar* SPPath::description() {
s = s + ", " + lpeobj->get_lpe()->getName();
}
}
-
- return g_strdup_printf(ngettext("<b>Path</b> (%i node, path effect: %s)",
- "<b>Path</b> (%i nodes, path effect: %s)",count), count, s.c_str());
- } else {
- return g_strdup_printf(ngettext("<b>Path</b> (%i node)",
- "<b>Path</b> (%i nodes)",count), count);
+ lpe_desc = g_strdup_printf(_(", path effect: %s"), s.c_str());
}
+ char *ret = g_strdup_printf(ngettext(
+ _("%i node%s"), _("%i nodes%s"), count), count, lpe_desc);
+ g_free(lpe_desc);
+ return ret;
}
void SPPath::convert_to_guides() {