mirror of
https://github.com/aclist/dztui.git
synced 2024-12-28 21:32:36 +01:00
Merge pull request #161 from aclist/release/5.5.0-beta.4
Release/5.5.0-beta.4
This commit is contained in:
commit
abcbb1b427
4 changed files with 42 additions and 9 deletions
|
@ -1,5 +1,11 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [5.5.0-beta.4] 2024-10-31
|
||||||
|
### Added
|
||||||
|
- Expose a toggle setting for whether to launch the application in fullscreen
|
||||||
|
### Fixed
|
||||||
|
- Enable adding/removing servers to/from My Saved Servers when in Recent Servers context
|
||||||
|
|
||||||
## [5.5.0-beta.3] 2024-10-31
|
## [5.5.0-beta.3] 2024-10-31
|
||||||
### Fixed
|
### Fixed
|
||||||
- Prevent maps combobox from duplicating contents
|
- Prevent maps combobox from duplicating contents
|
||||||
|
|
9
dzgui.sh
9
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
version=5.5.0-beta.3
|
version=5.5.0-beta.4
|
||||||
|
|
||||||
#CONSTANTS
|
#CONSTANTS
|
||||||
aid=221100
|
aid=221100
|
||||||
|
@ -193,6 +193,9 @@ debug="$debug"
|
||||||
#Toggle stable/testing branch
|
#Toggle stable/testing branch
|
||||||
branch="$branch"
|
branch="$branch"
|
||||||
|
|
||||||
|
#Start in fullscreen
|
||||||
|
fullscreen="$fullscreen"
|
||||||
|
|
||||||
#Steam API key
|
#Steam API key
|
||||||
steam_api="$steam_api"
|
steam_api="$steam_api"
|
||||||
|
|
||||||
|
@ -566,10 +569,10 @@ fetch_helpers_by_sum(){
|
||||||
[[ -f "$config_file" ]] && source "$config_file"
|
[[ -f "$config_file" ]] && source "$config_file"
|
||||||
declare -A sums
|
declare -A sums
|
||||||
sums=(
|
sums=(
|
||||||
["ui.py"]="bfdc7d510cea375731d4b92b9c3ab510"
|
["ui.py"]="f4aaf17ec91b95b9b951fc1bc7c2b7b4"
|
||||||
["query_v2.py"]="55d339ba02512ac69de288eb3be41067"
|
["query_v2.py"]="55d339ba02512ac69de288eb3be41067"
|
||||||
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
|
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
|
||||||
["funcs"]="105e7be170eea48ce61fcfe7b50b8f59"
|
["funcs"]="d8ae2662fbc3c62bdb5a51dec1935705"
|
||||||
["lan"]="c62e84ddd1457b71a85ad21da662b9af"
|
["lan"]="c62e84ddd1457b71a85ad21da662b9af"
|
||||||
)
|
)
|
||||||
local author="aclist"
|
local author="aclist"
|
||||||
|
|
|
@ -410,6 +410,7 @@ query_config(){
|
||||||
"name"
|
"name"
|
||||||
"fav_label"
|
"fav_label"
|
||||||
"preferred_client"
|
"preferred_client"
|
||||||
|
"fullscreen"
|
||||||
)
|
)
|
||||||
if [[ -n $key ]]; then
|
if [[ -n $key ]]; then
|
||||||
if [[ -n ${!key} ]]; then
|
if [[ -n ${!key} ]]; then
|
||||||
|
@ -714,6 +715,9 @@ debug="$debug"
|
||||||
#Toggle stable/testing branch
|
#Toggle stable/testing branch
|
||||||
branch="$branch"
|
branch="$branch"
|
||||||
|
|
||||||
|
#Start in fullscreen
|
||||||
|
fullscreen="$fullscreen"
|
||||||
|
|
||||||
#Steam API key
|
#Steam API key
|
||||||
steam_api="$steam_api"
|
steam_api="$steam_api"
|
||||||
|
|
||||||
|
@ -807,6 +811,14 @@ toggle(){
|
||||||
else
|
else
|
||||||
preferred_client="steam"
|
preferred_client="steam"
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
Toggle[[:space:]]DZGUI[[:space:]]fullscreen[[:space:]]boot)
|
||||||
|
if [[ $fullscreen == "true" ]]; then
|
||||||
|
fullscreen="false"
|
||||||
|
else
|
||||||
|
fullscreen="true"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
update_config
|
update_config
|
||||||
return 90
|
return 90
|
||||||
|
|
|
@ -105,6 +105,7 @@ options = [
|
||||||
("Toggle release branch",),
|
("Toggle release branch",),
|
||||||
("Toggle mod install mode",),
|
("Toggle mod install mode",),
|
||||||
("Toggle Steam/Flatpak",),
|
("Toggle Steam/Flatpak",),
|
||||||
|
("Toggle DZGUI fullscreen boot",),
|
||||||
("Change player name",),
|
("Change player name",),
|
||||||
("Change Steam API key",),
|
("Change Steam API key",),
|
||||||
("Change Battlemetrics API key",),
|
("Change Battlemetrics API key",),
|
||||||
|
@ -153,6 +154,7 @@ status_tooltip = {
|
||||||
"Toggle release branch": "Switch between stable and testing branches",
|
"Toggle release branch": "Switch between stable and testing branches",
|
||||||
"Toggle mod install mode": "Switch between manual and auto mod installation",
|
"Toggle mod install mode": "Switch between manual and auto mod installation",
|
||||||
"Toggle Steam/Flatpak": "Switch the preferred client to use for launching DayZ",
|
"Toggle Steam/Flatpak": "Switch the preferred client to use for launching DayZ",
|
||||||
|
"Toggle DZGUI fullscreen boot": "Whether to start DZGUI as a maximized window (desktop only)",
|
||||||
"Change player name": "Update your in-game name (required by some servers)",
|
"Change player name": "Update your in-game name (required by some servers)",
|
||||||
"Change Steam API key": "Can be used if you revoked an old API key",
|
"Change Steam API key": "Can be used if you revoked an old API key",
|
||||||
"Change Battlemetrics API key": "Can be used if you revoked an old API key",
|
"Change Battlemetrics API key": "Can be used if you revoked an old API key",
|
||||||
|
@ -348,7 +350,12 @@ def process_tree_option(input, treeview):
|
||||||
logger.info("Parsing tree option '%s' for the context '%s'" %(command, context))
|
logger.info("Parsing tree option '%s' for the context '%s'" %(command, context))
|
||||||
|
|
||||||
transient_parent = treeview.get_outer_window()
|
transient_parent = treeview.get_outer_window()
|
||||||
toggle_contexts = ["Toggle mod install mode", "Toggle release branch", "Toggle Steam/Flatpak"]
|
toggle_contexts = [
|
||||||
|
"Toggle mod install mode",
|
||||||
|
"Toggle release branch",
|
||||||
|
"Toggle Steam/Flatpak",
|
||||||
|
"Toggle DZGUI fullscreen boot"
|
||||||
|
]
|
||||||
|
|
||||||
def call_on_thread(bool, subproc, msg, args):
|
def call_on_thread(bool, subproc, msg, args):
|
||||||
def _background(subproc, args, dialog):
|
def _background(subproc, args, dialog):
|
||||||
|
@ -374,7 +381,6 @@ def process_tree_option(input, treeview):
|
||||||
msg = out[-1]
|
msg = out[-1]
|
||||||
process_shell_return_code(transient_parent, msg, rc, input)
|
process_shell_return_code(transient_parent, msg, rc, input)
|
||||||
|
|
||||||
|
|
||||||
match context:
|
match context:
|
||||||
case "Help":
|
case "Help":
|
||||||
if command == "View changelog":
|
if command == "View changelog":
|
||||||
|
@ -465,7 +471,8 @@ class OuterWindow(Gtk.Window):
|
||||||
if is_game_mode is True:
|
if is_game_mode is True:
|
||||||
self.fullscreen()
|
self.fullscreen()
|
||||||
else:
|
else:
|
||||||
self.maximize()
|
if query_config(None, "fullscreen")[0] == "true":
|
||||||
|
self.maximize()
|
||||||
|
|
||||||
# Hide FilterPanel on main menu
|
# Hide FilterPanel on main menu
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
@ -759,7 +766,7 @@ class TreeView(Gtk.TreeView):
|
||||||
mod_context_items = ["Open in Steam Workshop", "Delete mod"]
|
mod_context_items = ["Open in Steam Workshop", "Delete mod"]
|
||||||
subcontext_items = {"Server browser": ["Add to my servers", "Copy IP to clipboard", "Show server-side mods", "Refresh player count"],
|
subcontext_items = {"Server browser": ["Add to my servers", "Copy IP to clipboard", "Show server-side mods", "Refresh player count"],
|
||||||
"My saved servers": ["Remove from my servers", "Copy IP to clipboard", "Show server-side mods", "Refresh player count"],
|
"My saved servers": ["Remove from my servers", "Copy IP to clipboard", "Show server-side mods", "Refresh player count"],
|
||||||
"Recent servers": ["Remove from history", "Copy IP to clipboard", "Show server-side mods", "Refresh player count"],
|
"Recent servers": ["Add to my servers", "Remove from history", "Copy IP to clipboard", "Show server-side mods", "Refresh player count"],
|
||||||
}
|
}
|
||||||
# submenu hierarchy https://stackoverflow.com/questions/52847909/how-to-add-a-sub-menu-to-a-gtk-menu
|
# submenu hierarchy https://stackoverflow.com/questions/52847909/how-to-add-a-sub-menu-to-a-gtk-menu
|
||||||
if context == "Mod":
|
if context == "Mod":
|
||||||
|
@ -772,7 +779,7 @@ class TreeView(Gtk.TreeView):
|
||||||
return
|
return
|
||||||
|
|
||||||
for item in items:
|
for item in items:
|
||||||
if subcontext == "Server browser" and item == "Add to my servers":
|
if subcontext == "Server browser" or "Recent servers" and item == "Add to my servers":
|
||||||
record = "%s:%s" %(self.get_column_at_index(7), self.get_column_at_index(8))
|
record = "%s:%s" %(self.get_column_at_index(7), self.get_column_at_index(8))
|
||||||
proc = call_out(widget, "is_in_favs", record)
|
proc = call_out(widget, "is_in_favs", record)
|
||||||
if proc.returncode == 0:
|
if proc.returncode == 0:
|
||||||
|
@ -1237,7 +1244,8 @@ def format_metadata(row_sel):
|
||||||
"auto_install": config_vals[2],
|
"auto_install": config_vals[2],
|
||||||
"name": config_vals[3],
|
"name": config_vals[3],
|
||||||
"fav_label": config_vals[4],
|
"fav_label": config_vals[4],
|
||||||
"preferred_client": config_vals[5]
|
"preferred_client": config_vals[5],
|
||||||
|
"fullscreen": config_vals[6]
|
||||||
}
|
}
|
||||||
match row_sel:
|
match row_sel:
|
||||||
case "Quick-connect to favorite server" | "Change favorite server":
|
case "Quick-connect to favorite server" | "Change favorite server":
|
||||||
|
@ -1257,6 +1265,10 @@ def format_metadata(row_sel):
|
||||||
val = "branch"
|
val = "branch"
|
||||||
case "Toggle Steam/Flatpak":
|
case "Toggle Steam/Flatpak":
|
||||||
val = "preferred_client"
|
val = "preferred_client"
|
||||||
|
case "Toggle DZGUI fullscreen boot":
|
||||||
|
default = "false"
|
||||||
|
alt = "true"
|
||||||
|
val = "fullscreen"
|
||||||
case _:
|
case _:
|
||||||
return prefix
|
return prefix
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue