diff --git a/src/file.cpp b/src/file.cpp
index de8ab2b5dca10285da5f7dc6a333c7da185d8d36..568d32572874d523c83b69445f4ed41917d5c7b0 100644 (file)
--- a/src/file.cpp
+++ b/src/file.cpp
sp_create_window(dtw, TRUE);
dt = static_cast<SPDesktop*>(dtw->view);
sp_namedview_window_from_document(dt);
+ sp_namedview_update_layers_from_document(dt);
}
return dt;
}
// 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));
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) {
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
(char const *) _("Select file to save to"),
default_extension
);
+ else
+ saveDialogInstance->change_path(save_loc);
saveDialogInstance->change_title(dialog_title);
bool success = saveDialogInstance->show();
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;
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());