mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 15:12:48 +01:00
fix: update ok label text if no missing mods
This commit is contained in:
1 parent
fb5397ae91
commit
a1e2876251
3 files changed
+15
-3
No files matched your search
@@ -75,6 +75,7 @@ class Prerequisites:
|
|||||||
dayz_running: bool
|
dayz_running: bool
|
||||||
steam_proc: SteamProcess
|
steam_proc: SteamProcess
|
||||||
mods: list[str]
|
mods: list[str]
|
||||||
|
missing_mods: int
|
||||||
foreground_cmd: str | None
|
foreground_cmd: str | None
|
||||||
game_mode: bool
|
game_mode: bool
|
||||||
|
|
||||||
@@ -183,6 +184,7 @@ class ConnectionManager:
|
|||||||
dayz_running=dayz_running,
|
dayz_running=dayz_running,
|
||||||
steam_proc=steam_proc,
|
steam_proc=steam_proc,
|
||||||
mods=remote_mods,
|
mods=remote_mods,
|
||||||
|
missing_mods=len(self.missing_mods),
|
||||||
foreground_cmd=self.foreground_cmd, # TODO: change to bool
|
foreground_cmd=self.foreground_cmd, # TODO: change to bool
|
||||||
game_mode=game_mode,
|
game_mode=game_mode,
|
||||||
)
|
)
|
||||||
@@ -259,7 +261,7 @@ class ConnectionManager:
|
|||||||
if is_dayz_running():
|
if is_dayz_running():
|
||||||
break
|
break
|
||||||
time.sleep(1)
|
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()
|
# proxy_model.append_to_history()
|
||||||
func = StoredFunc(self.controller.open_page, NotebookPage.SERVERS)
|
func = StoredFunc(self.controller.open_page, NotebookPage.SERVERS)
|
||||||
self.thread_man.set_cleanup_func(func)
|
self.thread_man.set_cleanup_func(func)
|
||||||
@@ -304,4 +306,3 @@ class ConnectionManager:
|
|||||||
self._connect_steam()
|
self._connect_steam()
|
||||||
else:
|
else:
|
||||||
self._connect_steam()
|
self._connect_steam()
|
||||||
# TODO: use this only if going back before launching
|
|
||||||
@@ -214,6 +214,16 @@ class ServerModelManager:
|
|||||||
res = Servers.query_by_record(record)
|
res = Servers.query_by_record(record)
|
||||||
self._parse_single_record(res, delete=True)
|
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:
|
def remove_from_history(self, record: Servers.Record) -> None:
|
||||||
"""Fully unthreaded, just removes a row"""
|
"""Fully unthreaded, just removes a row"""
|
||||||
proxy_man = self._get_proxy_man()
|
proxy_man = self._get_proxy_man()
|
||||||
|
|||||||
@@ -284,11 +284,12 @@ class PreConnectionAssistant(Gtk.ScrolledWindow):
|
|||||||
if prereqs.foreground_cmd is not None:
|
if prereqs.foreground_cmd is not None:
|
||||||
self.raise_window.set_sensitive(True)
|
self.raise_window.set_sensitive(True)
|
||||||
|
|
||||||
|
if prereqs.missing_mods < 1:
|
||||||
|
self.ok.set_label(preconnect.connect)
|
||||||
if total_mods < 1:
|
if total_mods < 1:
|
||||||
self.scrolled.set_visible(False)
|
self.scrolled.set_visible(False)
|
||||||
self.progress_box.set_visible(False)
|
self.progress_box.set_visible(False)
|
||||||
self.mods_placeholder.set_visible(True)
|
self.mods_placeholder.set_visible(True)
|
||||||
self.ok.set_label(preconnect.connect)
|
|
||||||
else:
|
else:
|
||||||
self.scrolled.set_visible(True)
|
self.scrolled.set_visible(True)
|
||||||
self.progress_box.set_visible(True)
|
self.progress_box.set_visible(True)
|
||||||
|
|||||||
Reference in new issue
Block a user