summaryrefslogtreecommitdiffstats
path: root/src/widgets/desktop-widget.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-12-13 04:17:37 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-12-13 04:17:37 +0000
commit991279702f188995eaf339994394ba0ea4d9e7a6 (patch)
tree4cda11330822097aae2cb256602343fe2a918f12 /src/widgets/desktop-widget.cpp
parentpreliminary release of the EMF import text reassembly feature. (diff)
parentMigrate document metadata from NotbookPage to Gtk::Grid and drop dead code (diff)
downloadinkscape-991279702f188995eaf339994394ba0ea4d9e7a6.tar.gz
inkscape-991279702f188995eaf339994394ba0ea4d9e7a6.zip
merge from trunk (r11952)
(bzr r11668.1.46)
Diffstat (limited to 'src/widgets/desktop-widget.cpp')
-rw-r--r--src/widgets/desktop-widget.cpp53
1 files changed, 37 insertions, 16 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index cc441cc1c..3791ec73c 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -817,12 +817,15 @@ SPDesktopWidget::updateTitle(gchar const* uri)
gchar const *fname = uri;
GString *name = g_string_new ("");
- gchar const *grayscalename = _("(grayscale) ");
- gchar const *grayscalenamecomma = _(", grayscale");
- gchar const *printcolorsname = _("(print colors preview) ");
- gchar const *printcolorsnamecomma = _(", print colors preview");
- gchar const *colormodename = "";
- gchar const *colormodenamecomma = "";
+ gchar const *grayscalename = N_("grayscale");
+ gchar const *grayscalenamecomma = N_(", grayscale");
+ gchar const *printcolorsname = N_("print colors preview");
+ gchar const *printcolorsnamecomma = N_(", print colors preview");
+ gchar const *outlinename = N_("outline");
+ gchar const *nofiltersname = N_("no filters");
+ gchar const *colormodename = NULL;
+ gchar const *colormodenamecomma = NULL;
+ gchar const *rendermodename = NULL;
gchar const *modifiedname = "";
SPDocument *doc = this->desktop->doc();
if (doc->isModifiedSinceSave()) {
@@ -836,22 +839,40 @@ SPDesktopWidget::updateTitle(gchar const* uri)
colormodename = printcolorsname;
colormodenamecomma = printcolorsnamecomma;
}
+ if (this->desktop->getMode() == Inkscape::RENDERMODE_OUTLINE) {
+ rendermodename = outlinename;
+ } else if (this->desktop->getMode() == Inkscape::RENDERMODE_NO_FILTERS) {
+ rendermodename = nofiltersname;
+ }
+
if (this->desktop->number > 1) {
- if (this->desktop->getMode() == Inkscape::RENDERMODE_OUTLINE) {
- g_string_printf (name, _("%s%s: %d (outline%s) - Inkscape"), modifiedname, fname, this->desktop->number, colormodenamecomma);
- } else if (this->desktop->getMode() == Inkscape::RENDERMODE_NO_FILTERS) {
- g_string_printf (name, _("%s%s: %d (no filters%s) - Inkscape"), modifiedname, fname, this->desktop->number, colormodenamecomma);
+ if (rendermodename) {
+ if (colormodenamecomma) {
+ g_string_printf (name, _("%s%s: %d (%s%s) - Inkscape"), modifiedname, fname, this->desktop->number, _(rendermodename), _(colormodenamecomma));
+ } else {
+ g_string_printf (name, _("%s%s: %d (%s) - Inkscape"), modifiedname, fname, this->desktop->number, _(rendermodename));
+ }
} else {
- g_string_printf (name, _("%s%s: %d %s- Inkscape"), modifiedname, fname, this->desktop->number, colormodename);
+ if (colormodename) {
+ g_string_printf (name, _("%s%s: %d (%s) - Inkscape"), modifiedname, fname, this->desktop->number, _(colormodename));
+ } else {
+ g_string_printf (name, _("%s%s: %d - Inkscape"), modifiedname, fname, this->desktop->number);
+ }
}
} else {
- if (this->desktop->getMode() == Inkscape::RENDERMODE_OUTLINE) {
- g_string_printf (name, _("%s%s (outline%s) - Inkscape"), modifiedname, fname, colormodenamecomma);
- } else if (this->desktop->getMode() == Inkscape::RENDERMODE_NO_FILTERS) {
- g_string_printf (name, _("%s%s (no filters%s) - Inkscape"), modifiedname, fname, colormodenamecomma);
+ if (rendermodename) {
+ if (colormodenamecomma) {
+ g_string_printf (name, _("%s%s (%s%s) - Inkscape"), modifiedname, fname, _(rendermodename), _(colormodenamecomma));
+ } else {
+ g_string_printf (name, _("%s%s (%s) - Inkscape"), modifiedname, fname, _(rendermodename));
+ }
} else {
- g_string_printf (name, _("%s%s %s- Inkscape"), modifiedname, fname, colormodename);
+ if (colormodename) {
+ g_string_printf (name, _("%s%s (%s) - Inkscape"), modifiedname, fname, _(colormodename));
+ } else {
+ g_string_printf (name, _("%s%s - Inkscape"), modifiedname, fname);
+ }
}
}
window->set_title (name->str);