X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffile.cpp;h=f7cd6a09afb06e30f1811cd91eb8e23422171eb2;hb=1b7827f2519b38d72174d744f9795392d538d64f;hp=50fcd3642a0eab67a58da51893cbf6a797f8cba6;hpb=d6f9b52df16e79dea9fe5c9a6db9e5eee14dee62;p=inkscape.git diff --git a/src/file.cpp b/src/file.cpp index 50fcd3642..f7cd6a09a 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -31,8 +31,6 @@ #include #include -#include "application/application.h" -#include "application/editor.h" #include "desktop.h" #include "desktop-handles.h" #include "dialogs/export.h" @@ -126,19 +124,14 @@ sp_file_new(const Glib::ustring &templ) g_return_val_if_fail(doc != NULL, NULL); SPDesktop *dt; - if (Inkscape::NSApplication::Application::getNewGui()) - { - dt = Inkscape::NSApplication::Editor::createDesktop (doc); - } else { - SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL)); - g_return_val_if_fail(dtw != NULL, NULL); - sp_document_unref(doc); + SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL)); + g_return_val_if_fail(dtw != NULL, NULL); + sp_document_unref(doc); - sp_create_window(dtw, TRUE); - dt = static_cast(dtw->view); - sp_namedview_window_from_document(dt); - sp_namedview_update_layers_from_document(dt); - } + sp_create_window(dtw, TRUE); + dt = static_cast(dtw->view); + sp_namedview_window_from_document(dt); + sp_namedview_update_layers_from_document(dt); #ifdef WITH_DBUS Inkscape::Extension::Dbus::dbus_init_desktop_interface(dt); @@ -247,14 +240,10 @@ sp_file_open(const Glib::ustring &uri, desktop->change_document(doc); sp_document_resized_signal_emit (doc, sp_document_width(doc), sp_document_height(doc)); } else { - if (!Inkscape::NSApplication::Application::getNewGui()) { - // create a whole new desktop and window - SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL)); - sp_create_window(dtw, TRUE); - desktop = static_cast(dtw->view); - } else { - desktop = Inkscape::NSApplication::Editor::createDesktop (doc); - } + // create a whole new desktop and window + SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL)); + sp_create_window(dtw, TRUE); + desktop = static_cast(dtw->view); } doc->virgin = FALSE;