X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Ffile.cpp;h=568d32572874d523c83b69445f4ed41917d5c7b0;hb=2d02a258df2d7cb1eeb460a93e13b01f5526001b;hp=de8ab2b5dca10285da5f7dc6a333c7da185d8d36;hpb=f2ab0fa1527c64eacc741d3726de7458b5df9b3a;p=inkscape.git diff --git a/src/file.cpp b/src/file.cpp index de8ab2b5d..568d32572 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -106,6 +106,7 @@ sp_file_new(const Glib::ustring &templ) sp_create_window(dtw, TRUE); dt = static_cast(dtw->view); sp_namedview_window_from_document(dt); + sp_namedview_update_layers_from_document(dt); } return dt; } @@ -201,9 +202,8 @@ sp_file_open(const Glib::ustring &uri, // everyone who cares now has a reference, get rid of ours sp_document_unref(doc); // resize the window to match the document properties - // (this may be redundant for new windows... if so, move to the "virgin" - // section above) sp_namedview_window_from_document(desktop); + sp_namedview_update_layers_from_document(desktop); if (add_to_recent) { prefs_set_recent_file(SP_DOCUMENT_URI(doc), SP_DOCUMENT_NAME(doc)); @@ -463,7 +463,7 @@ sp_file_vacuum() unsigned int diff = vacuum_document (doc); sp_document_done(doc, SP_VERB_FILE_VACUUM, - /* TODO: annotate */ "file.cpp:515"); + _("Vacuum <defs>")); SPDesktop *dt = SP_ACTIVE_DESKTOP; if (diff > 0) { @@ -589,7 +589,8 @@ sp_file_save_dialog(SPDocument *doc, bool is_copy) save_loc.append(formatBuf); } } else { - save_loc = Glib::path_get_dirname(doc->uri); + save_loc = Glib::build_filename(Glib::path_get_dirname(doc->uri), + Glib::path_get_basename(doc->uri)); } // convert save_loc from utf-8 to locale @@ -615,6 +616,8 @@ sp_file_save_dialog(SPDocument *doc, bool is_copy) (char const *) _("Select file to save to"), default_extension ); + else + saveDialogInstance->change_path(save_loc); saveDialogInstance->change_title(dialog_title); bool success = saveDialogInstance->show(); @@ -640,7 +643,7 @@ sp_file_save_dialog(SPDocument *doc, bool is_copy) if (success) prefs_set_recent_file(SP_DOCUMENT_URI(doc), SP_DOCUMENT_NAME(doc)); - save_path = fileName; + save_path = Glib::path_get_dirname(fileName); prefs_set_string_attribute("dialogs.save_as", "path", save_path.c_str()); return success; @@ -846,7 +849,7 @@ file_import(SPDocument *in_doc, const Glib::ustring &uri, sp_document_unref(doc); sp_document_done(in_doc, SP_VERB_FILE_IMPORT, - /* TODO: annotate */ "file.cpp:900"); + _("Import")); } else { gchar *text = g_strdup_printf(_("Failed to load the requested file %s"), uri.c_str());