fix: update ok label text if no missing mods

This commit is contained in:
aclist 2026-05-10 01:26:18 +09:00
parent fb5397ae91
commit a1e2876251
3 changed files with 15 additions and 3 deletions

View File

@ -75,6 +75,7 @@ class Prerequisites:
dayz_running: bool
steam_proc: SteamProcess
mods: list[str]
missing_mods: int
foreground_cmd: str | None
game_mode: bool
@ -183,6 +184,7 @@ class ConnectionManager:
dayz_running=dayz_running,
steam_proc=steam_proc,
mods=remote_mods,
missing_mods=len(self.missing_mods),
foreground_cmd=self.foreground_cmd, # TODO: change to bool
game_mode=game_mode,
)
@ -259,7 +261,7 @@ class ConnectionManager:
if is_dayz_running():
break
time.sleep(1)
# TODO: add to history file and list store
# TODO: add self.record to history file and list store
# proxy_model.append_to_history()
func = StoredFunc(self.controller.open_page, NotebookPage.SERVERS)
self.thread_man.set_cleanup_func(func)
@ -304,4 +306,3 @@ class ConnectionManager:
self._connect_steam()
else:
self._connect_steam()
# TODO: use this only if going back before launching

View File

@ -214,6 +214,16 @@ class ServerModelManager:
res = Servers.query_by_record(record)
self._parse_single_record(res, delete=True)
# TODO:
# def add_to_history(self, record: Servers.Record) -> None:
# functionally similar to remove action
# # needs to be called from controller against history tree, not current tree
# proxy_man = self._get_proxy_man()
# # proxy_man.append_row_to_history
# control_model = proxy_man.get_control()
# config_man = self.controller.get_config_man()
# config_man.update_history_file(control_model)
def remove_from_history(self, record: Servers.Record) -> None:
"""Fully unthreaded, just removes a row"""
proxy_man = self._get_proxy_man()

View File

@ -284,11 +284,12 @@ class PreConnectionAssistant(Gtk.ScrolledWindow):
if prereqs.foreground_cmd is not None:
self.raise_window.set_sensitive(True)
if prereqs.missing_mods < 1:
self.ok.set_label(preconnect.connect)
if total_mods < 1:
self.scrolled.set_visible(False)
self.progress_box.set_visible(False)
self.mods_placeholder.set_visible(True)
self.ok.set_label(preconnect.connect)
else:
self.scrolled.set_visible(True)
self.progress_box.set_visible(True)