chore: add boilerplate

This commit is contained in:
aclist 2026-05-16 20:11:11 +09:00
parent 5bb4ab688e
commit 08b62e1cfd
7 changed files with 9 additions and 4 deletions

View File

@ -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")

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View 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)

View File

@ -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()