summaryrefslogtreecommitdiffstats
path: root/src/sp-flowtext.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-flowtext.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-flowtext.cpp')
-rw-r--r--src/sp-flowtext.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp
index c7ef579ac..9d54ad92b 100644
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
@@ -280,17 +280,20 @@ void SPFlowtext::print(SPPrintContext *ctx) {
this->layout.print(ctx, pbox, dbox, bbox, ctm);
}
+const char* SPFlowtext::display_name() {
+ if (SP_FLOWTEXT(this)->has_internal_frame()) {
+ return _("Flowed Text");
+ } else {
+ return _("Linked Flowed Text");
+ }
+}
+
gchar* SPFlowtext::description() {
Inkscape::Text::Layout const &layout = SP_FLOWTEXT(this)->layout;
int const nChars = layout.iteratorToCharIndex(layout.end());
-
char const *trunc = (layout.inputTruncated()) ? _(" [truncated]") : "";
- if (SP_FLOWTEXT(this)->has_internal_frame()) {
- return g_strdup_printf(ngettext("<b>Flowed text</b> (%d character%s)", "<b>Flowed text</b> (%d characters%s)", nChars), nChars, trunc);
- } else {
- return g_strdup_printf(ngettext("<b>Linked flowed text</b> (%d character%s)", "<b>Linked flowed text</b> (%d characters%s)", nChars), nChars, trunc);
- }
+ return g_strdup_printf(ngettext(_("(%d character%s)"), _("(%d characters%s)"), nChars), nChars, trunc);
}
void SPFlowtext::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::SnapPreferences const *snapprefs) {