summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorSlagvi Public <JandotDarowskiattgmaildottcom>2013-09-18 15:15:17 +0000
committerSlagvi Public <JandotDarowskiattgmaildottcom>2013-09-18 15:15:17 +0000
commit4eb731d194e43b55a97ad1c9d4f5d095d4b759a0 (patch)
treee997f246dfcfe1c5bc1e026bcbd1cc16490f42ba /src/file.cpp
parentFix "default_*" template names treatment. (diff)
downloadinkscape-4eb731d194e43b55a97ad1c9d4f5d095d4b759a0.tar.gz
inkscape-4eb731d194e43b55a97ad1c9d4f5d095d4b759a0.zip
Opening new documents behaviour fixed.
(bzr r12481.1.9)
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/file.cpp b/src/file.cpp
index 68e229e62..12373a2e5 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -139,24 +139,14 @@ SPDesktop *sp_file_new(const Glib::ustring &templ)
}
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- if (desktop) {
+ if (desktop)
desktop->setWaitingCursor();
- }
- SPDocument *existing = desktop ? sp_desktop_document(desktop) : NULL;
- if (existing && existing->virgin) {
- // If the current desktop is empty, open the document there
- doc->ensureUpToDate(); // TODO this will trigger broken link warnings, etc.
- desktop->change_document(doc);
- doc->emitResizedSignal(doc->getWidth(), doc->getHeight());
- } else {
- // create a whole new desktop and window
- SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL)); // TODO this will trigger broken link warnings, etc.
- g_return_val_if_fail(dtw != NULL, NULL);
- sp_create_window(dtw, TRUE);
- desktop = static_cast<SPDesktop *>(dtw->view);
- }
+ SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL)); // TODO this will trigger broken link warnings, etc.
+ g_return_val_if_fail(dtw != NULL, NULL);
+ sp_create_window(dtw, TRUE);
+ desktop = static_cast<SPDesktop *>(dtw->view);
doc->doUnref();
@@ -166,6 +156,9 @@ SPDesktop *sp_file_new(const Glib::ustring &templ)
#ifdef WITH_DBUS
Inkscape::Extension::Dbus::dbus_init_desktop_interface(desktop);
#endif
+
+ if (desktop)
+ desktop->clearWaitingCursor();
return desktop;
}
@@ -220,7 +213,7 @@ SPDesktop* sp_file_new_default()
{
Glib::ustring templateUri = sp_file_default_template_uri();
SPDesktop* desk = sp_file_new(sp_file_default_template_uri());
- rdf_add_from_preferences( SP_ACTIVE_DOCUMENT );
+ //rdf_add_from_preferences( SP_ACTIVE_DOCUMENT );
return desk;
}