diff options
Diffstat (limited to 'src/file.cpp')
| -rw-r--r-- | src/file.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/file.cpp b/src/file.cpp index a03c459da..14f70fc8c 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -675,7 +675,12 @@ file_save(Gtk::Window &parentWindow, SPDocument *doc, const Glib::ustring &uri, } SP_ACTIVE_DESKTOP->event_log->rememberFileSave(); - Glib::ustring msg = Glib::ustring::format(_("Document saved."), " ", doc->getURI()); + Glib::ustring msg; + if (doc->getURI() == NULL) { + msg = Glib::ustring::format(_("Document saved.")); + } else { + msg = Glib::ustring::format(_("Document saved."), " ", doc->getURI()); + } SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::NORMAL_MESSAGE, msg.c_str()); return true; } @@ -952,7 +957,13 @@ sp_file_save_document(Gtk::Window &parentWindow, SPDocument *doc) } } } else { - Glib::ustring msg = Glib::ustring::format(_("No changes need to be saved."), " ", doc->getURI()); + Glib::ustring msg; + if ( doc->getURI() == NULL ) + { + msg = Glib::ustring::format(_("No changes need to be saved.")); + } else { + msg = Glib::ustring::format(_("No changes need to be saved."), " ", doc->getURI()); + } SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::WARNING_MESSAGE, msg.c_str()); success = TRUE; } |
