mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 14:42:54 +01:00
feat: set exit event on SIGINT
This commit is contained in:
1 parent
90f818f462
commit
0aafe44b4e
3 files changed
+17
-4
No files matched your search
+10
-2
@@ -1,7 +1,7 @@
|
||||
import inspect
|
||||
import logging
|
||||
import threading
|
||||
|
||||
from typing import Any, Callable, TYPE_CHECKING
|
||||
from typing import Any, TYPE_CHECKING
|
||||
|
||||
import dzgui.util._json as JSON # noqa
|
||||
|
||||
@@ -84,6 +84,8 @@ class Controller(GObject.GObject):
|
||||
self.loaded = False
|
||||
self.pending_jobs = 1
|
||||
|
||||
self.exit_event = threading.Event()
|
||||
|
||||
def get_emitter(self) -> Emitter:
|
||||
return self.emitter
|
||||
|
||||
@@ -442,3 +444,9 @@ class Controller(GObject.GObject):
|
||||
|
||||
def get_modtreeview(self) -> "ModTreeView":
|
||||
return self.mediator.modtreeview
|
||||
|
||||
def set_exit_event(self) -> None:
|
||||
self.exit_event.set()
|
||||
|
||||
def get_exit_event(self) -> None:
|
||||
return self.exit_event
|
||||
Reference in new issue
Block a user