diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2019-02-20 09:50:38 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2019-02-20 09:50:38 +0000 |
| commit | 774bee47ed685bd666173cb4d1664933217371c9 (patch) | |
| tree | 077955bb8b312b64b308fbd2ab1a32ee5989f605 /src/ui | |
| parent | Fix Window centering LPEDialog (diff) | |
| download | inkscape-774bee47ed685bd666173cb4d1664933217371c9.tar.gz inkscape-774bee47ed685bd666173cb4d1664933217371c9.zip | |
Give more descriptive names to document file related variables and functions.
Makes searching through code for them easier.
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/clipboard.cpp | 2 | ||||
| -rw-r--r-- | src/ui/contextmenu.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/export.cpp | 12 | ||||
| -rw-r--r-- | src/ui/dialog/print.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/xml-tree.cpp | 2 | ||||
| -rw-r--r-- | src/ui/view/view.cpp | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 733d6e8d1..13390545a 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -1271,7 +1271,7 @@ void ClipboardManagerImpl::_onGet(Gtk::SelectionData &sel, guint /*info*/) } if (SP_ACTIVE_DOCUMENT) { - _clipboardSPDoc->setBase(SP_ACTIVE_DOCUMENT->getBase()); + _clipboardSPDoc->setDocumentBase(SP_ACTIVE_DOCUMENT->getDocumentBase()); } (*out)->save(_clipboardSPDoc, filename, true); diff --git a/src/ui/contextmenu.cpp b/src/ui/contextmenu.cpp index efbe8b0ff..a95cb3c20 100644 --- a/src/ui/contextmenu.cpp +++ b/src/ui/contextmenu.cpp @@ -823,8 +823,8 @@ void ContextMenu::ImageEdit() if (Glib::path_is_absolute(name)) { fullname = name; - } else if (SP_ACTIVE_DOCUMENT->getBase()) { - fullname = Glib::build_filename(SP_ACTIVE_DOCUMENT->getBase(), name); + } else if (SP_ACTIVE_DOCUMENT->getDocumentBase()) { + fullname = Glib::build_filename(SP_ACTIVE_DOCUMENT->getDocumentBase(), name); } else { fullname = Glib::build_filename(Glib::get_current_dir(), name); } diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index b02fbb5dc..d42d537fd 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -441,10 +441,10 @@ void Export::setTargetDesktop(SPDesktop *desktop) */ void Export::set_default_filename () { - if ( SP_ACTIVE_DOCUMENT && SP_ACTIVE_DOCUMENT->getURI() ) + if ( SP_ACTIVE_DOCUMENT && SP_ACTIVE_DOCUMENT->getDocumentURI() ) { SPDocument * doc = SP_ACTIVE_DOCUMENT; - const gchar *uri = doc->getURI(); + const gchar *uri = doc->getDocumentURI(); const gchar *text_extension = get_file_save_extension (Inkscape::Extension::FILE_SAVE_METHOD_SAVE_AS).c_str(); Inkscape::Extension::Output * oextension = nullptr; @@ -561,7 +561,7 @@ Glib::ustring Export::create_filepath_from_id (Glib::ustring id, const Glib::ust if (directory.empty()) { /* Grab document directory */ - const gchar* docURI = SP_ACTIVE_DOCUMENT->getURI(); + const gchar* docURI = SP_ACTIVE_DOCUMENT->getDocumentURI(); if (docURI) { directory = Glib::path_get_dirname(docURI); } @@ -952,8 +952,8 @@ Glib::ustring Export::absolutize_path_from_document_location (SPDocument *doc, c { Glib::ustring path; //Make relative paths go from the document location, if possible: - if (!Glib::path_is_absolute(filename) && doc->getURI()) { - Glib::ustring dirname = Glib::path_get_dirname(doc->getURI()); + if (!Glib::path_is_absolute(filename) && doc->getDocumentURI()) { + Glib::ustring dirname = Glib::path_get_dirname(doc->getDocumentURI()); if (!dirname.empty()) { path = Glib::build_filename(dirname, filename); } @@ -1236,7 +1236,7 @@ void Export::onExport () Inkscape::XML::Node * repr = *i; const gchar * temp_string; Glib::ustring dir = Glib::path_get_dirname(filename.c_str()); - const gchar* docURI=SP_ACTIVE_DOCUMENT->getURI(); + const gchar* docURI=SP_ACTIVE_DOCUMENT->getDocumentURI(); Glib::ustring docdir; if (docURI) { diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp index 65f1297d5..8d1606a19 100644 --- a/src/ui/dialog/print.cpp +++ b/src/ui/dialog/print.cpp @@ -46,7 +46,7 @@ Print::Print(SPDocument *doc, SPItem *base) : _printop = Gtk::PrintOperation::create(); // set up dialog title, based on document name - const Glib::ustring jobname = _doc->getName() ? _doc->getName() : _("SVG Document"); + const Glib::ustring jobname = _doc->getDocumentName() ? _doc->getDocumentName() : _("SVG Document"); Glib::ustring title = _("Print"); title += " "; title += jobname; diff --git a/src/ui/dialog/xml-tree.cpp b/src/ui/dialog/xml-tree.cpp index 88fab8f18..3756a670a 100644 --- a/src/ui/dialog/xml-tree.cpp +++ b/src/ui/dialog/xml-tree.cpp @@ -284,7 +284,7 @@ void XmlTree::set_tree_document(SPDocument *document) if (current_document) { document_uri_set_connection = current_document->connectURISet(sigc::bind(sigc::ptr_fun(&on_document_uri_set), current_document)); - on_document_uri_set( current_document->getURI(), current_document ); + on_document_uri_set( current_document->getDocumentURI(), current_document ); set_tree_repr(current_document->getReprRoot()); } else { set_tree_repr(nullptr); diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp index b595ce1a7..4395357e0 100644 --- a/src/ui/view/view.cpp +++ b/src/ui/view/view.cpp @@ -121,7 +121,7 @@ void View::setDocument(SPDocument *doc) { _doc->connectURISet(sigc::bind(sigc::ptr_fun(&_onDocumentURISet), this)); _document_resized_connection = _doc->connectResized(sigc::bind(sigc::ptr_fun(&_onDocumentResized), this)); - _document_uri_set_signal.emit( _doc->getURI() ); + _document_uri_set_signal.emit( _doc->getDocumentURI() ); } }}} |
