mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 23:22:44 +01:00
Compare commits
28
Commits
557079ce0f
...
7.0.0b21
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28cd6b8c45 | ||
|
|
81e327fb35 | ||
|
|
37e247d1d9 | ||
|
|
286e3f2d80 | ||
|
|
2ef27a55d8 | ||
|
|
d0ac09ffe5 | ||
|
|
c0015c05ec | ||
|
|
682b5bb4c0 | ||
|
|
3551877192 | ||
|
|
b22aba8593 | ||
|
|
f85f1ef2a5 | ||
|
|
010d7984b6 | ||
|
|
70e1e9e740 | ||
|
|
734af7cf22 | ||
|
|
d8f4977ffe | ||
|
|
c9fd00f938 | ||
|
|
f4db1484d8 | ||
|
|
99ef9a31b9 | ||
|
|
4c392dc571 | ||
|
|
155ffea15d | ||
|
|
57d231331d | ||
|
|
d5fe3c35dc | ||
|
|
3cf547e903 | ||
|
|
bd0bfcb03d | ||
|
|
4f6c583294 | ||
|
|
5e5a6b4eaf | ||
|
|
ff59d6dc35 | ||
|
|
1c154a709d |
No files matched your search
@@ -139,6 +139,7 @@ def get_remote_signatures(mods: list[str]) -> list[tuple[str, str, int, int]]:
|
|||||||
j = r.json()
|
j = r.json()
|
||||||
rows = j["response"]["publishedfiledetails"]
|
rows = j["response"]["publishedfiledetails"]
|
||||||
for row in rows:
|
for row in rows:
|
||||||
|
# NOTE: not a valid published file
|
||||||
if row["result"] == 9:
|
if row["result"] == 9:
|
||||||
continue
|
continue
|
||||||
title = str(row["title"])
|
title = str(row["title"])
|
||||||
|
|||||||
@@ -327,8 +327,8 @@ mod_panel = ModPanelStrings(
|
|||||||
unhighlight_stale_tooltip="Clears highlight from stale mods",
|
unhighlight_stale_tooltip="Clears highlight from stale mods",
|
||||||
highlight_stale="Highlight stale",
|
highlight_stale="Highlight stale",
|
||||||
highlight_stale_tooltip=(
|
highlight_stale_tooltip=(
|
||||||
"Shows locally-installed mods which are not used by any server "
|
"Shows locally-installed mods which are not \n"
|
||||||
"in your Saved Servers"
|
"used by any server in your Saved Servers"
|
||||||
),
|
),
|
||||||
unsub_selected="Unsubscribe selected",
|
unsub_selected="Unsubscribe selected",
|
||||||
unsub_selected_tooltip="Unsubscribes from selected mods",
|
unsub_selected_tooltip="Unsubscribes from selected mods",
|
||||||
|
|||||||
+4
-1
@@ -54,7 +54,10 @@ class OuterWindow(Gtk.Window):
|
|||||||
MainController.register_widget("window", self)
|
MainController.register_widget("window", self)
|
||||||
|
|
||||||
# NOTE: steam deck taskbar may occlude elements
|
# NOTE: steam deck taskbar may occlude elements
|
||||||
if MainController.get_prefs().is_steam_deck is False:
|
is_deck = MainController.get_prefs().is_steam_deck
|
||||||
|
if is_deck:
|
||||||
|
self.maximize()
|
||||||
|
else:
|
||||||
self.set_titlebar(self.hb)
|
self.set_titlebar(self.hb)
|
||||||
|
|
||||||
self.connect("delete-event", self._on_delete_event)
|
self.connect("delete-event", self._on_delete_event)
|
||||||
|
|||||||
@@ -37,7 +37,11 @@ class CursorMixin:
|
|||||||
end = len(model) - 1
|
end = len(model) - 1
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
cur_row = self.get_focused_row_index() # type: ignore
|
|
||||||
|
try:
|
||||||
|
cur_row = self.get_focused_row_index() # type: ignore
|
||||||
|
except Exception:
|
||||||
|
return False
|
||||||
|
|
||||||
if position == CursorPosition.DOWN:
|
if position == CursorPosition.DOWN:
|
||||||
if cur_row == end:
|
if cur_row == end:
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ class Changelog(HelpMenuMixin, ScrollableMixin, Gtk.ScrolledWindow): # type: ig
|
|||||||
|
|
||||||
# TODO: should long text be wrapped?
|
# TODO: should long text be wrapped?
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=5, margin_top=10)
|
self.box = Gtk.Box(
|
||||||
|
orientation=Gtk.Orientation.VERTICAL, spacing=5, margin_top=10
|
||||||
|
)
|
||||||
self.add(self.box)
|
self.add(self.box)
|
||||||
|
|
||||||
self.connect("key-press-event", self._on_keypress)
|
self.connect("key-press-event", self._on_keypress)
|
||||||
@@ -55,7 +57,6 @@ class Changelog(HelpMenuMixin, ScrollableMixin, Gtk.ScrolledWindow): # type: ig
|
|||||||
return version, date
|
return version, date
|
||||||
raise ValueError("Changelog parse error")
|
raise ValueError("Changelog parse error")
|
||||||
|
|
||||||
|
|
||||||
def _generate_nodes(self, releases: list[tuple[str, list[str]]]) -> None:
|
def _generate_nodes(self, releases: list[tuple[str, list[str]]]) -> None:
|
||||||
for header, changes in releases:
|
for header, changes in releases:
|
||||||
for ind in (0, -1):
|
for ind in (0, -1):
|
||||||
@@ -64,8 +65,12 @@ class Changelog(HelpMenuMixin, ScrollableMixin, Gtk.ScrolledWindow): # type: ig
|
|||||||
text = "\n".join(changes)
|
text = "\n".join(changes)
|
||||||
formatted = format_pango(text)
|
formatted = format_pango(text)
|
||||||
|
|
||||||
label = Gtk.Label(valign=Gtk.Align.START, margin=15, halign=Gtk.Align.START)
|
container = Gtk.Box(
|
||||||
|
valign=Gtk.Align.START, halign=Gtk.Align.START
|
||||||
|
)
|
||||||
|
label = Gtk.Label()
|
||||||
label.set_markup(formatted)
|
label.set_markup(formatted)
|
||||||
|
container.add(label)
|
||||||
|
|
||||||
version, date = self._parse_version(header)
|
version, date = self._parse_version(header)
|
||||||
button_text = f"{version} ({date})"
|
button_text = f"{version} ({date})"
|
||||||
@@ -73,9 +78,20 @@ class Changelog(HelpMenuMixin, ScrollableMixin, Gtk.ScrolledWindow): # type: ig
|
|||||||
|
|
||||||
expander = Gtk.Expander()
|
expander = Gtk.Expander()
|
||||||
expander.set_label_widget(button)
|
expander.set_label_widget(button)
|
||||||
expander.add(label)
|
expander.add(container)
|
||||||
|
expander.connect("activate", self._on_expand, container)
|
||||||
self.box.add(expander)
|
self.box.add(expander)
|
||||||
|
|
||||||
|
def _on_expand(self, expander: Gtk.Box, container: Gtk.Box) -> None:
|
||||||
|
"""
|
||||||
|
Wayland/some themes do not expect widgets to have a size allocation until expanded.
|
||||||
|
Trying to set margins a priori may cause negative allocation,
|
||||||
|
as the margins are subtracted from zero. In effect, the widget is not realized
|
||||||
|
until it is expanded for the first time.
|
||||||
|
"""
|
||||||
|
container.set_margin_start(15)
|
||||||
|
container.set_margin_top(15)
|
||||||
|
container.set_margin_bottom(15)
|
||||||
|
|
||||||
def _parse(self, changelog: str) -> list[tuple[str, list[str]]]:
|
def _parse(self, changelog: str) -> list[tuple[str, list[str]]]:
|
||||||
release = ""
|
release = ""
|
||||||
|
|||||||
@@ -103,4 +103,4 @@ class Keybindings(ScrollableMixin, Gtk.ScrolledWindow): # type: ignore
|
|||||||
return grid
|
return grid
|
||||||
|
|
||||||
def grab_content_area(self) -> None:
|
def grab_content_area(self) -> None:
|
||||||
self.box.grab_focus()
|
self.grab_focus()
|
||||||
@@ -521,3 +521,6 @@ class OfflineLoader(Gtk.Box):
|
|||||||
self.mission_frame.present_folder_changed(mission)
|
self.mission_frame.present_folder_changed(mission)
|
||||||
return
|
return
|
||||||
self.offline_man.launch(appid, mission, local_mods, custom_folder, custom_mods)
|
self.offline_man.launch(appid, mission, local_mods, custom_folder, custom_mods)
|
||||||
|
|
||||||
|
def grab_content_area(self) -> None:
|
||||||
|
self.local_frame.tree.grab_focus()
|
||||||
@@ -20,11 +20,13 @@ from dzgui.const.enum import Preferences, ServerTab
|
|||||||
from dzgui.strings import errors, options
|
from dzgui.strings import errors, options
|
||||||
from dzgui.util import strings, css, open_links
|
from dzgui.util import strings, css, open_links
|
||||||
|
|
||||||
|
from dzgui.views.components.box import VBox
|
||||||
from dzgui.views.components.labels import LeftLabel
|
from dzgui.views.components.labels import LeftLabel
|
||||||
from dzgui.views.components.buttons import WebButton
|
from dzgui.views.components.buttons import WebButton
|
||||||
from dzgui.views.components.frame import HeadingFrame
|
from dzgui.views.components.frame import HeadingFrame
|
||||||
from dzgui.views.components.misc import ClientCombo
|
from dzgui.views.components.misc import ClientCombo
|
||||||
from dzgui.views.dialogs.generic import ExceptionDialog
|
from dzgui.views.dialogs.generic import ExceptionDialog
|
||||||
|
from dzgui.views.mixins.scrollable_mixin import ScrollableMixin
|
||||||
|
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
@@ -44,10 +46,9 @@ class ShortHBox(Gtk.Box):
|
|||||||
self.pack_start(widget, NO_EXPAND, NO_FILL, NO_PADDING)
|
self.pack_start(widget, NO_EXPAND, NO_FILL, NO_PADDING)
|
||||||
|
|
||||||
|
|
||||||
class Options(Gtk.Box):
|
class Options(ScrollableMixin, Gtk.ScrolledWindow): # type: ignore
|
||||||
def __init__(self, controller: "Controller"):
|
def __init__(self, controller: "Controller"):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
orientation=Gtk.Orientation.VERTICAL,
|
|
||||||
margin_start=10,
|
margin_start=10,
|
||||||
margin_end=10,
|
margin_end=10,
|
||||||
)
|
)
|
||||||
@@ -60,11 +61,6 @@ class Options(Gtk.Box):
|
|||||||
self.DEFAULT_WIDTH = 1
|
self.DEFAULT_WIDTH = 1
|
||||||
self.DEFAULT_HEIGHT = 1
|
self.DEFAULT_HEIGHT = 1
|
||||||
|
|
||||||
label = Gtk.Label(label=strings.options.header)
|
|
||||||
label.set_halign(Gtk.Align.CENTER)
|
|
||||||
css.add_class(label, "page-heading")
|
|
||||||
self.add(label)
|
|
||||||
|
|
||||||
self.steam_entry: Gtk.Entry
|
self.steam_entry: Gtk.Entry
|
||||||
|
|
||||||
self.steam = WebButton(label=strings.options.steam_web)
|
self.steam = WebButton(label=strings.options.steam_web)
|
||||||
@@ -165,9 +161,16 @@ class Options(Gtk.Box):
|
|||||||
grid.attach(frame, col, row, self.DEFAULT_WIDTH, self.DEFAULT_HEIGHT)
|
grid.attach(frame, col, row, self.DEFAULT_WIDTH, self.DEFAULT_HEIGHT)
|
||||||
row += 1
|
row += 1
|
||||||
|
|
||||||
self.scrollable = Gtk.ScrolledWindow(vexpand=True)
|
label = Gtk.Label(label=strings.options.header)
|
||||||
self.scrollable.add(grid)
|
label.set_halign(Gtk.Align.CENTER)
|
||||||
self.add(self.scrollable)
|
css.add_class(label, "page-heading")
|
||||||
|
|
||||||
|
box = VBox()
|
||||||
|
box.add(label)
|
||||||
|
box.add(grid)
|
||||||
|
self.add(box)
|
||||||
|
|
||||||
|
self.connect("key-press-event", self._on_keypress)
|
||||||
|
|
||||||
def get_client_name(self) -> str:
|
def get_client_name(self) -> str:
|
||||||
model = self.client_combo.get_model()
|
model = self.client_combo.get_model()
|
||||||
@@ -442,4 +445,4 @@ class Options(Gtk.Box):
|
|||||||
widget.set_visibility(state)
|
widget.set_visibility(state)
|
||||||
|
|
||||||
def grab_content_area(self) -> None:
|
def grab_content_area(self) -> None:
|
||||||
return
|
self.grab_focus()
|
||||||
@@ -284,7 +284,7 @@ class PreConnectionAssistant(Gtk.Box):
|
|||||||
allows_dl, running_app = prereqs.allows_downloads
|
allows_dl, running_app = prereqs.allows_downloads
|
||||||
if len(prereqs.mods) > 0 and allows_dl is False:
|
if len(prereqs.mods) > 0 and allows_dl is False:
|
||||||
msg = (
|
msg = (
|
||||||
f"The game '{running_app}' is currently running in Steam, but background downloads are not enabled.\n"
|
f"The app '{running_app}' is currently running in Steam, but background downloads are not enabled.\n"
|
||||||
"Either stop the game first, or update your global Steam settings or the game's local settings.\n"
|
"Either stop the game first, or update your global Steam settings or the game's local settings.\n"
|
||||||
"Otherwise, mods may be queued for download but never update."
|
"Otherwise, mods may be queued for download but never update."
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ description = "DayZ server browser and mod manager for Linux"
|
|||||||
authors = [
|
authors = [
|
||||||
{name = "aclist"}
|
{name = "aclist"}
|
||||||
]
|
]
|
||||||
version = "7.0.0b20"
|
version = "7.0.0b21"
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
license-files = ["LICENSE"]
|
license-files = ["LICENSE"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
Reference in new issue
Block a user