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