From d60204b676ae3f975068f5ff8fe59a332e139b7b Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 26 May 2026 03:51:44 +0900 Subject: [PATCH 01/10] chore: reorder operations in entrypoint function --- dzgui/main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dzgui/main.py b/dzgui/main.py index 9ca1018..c5d74d4 100644 --- a/dzgui/main.py +++ b/dzgui/main.py @@ -121,8 +121,6 @@ def main() -> None: with open(XDG.debug, "w") as f: f.truncate(0) - latest_release = check_updates(version) - if _is_steam_deck is False: # TODO: sudo escalation dialog # count = get_map_count() @@ -130,16 +128,22 @@ def main() -> None: if has_steam_client() is False: EarlyAlertDialog(init.requires_steam) + is_dayz_installed(XDG.config) + + # TODO: slow running procs here--needs dialog # NOTE: clears versions file of unlinked mods rebuild_symlinks(XDG.config) remove_stale_signatures(XDG.config, XDG.version) - is_dayz_installed(XDG.config) # TODO: handle IP DB failure and use coords fallback + # TODO: drop this after dialog is complete + print("Fetching geolocation data, may take some time...") get_ipdb(XDG.ips) local_coords = get_local_coords(XDG.ips) use_miles = lookup(XDG.config, Preferences.DIST) + latest_release = check_updates(version) + prefs = UserPrefs( is_steam_deck=_is_steam_deck, is_game_mode=_is_game_mode, From 00c27ad0204c025aecf30019411de86a64dc9510 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 26 May 2026 03:52:11 +0900 Subject: [PATCH 02/10] fix: resolve #308 --- dzgui/util/symlink.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/dzgui/util/symlink.py b/dzgui/util/symlink.py index ad96e0a..50253b8 100644 --- a/dzgui/util/symlink.py +++ b/dzgui/util/symlink.py @@ -43,11 +43,14 @@ def clone_symlinks(steam_path: Path) -> None: # TODO: test these two operations # use less time intensive logic like the above - for file in exp_path.iterdir(): - if file.is_symlink(): - file.unlink() + try: + for file in exp_path.iterdir(): + if file.is_symlink(): + file.unlink() - for file in dayz_path.iterdir(): - if file.is_symlink(): - uid = file.name - Path(exp_path / uid).symlink_to(dayz_path / uid) + for file in dayz_path.iterdir(): + if file.is_symlink(): + uid = file.name + Path(exp_path / uid).symlink_to(dayz_path / uid) + except Exception as e: + logger.critical(e) From afdfa76fdf32d5050f41c4d2ba5946e46d663f7d Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 26 May 2026 03:53:01 +0900 Subject: [PATCH 03/10] fix: resolve #309, #307 --- dzgui/managers/connection.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dzgui/managers/connection.py b/dzgui/managers/connection.py index 43e2293..cbc1c34 100644 --- a/dzgui/managers/connection.py +++ b/dzgui/managers/connection.py @@ -161,7 +161,7 @@ class ConnectionManager: if len(self.missing_mods) > 0: required_size = sum(row[2] for row in self.missing_mods) required_mib = format_mib(required_size) - free_mib = format_mib(required_size) + free_mib = format_mib(free) dayz_running = is_dayz_running() @@ -222,7 +222,8 @@ class ConnectionManager: def query_modlist_and_present(self, record: Servers.Record) -> None: try: mods = self._query_modlist(record) - except Exception: + except Exception as e: + print(f"{type(e).__name__}: {e}") self.thread_man.set_cleanup_func( StoredFunc(self._server_timeout), destroy_first=True ) @@ -279,8 +280,13 @@ class ConnectionManager: for title, mod, stamp, size in self.missing_mods: # TODO: check cancel and exit events + if self.controller.get_exit_event().is_set(): + return + if self.controller.get_cancel_event().is_set(): + self.controller.clear_cancel_event() + return enqueue_mod(mod, self.appid) - time.sleep(2) + time.sleep(2.5) if raise_window is True: logger.info("Bringing window to foreground") From 3e144dc7d20a1c3dec0a429755977e00b058eac1 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 26 May 2026 03:54:30 +0900 Subject: [PATCH 04/10] fix: resolve #305 --- dzgui/views/dialogs/early_alert.py | 2 ++ dzgui/views/pages/log.py | 3 ++- dzgui/views/pages/mods.py | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dzgui/views/dialogs/early_alert.py b/dzgui/views/dialogs/early_alert.py index a404a32..1f911c7 100644 --- a/dzgui/views/dialogs/early_alert.py +++ b/dzgui/views/dialogs/early_alert.py @@ -53,3 +53,5 @@ class EarlyIgnoreDialog(EarlyAlertDialog): # TODO: reverse order self.add_button("Ignore", Gtk.ResponseType.CANCEL) + + # TODO: if exit, sys.exit(1), else pass diff --git a/dzgui/views/pages/log.py b/dzgui/views/pages/log.py index b9fbc3b..a9e1bd5 100644 --- a/dzgui/views/pages/log.py +++ b/dzgui/views/pages/log.py @@ -1,5 +1,6 @@ from typing import TYPE_CHECKING from dzgui.const.constants import LOG_FILTERS +from dzgui.views.components.scrollable import NoOverlayScrolledWindow from dzgui.views.mixins.cursor_mixin import CursorMixin from dzgui.views.mixins.help_menu_mixin import HelpMenuMixin from dzgui.views.trees.tree_log import LogTreeView @@ -21,7 +22,7 @@ class Log(CursorMixin, HelpMenuMixin, Gtk.Box): # type: ignore NOTE: LogTreeView is kept in a separate ScrolledWindow so that checkboxes will be flush on bottom """ - self.scrolled = Gtk.ScrolledWindow() + self.scrolled = NoOverlayScrolledWindow() self.treeview = LogTreeView(controller) self.scrolled.add(self.treeview) diff --git a/dzgui/views/pages/mods.py b/dzgui/views/pages/mods.py index 89509d6..f87d993 100644 --- a/dzgui/views/pages/mods.py +++ b/dzgui/views/pages/mods.py @@ -1,4 +1,5 @@ from typing import Self, TYPE_CHECKING +from dzgui.views.components.scrollable import NoOverlayScrolledWindow from dzgui.views.trees.tree_mods import ModTreeView import gi @@ -10,7 +11,8 @@ if TYPE_CHECKING: from dzgui.controllers.mc import Controller -class Mods(Gtk.ScrolledWindow): + +class Mods(NoOverlayScrolledWindow): def __init__(self, controller: "Controller") -> None: super().__init__() From c95ad53f6f5ed09ba611e3eb68f8fc3f494716d8 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 26 May 2026 03:55:51 +0900 Subject: [PATCH 05/10] chore: bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5f81c07..63badb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ description = "DayZ server browser and mod manager for Linux" authors = [ {name = "aclist"} ] -version = "7.0.0b5" +version = "7.0.0b6" license = "GPL-3.0-or-later" license-files = ["LICENSE"] readme = "README.md" From c45678ca881d620584acd6ffa9625241e26124da Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 26 May 2026 03:56:35 +0900 Subject: [PATCH 06/10] chore: add custom ScrolledWindow class --- dzgui/views/components/scrollable.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 dzgui/views/components/scrollable.py diff --git a/dzgui/views/components/scrollable.py b/dzgui/views/components/scrollable.py new file mode 100644 index 0000000..b205c62 --- /dev/null +++ b/dzgui/views/components/scrollable.py @@ -0,0 +1,11 @@ +from dzgui.util import css + +import gi + +gi.require_version("Gtk", "3.0") +from gi.repository import Gtk # noqa + + +class NoOverlayScrolledWindow(Gtk.ScrolledWindow): + def __init__(self) -> None: + super().__init__(overlay_scrolling=False) From d57277f527b029a1a5cc0c5b727a047c07918346 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 26 May 2026 03:57:13 +0900 Subject: [PATCH 07/10] fix: drop unused import --- dzgui/views/components/scrollable.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/dzgui/views/components/scrollable.py b/dzgui/views/components/scrollable.py index b205c62..294ca53 100644 --- a/dzgui/views/components/scrollable.py +++ b/dzgui/views/components/scrollable.py @@ -1,5 +1,3 @@ -from dzgui.util import css - import gi gi.require_version("Gtk", "3.0") From 41b3ad8eca183e6e3093ca9be10af4a5ec26ff6a Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 26 May 2026 03:59:11 +0900 Subject: [PATCH 08/10] chore: clear typehinting errors --- dzgui/init/migrate.py | 3 ++- dzgui/util/_json.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dzgui/init/migrate.py b/dzgui/init/migrate.py index 9414b4c..97c5587 100644 --- a/dzgui/init/migrate.py +++ b/dzgui/init/migrate.py @@ -1,6 +1,7 @@ import shutil from pathlib import Path +from typing import Any from dzgui.const.constants import LEGACY_CONFIG_PATH, LEGACY_COLS_PATH, LEGACY_IPS_PATH from dzgui.config.convert import rc2json from dzgui.util._json import read_json, write_json @@ -17,7 +18,7 @@ def has_new_config(config: Path) -> bool: return config.exists() -def convert_cols_file(res: Path) -> dict[str, int] | None: +def convert_cols_file(res: Path) -> Any | None: j = read_json(res) cols = j["cols"] # NOTE: implies prior conversion diff --git a/dzgui/util/_json.py b/dzgui/util/_json.py index 58faa93..cad0263 100644 --- a/dzgui/util/_json.py +++ b/dzgui/util/_json.py @@ -12,7 +12,7 @@ def read_json(path: Path) -> Any: raise e -def write_json(data: dict, path: Path) -> None: +def write_json(data: dict[str, Any], path: Path) -> None: try: j = json.dumps(data, indent=2) path.write_text(j) From ef2709561d7589074f8e1674717aa40d73f98840 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 26 May 2026 04:40:14 +0900 Subject: [PATCH 09/10] fix: resolve #306 --- dzgui/model/servers.py | 4 +++- dzgui/views/pages/servers.py | 13 ------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/dzgui/model/servers.py b/dzgui/model/servers.py index db9cac7..ad75b15 100644 --- a/dzgui/model/servers.py +++ b/dzgui/model/servers.py @@ -324,6 +324,7 @@ class ServerModelManager: self.thread_man.set_cleanup_func(func) return config_man.add_saved_server(fqip) + # FIXME: this is valid if saved servers tab is already open, # but not if app was just booted; causes single row to appear prematurely if proxy_man.has_control_model() is False: @@ -374,7 +375,8 @@ class ServerModelManager: proxy = self._get_proxy_man().get_proxy_model() self.tv.set_model(proxy) - self.emitter.emit("servers_loaded", self.enum) + if self.controller.get_active_treeview().get_enum == ServerTab.SAVED: + self.emitter.emit("servers_loaded", self.enum) filter_man = self.tv.get_filter_man() # NOTE: maps are set outside of thread because it triggers map changed signals diff --git a/dzgui/views/pages/servers.py b/dzgui/views/pages/servers.py index 2d12413..651dfe5 100644 --- a/dzgui/views/pages/servers.py +++ b/dzgui/views/pages/servers.py @@ -162,19 +162,6 @@ class ServerNotebook(Gtk.ScrolledWindow): return tv raise ValueError("No treeview set") - def add_notification(self) -> None: - saved = self.notebook.get_nth_page(1) - if saved is None: - return - text = self.notebook.get_tab_label_text(saved) - if text is None: - return - # TODO: strings - if "*" in text: - return - text += "*" - self.notebook.set_tab_label_text(saved, text) - def update_tab_widths(self, col: Gtk.TreeViewColumn) -> None: # TODO: may cause pixel offsets when application is maximized width = col.get_width() From 92699ebaa9aa12f8ce619760d20b09eb2c40682a Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Tue, 26 May 2026 04:42:50 +0900 Subject: [PATCH 10/10] chore: revert delay to 3s --- dzgui/managers/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui/managers/connection.py b/dzgui/managers/connection.py index cbc1c34..a03992d 100644 --- a/dzgui/managers/connection.py +++ b/dzgui/managers/connection.py @@ -286,7 +286,7 @@ class ConnectionManager: self.controller.clear_cancel_event() return enqueue_mod(mod, self.appid) - time.sleep(2.5) + time.sleep(3) if raise_window is True: logger.info("Bringing window to foreground")