mirror of
https://github.com/aclist/dztui.git
synced 2026-08-29 11:17:12 +02:00
Compare commits
7 Commits
9354ed7df5
...
6966db8ae7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6966db8ae7 | ||
|
|
74bf4b5cfc | ||
|
|
896799f904 | ||
|
|
0f591e658c | ||
|
|
f9083b33ef | ||
|
|
89fcfcb5d6 | ||
|
|
fc7f1d7815 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,4 +11,3 @@ uv.lock
|
||||
.coverage
|
||||
pyapp-latest/
|
||||
dist/
|
||||
cpython
|
||||
|
||||
@ -106,7 +106,7 @@ class A2SInfo:
|
||||
|
||||
def get_netmask() -> str:
|
||||
hostname = os.uname()[1]
|
||||
i = socket.gethostbyname(hostname)
|
||||
i = socket.gethostbyname(f"{hostname}.local")
|
||||
netmask = i.rsplit(".", 1)[0]
|
||||
return netmask
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@ import gi
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository.Gtk import main_quit # noqa E402
|
||||
|
||||
# import dzgui.api.servers as Servers
|
||||
if TYPE_CHECKING:
|
||||
from dzgui.config.userprefs import UserPrefs
|
||||
from dzgui.controllers.mc import Controller
|
||||
|
||||
@ -101,7 +101,7 @@ build_corrupted = (
|
||||
"Steam settings or DayZ installation may be corrupted. Try restarting Steam."
|
||||
)
|
||||
api_warn_msg = """No servers returned. Please wait and try again.
|
||||
If this issue persists, your API key may be defunct or your network is blocking requests.
|
||||
This usually indicates a transitory network timeout. If this issue persists, your API key or network may be malfunctioning.
|
||||
"""
|
||||
server_timeout = "Timed out when querying server, check IP or try again later."
|
||||
server_error = (
|
||||
|
||||
@ -262,8 +262,8 @@ class Grid(Gtk.Grid):
|
||||
|
||||
self.emitter.connect("server_page_toggled", self.toggle_filter_panels)
|
||||
|
||||
# TODO: drop, use map/signal
|
||||
def hide_widgets_on_init(self) -> None:
|
||||
self.conpan.set_lan_visible(False)
|
||||
self.right_panel.sel_panel.hide()
|
||||
|
||||
def toggle_filter_panels(self, emitter: "Emitter", state: bool) -> None:
|
||||
|
||||
@ -278,9 +278,7 @@ class ConnectPanel(Gtk.Box):
|
||||
|
||||
for el in self.lan, self.fav, self.add_panel:
|
||||
self.add(el)
|
||||
|
||||
def set_lan_visible(self, state: bool) -> None:
|
||||
self.lan.set_visible(state)
|
||||
self.lan.set_visible(False)
|
||||
|
||||
def _on_lan_tab_toggled(self, emitter: "Emitter", state: bool) -> None:
|
||||
self.set_lan_visible(state)
|
||||
self.lan.set_visible(state)
|
||||
|
||||
@ -11,5 +11,5 @@ class ModsMixin:
|
||||
self, tree: TreeView, path: Gtk.TreePath, column: Gtk.TreeViewColumn
|
||||
) -> None:
|
||||
|
||||
path = self.get_focused_row_path() # type: ignore
|
||||
self.controller.open_mod_page(path) # type: ignore
|
||||
mod = self.get_value_at_index(2)
|
||||
self.controller.open_workshop_page(mod) # type: ignore
|
||||
|
||||
@ -17,7 +17,7 @@ from dzgui.views.trees.tree_server_mods import ServerModTreeView
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gdk, Gtk # type: ignore # noqa E402
|
||||
from gi.repository import Gdk, Gtk # noqa E402
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@ -162,8 +162,8 @@ class ServerTreeView(ContextMixin, TreeView): # type: ignore
|
||||
|
||||
def _on_map(self, widget: Self) -> None:
|
||||
# TODO: disable filter panel if current model is None
|
||||
if self.get_enum() is ServerTab.LAN:
|
||||
self.emitter.emit("lan_tab_toggled", True)
|
||||
state = self.get_enum() is ServerTab.LAN
|
||||
self.emitter.emit("lan_tab_toggled", state)
|
||||
|
||||
store = self.filter_man.get_map_store()
|
||||
|
||||
@ -178,8 +178,6 @@ class ServerTreeView(ContextMixin, TreeView): # type: ignore
|
||||
# NOTE: removes queue checker for this tab
|
||||
GLib.Source.remove(self.queue_id)
|
||||
self.emitter.disconnect(self.handler_id)
|
||||
if self.get_enum() is ServerTab.LAN:
|
||||
self.emitter.emit("lan_tab_toggled", False)
|
||||
|
||||
def _on_col_width_changed(
|
||||
self, col: Gtk.TreeViewColumn, width: GObject.ParamSpecInt
|
||||
|
||||
@ -9,6 +9,7 @@ root = Path(__file__).resolve().parents[1]
|
||||
output = root.joinpath("dist")
|
||||
|
||||
pyapp_dir = root.joinpath("pyapp-latest")
|
||||
cpython = root.joinpath("build/cpython/airgapped.tar.gz")
|
||||
|
||||
builder = build.ProjectBuilder(root)
|
||||
wheel = builder.build("wheel", output_directory=output)
|
||||
@ -33,7 +34,7 @@ env["PYAPP_PASS_LOCATION"] = "true"
|
||||
env["PYAPP_SKIP_INSTALL"] = "true"
|
||||
env["PYAPP_DISTRIBUTION_EMBED"] = "true"
|
||||
env["PYAPP_FULL_ISOLATION"] = "true"
|
||||
env["PYAPP_DISTRIBUTION_PATH"] = "cpython/airgapped.tar.gz"
|
||||
env["PYAPP_DISTRIBUTION_PATH"] = str(cpython)
|
||||
env["PYAPP_DISTRIBUTION_PYTHON_PATH"] = "python/bin/python3"
|
||||
|
||||
proc = subprocess.run(["cargo", "build", "--release"], env=env, cwd=pyapp_dir)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user