mirror of
https://github.com/aclist/dztui.git
synced 2026-11-22 09:29:31 +01:00
Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b9f245a51 | ||
|
|
d4c4268eaa | ||
|
|
f2025dd48d | ||
|
|
ca7fea3601 | ||
|
|
30fba4ec10 | ||
|
|
21bc1222da | ||
|
|
9619047147 | ||
|
|
6dd053af8c | ||
|
|
23637dafc9 | ||
|
|
ee18b9c513 | ||
|
|
4c59ba85d7 | ||
|
|
3a9e1c6ff2 | ||
|
|
4cbda4e537 | ||
|
|
417801ac41 | ||
|
|
48d58ba5c9 | ||
|
|
17dedd79a7 | ||
|
|
ede064858e |
No files matched your search
+23
-25
@@ -2,8 +2,10 @@ from __future__ import annotations
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
from dzgui.util import strings
|
from dzgui.strings import mod_panel
|
||||||
from dzgui.strings import rows
|
from dzgui.strings import rows
|
||||||
|
from dzgui.strings import side_buttons
|
||||||
|
from dzgui.util import strings
|
||||||
|
|
||||||
|
|
||||||
class Port(Enum):
|
class Port(Enum):
|
||||||
@@ -226,29 +228,25 @@ class RowType(Enum):
|
|||||||
|
|
||||||
|
|
||||||
class ModButton(Enum):
|
class ModButton(Enum):
|
||||||
SELECT_ALL = ModButtonMeta(
|
SELECT_ALL = ModButtonMeta(mod_panel.select_all, mod_panel.select_all_tooltip)
|
||||||
strings.mod_panel.select_all, strings.mod_panel.select_all_tooltip
|
UNSELECT_ALL = ModButtonMeta(mod_panel.unselect_all, mod_panel.unselect_all_tooltip)
|
||||||
)
|
|
||||||
UNSELECT_ALL = ModButtonMeta(
|
|
||||||
strings.mod_panel.unselect_all, strings.mod_panel.unselect_all_tooltip
|
|
||||||
)
|
|
||||||
HIGHLIGHT_STALE = ModButtonMeta(
|
HIGHLIGHT_STALE = ModButtonMeta(
|
||||||
strings.mod_panel.highlight_stale, strings.mod_panel.highlight_stale_tooltip
|
mod_panel.highlight_stale, mod_panel.highlight_stale_tooltip
|
||||||
)
|
)
|
||||||
UNHIGHLIGHT_STALE = ModButtonMeta(
|
UNHIGHLIGHT_STALE = ModButtonMeta(
|
||||||
strings.mod_panel.unhighlight_stale, strings.mod_panel.unhighlight_stale_tooltip
|
mod_panel.unhighlight_stale, mod_panel.unhighlight_stale_tooltip
|
||||||
)
|
)
|
||||||
UNSUB_SELECTED = ModButtonMeta(
|
UNSUB_SELECTED = ModButtonMeta(
|
||||||
strings.mod_panel.unsub_selected,
|
mod_panel.unsub_selected,
|
||||||
strings.mod_panel.unsub_selected_tooltip,
|
mod_panel.unsub_selected_tooltip,
|
||||||
)
|
)
|
||||||
SELECT_STALE = ModButtonMeta(
|
SELECT_STALE = ModButtonMeta(
|
||||||
strings.mod_panel.select_stale,
|
mod_panel.select_stale,
|
||||||
strings.mod_panel.select_stale_tooltip,
|
mod_panel.select_stale_tooltip,
|
||||||
)
|
)
|
||||||
VALIDATE = ModButtonMeta(
|
VALIDATE = ModButtonMeta(
|
||||||
strings.mod_panel.validate,
|
mod_panel.validate,
|
||||||
strings.mod_panel.validate_tooltip,
|
mod_panel.validate_tooltip,
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -262,28 +260,28 @@ class ModButton(Enum):
|
|||||||
|
|
||||||
class ButtonType(Enum):
|
class ButtonType(Enum):
|
||||||
SERVERS = ButtonTypeMeta(
|
SERVERS = ButtonTypeMeta(
|
||||||
strings.buttons.servers_label,
|
side_buttons.servers_label,
|
||||||
strings.buttons.servers_tooltip,
|
side_buttons.servers_tooltip,
|
||||||
NotebookPage.SERVERS,
|
NotebookPage.SERVERS,
|
||||||
)
|
)
|
||||||
MODS = ButtonTypeMeta(
|
MODS = ButtonTypeMeta(
|
||||||
strings.buttons.mods_label,
|
side_buttons.mods_label,
|
||||||
strings.buttons.mods_tooltip,
|
side_buttons.mods_tooltip,
|
||||||
NotebookPage.MODS,
|
NotebookPage.MODS,
|
||||||
)
|
)
|
||||||
OPTIONS = ButtonTypeMeta(
|
OPTIONS = ButtonTypeMeta(
|
||||||
strings.buttons.options_label,
|
side_buttons.options_label,
|
||||||
strings.buttons.options_tooltip,
|
side_buttons.options_tooltip,
|
||||||
NotebookPage.OPTIONS,
|
NotebookPage.OPTIONS,
|
||||||
)
|
)
|
||||||
HELP = ButtonTypeMeta(
|
HELP = ButtonTypeMeta(
|
||||||
strings.buttons.help_label,
|
side_buttons.help_label,
|
||||||
strings.buttons.help_tooltip,
|
side_buttons.help_tooltip,
|
||||||
NotebookPage.HELP,
|
NotebookPage.HELP,
|
||||||
)
|
)
|
||||||
EXIT = ButtonTypeMeta(
|
EXIT = ButtonTypeMeta(
|
||||||
strings.buttons.exit_label,
|
side_buttons.exit_label,
|
||||||
strings.buttons.exit_tooltip,
|
side_buttons.exit_tooltip,
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ from dzgui.init.libgi import test_libgi_missing
|
|||||||
from dzgui.init.prefix import get_version
|
from dzgui.init.prefix import get_version
|
||||||
from dzgui.util.deck import is_steam_deck
|
from dzgui.util.deck import is_steam_deck
|
||||||
from dzgui.util.map_count import set_map_count
|
from dzgui.util.map_count import set_map_count
|
||||||
from dzgui.util.strings import flags
|
from dzgui.strings import flags
|
||||||
|
|
||||||
from dzgui.views.dialogs.uninstall import UninstallWizard
|
from dzgui.views.dialogs.uninstall import UninstallWizard
|
||||||
from dzgui.config.xdg import get_xdg_paths
|
from dzgui.config.xdg import get_xdg_paths
|
||||||
|
|||||||
+10
-10
@@ -1,16 +1,16 @@
|
|||||||
clipboard_button = "Copy to clipboard"
|
clipboard_button = "Copy to clipboard"
|
||||||
clipboard_ip_button = "Copy IP to clipboard"
|
clipboard_ip_button = "Copy IP to clipboard"
|
||||||
|
copy_button = "Copy"
|
||||||
dock_button_collapse = "Collapse the connection panel"
|
dock_button_collapse = "Collapse the connection panel"
|
||||||
dock_button_expand = "Expand the connection panel"
|
dock_button_expand = "Expand the connection panel"
|
||||||
|
keys_button = "Keys"
|
||||||
workshop = "Steam Workshop"
|
keys_button_tooltip = "Toggles the keybindings dialog"
|
||||||
workshop_tooltip = "Open your Workshop subscriptions"
|
refresh_button = "Refresh"
|
||||||
|
refresh_tooltip = "Refresh server data"
|
||||||
version_notifier = "Copied!"
|
|
||||||
version_tooltip = "Click to copy to clipboard"
|
|
||||||
|
|
||||||
update_button = "Updates available"
|
|
||||||
|
|
||||||
unset_button_label = "Unset"
|
unset_button_label = "Unset"
|
||||||
unset_button_tooltip = "Unset this server as favorite"
|
unset_button_tooltip = "Unset this server as favorite"
|
||||||
|
update_button = "Updates available"
|
||||||
|
version_notifier = "Copied!"
|
||||||
|
version_tooltip = "Click to copy to clipboard"
|
||||||
|
workshop = "Steam Workshop"
|
||||||
|
workshop_tooltip = "Open your Workshop subscriptions"
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
collapse_all = "Collapse all"
|
collapse_all = "Collapse all"
|
||||||
expand_all = "Expand all"
|
expand_all = "Expand all"
|
||||||
|
missing_changelog = "Error: failed to read changelog"
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
page_header = "Developers"
|
||||||
|
paths_label="Resolved XDG paths"
|
||||||
|
prefs_label="Boot preferences"
|
||||||
|
columns=["Key", "Value"]
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
default_header = "DZGUI - Dialog"
|
||||||
|
error = "ERROR"
|
||||||
|
|
||||||
waiting_for_launch = "Waiting for DayZ to launch"
|
waiting_for_launch = "Waiting for DayZ to launch"
|
||||||
waiting_for_mods = "Queueing up mods (step 1/2)"
|
waiting_for_mods = "Queueing up mods (step 1/2)"
|
||||||
waiting_for_directories = "Steam is staging mods (step 2/2)"
|
waiting_for_directories = "Steam is staging mods (step 2/2)"
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
description = "DayZ server browser and mod manager"
|
||||||
|
version = "print version information"
|
||||||
|
uninstall = "clean up state/config files"
|
||||||
|
debug = "enable developer debugging features"
|
||||||
|
map_count = "check and update system map count value"
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
navigation = {
|
||||||
|
"Enter/space/double click": "select row item",
|
||||||
|
"Down arrow": "move down a row/scroll down",
|
||||||
|
"Up arrow": "move up a row/scroll up",
|
||||||
|
"Right arrow": "jump to sidebar from main area",
|
||||||
|
"Left arrow": "jump to main area from sidebar",
|
||||||
|
"Tab": "cycle forward through elements",
|
||||||
|
"Shift-tab": "cycle backward through elements",
|
||||||
|
"ESC/Enter": "close dialogs",
|
||||||
|
"?": "show/hide this dialog",
|
||||||
|
"Ctrl-q": "Quit",
|
||||||
|
}
|
||||||
|
servers = {
|
||||||
|
"Enter/space/double-click": "connect to server",
|
||||||
|
"Right-click/Ctrl-l": "additional context menus",
|
||||||
|
"Ctrl-r": "refresh players",
|
||||||
|
"Ctrl-f": "jump to keyword search field",
|
||||||
|
"Ctrl-m": "jump to maps field",
|
||||||
|
"Ctrl-d": "select default LAN port",
|
||||||
|
"Ctrl-n": "select custom LAN port",
|
||||||
|
"Ctrl-u": "connect to server from preconnect dialog",
|
||||||
|
"Ctrl-i": "jump to IP insert field",
|
||||||
|
"n": "navigate to next tab",
|
||||||
|
"p": "navigate to previous tab",
|
||||||
|
"ESC": "return to table",
|
||||||
|
"1-9": "toggle filter 1-9 on/off",
|
||||||
|
"0": "toggle filter 10",
|
||||||
|
"Minus": "toggle filter 11",
|
||||||
|
"Backslash": "toggle filter 12",
|
||||||
|
"Apostrophe": "toggle filter 13",
|
||||||
|
}
|
||||||
|
vim = {
|
||||||
|
"j": "Move down a row/scroll up",
|
||||||
|
"k": "Move up a row/scroll down",
|
||||||
|
"h": "Jump to main area from sidebar",
|
||||||
|
"l": "Jump to sidebar from main area",
|
||||||
|
"g": "Jump to first row/top of page",
|
||||||
|
"G": "Jump to last row/bottom of page",
|
||||||
|
}
|
||||||
|
key_contexts = ["Servers", "Navigation", "Vim-style keys"]
|
||||||
|
key_header = "Keybindings"
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
bulk_select = "Bulk selects all currently highlighted mods"
|
||||||
|
clear_highlights = "Clears highlights and reverts the table to a default state"
|
||||||
|
header = "Mod actions"
|
||||||
|
highlight_stale = "Highlight stale"
|
||||||
|
highlight_stale_tooltip = (
|
||||||
|
"Shows locally-installed mods which are not \n"
|
||||||
|
"used by any server in your Saved Servers"
|
||||||
|
)
|
||||||
|
select_all = "Select all"
|
||||||
|
select_all_tooltip = "Bulk selects all mods"
|
||||||
|
select_stale = "Select stale"
|
||||||
|
select_stale_tooltip = "Only selects highlighted stale mods"
|
||||||
|
unhighlight_stale = "Unhighlight stale"
|
||||||
|
unhighlight_stale_tooltip = "Clears highlight from stale mods"
|
||||||
|
unselect_all = "Unselect all"
|
||||||
|
unselect_all_tooltip = "Bulk unselects all mods"
|
||||||
|
unsub_selected = "Unsubscribe selected"
|
||||||
|
unsub_selected_tooltip = "Unsubscribes from selected mods"
|
||||||
|
validate = "Validate selected"
|
||||||
|
validate_tooltip = "Validates selected mods and updates them if necessary"
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
exit_label = "Exit"
|
||||||
|
exit_tooltip = "Quits the application"
|
||||||
|
help_label = "Help"
|
||||||
|
help_tooltip = "Troubleshooting and documentation"
|
||||||
|
mods_label = "Mods"
|
||||||
|
mods_tooltip = "Manage local mods"
|
||||||
|
options_label = "Options"
|
||||||
|
options_tooltip = "Advanced options"
|
||||||
|
servers_label = "Servers"
|
||||||
|
servers_tooltip = "Search for and connect to servers"
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
esc_to_return = "Press ESC to return"
|
||||||
|
question_to_return = "Press ? to return"
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
header="# Special thanks"
|
||||||
|
description=(
|
||||||
|
"This page recognizes beta testers, collaborators, code "
|
||||||
|
"contributors, and sponsors of the project in alphabetical order.\n"
|
||||||
|
"If you wish to be removed from this list, please submit a ticket."
|
||||||
|
)
|
||||||
|
users=[
|
||||||
|
"bongjutsu",
|
||||||
|
"Deku",
|
||||||
|
"dj3hac",
|
||||||
|
"finntux",
|
||||||
|
"GaryBlackbourne",
|
||||||
|
"jiriks74",
|
||||||
|
"Johnofwrong",
|
||||||
|
"MatheusLasserr",
|
||||||
|
"nolan-perez",
|
||||||
|
"OnniSaarni",
|
||||||
|
"scandalouss",
|
||||||
|
"SnackSBR",
|
||||||
|
"StevelDusa",
|
||||||
|
"Thoughtduck216",
|
||||||
|
]
|
||||||
+73
-341
@@ -1,5 +1,77 @@
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from dzgui.const.constants import SYSTEM_LOG
|
|
||||||
|
|
||||||
|
@dataclass(slots=True, frozen=True)
|
||||||
|
class ServerLabels:
|
||||||
|
browser: str
|
||||||
|
saved: str
|
||||||
|
recent: str
|
||||||
|
lan: str
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(slots=True, frozen=True)
|
||||||
|
class Dialog:
|
||||||
|
querying: str
|
||||||
|
fetching: str
|
||||||
|
filtering: str
|
||||||
|
refreshing: str
|
||||||
|
details: str
|
||||||
|
modlist: str
|
||||||
|
working: str
|
||||||
|
updating_mods: str
|
||||||
|
scanning: str
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(slots=True, frozen=True)
|
||||||
|
class Init:
|
||||||
|
is_steam_running: str
|
||||||
|
is_dayz_running: str
|
||||||
|
requires_steam: str
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(slots=True, frozen=True)
|
||||||
|
class Crumbs:
|
||||||
|
changelog: str
|
||||||
|
keys: str
|
||||||
|
log: str
|
||||||
|
_help: str
|
||||||
|
mods: str
|
||||||
|
options: str
|
||||||
|
servers: str
|
||||||
|
thanks: str
|
||||||
|
developers: str
|
||||||
|
default: str
|
||||||
|
offline: str
|
||||||
|
connect: str
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(slots=True, frozen=True)
|
||||||
|
class Options:
|
||||||
|
header: str
|
||||||
|
steam_web: str
|
||||||
|
enter_steam: str
|
||||||
|
steam_placeholder: str
|
||||||
|
name_placeholder: str
|
||||||
|
last_used: str
|
||||||
|
always_fs: str
|
||||||
|
steam: str
|
||||||
|
flatpak: str
|
||||||
|
km: str
|
||||||
|
mi: str
|
||||||
|
client: str
|
||||||
|
window_size: str
|
||||||
|
distance: str
|
||||||
|
name: str
|
||||||
|
manual_dl: str
|
||||||
|
auto_dl: str
|
||||||
|
update: str
|
||||||
|
api_key: str
|
||||||
|
prefs: str
|
||||||
|
mods: str
|
||||||
|
version: str
|
||||||
|
branch: str
|
||||||
|
stable: str
|
||||||
|
testing: str
|
||||||
|
|
||||||
|
|
||||||
# General
|
# General
|
||||||
@@ -88,51 +160,6 @@ server_protected = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# KeybindingsDialog
|
|
||||||
navigation = {
|
|
||||||
"Enter/space/double click": "select row item",
|
|
||||||
"Down arrow": "move down a row/scroll down",
|
|
||||||
"Up arrow": "move up a row/scroll up",
|
|
||||||
"Right arrow": "jump to sidebar from main area",
|
|
||||||
"Left arrow": "jump to main area from sidebar",
|
|
||||||
"Tab": "cycle forward through elements",
|
|
||||||
"Shift-tab": "cycle backward through elements",
|
|
||||||
"ESC/Enter": "close dialogs",
|
|
||||||
"?": "show/hide this dialog",
|
|
||||||
"Ctrl-q": "Quit",
|
|
||||||
}
|
|
||||||
servers = {
|
|
||||||
"Enter/space/double-click": "connect to server",
|
|
||||||
"Right-click/Ctrl-l": "additional context menus",
|
|
||||||
"Ctrl-r": "refresh players",
|
|
||||||
"Ctrl-f": "jump to keyword search field",
|
|
||||||
"Ctrl-m": "jump to maps field",
|
|
||||||
"Ctrl-d": "select default LAN port",
|
|
||||||
"Ctrl-n": "select custom LAN port",
|
|
||||||
"Ctrl-u": "connect to server from preconnect dialog",
|
|
||||||
"Ctrl-i": "jump to IP insert field",
|
|
||||||
"n": "navigate to next tab",
|
|
||||||
"p": "navigate to previous tab",
|
|
||||||
"ESC": "return to table",
|
|
||||||
"1-9": "toggle filter 1-9 on/off",
|
|
||||||
"0": "toggle filter 10",
|
|
||||||
"Minus": "toggle filter 11",
|
|
||||||
"Backslash": "toggle filter 12",
|
|
||||||
"Apostrophe": "toggle filter 13",
|
|
||||||
}
|
|
||||||
vim = {
|
|
||||||
"j": "Move down a row/scroll up",
|
|
||||||
"k": "Move up a row/scroll down",
|
|
||||||
"h": "Jump to main area from sidebar",
|
|
||||||
"l": "Jump to sidebar from main area",
|
|
||||||
"g": "Jump to first row/top of page",
|
|
||||||
"G": "Jump to last row/bottom of page",
|
|
||||||
}
|
|
||||||
key_contexts = ["Servers", "Navigation", "Vim-style keys"]
|
|
||||||
key_header = "Keybindings"
|
|
||||||
|
|
||||||
# ModSelectionPanel
|
|
||||||
|
|
||||||
# labels
|
# labels
|
||||||
label_main_menu = "Main menu"
|
label_main_menu = "Main menu"
|
||||||
|
|
||||||
@@ -142,9 +169,6 @@ ping_tooltip = (
|
|||||||
"Refresh the ping for visible servers.\n" "Available once per unique filter context"
|
"Refresh the ping for visible servers.\n" "Available once per unique filter context"
|
||||||
)
|
)
|
||||||
|
|
||||||
# statusbar_helptext = "Select a row to see its detailed description"
|
|
||||||
# statusbar_helptext = "No server metadata to list."
|
|
||||||
|
|
||||||
# use e.g. filters.1pp
|
# use e.g. filters.1pp
|
||||||
filter_1pp = "1PP"
|
filter_1pp = "1PP"
|
||||||
filter_3pp = "3PP"
|
filter_3pp = "3PP"
|
||||||
@@ -182,177 +206,12 @@ self_workshop = "Open Steam workshop"
|
|||||||
settings_updated = "Settings updated!"
|
settings_updated = "Settings updated!"
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class ModPanelStrings:
|
|
||||||
header: str
|
|
||||||
unhighlight_stale: str
|
|
||||||
unhighlight_stale_tooltip: str
|
|
||||||
highlight_stale: str
|
|
||||||
highlight_stale_tooltip: str
|
|
||||||
unsub_selected: str
|
|
||||||
unsub_selected_tooltip: str
|
|
||||||
unselect_all: str
|
|
||||||
unselect_all_tooltip: str
|
|
||||||
select_all: str
|
|
||||||
select_all_tooltip: str
|
|
||||||
bulk_select: str
|
|
||||||
clear_highlights: str
|
|
||||||
select_stale: str
|
|
||||||
select_stale_tooltip: str
|
|
||||||
validate: str
|
|
||||||
validate_tooltip: str
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class Dialog:
|
|
||||||
querying: str
|
|
||||||
fetching: str
|
|
||||||
filtering: str
|
|
||||||
refreshing: str
|
|
||||||
details: str
|
|
||||||
modlist: str
|
|
||||||
working: str
|
|
||||||
updating_mods: str
|
|
||||||
scanning: str
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class Init:
|
|
||||||
is_steam_running: str
|
|
||||||
is_dayz_running: str
|
|
||||||
requires_steam: str
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class Button:
|
|
||||||
servers_label: str
|
|
||||||
servers_tooltip: str
|
|
||||||
mods_label: str
|
|
||||||
mods_tooltip: str
|
|
||||||
options_label: str
|
|
||||||
options_tooltip: str
|
|
||||||
help_label: str
|
|
||||||
help_tooltip: str
|
|
||||||
exit_label: str
|
|
||||||
exit_tooltip: str
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class Crumbs:
|
|
||||||
changelog: str
|
|
||||||
keys: str
|
|
||||||
log: str
|
|
||||||
_help: str
|
|
||||||
mods: str
|
|
||||||
options: str
|
|
||||||
servers: str
|
|
||||||
thanks: str
|
|
||||||
developers: str
|
|
||||||
default: str
|
|
||||||
offline: str
|
|
||||||
connect: str
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class Thanks:
|
|
||||||
header: str
|
|
||||||
description: str
|
|
||||||
users: list[str]
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class Options:
|
|
||||||
header: str
|
|
||||||
steam_web: str
|
|
||||||
enter_steam: str
|
|
||||||
steam_placeholder: str
|
|
||||||
name_placeholder: str
|
|
||||||
last_used: str
|
|
||||||
always_fs: str
|
|
||||||
steam: str
|
|
||||||
flatpak: str
|
|
||||||
km: str
|
|
||||||
mi: str
|
|
||||||
client: str
|
|
||||||
window_size: str
|
|
||||||
distance: str
|
|
||||||
name: str
|
|
||||||
manual_dl: str
|
|
||||||
auto_dl: str
|
|
||||||
update: str
|
|
||||||
install_mode: str
|
|
||||||
force_update: str
|
|
||||||
dl_eventbox: str
|
|
||||||
force_eventbox: str
|
|
||||||
self_update: str
|
|
||||||
no_self_update: str
|
|
||||||
api_key: str
|
|
||||||
prefs: str
|
|
||||||
mods: str
|
|
||||||
version: str
|
|
||||||
branch: str
|
|
||||||
stable: str
|
|
||||||
testing: str
|
|
||||||
manual_sub_msg: str
|
|
||||||
|
|
||||||
|
|
||||||
init = Init(
|
init = Init(
|
||||||
is_steam_running="Is Steam running? DZGUI must be run on top of Steam.",
|
is_steam_running="Is Steam running? DZGUI must be run on top of Steam.",
|
||||||
is_dayz_running="Is DayZ already running? DZGUI cannot launch DayZ if another process is using it.",
|
is_dayz_running="Is DayZ already running? DZGUI cannot launch DayZ if another process is using it.",
|
||||||
requires_steam="Your chosen client (Steam/Flatpak Steam) must be installed on the system.",
|
requires_steam="Your chosen client (Steam/Flatpak Steam) must be installed on the system.",
|
||||||
)
|
)
|
||||||
|
|
||||||
mod_panel = ModPanelStrings(
|
|
||||||
header="Mod actions",
|
|
||||||
unhighlight_stale="Unhighlight stale",
|
|
||||||
unhighlight_stale_tooltip="Clears highlight from stale mods",
|
|
||||||
highlight_stale="Highlight stale",
|
|
||||||
highlight_stale_tooltip=(
|
|
||||||
"Shows locally-installed mods which are not \n"
|
|
||||||
"used by any server in your Saved Servers"
|
|
||||||
),
|
|
||||||
unsub_selected="Unsubscribe selected",
|
|
||||||
unsub_selected_tooltip="Unsubscribes from selected mods",
|
|
||||||
unselect_all="Unselect all",
|
|
||||||
unselect_all_tooltip="Bulk unselects all mods",
|
|
||||||
select_all="Select all",
|
|
||||||
select_all_tooltip="Bulk selects all mods",
|
|
||||||
bulk_select="Bulk selects all currently highlighted mods",
|
|
||||||
clear_highlights="Clears highlights and reverts the table to a default state",
|
|
||||||
select_stale="Select stale",
|
|
||||||
select_stale_tooltip="Only selects highlighted stale mods",
|
|
||||||
validate="Validate selected",
|
|
||||||
validate_tooltip="Validates selected mods and updates them if necessary",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
thanks = Thanks(
|
|
||||||
header="# Special thanks",
|
|
||||||
description=(
|
|
||||||
"This page recognizes beta testers, collaborators, code "
|
|
||||||
"contributors, and sponsors of the project in alphabetical order.\n"
|
|
||||||
"If you wish to be removed from this list, please submit a ticket."
|
|
||||||
),
|
|
||||||
users=[
|
|
||||||
"bongjutsu",
|
|
||||||
"Deku",
|
|
||||||
"dj3hac",
|
|
||||||
"finntux",
|
|
||||||
"GaryBlackbourne",
|
|
||||||
"jiriks74",
|
|
||||||
"Johnofwrong",
|
|
||||||
"MatheusLasserr",
|
|
||||||
"nolan-perez",
|
|
||||||
"OnniSaarni",
|
|
||||||
"scandalouss",
|
|
||||||
"SnackSBR",
|
|
||||||
"StevelDusa",
|
|
||||||
"sylvaingirardbe",
|
|
||||||
"Thoughtduck216",
|
|
||||||
"u-alexandru",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
options = Options(
|
options = Options(
|
||||||
header="Options",
|
header="Options",
|
||||||
@@ -373,20 +232,6 @@ options = Options(
|
|||||||
manual_dl="Manual",
|
manual_dl="Manual",
|
||||||
auto_dl="Auto",
|
auto_dl="Auto",
|
||||||
update="Update",
|
update="Update",
|
||||||
install_mode="Mod install mode",
|
|
||||||
force_update="Force update local mods",
|
|
||||||
dl_eventbox=(
|
|
||||||
"Manual: prompt to subscribe to mods in Steam. " "Auto: unmanned downloads."
|
|
||||||
),
|
|
||||||
force_eventbox="Synchronize all local mods. Automatic mode must be enabled.",
|
|
||||||
self_update=(
|
|
||||||
"Stable: only contains stable features. "
|
|
||||||
"Testing: pre-release beta, contains new features."
|
|
||||||
),
|
|
||||||
no_self_update=(
|
|
||||||
"In-app updates are disabled when DZGUI is "
|
|
||||||
"installed globally (e.g., via package manager)."
|
|
||||||
),
|
|
||||||
api_key="API Key",
|
api_key="API Key",
|
||||||
prefs="Preferences",
|
prefs="Preferences",
|
||||||
mods="Mods",
|
mods="Mods",
|
||||||
@@ -394,13 +239,6 @@ options = Options(
|
|||||||
branch="DZGUI branch",
|
branch="DZGUI branch",
|
||||||
stable="Stable",
|
stable="Stable",
|
||||||
testing="Testing",
|
testing="Testing",
|
||||||
manual_sub_msg="""When switching from MANUAL to AUTO mod install mode,
|
|
||||||
DZGUI will manage mod installation and deletion for you.
|
|
||||||
To prevent conflicts with Steam Workshop subscriptions and old mods from being downloaded
|
|
||||||
when Steam updates, you should unsubscribe from any existing Workshop mods you manually subscribed to.
|
|
||||||
Open your Profile, then 'Workshop Items' and select 'Unsubscribe from all'
|
|
||||||
on the right-hand side.
|
|
||||||
""",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
dialog = Dialog(
|
dialog = Dialog(
|
||||||
@@ -415,19 +253,6 @@ dialog = Dialog(
|
|||||||
scanning="Scanning LAN ports",
|
scanning="Scanning LAN ports",
|
||||||
)
|
)
|
||||||
|
|
||||||
buttons = Button(
|
|
||||||
servers_label="Servers",
|
|
||||||
servers_tooltip="Search for and connect to servers",
|
|
||||||
mods_label="Mods",
|
|
||||||
mods_tooltip="Manage local mods",
|
|
||||||
options_label="Options",
|
|
||||||
options_tooltip="Advanced options",
|
|
||||||
help_label="Help",
|
|
||||||
help_tooltip="Troubleshooting and documentation",
|
|
||||||
exit_label="Exit",
|
|
||||||
exit_tooltip="Quits the application",
|
|
||||||
)
|
|
||||||
|
|
||||||
crumbs = Crumbs(
|
crumbs = Crumbs(
|
||||||
changelog="Help > Changelog",
|
changelog="Help > Changelog",
|
||||||
keys="Keybindings",
|
keys="Keybindings",
|
||||||
@@ -447,102 +272,9 @@ no_mods = "No local mods found."
|
|||||||
no_servers = "No server metadata to list."
|
no_servers = "No server metadata to list."
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class Flags:
|
|
||||||
description: str
|
|
||||||
version: str
|
|
||||||
uninstall: str
|
|
||||||
debug: str
|
|
||||||
map_count: str
|
|
||||||
|
|
||||||
|
|
||||||
flags = Flags(
|
|
||||||
description="DayZ server browser and mod manager",
|
|
||||||
version="print version information",
|
|
||||||
uninstall="clean up state/config files",
|
|
||||||
debug="enable developer debugging features",
|
|
||||||
map_count="check and update system map count value",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class FilePicker:
|
|
||||||
title: str
|
|
||||||
placeholder: str
|
|
||||||
|
|
||||||
|
|
||||||
picker = FilePicker(
|
|
||||||
title="Save diagnostic log to file",
|
|
||||||
placeholder=SYSTEM_LOG,
|
|
||||||
)
|
|
||||||
|
|
||||||
api_error = (
|
|
||||||
"API key validation error or timeout. See 'Help > Show debug log' for details."
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class DevelopersPage:
|
|
||||||
header: str
|
|
||||||
paths_label: str
|
|
||||||
prefs_label: str
|
|
||||||
columns: list[str]
|
|
||||||
|
|
||||||
|
|
||||||
developers = DevelopersPage(
|
|
||||||
header="Developers",
|
|
||||||
paths_label="Resolved XDG paths",
|
|
||||||
prefs_label="Boot preferences",
|
|
||||||
columns=["Key", "Value"],
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class ServerLabels:
|
|
||||||
browser: str
|
|
||||||
saved: str
|
|
||||||
recent: str
|
|
||||||
lan: str
|
|
||||||
|
|
||||||
|
|
||||||
server_labels = ServerLabels(
|
server_labels = ServerLabels(
|
||||||
browser="Server Browser",
|
browser="Server Browser",
|
||||||
saved="Saved Servers",
|
saved="Saved Servers",
|
||||||
recent="Recent",
|
recent="Recent",
|
||||||
lan="LAN",
|
lan="LAN",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
distance_suffix = "Distance: calculating..."
|
|
||||||
dialog_error = "ERROR"
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(slots=True, frozen=True)
|
|
||||||
class AtomicButton:
|
|
||||||
refresh: str
|
|
||||||
refresh_tooltip: str
|
|
||||||
copy: str
|
|
||||||
keys: str
|
|
||||||
keys_tooltip: str
|
|
||||||
|
|
||||||
|
|
||||||
atomic_buttons = AtomicButton(
|
|
||||||
refresh="Refresh",
|
|
||||||
refresh_tooltip="Refresh server data",
|
|
||||||
copy="Copy",
|
|
||||||
keys="Keys",
|
|
||||||
keys_tooltip="Toggles the keybindings dialog",
|
|
||||||
)
|
|
||||||
|
|
||||||
gtk_theme_missing = "No GTK theme provided"
|
|
||||||
steam_icon_missing = "Steam icon not found in IconTheme"
|
|
||||||
|
|
||||||
missing_changelog = "Error: failed to read changelog"
|
|
||||||
esc_to_return = "Press ESC to return"
|
|
||||||
question_to_return = "Press ? to return"
|
|
||||||
|
|
||||||
alert_button_tooltip = "Click to open debug log"
|
|
||||||
|
|
||||||
address_already_saved = "This address is already in your Saved Servers"
|
|
||||||
stop_scanning = "Stop scanning on first hit"
|
|
||||||
abort_tooltip = "Unless you have multiple DayZ servers on your LAN,\nleave this checked to get results faster"
|
|
||||||
@@ -2,9 +2,6 @@ from typing import Callable, Literal, Self, TYPE_CHECKING
|
|||||||
|
|
||||||
from dzgui.util.clip import copy_clipboard
|
from dzgui.util.clip import copy_clipboard
|
||||||
from dzgui.strings import buttons
|
from dzgui.strings import buttons
|
||||||
from dzgui.util.strings import (
|
|
||||||
atomic_buttons,
|
|
||||||
)
|
|
||||||
from dzgui.const.icons import (
|
from dzgui.const.icons import (
|
||||||
ICON_CLIPBOARD,
|
ICON_CLIPBOARD,
|
||||||
ICON_CLOSE,
|
ICON_CLOSE,
|
||||||
@@ -99,7 +96,7 @@ class LargeIconTextButton(IconButton):
|
|||||||
|
|
||||||
class ClipboardButton(IconTextButton):
|
class ClipboardButton(IconTextButton):
|
||||||
def __init__(self, func: Callable[[], str]) -> None:
|
def __init__(self, func: Callable[[], str]) -> None:
|
||||||
super().__init__(ICON_CLIPBOARD, atomic_buttons.copy)
|
super().__init__(ICON_CLIPBOARD, buttons.copy_button)
|
||||||
self.connect("clicked", self._on_button_clicked, func)
|
self.connect("clicked", self._on_button_clicked, func)
|
||||||
|
|
||||||
self.set_tooltip_text(buttons.clipboard_button)
|
self.set_tooltip_text(buttons.clipboard_button)
|
||||||
@@ -139,7 +136,7 @@ class RefreshButton(IconTextButton):
|
|||||||
def __init__(self, controller: "Controller") -> None:
|
def __init__(self, controller: "Controller") -> None:
|
||||||
super().__init__(
|
super().__init__(
|
||||||
icon=ICON_REFRESH,
|
icon=ICON_REFRESH,
|
||||||
label=atomic_buttons.refresh,
|
label=buttons.refresh_button,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
@@ -152,7 +149,7 @@ class RefreshButton(IconTextButton):
|
|||||||
self.set_margin_top(10)
|
self.set_margin_top(10)
|
||||||
self.set_margin_start(80)
|
self.set_margin_start(80)
|
||||||
self.set_margin_end(80)
|
self.set_margin_end(80)
|
||||||
self.set_tooltip_text(atomic_buttons.refresh_tooltip)
|
self.set_tooltip_text(buttons.refresh_tooltip)
|
||||||
|
|
||||||
self.connect("clicked", self._on_refresh_clicked)
|
self.connect("clicked", self._on_refresh_clicked)
|
||||||
emitter.connect("servers_loaded", self._on_load)
|
emitter.connect("servers_loaded", self._on_load)
|
||||||
@@ -196,21 +193,21 @@ class RefreshButton(IconTextButton):
|
|||||||
|
|
||||||
def show_time(self, state: bool) -> None:
|
def show_time(self, state: bool) -> None:
|
||||||
if state is True:
|
if state is True:
|
||||||
self.set_label(f"{atomic_buttons.refresh} ({str(self.time)})")
|
self.set_label(f"{buttons.refresh_button} ({str(self.time)})")
|
||||||
else:
|
else:
|
||||||
self.set_label(atomic_buttons.refresh)
|
self.set_label(buttons.refresh_button)
|
||||||
|
|
||||||
|
|
||||||
class KeysButton(IconTextButton):
|
class KeysButton(IconTextButton):
|
||||||
def __init__(self, controller: "Controller") -> None:
|
def __init__(self, controller: "Controller") -> None:
|
||||||
super().__init__(icon=ICON_INPUT_KEYBOARD, label=atomic_buttons.keys)
|
super().__init__(icon=ICON_INPUT_KEYBOARD, label=buttons.keys_button)
|
||||||
|
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
self.set_margin_top(10)
|
self.set_margin_top(10)
|
||||||
self.set_margin_start(80)
|
self.set_margin_start(80)
|
||||||
self.set_margin_end(80)
|
self.set_margin_end(80)
|
||||||
|
|
||||||
self.set_tooltip_text(atomic_buttons.keys_tooltip)
|
self.set_tooltip_text(buttons.keys_button_tooltip)
|
||||||
|
|
||||||
self.connect("clicked", self._on_keys_clicked)
|
self.connect("clicked", self._on_keys_clicked)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from typing import Self, TYPE_CHECKING
|
from typing import Self, TYPE_CHECKING
|
||||||
|
|
||||||
from dzgui.const.enum import ModButton
|
from dzgui.const.enum import ModButton
|
||||||
from dzgui.util.strings import mod_panel
|
from dzgui.strings import mod_panel
|
||||||
from dzgui.views.components.labels import BoldLabel
|
from dzgui.views.components.labels import BoldLabel
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from typing import Self, Union, TYPE_CHECKING
|
from typing import Self, Union, TYPE_CHECKING
|
||||||
|
|
||||||
from dzgui.const.enum import NotebookPage, ServerTab
|
from dzgui.const.enum import NotebookPage, ServerTab
|
||||||
from dzgui.util.strings import esc_to_return, question_to_return
|
from dzgui.strings import statusbar
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
@@ -70,14 +70,14 @@ class Statusbar(Gtk.Grid):
|
|||||||
NotebookPage.OFFLINE,
|
NotebookPage.OFFLINE,
|
||||||
):
|
):
|
||||||
self.prior_enum = enum
|
self.prior_enum = enum
|
||||||
self.set_by_context(enum, esc_to_return)
|
self.set_by_context(enum, statusbar.esc_to_return)
|
||||||
return
|
return
|
||||||
|
|
||||||
match enum:
|
match enum:
|
||||||
case NotebookPage.HELP:
|
case NotebookPage.HELP:
|
||||||
bar = self.controller.get_help_row()
|
bar = self.controller.get_help_row()
|
||||||
case NotebookPage.KEYS:
|
case NotebookPage.KEYS:
|
||||||
bar = question_to_return
|
bar = statusbar.question_to_return
|
||||||
case _:
|
case _:
|
||||||
bar = self.prior_status
|
bar = self.prior_status
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ from dzgui.init.update import check_updates
|
|||||||
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
||||||
from dzgui.strings import preboot, dialogs
|
from dzgui.strings import preboot, dialogs
|
||||||
from dzgui.util.format import format_exception
|
from dzgui.util.format import format_exception
|
||||||
from dzgui.util.strings import dialog_header
|
|
||||||
from dzgui.util.symlink import rebuild_symlinks
|
from dzgui.util.symlink import rebuild_symlinks
|
||||||
from dzgui.views.components.buttons import ClipboardButton
|
from dzgui.views.components.buttons import ClipboardButton
|
||||||
from dzgui.views.mixins.colorscheme import ColorAwareApp
|
from dzgui.views.mixins.colorscheme import ColorAwareApp
|
||||||
@@ -36,7 +35,7 @@ class Success(Enum):
|
|||||||
class BootDialog(ColorAwareApp, Gtk.Dialog): # type: ignore
|
class BootDialog(ColorAwareApp, Gtk.Dialog): # type: ignore
|
||||||
def __init__(self, parent: "BootWindow", xdg: "Xdg", version: str) -> None:
|
def __init__(self, parent: "BootWindow", xdg: "Xdg", version: str) -> None:
|
||||||
super().__init__(
|
super().__init__(
|
||||||
title=dialog_header,
|
title=dialogs.default_header,
|
||||||
transient_for=parent,
|
transient_for=parent,
|
||||||
modal=True,
|
modal=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import textwrap
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from typing import Self
|
from typing import Self
|
||||||
from dzgui.util.strings import dialog_error, dialog_header
|
from dzgui.strings import dialogs
|
||||||
from dzgui.views.mixins.colorscheme import ColorAwareApp
|
from dzgui.views.mixins.colorscheme import ColorAwareApp
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
@@ -14,8 +14,8 @@ from gi.repository import Gtk
|
|||||||
class AbortDialog(ColorAwareApp, Gtk.MessageDialog): # type: ignore
|
class AbortDialog(ColorAwareApp, Gtk.MessageDialog): # type: ignore
|
||||||
def __init__(self, string: str, buttons: Gtk.ButtonsType) -> None:
|
def __init__(self, string: str, buttons: Gtk.ButtonsType) -> None:
|
||||||
super().__init__(
|
super().__init__(
|
||||||
title=dialog_header,
|
title=dialogs.default_header,
|
||||||
text=dialog_error,
|
text=dialogs.error,
|
||||||
transient_for=None,
|
transient_for=None,
|
||||||
buttons=buttons,
|
buttons=buttons,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class GenericDialog(Gtk.MessageDialog):
|
|||||||
buttons=buttons,
|
buttons=buttons,
|
||||||
text=text,
|
text=text,
|
||||||
secondary_text=secondary,
|
secondary_text=secondary,
|
||||||
title=strings.dialog_header,
|
title=dialogs.default_header,
|
||||||
modal=True,
|
modal=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ from importlib import resources
|
|||||||
|
|
||||||
from dzgui.const.constants import APP_NAME, APP_NAME_LOWER, CHANGELOG_PATH
|
from dzgui.const.constants import APP_NAME, APP_NAME_LOWER, CHANGELOG_PATH
|
||||||
from dzgui.strings import changelog as clog
|
from dzgui.strings import changelog as clog
|
||||||
from dzgui.util.strings import missing_changelog
|
|
||||||
from dzgui.util.format import format_pango
|
from dzgui.util.format import format_pango
|
||||||
from dzgui.views.mixins.help_menu_mixin import HelpMenuMixin
|
from dzgui.views.mixins.help_menu_mixin import HelpMenuMixin
|
||||||
from dzgui.views.mixins.scrollable_mixin import ScrollableMixin
|
from dzgui.views.mixins.scrollable_mixin import ScrollableMixin
|
||||||
@@ -31,7 +30,7 @@ class Changelog(HelpMenuMixin, ScrollableMixin, Gtk.ScrolledWindow): # type: ig
|
|||||||
changelog = resources.read_text(APP_NAME_LOWER, CHANGELOG_PATH)
|
changelog = resources.read_text(APP_NAME_LOWER, CHANGELOG_PATH)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
logger.critical(e)
|
logger.critical(e)
|
||||||
changelog = missing_changelog
|
changelog = clog.missing_changelog
|
||||||
|
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
self.box = Gtk.Box(
|
self.box = Gtk.Box(
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from typing import Self, Union, TYPE_CHECKING
|
|||||||
|
|
||||||
from dzgui.const.enum import NotebookPage
|
from dzgui.const.enum import NotebookPage
|
||||||
from dzgui.util.css import add_class
|
from dzgui.util.css import add_class
|
||||||
from dzgui.util.strings import developers
|
from dzgui.strings import developers
|
||||||
from dzgui.views.components.labels import BoldLabel
|
from dzgui.views.components.labels import BoldLabel
|
||||||
from dzgui.views.trees.tree_base import TreeView
|
from dzgui.views.trees.tree_base import TreeView
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ class Developers(Gtk.ScrolledWindow):
|
|||||||
orientation=Gtk.Orientation.VERTICAL, margin_start=10, margin_end=10
|
orientation=Gtk.Orientation.VERTICAL, margin_start=10, margin_end=10
|
||||||
)
|
)
|
||||||
|
|
||||||
heading = Gtk.Label(label=developers.header)
|
heading = Gtk.Label(label=developers.page_header)
|
||||||
heading.set_halign(Gtk.Align.CENTER)
|
heading.set_halign(Gtk.Align.CENTER)
|
||||||
add_class(heading, "page-heading")
|
add_class(heading, "page-heading")
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from dzgui.views.mixins.scrollable_mixin import ScrollableMixin
|
from dzgui.views.mixins.scrollable_mixin import ScrollableMixin
|
||||||
from dzgui.util.strings import navigation, servers, vim, key_header, key_contexts
|
from dzgui.strings import keybindings
|
||||||
from dzgui.util.css import add_class
|
from dzgui.util.css import add_class
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
@@ -26,10 +26,12 @@ class Keybindings(ScrollableMixin, Gtk.ScrolledWindow): # type: ignore
|
|||||||
self.controller = controller
|
self.controller = controller
|
||||||
self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
|
||||||
|
|
||||||
label = Gtk.Label(label=key_header)
|
label = Gtk.Label(label=keybindings.key_header)
|
||||||
add_class(label, "page-heading")
|
add_class(label, "page-heading")
|
||||||
|
|
||||||
grid = self.build_grid([servers, navigation, vim])
|
grid = self.build_grid(
|
||||||
|
[keybindings.servers, keybindings.navigation, keybindings.vim]
|
||||||
|
)
|
||||||
self.box.add(label)
|
self.box.add(label)
|
||||||
self.box.add(grid)
|
self.box.add(grid)
|
||||||
self.add(self.box)
|
self.add(self.box)
|
||||||
@@ -94,7 +96,7 @@ class Keybindings(ScrollableMixin, Gtk.ScrolledWindow): # type: ignore
|
|||||||
|
|
||||||
row, column = 1, 1
|
row, column = 1, 1
|
||||||
w, h = 1, 1
|
w, h = 1, 1
|
||||||
sidebar = self.build_sidebar(key_contexts)
|
sidebar = self.build_sidebar(keybindings.key_contexts)
|
||||||
separator = Gtk.Separator()
|
separator = Gtk.Separator()
|
||||||
keys_box = self.build_keys(items)
|
keys_box = self.build_keys(items)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
from dzgui.util.format import format_pango
|
from dzgui.util.format import format_pango
|
||||||
from dzgui.util.strings import thanks
|
from dzgui.strings import thanks
|
||||||
from dzgui.views.mixins.help_menu_mixin import HelpMenuMixin
|
from dzgui.views.mixins.help_menu_mixin import HelpMenuMixin
|
||||||
from dzgui.views.mixins.scrollable_mixin import ScrollableMixin
|
from dzgui.views.mixins.scrollable_mixin import ScrollableMixin
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user