mirror of
https://github.com/aclist/dztui.git
synced 2025-04-05 03:53:01 +02:00
feat: make fullscreen option sticky
This commit is contained in:
parent
9d1ff35559
commit
ce93fdf869
4 changed files with 37 additions and 4 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
|
||||||
|
|
3
dzgui.sh
3
dzgui.sh
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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()
|
||||||
|
@ -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