mirror of
https://github.com/aclist/dztui.git
synced 2026-10-29 14:12:45 +01:00
feat: setup wizard (WIP)
This commit is contained in:
1 parent
f0e51fa758
commit
07ea73ef2e
17 files changed
+839
-61
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import inspect
|
||||
import logging
|
||||
import threading
|
||||
from typing import Any, Literal, TYPE_CHECKING
|
||||
from typing import Any, Literal, TYPE_CHECKING, Union
|
||||
|
||||
from functools import wraps
|
||||
from typing import Callable
|
||||
@@ -52,7 +52,7 @@ class StoredFunc:
|
||||
|
||||
|
||||
class ThreadingManager:
|
||||
def __init__(self, controller: "Controller") -> None:
|
||||
def __init__(self, controller: Union["Controller", None]) -> None:
|
||||
self.controller = controller
|
||||
self.jobs = 1
|
||||
self.cleanup_func: StoredFunc | None = None
|
||||
@@ -69,7 +69,7 @@ class ThreadingManager:
|
||||
func.call()
|
||||
GLib.idle_add(self._destroy_on_idle)
|
||||
|
||||
if show_dialog:
|
||||
if show_dialog is True and self.controller is not None:
|
||||
self.wait_dialog = WaitDialog(
|
||||
self.controller, dialog_str, jobs=self.jobs, show_cancel=show_cancel
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user