diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2018-11-12 20:22:44 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2018-11-18 12:39:15 +0000 |
| commit | 408cb49b5559a81ea803df64bf58457a5dd4bf16 (patch) | |
| tree | ce3eac6a8bf8f641ba1c71b72f228080d201bb6d /src/inkscape.cpp | |
| parent | Fix stream class locations (diff) | |
| download | inkscape-408cb49b5559a81ea803df64bf58457a5dd4bf16.tar.gz inkscape-408cb49b5559a81ea803df64bf58457a5dd4bf16.zip | |
Rewrite of main.cpp using InkscapeApplication (Gtk::Application)
Use Gio::File for accessing files.
Use Gio options to handle command line arguments.
Use Gio::Actions for some command line arguments.
Move file export code to src/io/file-export-cmd.h/.cpp. Make into class.
Diffstat (limited to 'src/inkscape.cpp')
| -rw-r--r-- | src/inkscape.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 19438b437..acac67649 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -67,7 +67,7 @@ Inkscape::Application * Inkscape::Application::_S_inst = nullptr; bool Inkscape::Application::_crashIsHappening = false; -#define DESKTOP_IS_ACTIVE(d) (!INKSCAPE._desktops->empty() && ((d) == INKSCAPE._desktops->front())) +#define DESKTOP_IS_ACTIVE(d) (INKSCAPE._desktops != nullptr && !INKSCAPE._desktops->empty() && ((d) == INKSCAPE._desktops->front())) static void (* segv_handler) (int) = SIG_DFL; static void (* abrt_handler) (int) = SIG_DFL; @@ -609,7 +609,7 @@ Application::~Application() _S_inst = nullptr; // this will probably break things refCount = 0; - gtk_main_quit (); + // gtk_main_quit (); } /** Sets the keyboard modifer to map to Alt. @@ -1279,6 +1279,7 @@ Application::action_context_for_document(SPDocument *doc) // Document is not associated with any desktops - maybe we're in command-line mode std::map<SPDocument *, AppSelectionModel *>::iterator sel_iter = _selection_models.find(doc); if (sel_iter == _selection_models.end()) { + std::cout << "Application::action_context_for_document: no selection model" << std::endl; return Inkscape::ActionContext(); } return Inkscape::ActionContext(sel_iter->second->getSelection()); @@ -1309,7 +1310,7 @@ Application::exit () signal_shut_down.emit(); Inkscape::Preferences::unload(); - gtk_main_quit (); + //gtk_main_quit (); } |
