diff options
| author | Karl Cheng <qantas94heavy@gmail.com> | 2019-05-22 10:39:30 +0000 |
|---|---|---|
| committer | Karl Cheng <qantas94heavy@gmail.com> | 2019-06-16 09:43:07 +0000 |
| commit | eee1a8040505f84fad7b313a82082e85ea0a94c6 (patch) | |
| tree | cb392d5b28f4d23298563e06ebd4ff0bc556b0c1 /src/file.cpp | |
| parent | Replace deprecated Gtk::Menu::popup() -> popup_at_pointer() (diff) | |
| download | inkscape-eee1a8040505f84fad7b313a82082e85ea0a94c6.tar.gz inkscape-eee1a8040505f84fad7b313a82082e85ea0a94c6.zip | |
Replace deprecated Gtk::Main::quit() call
As this should only be called in a console context, we can replace
Gtk::Main::quit() with Gio::Application::quit().
Diffstat (limited to 'src/file.cpp')
| -rw-r--r-- | src/file.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/file.cpp b/src/file.cpp index a0c53a6ee..6b8e52c45 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -148,12 +148,13 @@ SPDesktop* sp_file_new_default() /** * Perform document closures preceding an exit() */ -void -sp_file_exit() +void sp_file_exit() { if (SP_ACTIVE_DESKTOP == nullptr) { // We must be in console mode - Gtk::Main::quit(); + auto app = Gio::Application::get_default(); + g_assert(app); + app->quit(); } else { sp_ui_close_all(); // no need to call inkscape_exit here; last document being closed will take care of that @@ -161,7 +162,6 @@ sp_file_exit() } - /** * Handle prompting user for "do you want to revert"? Revert on "OK" */ |
