mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 22:52:42 +01:00
feat: preconnect dialog fields (WIP)
This commit is contained in:
1 parent
dcbc1fa716
commit
5f8795acf7
7 files changed
+144
-82
No files matched your search
+40
-21
@@ -191,6 +191,7 @@ def parse_json(json: list) -> list:
|
|||||||
return rows
|
return rows
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def query_direct(ip: str, qport: int, timeout: float = 3.0) -> dict | None:
|
def query_direct(ip: str, qport: int, timeout: float = 3.0) -> dict | None:
|
||||||
try:
|
try:
|
||||||
info = a2s.info((ip, qport), timeout)
|
info = a2s.info((ip, qport), timeout)
|
||||||
@@ -238,12 +239,12 @@ class Details:
|
|||||||
success: bool
|
success: bool
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
#@dataclass(slots=True, frozen=True)
|
||||||
class Prereqs:
|
#class Prereqs:
|
||||||
password: bool
|
# password: bool
|
||||||
gameport: int
|
# gameport: int
|
||||||
appid: Union[int, None]
|
# appid: Union[int, None]
|
||||||
version: Union[str, None]
|
# version: Union[str, None]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True)
|
@dataclass(slots=True)
|
||||||
@@ -256,19 +257,25 @@ class Record:
|
|||||||
gameport: int
|
gameport: int
|
||||||
qport: int
|
qport: int
|
||||||
|
|
||||||
|
@dataclass(frozen=True, slots=True)
|
||||||
|
class PreReqs:
|
||||||
|
record: Record
|
||||||
|
source: a2s.SourceInfo
|
||||||
|
|
||||||
def get_prereqs(ip: str, qport: int) -> Prereqs:
|
|
||||||
try:
|
|
||||||
info = a2s.info((ip, qport))
|
|
||||||
except TimeoutError:
|
|
||||||
return Prereqs(False, 0, None, None)
|
|
||||||
|
|
||||||
gameport = getattr(info, "port", 0)
|
|
||||||
is_password = getattr(info, "password_protected", False)
|
|
||||||
appid = getattr(info, "game_id", None)
|
|
||||||
version = getattr(info, "version", None)
|
|
||||||
|
|
||||||
return Prereqs(is_password, gameport, appid, version)
|
#def get_prereqs(ip: str, qport: int) -> Prereqs:
|
||||||
|
# try:
|
||||||
|
# info = a2s.info((ip, qport))
|
||||||
|
# except TimeoutError:
|
||||||
|
# return Prereqs(False, 0, None, None)
|
||||||
|
#
|
||||||
|
# gameport = getattr(info, "port", 0)
|
||||||
|
# is_password = getattr(info, "password_protected", False)
|
||||||
|
# appid = getattr(info, "game_id", None)
|
||||||
|
# version = getattr(info, "version", None)
|
||||||
|
#
|
||||||
|
# return Prereqs(is_password, gameport, appid, version)
|
||||||
|
|
||||||
|
|
||||||
def get_details(record: Record) -> Details:
|
def get_details(record: Record) -> Details:
|
||||||
@@ -443,13 +450,13 @@ def get_rules(record: Record) -> list["DayzMod"]:
|
|||||||
#return []
|
#return []
|
||||||
|
|
||||||
|
|
||||||
def query_by_id(addr: str, key: str) -> dict[Any] | None:
|
def query_by_id(addr: str, key: str, full: bool = False) -> dict[Any] | None:
|
||||||
"""
|
"""
|
||||||
Used with numeric Battlemetrics IDs
|
Used with numeric Battlemetrics IDs
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
resolved = map_id_to_record(key, addr)
|
resolved = map_id_to_record(key, addr)
|
||||||
return query_direct(resolved.ip, resolved.qport)
|
return query_direct(resolved.ip, resolved.qport, full)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.critical(e)
|
logger.critical(e)
|
||||||
return None
|
return None
|
||||||
@@ -470,12 +477,19 @@ def query_playercount(record: Record) -> tuple[int, int] | None:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def query_by_ip(addr: str) -> dict[Any] | None:
|
def query_by_ip(addr: str, full: bool = False) -> dict[Any] | None:
|
||||||
record = short_ip_to_record(addr)
|
record = short_ip_to_record(addr)
|
||||||
return query_by_record(record)
|
return query_by_record(record, full)
|
||||||
|
|
||||||
|
def query_by_record(record: Record, full: bool = False) -> dict[Any] | None:
|
||||||
|
if full:
|
||||||
|
try:
|
||||||
|
info = a2s.info((record.ip, record.qport), 3.0)
|
||||||
|
return PreReqs(record, info)
|
||||||
|
except Exception as e:
|
||||||
|
logger.critical(e)
|
||||||
|
return None
|
||||||
|
|
||||||
def query_by_record(record: Record) -> dict[Any] | None:
|
|
||||||
try:
|
try:
|
||||||
return query_direct(record.ip, record.qport)
|
return query_direct(record.ip, record.qport)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -504,6 +518,11 @@ def response_to_fqip(res: dict) -> str:
|
|||||||
return f"{ip}:{gameport}:{qport}"
|
return f"{ip}:{gameport}:{qport}"
|
||||||
|
|
||||||
|
|
||||||
|
def source_info_to_record(res: a2s.SourceInfo) -> Record:
|
||||||
|
print(res)
|
||||||
|
return
|
||||||
|
return Record(ip, int(gameport), int(qport))
|
||||||
|
|
||||||
def response_to_record(res: dict) -> Record:
|
def response_to_record(res: dict) -> Record:
|
||||||
ip = res["addr"].split(":")[0]
|
ip = res["addr"].split(":")[0]
|
||||||
gameport = res["gameport"]
|
gameport = res["gameport"]
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ SEARCH_ICON = "system-search-symbolic"
|
|||||||
STEAM_ICON = "steam_tray_mono"
|
STEAM_ICON = "steam_tray_mono"
|
||||||
VIEW_CONCEAL = "view-conceal-symbolic"
|
VIEW_CONCEAL = "view-conceal-symbolic"
|
||||||
VIEW_REVEAL = "view-reveal-symbolic"
|
VIEW_REVEAL = "view-reveal-symbolic"
|
||||||
|
ERROR = "dialog-error-symbolic"
|
||||||
WARNING = "dialog-warning-symbolic"
|
WARNING = "dialog-warning-symbolic"
|
||||||
WEB_BROWSER = "web-browser-symbolic"
|
WEB_BROWSER = "web-browser-symbolic"
|
||||||
|
|
||||||
@@ -61,5 +62,6 @@ LEGACY_IPS_PATH = ".local/share/dzgui/helpers/ips.csv"
|
|||||||
DEBUG_LOG = f"{APP_NAME}_DEBUG.LOG"
|
DEBUG_LOG = f"{APP_NAME}_DEBUG.LOG"
|
||||||
SYSTEM_LOG = f"{APP_NAME}_SYSTEM.LOG"
|
SYSTEM_LOG = f"{APP_NAME}_SYSTEM.LOG"
|
||||||
CHANGELOG_PATH = "data/CHANGELOG.md"
|
CHANGELOG_PATH = "data/CHANGELOG.md"
|
||||||
|
CSS_PATH = "data/app.css"
|
||||||
|
|
||||||
LOG_FILTERS = ("CRITICAL", "WARNING", "INFO", "DEBUG")
|
LOG_FILTERS = ("CRITICAL", "WARNING", "INFO", "DEBUG")
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
from typing import Any, TYPE_CHECKING
|
import shutil
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Any, Union, TYPE_CHECKING
|
||||||
|
|
||||||
|
import dzgui.api.pefile as PeFile
|
||||||
import dzgui.api.servers as Servers
|
import dzgui.api.servers as Servers
|
||||||
|
|
||||||
from dzgui.api.mods import get_local_mod_ids
|
from dzgui.api.mods import get_local_mod_ids
|
||||||
@@ -15,6 +19,7 @@ gi.require_version("Gtk", "3.0")
|
|||||||
from gi.repository import Gtk # noqa E402
|
from gi.repository import Gtk # noqa E402
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
from dzgui.api.servers import PreReqs
|
||||||
from dzgui.controllers.mc import Controller
|
from dzgui.controllers.mc import Controller
|
||||||
|
|
||||||
|
|
||||||
@@ -26,35 +31,50 @@ class ConnectionManager:
|
|||||||
|
|
||||||
@call_on_thread(dialog.querying)
|
@call_on_thread(dialog.querying)
|
||||||
def connect_by_id(self, addr: str, key: str) -> None:
|
def connect_by_id(self, addr: str, key: str) -> None:
|
||||||
res = Servers.query_by_id(addr, key)
|
res = Servers.query_by_id(addr, key, full=True)
|
||||||
self._prepare_connection(res)
|
self._prepare_connection(res)
|
||||||
|
|
||||||
@call_on_thread(dialog.querying)
|
@call_on_thread(dialog.querying)
|
||||||
def connect_by_ip(self, addr: str) -> None:
|
def connect_by_ip(self, addr: str) -> None:
|
||||||
res = Servers.query_by_ip(addr)
|
res = Servers.query_by_ip(addr, full=True)
|
||||||
self._prepare_connection(res)
|
self._prepare_connection(res)
|
||||||
|
|
||||||
@call_on_thread(dialog.querying)
|
@call_on_thread(dialog.querying)
|
||||||
def connect_by_record(self, record: Servers.Record) -> None:
|
def connect_by_record(self, record: Servers.Record) -> None:
|
||||||
res = Servers.query_by_record(record)
|
res = Servers.query_by_record(record, full=True)
|
||||||
self._prepare_connection(res)
|
self._prepare_connection(res)
|
||||||
|
|
||||||
def _prepare_connection(self, res: dict[Any] | None) -> None:
|
def _prepare_connection(self, res: Union["PreReqs", None]) -> None:
|
||||||
|
failure_func = StoredFunc(self._server_timeout)
|
||||||
|
|
||||||
if res is None:
|
if res is None:
|
||||||
self.thread_man.set_cleanup_func(
|
self.thread_man.set_cleanup_func(failure_func, destroy_first=True)
|
||||||
StoredFunc(self._server_timeout), destroy_first=True
|
|
||||||
)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
record = Servers.response_to_record(res)
|
record = res.record
|
||||||
|
info = res.source
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# TODO: proper error handling (currently returns empty list)
|
# TODO: proper error handling (currently returns empty list)
|
||||||
mods = self._query_modlist(record)
|
mods = self._query_modlist(record)
|
||||||
except Exception:
|
except Exception:
|
||||||
self.thread_man.set_cleanup_func(
|
self.thread_man.set_cleanup_func(failure_func, destroy_first=True)
|
||||||
StoredFunc(self._server_timeout), destroy_first=True
|
|
||||||
)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# TODO: get missing mod diff
|
||||||
|
# TODO: get missing mod sizes
|
||||||
|
|
||||||
|
try:
|
||||||
|
path = Path(self.controller.query_config(Preferences.DEFAULT))
|
||||||
|
dayz_path = PeFile.get_pefile_path(path, info.game_id)
|
||||||
|
total, used, free = shutil.disk_usage(dayz_path)
|
||||||
|
free_mib = free / (1024**2)
|
||||||
|
print(free_mib)
|
||||||
|
except Exception:
|
||||||
|
# TODO: if this fails, need to show missing build warning
|
||||||
|
# logger.warning(e)
|
||||||
|
self.thread_man.set_cleanup_func(failure_func, destroy_first=True)
|
||||||
|
|
||||||
func = StoredFunc(self.controller.open_connection_assistant, res, mods)
|
func = StoredFunc(self.controller.open_connection_assistant, res, mods)
|
||||||
self.thread_man.set_cleanup_func(func, destroy_first=True)
|
self.thread_man.set_cleanup_func(func, destroy_first=True)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
update_mods = "Update mods and connect"
|
||||||
|
back = "Back"
|
||||||
|
cancel = "Cancel"
|
||||||
|
warnings = "Warnings"
|
||||||
|
errors = "Errors"
|
||||||
|
mods = "Mods"
|
||||||
|
total_mods = "Total mods: "
|
||||||
+6
-32
@@ -1,4 +1,9 @@
|
|||||||
|
from importlib import resources
|
||||||
|
|
||||||
|
from dzgui.const.constants import APP_NAME_LOWER, CSS_PATH
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository import Gtk, Gdk # noqa E402
|
from gi.repository import Gtk, Gdk # noqa E402
|
||||||
|
|
||||||
@@ -18,38 +23,7 @@ def remove_class(widget: Gtk.Widget, label: str) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def load_css() -> None:
|
def load_css() -> None:
|
||||||
# TODO: consider storing this in a data file
|
css = resources.read_text(APP_NAME_LOWER, CSS_PATH)
|
||||||
css = """
|
|
||||||
.invalid-entry {
|
|
||||||
border-color: red;
|
|
||||||
}
|
|
||||||
.frame {
|
|
||||||
border: 0px;
|
|
||||||
}
|
|
||||||
.toast-label {
|
|
||||||
background-color: black;
|
|
||||||
border: 1px solid white;
|
|
||||||
}
|
|
||||||
.frame > border {
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
.page-heading {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
font-weight: 800;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
.settings-subheading {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
.left-label {
|
|
||||||
font-size: 1.3rem;
|
|
||||||
}
|
|
||||||
.details-heading {
|
|
||||||
font-size: 1.2rem
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
prov = Gtk.CssProvider()
|
prov = Gtk.CssProvider()
|
||||||
prov.load_from_data(css.encode("ascii"))
|
prov.load_from_data(css.encode("ascii"))
|
||||||
screen = Gdk.Screen.get_default()
|
screen = Gdk.Screen.get_default()
|
||||||
|
|||||||
@@ -21,3 +21,14 @@ class LeftLabel(Gtk.Label):
|
|||||||
halign=Gtk.Align.START,
|
halign=Gtk.Align.START,
|
||||||
)
|
)
|
||||||
self.set_tooltip_text(tooltip)
|
self.set_tooltip_text(tooltip)
|
||||||
|
|
||||||
|
|
||||||
|
class IconLabel(Gtk.Box):
|
||||||
|
def __init__(self, text: str, label: str) -> None:
|
||||||
|
super().__init__(
|
||||||
|
orientation=Gtk.Orientation.HORIZONTAL, spacing=10, margin_start=10
|
||||||
|
)
|
||||||
|
self.label = Gtk.Label(label=text, halign=Gtk.Align.START, margin_bottom=2)
|
||||||
|
self.icon = Gtk.Image.new_from_icon_name(label, Gtk.IconSize.BUTTON)
|
||||||
|
for el in self.icon, self.label:
|
||||||
|
self.add(el)
|
||||||
@@ -6,9 +6,14 @@ from dzgui.const.constants import (
|
|||||||
APPID_DAYZ_EXP,
|
APPID_DAYZ_EXP,
|
||||||
APPNAME_DAYZ,
|
APPNAME_DAYZ,
|
||||||
APPNAME_DAYZ_EXP,
|
APPNAME_DAYZ_EXP,
|
||||||
|
ERROR,
|
||||||
|
WARNING,
|
||||||
)
|
)
|
||||||
from dayzquery import DayzMod
|
from dayzquery import DayzMod
|
||||||
|
from dzgui.util.css import add_class
|
||||||
|
from dzgui.strings import preconnect
|
||||||
from dzgui.views.components.frame import HeadingFrame
|
from dzgui.views.components.frame import HeadingFrame
|
||||||
|
from dzgui.views.components.labels import IconLabel
|
||||||
from dzgui.views.trees.tree_server_mods import ServerModTreeView
|
from dzgui.views.trees.tree_server_mods import ServerModTreeView
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
@@ -18,13 +23,23 @@ from gi.repository import Gtk # type: ignore # noqa E402
|
|||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
from dzgui.api.servers import PreReqs
|
||||||
from dzgui.controllers.mc import Controller
|
from dzgui.controllers.mc import Controller
|
||||||
|
|
||||||
|
|
||||||
# TODO: pack entire box in scrolled window
|
class WarningLabel(IconLabel):
|
||||||
class PreConnectionAssistant(Gtk.Box):
|
def __init__(self, text: str) -> None:
|
||||||
|
super().__init__(text, WARNING)
|
||||||
|
|
||||||
|
|
||||||
|
class ErrorLabel(IconLabel):
|
||||||
|
def __init__(self, text: str) -> None:
|
||||||
|
super().__init__(text, ERROR)
|
||||||
|
|
||||||
|
|
||||||
|
class PreConnectionAssistant(Gtk.ScrolledWindow):
|
||||||
def __init__(self, controller: "Controller") -> None:
|
def __init__(self, controller: "Controller") -> None:
|
||||||
super().__init__(orientation=Gtk.Orientation.VERTICAL)
|
super().__init__()
|
||||||
|
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
|
|
||||||
@@ -44,11 +59,11 @@ class PreConnectionAssistant(Gtk.Box):
|
|||||||
|
|
||||||
# TODO: strings
|
# TODO: strings
|
||||||
# TODO: dynamic button text if no mods needed
|
# TODO: dynamic button text if no mods needed
|
||||||
self.back = Gtk.Button(label="Back", halign=Gtk.Align.START)
|
self.back = Gtk.Button(label=preconnect.back, halign=Gtk.Align.START)
|
||||||
self.cancel = Gtk.Button(
|
self.cancel = Gtk.Button(
|
||||||
label="Cancel", halign=Gtk.Align.END, sensitive=False, hexpand=True
|
label=preconnect.cancel, halign=Gtk.Align.END, sensitive=False, hexpand=True
|
||||||
)
|
)
|
||||||
self.ok = Gtk.Button(label="Update mods and connect", halign=Gtk.Align.END)
|
self.ok = Gtk.Button(label=preconnect.update_mods, halign=Gtk.Align.END)
|
||||||
|
|
||||||
self.button_box = Gtk.Box(
|
self.button_box = Gtk.Box(
|
||||||
orientation=Gtk.Orientation.HORIZONTAL,
|
orientation=Gtk.Orientation.HORIZONTAL,
|
||||||
@@ -63,9 +78,11 @@ class PreConnectionAssistant(Gtk.Box):
|
|||||||
self.ok.connect("clicked", self._on_ok_clicked)
|
self.ok.connect("clicked", self._on_ok_clicked)
|
||||||
|
|
||||||
self.title = Gtk.Label(label="")
|
self.title = Gtk.Label(label="")
|
||||||
|
add_class(self.title, "preconnect-heading")
|
||||||
|
|
||||||
self.tree = ServerModTreeView(self.controller)
|
self.tree = ServerModTreeView(self.controller)
|
||||||
self.mod_count = Gtk.Label(label="", halign=Gtk.Align.START, margin_start=5)
|
self.mod_count = Gtk.Label(label="", halign=Gtk.Align.START, margin_start=5)
|
||||||
|
|
||||||
# TODO: live count of remaining downloads
|
# TODO: live count of remaining downloads
|
||||||
# "Steam is downloading: {mod_name}"
|
# "Steam is downloading: {mod_name}"
|
||||||
# mention whether manual or auto mod is active
|
# mention whether manual or auto mod is active
|
||||||
@@ -78,7 +95,7 @@ class PreConnectionAssistant(Gtk.Box):
|
|||||||
self.tree_box.add(self.scrolled)
|
self.tree_box.add(self.scrolled)
|
||||||
self.tree_box.add(self.mod_count)
|
self.tree_box.add(self.mod_count)
|
||||||
|
|
||||||
self.tree_frame = HeadingFrame(self.tree_box, "Mods")
|
self.tree_frame = HeadingFrame(self.tree_box, preconnect.mods)
|
||||||
|
|
||||||
self.warnings = []
|
self.warnings = []
|
||||||
# TODO: populate with strings and icons
|
# TODO: populate with strings and icons
|
||||||
@@ -94,12 +111,23 @@ class PreConnectionAssistant(Gtk.Box):
|
|||||||
- steam is not running
|
- steam is not running
|
||||||
- server has password
|
- server has password
|
||||||
"""
|
"""
|
||||||
frame = HeadingFrame(Gtk.Label(label="ITEM ONE"), "Warnings")
|
# TODO: abstract into components
|
||||||
|
warning_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
|
warning_box.add(WarningLabel("Warning 1"))
|
||||||
|
self.warning_frame = HeadingFrame(warning_box, preconnect.warnings)
|
||||||
|
|
||||||
self.add(self.title)
|
error_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
self.add(self.tree_frame)
|
error_box.add(ErrorLabel("Error 1"))
|
||||||
self.add(frame)
|
self.error_frame = HeadingFrame(error_box, preconnect.errors)
|
||||||
self.add(self.button_box)
|
|
||||||
|
self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
|
self.box.add(self.title)
|
||||||
|
self.box.add(self.tree_frame)
|
||||||
|
self.box.add(self.warning_frame)
|
||||||
|
self.box.add(self.error_frame)
|
||||||
|
self.box.add(self.button_box)
|
||||||
|
|
||||||
|
self.add(self.box)
|
||||||
|
|
||||||
def _on_ok_clicked(self, button: Gtk.Button) -> None:
|
def _on_ok_clicked(self, button: Gtk.Button) -> None:
|
||||||
# TODO: update mod store in place with spinner/toast
|
# TODO: update mod store in place with spinner/toast
|
||||||
@@ -110,10 +138,12 @@ class PreConnectionAssistant(Gtk.Box):
|
|||||||
page = self.controller.get_prior_page()
|
page = self.controller.get_prior_page()
|
||||||
self.controller.open_page(page)
|
self.controller.open_page(page)
|
||||||
|
|
||||||
def populate(self, res: dict[Any], mods: list["DayzMod"]) -> None:
|
def populate(self, res: "PreReqs", mods: list["DayzMod"]) -> None:
|
||||||
self.tree.populate(mods)
|
self.tree.populate(mods)
|
||||||
total = len(mods)
|
total = len(mods)
|
||||||
self.title.set_text(f"Connecting to {res["name"]}")
|
|
||||||
|
name = res.source.server_name
|
||||||
|
self.title.set_text(name)
|
||||||
if total < 1:
|
if total < 1:
|
||||||
self.tree_frame.set_visible(False)
|
self.tree_frame.set_visible(False)
|
||||||
self.mod_count.set_visible(False)
|
self.mod_count.set_visible(False)
|
||||||
@@ -121,14 +151,13 @@ class PreConnectionAssistant(Gtk.Box):
|
|||||||
else:
|
else:
|
||||||
self.tree.set_visible(True)
|
self.tree.set_visible(True)
|
||||||
self.mod_count.set_visible(True)
|
self.mod_count.set_visible(True)
|
||||||
self.mod_count.set_text(f"Total mods: {str(total)}")
|
prefix = preconnect.total_mods
|
||||||
|
self.mod_count.set_text(f"{prefix}{str(total)}")
|
||||||
|
|
||||||
# TODO: check which mods need updating
|
# TODO: check which mods need updating
|
||||||
# TODO: fourth column: needs update
|
|
||||||
# steam_path = self.controller.get_config_man().lookup(Preferences.DEFAULT)
|
# steam_path = self.controller.get_config_man().lookup(Preferences.DEFAULT)
|
||||||
# dayz_version = PeFile.get_pretty_version(steam_path, APPID_DAYZ)
|
# dayz_version = PeFile.get_pretty_version(steam_path, APPID_DAYZ)
|
||||||
# dayz_exp_version = PeFile.get_pretty_version(steam_path, APPID_DAYZ_EXP)
|
# dayz_exp_version = PeFile.get_pretty_version(steam_path, APPID_DAYZ_EXP)
|
||||||
pass
|
|
||||||
|
|
||||||
def download_mods(self) -> None:
|
def download_mods(self) -> None:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in new issue
Block a user