mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 06:32:53 +01:00
chore: abstract cancel check function to controller
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
This commit is contained in:
1 parent
b615869278
commit
9fa2840d1b
3 files changed
+15
-30
No files matched your search
@@ -525,3 +525,13 @@ class Controller(GObject.GObject):
|
||||
|
||||
def present_window(self) -> None:
|
||||
self.mediator.window.present_with_time(Gdk.CURRENT_TIME)
|
||||
|
||||
def is_cancel_pending(self) -> bool:
|
||||
if self.get_exit_event().is_set():
|
||||
return True
|
||||
if self.get_cancel_event().is_set():
|
||||
self.clear_cancel_event()
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Reference in new issue
Block a user