From 774bee47ed685bd666173cb4d1664933217371c9 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 20 Feb 2019 10:50:38 +0100 Subject: Give more descriptive names to document file related variables and functions. Makes searching through code for them easier. --- src/extension/system.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/extension/system.cpp') diff --git a/src/extension/system.cpp b/src/extension/system.cpp index 412e5dcd4..05a62884c 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -137,7 +137,7 @@ SPDocument *open(Extension *key, gchar const *filename) } } - doc->setUri(filename); + doc->setDocumentUri(filename); if (!show) { imod->set_gui(true); } @@ -288,7 +288,7 @@ save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension, // remember attributes in case this is an unofficial save and/or overwrite fails - gchar *saved_uri = g_strdup(doc->getURI()); + gchar *saved_uri = g_strdup(doc->getDocumentURI()); gchar *saved_output_extension = nullptr; gchar *saved_dataloss = nullptr; bool saved_modified = doc->isModifiedSinceSave(); @@ -618,8 +618,8 @@ get_file_save_path (SPDocument *doc, FileSaveMethod method) { case FILE_SAVE_METHOD_SAVE_AS: { use_current_dir = prefs->getBool("/dialogs/save_as/use_current_dir", true); - if (doc->getURI() && use_current_dir) { - path = Glib::path_get_dirname(doc->getURI()); + if (doc->getDocumentURI() && use_current_dir) { + path = Glib::path_get_dirname(doc->getDocumentURI()); } else { path = prefs->getString("/dialogs/save_as/path"); } @@ -630,15 +630,15 @@ get_file_save_path (SPDocument *doc, FileSaveMethod method) { break; case FILE_SAVE_METHOD_SAVE_COPY: use_current_dir = prefs->getBool("/dialogs/save_copy/use_current_dir", prefs->getBool("/dialogs/save_as/use_current_dir", true)); - if (doc->getURI() && use_current_dir) { - path = Glib::path_get_dirname(doc->getURI()); + if (doc->getDocumentURI() && use_current_dir) { + path = Glib::path_get_dirname(doc->getDocumentURI()); } else { path = prefs->getString("/dialogs/save_copy/path"); } break; case FILE_SAVE_METHOD_INKSCAPE_SVG: - if (doc->getURI()) { - path = Glib::path_get_dirname(doc->getURI()); + if (doc->getDocumentURI()) { + path = Glib::path_get_dirname(doc->getDocumentURI()); } else { // FIXME: should we use the save_as path here or something else? Maybe we should // leave this as a choice to the user. -- cgit v1.2.3