=== modified file 'src/document.cpp' --- src/document.cpp 2012-02-15 20:47:14 +0000 +++ src/document.cpp 2012-03-05 16:32:12 +0000 @@ -60,6 +60,7 @@ #include "sp-object-repr.h" #include "transf_mat_3x4.h" #include "unit-constants.h" +#include "widgets/desktop-widget.h" #include "xml/repr.h" #include "xml/rebase-hrefs.h" #include "libcroco/cr-cascade.h" @@ -1420,6 +1421,13 @@ return priv->seeking; } +void SPDocument::setModifiedSinceSave(bool modified) { + this->modified_since_save = modified; + Gtk::Window *parent = SP_ACTIVE_DESKTOP->getToplevel(); + g_assert(parent != NULL); + SPDesktopWidget *dtw = (SPDesktopWidget *) parent->get_data("desktopwidget"); + dtw->updateTitle( this->getName() ); +} /* Local Variables: === modified file 'src/document.h' --- src/document.h 2012-02-15 20:47:14 +0000 +++ src/document.h 2012-03-05 16:32:20 +0000 @@ -190,9 +190,7 @@ bool isSeeking() const; bool isModifiedSinceSave() const { return modified_since_save; } - void setModifiedSinceSave(bool modified = true) { - modified_since_save = modified; - } + void setModifiedSinceSave(bool modified = true); private: SPDocument(SPDocument const &); // no copy === modified file 'src/widgets/desktop-widget.cpp' --- src/widgets/desktop-widget.cpp 2012-02-26 21:46:12 +0000 +++ src/widgets/desktop-widget.cpp 2012-03-05 16:32:52 +0000 @@ -651,6 +651,11 @@ gchar const *printcolorsnamecomma = ", print colors preview"; gchar const *colormodename = ""; gchar const *colormodenamecomma = ""; + gchar const *modifiedname = ""; + SPDocument *doc = this->desktop->doc(); + if (doc->isModifiedSinceSave()) { + modifiedname = "*"; + } if (this->desktop->getColorMode() == Inkscape::COLORMODE_GRAYSCALE) { colormodename = grayscalename; @@ -662,19 +667,19 @@ if (this->desktop->number > 1) { if (this->desktop->getMode() == Inkscape::RENDERMODE_OUTLINE) { - g_string_printf (name, _("%s: %d (outline%s) - Inkscape"), fname, this->desktop->number, colormodenamecomma); + 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: %d (no filters%s) - Inkscape"), fname, this->desktop->number, colormodenamecomma); + g_string_printf (name, _("%s%s: %d (no filters%s) - Inkscape"), modifiedname, fname, this->desktop->number, colormodenamecomma); } else { - g_string_printf (name, _("%s: %d %s- Inkscape"), fname, this->desktop->number, colormodename); + g_string_printf (name, _("%s%s: %d %s- Inkscape"), modifiedname, fname, this->desktop->number, colormodename); } } else { if (this->desktop->getMode() == Inkscape::RENDERMODE_OUTLINE) { - g_string_printf (name, _("%s (outline%s) - Inkscape"), fname, colormodenamecomma); + 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 (no filters%s) - Inkscape"), fname, colormodenamecomma); + g_string_printf (name, _("%s%s (no filters%s) - Inkscape"), modifiedname, fname, colormodenamecomma); } else { - g_string_printf (name, _("%s %s- Inkscape"), fname, colormodename); + g_string_printf (name, _("%s%s %s- Inkscape"), modifiedname, fname, colormodename); } } window->set_title (name->str);