diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 2452a212..e3822e2a 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -82,7 +82,6 @@ class Application(Gtk.Application): self.add_main_option("debug", ord("d"), GLib.OptionFlags.NONE, GLib.OptionArg.STRING, "", None) handlers = {"on_close_app": self.on_close_app, - "on_resize": self.on_resize, "on_about_app": self.on_about_app, "on_settings": self.on_settings, "on_profile_changed": self.on_profile_changed, @@ -524,6 +523,10 @@ class Application(Gtk.Application): event.state |= MOD_MASK def on_close_app(self, *args): + """ Performing operations before closing the application. """ + # Saving the current size of the application window. + self._settings.add("window_size", self._main_window.get_size()) + if self._recorder: if self._recorder.is_record(): msg = "{}\n\n\t{}".format(get_message("Recording in progress!"), get_message("Are you sure?")) @@ -538,10 +541,6 @@ class Application(Gtk.Application): else: GLib.idle_add(self.quit) - def on_resize(self, window): - """ Stores new size properties for app window after resize """ - self._settings.add("window_size", window.get_size()) - @run_idle def on_about_app(self, action, value=None): show_dialog(DialogType.ABOUT, self._main_window) diff --git a/app/ui/main_window.glade b/app/ui/main_window.glade index fd8fdf5f..c3a0102f 100644 --- a/app/ui/main_window.glade +++ b/app/ui/main_window.glade @@ -1009,7 +1009,6 @@ Author: Dmitriy Yefremov demon-editor center DemonEditor -