diff options
| author | Liam P. White <inkscapebrony@gmail.com> | 2014-06-25 20:21:44 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebrony@gmail.com> | 2014-06-25 20:21:44 +0000 |
| commit | 60f288cc584bf34c65698341427cf377b88c7138 (patch) | |
| tree | b8b7e6d3c24f95350e85e4c1754a27d5dc9bde6c /src/inkscape.cpp | |
| parent | 1. make it compile (diff) | |
| download | inkscape-60f288cc584bf34c65698341427cf377b88c7138.tar.gz inkscape-60f288cc584bf34c65698341427cf377b88c7138.zip | |
2. connect signals
(bzr r13341.5.2)
Diffstat (limited to 'src/inkscape.cpp')
| -rw-r--r-- | src/inkscape.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 23c2b001a..4e8b06ef4 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -506,7 +506,7 @@ Application::Application() } this->menus = NULL; - //this->desktops = NULL; + this->desktops = NULL; this->_dialogs_toggle = TRUE; this->_mapalt = GDK_MOD1_MASK; this->_trackalt = FALSE; @@ -976,6 +976,10 @@ void Application::add_desktop (SPDesktop * desktop) { g_return_if_fail (desktop != NULL); + if (desktops == NULL) { + desktops = new std::list<SPDesktop*>; + g_message("Creating new desktop list."); + } //g_return_if_fail (inkscape != NULL); g_assert (std::find(desktops->begin(), desktops->end(), desktop) == desktops->end()); @@ -1030,7 +1034,9 @@ Application::remove_desktop (SPDesktop * desktop) // if this was the last desktop, shut down the program if (desktops->empty()) { + g_message("Shutting down."); this->exit(); + delete desktops; } } @@ -1285,7 +1291,7 @@ Application::remove_document (SPDocument *document) SPDesktop * Application::active_desktop() { - if (desktops == NULL) { + if (!desktops || desktops->empty()) { return NULL; } |
