chore: update options page strings

This commit is contained in:
aclist committed 2026-05-13 18:12:31 +09:00
1 parent c5a0050004
commit 5e0e6e4592
2 files changed
+26 -15

No files matched your search

+3
View File
@@ -34,6 +34,7 @@
- Preconnect dialog - Preconnect dialog
- Preconnect warnings/failsafes like filesize - Preconnect warnings/failsafes like filesize
## Changed ## Changed
- Reduce padding on keys button - Reduce padding on keys button
- Boldface breadcrumbs - Boldface breadcrumbs
@@ -44,11 +45,13 @@
- Cull servers with abnormal queue values (integer overflow: 2147483647) - Cull servers with abnormal queue values (integer overflow: 2147483647)
- Packaging structure - Packaging structure
- Suppress log messages from imported modules - Suppress log messages from imported modules
- Embed Workshop link in Options menu
## Dropped ## Dropped
- Debug mode - Debug mode
- Branch switching - Branch switching
- Manual mod install mode (describe rationale) - Manual mod install mode (describe rationale)
- Force update mods
## Fixed ## Fixed
- Longstanding issue with left clicks not registering as tree selection changes after spamming keyboard input - Longstanding issue with left clicks not registering as tree selection changes after spamming keyboard input
+23 -15
View File
@@ -41,6 +41,13 @@ if TYPE_CHECKING:
from dzgui.controllers.emitter import Emitter from dzgui.controllers.emitter import Emitter
class ShortHBox(Gtk.Box):
def __init__(self, widget: Gtk.Widget) -> None:
super().__init__(spacing=5, halign=Gtk.Align.START)
self.pack_start(widget, NO_EXPAND, NO_FILL, NO_PADDING)
class Options(Gtk.Box): class Options(Gtk.Box):
def __init__(self, controller: "Controller"): def __init__(self, controller: "Controller"):
super().__init__( super().__init__(
@@ -96,15 +103,16 @@ class Options(Gtk.Box):
) )
self.client_combo = Gtk.ComboBoxText() self.client_combo = Gtk.ComboBoxText()
# TODO: strings for text in (
self.client_combo.append_text("Steam") options.steam_combo,
self.client_combo.append_text("Flatpak") options.flatpak_combo,
self.client_combo.append_text("Flatpak (container)") options.flatpak_container_combo,
):
self.client_combo.append_text(text)
self.client_combo.set_active(0) self.client_combo.set_active(0)
self.client_combo.connect("changed", self._on_client_changed) self.client_combo.connect("changed", self._on_client_changed)
# TODO: short hbox class
client_hbox = Gtk.Box(spacing=5, halign=Gtk.Align.START) client_hbox = ShortHBox(self.client_combo)
client_hbox.pack_start(self.client_combo, NO_EXPAND, NO_FILL, NO_PADDING)
self.distance_toggle = self.make_binary_radio( self.distance_toggle = self.make_binary_radio(
strings.options.km, strings.options.mi, Preferences.DIST strings.options.km, strings.options.mi, Preferences.DIST
@@ -112,10 +120,10 @@ class Options(Gtk.Box):
combo_store = Gtk.ListStore(str, object) combo_store = Gtk.ListStore(str, object)
tabs = ( tabs = (
("Server browser", ServerTab.BROWSER), (options.server_combo, ServerTab.BROWSER),
("Saved servers", ServerTab.SAVED), (options.saved_combo, ServerTab.SAVED),
("Recent", ServerTab.RECENT), (options.recent_combo, ServerTab.RECENT),
("LAN", ServerTab.LAN), (options.lan_combo, ServerTab.LAN),
) )
for tab in tabs: for tab in tabs:
combo_store.append(tab) combo_store.append(tab)
@@ -124,15 +132,15 @@ class Options(Gtk.Box):
self.start_tab_combo.pack_start(renderer_text, True) self.start_tab_combo.pack_start(renderer_text, True)
self.start_tab_combo.add_attribute(renderer_text, "text", 0) self.start_tab_combo.add_attribute(renderer_text, "text", 0)
self.start_tab_combo.set_active(0) self.start_tab_combo.set_active(0)
start_tab_hbox = Gtk.Box(spacing=5, halign=Gtk.Align.START)
start_tab_hbox.pack_start(self.start_tab_combo, NO_EXPAND, NO_FILL, NO_PADDING) start_tab_hbox = ShortHBox(self.start_tab_combo)
self.start_tab_combo.connect("changed", self._on_start_tab_changed) self.start_tab_combo.connect("changed", self._on_start_tab_changed)
pref_rows = [ pref_rows = [
[LeftLabel(strings.options.client), client_hbox], [LeftLabel(strings.options.client), client_hbox],
[LeftLabel(strings.options.window_size), self.fullscreen_toggle], [LeftLabel(strings.options.window_size), self.fullscreen_toggle],
[LeftLabel(strings.options.distance), self.distance_toggle], [LeftLabel(strings.options.distance), self.distance_toggle],
[LeftLabel("Start tab"), start_tab_hbox], [LeftLabel(options.start_tab), start_tab_hbox],
[LeftLabel(strings.options.name), self.player_box], [LeftLabel(strings.options.name), self.player_box],
] ]
@@ -191,7 +199,7 @@ class Options(Gtk.Box):
hexpand=True, hexpand=True,
) )
developers = Gtk.Button(label="Developers", halign=Gtk.Align.START) developers = Gtk.Button(label=options.developers, halign=Gtk.Align.START)
developers.connect("clicked", self._on_developers_clicked) developers.connect("clicked", self._on_developers_clicked)
prefs = self.controller.get_prefs() prefs = self.controller.get_prefs()