Code

SPDocument->Document
[inkscape.git] / src / application / editor.cpp
index 49010efdc50dae1291859edfd523471bf9736811..730188bdd0859966d3143946283a34a952ce1fd6 100644 (file)
@@ -18,7 +18,7 @@
 #endif
 
 /*
-  TODO:  Replace SPDocument with the new Inkscape::Document
+  TODO:  Replace Document with the new Inkscape::Document
   TODO:  Change 'desktop's to 'view*'s
   TODO:  Add derivation from Inkscape::Application::RunMode
 */
@@ -76,7 +76,7 @@ Editor::init()
     //
     gchar const *tmpl = g_build_filename ((INKSCAPE_TEMPLATESDIR), "default.svg", NULL);
     bool have_default = Inkscape::IO::file_test (tmpl, G_FILE_TEST_IS_REGULAR);
-    SPDocument *doc = sp_document_new (have_default? tmpl:0, true, true);
+    Document *doc = sp_document_new (have_default? tmpl:0, true, true);
     g_return_val_if_fail (doc != 0, false);
     Inkscape::UI::View::EditWidget *ew = new Inkscape::UI::View::EditWidget (doc);
     sp_document_unref (doc);
@@ -96,7 +96,7 @@ Editor::getWindow()
 }
 
 /// Returns the active document
-SPDocument*
+Document*
 Editor::getActiveDocument()
 {
     if (getActiveDesktop()) {
@@ -107,7 +107,7 @@ Editor::getActiveDocument()
 }
 
 void
-Editor::addDocument (SPDocument *doc)
+Editor::addDocument (Document *doc)
 {
     if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) {
         _instance->_documents = g_slist_append (_instance->_documents, doc);
@@ -116,7 +116,7 @@ Editor::addDocument (SPDocument *doc)
 }
 
 void
-Editor::removeDocument (SPDocument *doc)
+Editor::removeDocument (Document *doc)
 {
     _instance->_document_set.erase(doc);
     if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) {
@@ -125,7 +125,7 @@ Editor::removeDocument (SPDocument *doc)
 }
 
 SPDesktop* 
-Editor::createDesktop (SPDocument* doc)
+Editor::createDesktop (Document* doc)
 {
     g_assert (doc != 0);
     (new Inkscape::UI::View::EditWidget (doc))->present();
@@ -227,13 +227,13 @@ Editor::reactivateDesktop (SPDesktop* dt)
 bool
 Editor::isDuplicatedView (SPDesktop* dt)
 {
-    SPDocument const* document = dt->doc();
+    Document const* document = dt->doc();
     if (!document) {
         return false;
     }
     for ( GSList *iter = _instance->_desktops ; iter ; iter = iter->next ) {
         SPDesktop *other_desktop=(SPDesktop *)iter->data;
-        SPDocument *other_document=other_desktop->doc();
+        Document *other_document=other_desktop->doc();
         if ( other_document == document && other_desktop != dt ) {
             return true;
         }