mirror of
https://github.com/aclist/dztui.git
synced 2026-08-28 18:57:12 +02:00
chore: add boilerplate
This commit is contained in:
parent
5bb4ab688e
commit
08b62e1cfd
@ -45,6 +45,7 @@ WEB_BROWSER = "web-browser-symbolic"
|
||||
|
||||
SEPARATOR = "SEPARATOR"
|
||||
|
||||
# TODO: drop
|
||||
NO_PADDING = 0
|
||||
NO_EXPAND = False
|
||||
NO_FILL = False
|
||||
@ -65,4 +66,5 @@ CHANGELOG_PATH = "data/CHANGELOG.md"
|
||||
CSS_PATH = "data/app.css"
|
||||
|
||||
LOG_FILTERS = ("CRITICAL", "WARNING", "INFO", "DEBUG")
|
||||
# TODO: drop
|
||||
FOREGROUND_CMDS = ("wmctrl", "xdotool")
|
||||
|
||||
@ -9,14 +9,14 @@ from gi.repository import Gdk, GObject # noqa E402
|
||||
if TYPE_CHECKING:
|
||||
from dzgui.const.enum import NotebookPage, ServerTab
|
||||
|
||||
# TODO: rename signals to e.g. maps_keybinding_pressed
|
||||
|
||||
# TODO: if servers fail to load, may leave dangling widgets waiting for a signal
|
||||
|
||||
class Emitter(GObject.GObject):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
|
||||
# TODO: rename request verbs
|
||||
# TODO: rename signals to e.g. maps_keybinding_pressed
|
||||
@GObject.Signal(flags=GObject.SignalFlags.RUN_LAST, arg_types=())
|
||||
def request_keyword_focus(self) -> None:
|
||||
"""User invoked Ctrl-f keybinding from ServerTreeView"""
|
||||
@ -150,4 +150,3 @@ class Emitter(GObject.GObject):
|
||||
def keyword_set(self, keyword: str) -> None:
|
||||
pass
|
||||
|
||||
# TODO: if servers fail to load, may leave dangling widgets waiting for a signal
|
||||
|
||||
@ -52,4 +52,5 @@ def copy_ipdb(ips_path: Path) -> None:
|
||||
return
|
||||
if legacy.is_file() is False:
|
||||
return
|
||||
# TODO: ensure that month file is copied
|
||||
shutil.copy(legacy, ips_path)
|
||||
|
||||
@ -39,6 +39,7 @@ def is_steam_running(cmd: str) -> bool:
|
||||
|
||||
|
||||
# CHORE: test alternate clients
|
||||
# TODO: has_flatpak_steam
|
||||
def is_flatpak_steam_running() -> bool:
|
||||
if has_cmd(FLATPAK_CMD) is False:
|
||||
return False
|
||||
|
||||
@ -102,6 +102,7 @@ def main() -> None:
|
||||
make_parents(XDG.debug)
|
||||
|
||||
if has_new_config(XDG.config) is False:
|
||||
# TODO: handle this in assistant
|
||||
migrate_legacy_conf(XDG.config)
|
||||
migrate_cols_file(XDG.columns)
|
||||
# TODO: copy notes file
|
||||
|
||||
@ -181,7 +181,7 @@ class ModManager:
|
||||
model[path][4] = True
|
||||
self.emitter.emit("mods_highlighted")
|
||||
|
||||
# TODO: strings
|
||||
# TODO: dialog strings
|
||||
@call_on_thread("working")
|
||||
def highlight_stale(self) -> None:
|
||||
stale = find_stale_mods(self.prefs.paths.config)
|
||||
|
||||
@ -215,6 +215,7 @@ class ServerTreeView(ContextMixin, TreeView): # type: ignore
|
||||
|
||||
def _check_result_queue(self) -> Literal[True]:
|
||||
latest_result = None
|
||||
# FIXME: empty results cause statusbar to be emptied
|
||||
while not self.queue.empty():
|
||||
latest_result = self.queue.get()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user