Browse Source

Fixes #354: resets Project::current when closing juci. Also now runs exit code when application is closed by desktop environment

merge-requests/365/head
eidheim 8 years ago
parent
commit
83ed4cfa00
  1. 13
      src/window.cc

13
src/window.cc

@ -161,6 +161,15 @@ Window::Window() {
return false; return false;
}); });
signal_hide().connect([]{
while(!Source::View::non_deleted_views.empty()) {
while(Gtk::Main::events_pending())
Gtk::Main::iteration(false);
}
// TODO 2022 (after Debian Stretch LTS has ended, see issue #354): remove:
Project::current=nullptr;
});
Gtk::Settings::get_default()->connect_property_changed("gtk-theme-name", [this] { Gtk::Settings::get_default()->connect_property_changed("gtk-theme-name", [this] {
Directories::get().update(); Directories::get().update();
if(auto view=Notebook::get().get_current_view()) if(auto view=Notebook::get().get_current_view())
@ -217,10 +226,6 @@ void Window::set_menu_actions() {
}); });
menu.add_action("quit", [this]() { menu.add_action("quit", [this]() {
close(); close();
while(!Source::View::non_deleted_views.empty()) {
while(Gtk::Main::events_pending())
Gtk::Main::iteration(false);
}
}); });
menu.add_action("new_file", [this]() { menu.add_action("new_file", [this]() {

Loading…
Cancel
Save