From df872fa4e7f3f0d23c9c369bd24d25205e02fe0a Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 14 Mar 2025 23:47:46 +0900 Subject: [PATCH] fix: send proper params to halt funcs --- helpers/ui.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/helpers/ui.py b/helpers/ui.py index 6d07f30..622bff3 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -899,7 +899,7 @@ class OuterWindow(Gtk.Window): def halt_proc_and_quit(self, window, event): self.grid.terminate_treeview_process() - save_res_and_quit(self.win) + save_res_and_quit(window) class ScrollableTree(Gtk.ScrolledWindow): @@ -2455,11 +2455,14 @@ class App(Gtk.Application): self.win.add_accel_group(accel) - GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, self._halt_window_subprocess) + GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, signal.SIGINT, self._catch_sigint) Gtk.main() + def _catch_sigint(self): + self.win.halt_proc_and_quit(self.win, None) + def _halt_window_subprocess(self, accel_group, window, code, flag): - self.win.halt_proc_and_quit(self, None) + self.win.halt_proc_and_quit(self.win, None) def save_res_and_quit(window): if window.props.is_maximized: