From d7b3ff8b3e1e799dedddb81a04ab8e3227acd5cd Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 6 Oct 2024 03:29:20 +0900 Subject: [PATCH 01/14] chore: update checksum --- dzgui.sh | 2 +- helpers/funcs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index fe7b953..638435f 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -569,7 +569,7 @@ fetch_helpers_by_sum(){ ["ui.py"]="9cac4d3b87ef292e7d30b25ca86cc438" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="7221bda853145942c4c728cbc76ac633" + ["funcs"]="71d3a941209792a41f381f011e78def8" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index 071c8d3..8bf10c5 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version=5.4.1 +version=5.4.2 #CONSTANTS aid=221100 From 9189837a344584eecb32fd0b7d8bee128e19c1c5 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 30 Oct 2024 22:58:56 +0900 Subject: [PATCH 02/14] feat: support dlc servers --- CHANGELOG.md | 7 +++++ dzgui.sh | 12 ++++---- helpers/funcs | 32 +++++++++++++++++---- helpers/ui.py | 80 ++++++++++++++++++++++++++++++++++++++++++--------- 4 files changed, 106 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe6a399..7677861 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.5.0-beta.1] 2024-10-30 +### Added +- Support servers running DLC content (fixes Frostline servers) +- Text autocompletion in maps search field +### Fixed +- Abort fallback query method if DLC is required + ## [5.4.2-beta.1] 2024-10-05 ### Fixed - Sanitize third-party API IDs to remove UGC collisions diff --git a/dzgui.sh b/dzgui.sh index 638435f..dd7bbec 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -525,14 +525,14 @@ fetch_a2s(){ logger INFO "Updated A2S helper to sha '$sha'" } fetch_dzq(){ - local sum="232f42b98a3b50a0dd6e73fee55521b2" + local sum="9caed1445c45832f4af87736ba3f9637" local file="$helpers_path/a2s/dayzquery.py" if [[ -f $file ]] && [[ $(get_hash "$file") == $sum ]]; then logger INFO "DZQ is current" return 0 fi - local sha=ccc4f71b48610a1885706c9d92638dbd8ca012a5 - local author="yepoleb" + local sha=788e85b82189cb3485d4a08ee350c67994b29ea3 + local author="aclist" local repo="dayzquery" local url="https://raw.githubusercontent.com/$author/$repo/$sha/dayzquery.py" curl -Ls "$url" > "$file" @@ -566,10 +566,10 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="9cac4d3b87ef292e7d30b25ca86cc438" + ["ui.py"]="91ea4d842d35a7d5e1441174f1f463c5" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="71d3a941209792a41f381f011e78def8" + ["funcs"]="105e7be170eea48ce61fcfe7b50b8f59" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" @@ -868,7 +868,7 @@ initial_setup(){ watcher_deps check_architecture test_connection - fetch_helpers > >(pdialog "Checking helper files") +# fetch_helpers > >(pdialog "Checking helper files") varcheck source "$config_file" lock diff --git a/helpers/funcs b/helpers/funcs index 8bf10c5..6aa8790 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version=5.4.2 +version=5.5.0 #CONSTANTS aid=221100 @@ -280,6 +280,14 @@ initialize_remote_servers(){ res=$(get_remote_servers) parse_server_json "$res" >> "$file" } +is_dlc(){ + local dlc + local ip="$1" + local gport="$2" + local res="$(curl -Ls "https://api.steampowered.com/IGameServersService/GetServerList/v1/?filter=\gameaddr\\${ip}:${gport}\appid\221100&key=$steam_api")" + dlc=$(<<< "$res" jq '.response.servers[].gametype|contains("isDLC")') + printf "%s\n" "$dlc" +} a2s(){ local ip="$1" local qport="$2" @@ -1081,25 +1089,39 @@ try_fallback(){ local qport="$2" local mode="$3" if [[ $mode != "rules" ]] && [[ $mode != "names" ]]; then + logger WARN "Fallback query API called with an invalid mode: '$mode'" return 1 fi [[ -z $api_key ]] && return 1 + logger INFO "Using fallback query API on '$ip:$qport' with mode: '$mode'" local res=$(curl -s "$bm_api" -H "Authorization: Bearer "$api_key"" \ -G -d "filter[game]=$game" \ -d "filter[search]=%22${ip}:${qport}%22") [[ -z $res ]] && return 1 local len=$(<<< "$res" jq '.data|length') [[ $len -eq 0 ]] && return 1 + + # cull defunct entries local record=$(<<< "$res" jq -r ' .data[].attributes - |select(.status != "removed").details') + |select(.status != "removed")') + + # reverse lookup gport + local dlc + local gport=$(<<< "$record" jq -r '.port') + dlc=$(is_dlc "$ip" "$gport") + if [[ $dlc == "true" ]]; then + logger FAIL "Fallback query API called on DLC-enabled server" + return 1 + fi + case "$mode" in "rules") - <<< "$record" jq '.modIds[]' + <<< "$record" jq '.details.modIds[]' ;; "names") <<< "$record" jq ' - [.modNames, .modIds] as [$n, $i] + .details|[.modNames, .modIds] as [$n, $i] | {names: $n, ids: $i}' ;; esac @@ -1403,7 +1425,7 @@ manual_mod_install(){ if [[ $mode == "auto" ]] || [[ $mode == "force" ]]; then $steam_cmd "steam://url/CommunityFilePage/${stage_mods[$i]}+workshop_download_item $aid ${stage_mods[$i]}" - echo "# Opening workshop page for ${stage_mods[$i]}" + echo "# Opening workshop page for ${stage_mods[$i]}. If you see no progress, you may be out of disk space." else $steam_cmd "steam://url/CommunityFilePage/${stage_mods[$i]}" echo "# Opening workshop page for ${stage_mods[$i]}. If you see no progress after subscribing, try unsubscribing and resubscribing again until the download commences." diff --git a/helpers/ui.py b/helpers/ui.py index 5e77f68..7e7e4f6 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -19,7 +19,7 @@ gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GLib, Gdk, GObject, Pango from enum import Enum -# 5.4.1 +# 5.5.0 app_name = "DZGUI" start_time = 0 @@ -895,8 +895,7 @@ class TreeView(Gtk.TreeView): case Gdk.KEY_m: if self.get_first_col() == "Mod": return - grid.right_panel.filters_vbox.maps_combo.grab_focus() - grid.right_panel.filters_vbox.maps_combo.popup() + grid.right_panel.filters_vbox.maps_entry.grab_focus() case _: return False elif keyname.isnumeric() and int(keyname) > 0: @@ -1566,7 +1565,7 @@ def KeysDialog(parent, text, mode): Enter/Space/Double click: connect to server Right-click on row/Ctrl-l: displays additional context menus Ctrl-f: jump to keyword field - Ctrl-m: jump to maps dropdown + Ctrl-m: jump to maps field Ctrl-d: toggle dry run (debug) mode Ctrl-r: refresh player count for active row 1-9: toggle filter ON/OFF @@ -1639,7 +1638,7 @@ class ModDialog(GenericDialog): def _load(): dialog.destroy() if data.returncode == 1: - spawn_dialog(parent, "Server has no mods installed", "NOTIFY") + spawn_dialog(parent, "Server has no mods installed or is unsupported in this mode", "NOTIFY") return self.show_all() self.set_markup("Modlist (%s mods)" %(mod_count)) @@ -1858,15 +1857,29 @@ class FilterPanel(Gtk.Box): self.keyword_entry.set_placeholder_text("Filter by keyword") self.keyword_entry.connect("activate", self._on_keyword_enter) self.keyword_entry.connect("key-press-event", self._on_esc_pressed) + + completion = Gtk.EntryCompletion(inline_completion=True) + completion.set_text_column(0) + completion.set_minimum_key_length(1) + completion.connect("match_selected", self._on_completer_match) renderer_text = Gtk.CellRendererText(ellipsize=Pango.EllipsizeMode.END) - self.maps_combo = Gtk.ComboBox.new_with_model(map_store) + self.maps_combo = Gtk.ComboBox.new_with_entry() + self.maps_combo.set_entry_text_column(0) + self.maps_combo.set_model(map_store) + + # instantiate maps completer entry + self.maps_entry = self.maps_combo.get_child() + self.maps_entry.set_completion(completion) + self.maps_entry.set_placeholder_text("Filter by map") + self.maps_entry.connect("changed", self._on_map_completion, True) + self.maps_entry.connect("key-press-event", self._on_map_entry_keypress) + self.maps_combo.pack_start(renderer_text, True) self.maps_combo.add_attribute(renderer_text, "text", 0) self.maps_combo.connect("changed", self._on_map_changed) self.maps_combo.connect("key-press-event", self._on_esc_pressed) - self.pack_start(self.filters_label, False, False, True) self.pack_start(self.keyword_entry, False, False, True) self.pack_start(self.maps_combo, False, False, True) @@ -1874,6 +1887,37 @@ class FilterPanel(Gtk.Box): for i, check in enumerate(checks[0:]): self.pack_start(checks[i], False, False, True) + def _on_map_entry_keypress(self, entry, event): + match event.keyval: + case Gdk.KEY_Return: + text = entry.get_text() + if text is None: + return + # if entry is exact match for value in liststore, + # trigger map change function + for i in enumerate(map_store): + if text == i[1][0]: + self.maps_combo.set_active(i[0]) + self._on_map_changed(self.maps_combo) + case Gdk.KEY_Escape: + GLib.idle_add(self.restore_focus_to_treeview) + # TODO: this is a workaround for widget.grab_remove() + # set cursor position to SOL when unfocusing + text = self.maps_entry.get_text() + self.maps_entry.set_position(len(text)) + case _: + return + + def _on_completer_match(self, completion, model, iter): + self.maps_combo.set_active_iter(iter) + + def _on_map_completion(self, entry, editable): + text = entry.get_text() + completion = entry.get_completion() + + if len(text) >= completion.get_minimum_key_length(): + completion.set_model(map_store) + self._on_map_changed(self.maps_combo) def grab_keyword_focus(self): self.keyword_entry.grab_focus() @@ -1884,9 +1928,11 @@ class FilterPanel(Gtk.Box): return False def _on_esc_pressed(self, entry, event): - keyname = Gdk.keyval_name(event.keyval) - if keyname == "Escape": - GLib.idle_add(self.restore_focus_to_treeview) + match event.keyval: + case Gdk.KEY_Escape: + GLib.idle_add(self.restore_focus_to_treeview) + case _: + return True def get_outer_grid(self): panel = self.get_parent() @@ -1952,13 +1998,19 @@ class FilterPanel(Gtk.Box): tree_iter = combo.get_active_iter() if tree_iter is not None: - selected_map.clear() + # take no action if completer query is same as current map sel + old_sel = selected_map[0].split("Map=")[1] model = combo.get_model() selection = model[tree_iter][0] - selected_map.append("Map=" + selection) - logger.info("User selected map '%s'" %(selection)) - filter_servers(transient_parent, self, treeview, context) + if selection == old_sel: + return + selected_map.clear() + if selection is not None: + selected_map.append("Map=" + selection) + logger.info("User selected map '%s'" %(selection)) + filter_servers(transient_parent, self, treeview, context) + self.maps_entry.set_text(selection) def main(): From d5426314218b3c1fc87b36eb25bf2745d1de00c7 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:01:18 +0900 Subject: [PATCH 03/14] docs: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7677861..b940559 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Added - Support servers running DLC content (fixes Frostline servers) - Text autocompletion in maps search field +- Add disk space warning to popup dialog ### Fixed - Abort fallback query method if DLC is required From 4a64ec8292bddaba5c4c2921f405ae197b980875 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:02:14 +0900 Subject: [PATCH 04/14] chore: uncomment --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index dd7bbec..3fee9a7 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -868,7 +868,7 @@ initial_setup(){ watcher_deps check_architecture test_connection -# fetch_helpers > >(pdialog "Checking helper files") + fetch_helpers > >(pdialog "Checking helper files") varcheck source "$config_file" lock From f6edbc1c9543f2ee70853790b093cad289f2cfc7 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:05:14 +0900 Subject: [PATCH 05/14] chore: bump version --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index 3fee9a7..58afb62 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.4.2-beta.1 +version=5.5.0-beta.1 #CONSTANTS aid=221100 From be06a87d8d45bd152c1a8f7e35ce1caf24b6b101 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:41:28 +0900 Subject: [PATCH 06/14] fix: restore keyboard input --- CHANGELOG.md | 4 ++++ dzgui.sh | 4 ++-- helpers/ui.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b940559..fc3aa30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [5.5.0-beta.1] 2024-10-31 +### Fixed +- Restore keyboard input to keyword entry field + ## [5.5.0-beta.1] 2024-10-30 ### Added - Support servers running DLC content (fixes Frostline servers) diff --git a/dzgui.sh b/dzgui.sh index 58afb62..18212c2 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.5.0-beta.1 +version=5.5.0-beta.2 #CONSTANTS aid=221100 @@ -566,7 +566,7 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="91ea4d842d35a7d5e1441174f1f463c5" + ["ui.py"]="804fd1ec88da07b7c6015fd341c5c133" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["funcs"]="105e7be170eea48ce61fcfe7b50b8f59" diff --git a/helpers/ui.py b/helpers/ui.py index 7e7e4f6..ba1e4dc 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -1932,7 +1932,7 @@ class FilterPanel(Gtk.Box): case Gdk.KEY_Escape: GLib.idle_add(self.restore_focus_to_treeview) case _: - return True + return False def get_outer_grid(self): panel = self.get_parent() From 9d1ff35559f9bb1a3f0888d5c1bb4460b5694959 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:54:56 +0900 Subject: [PATCH 07/14] fix: duplicated combobox --- CHANGELOG.md | 6 +++++- dzgui.sh | 4 ++-- helpers/ui.py | 4 +--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc3aa30..4eb4db6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -## [5.5.0-beta.1] 2024-10-31 +## [5.5.0-beta.3] 2024-10-31 +### Fixed +- Prevent maps combobox from duplicating contents + +## [5.5.0-beta.2] 2024-10-31 ### Fixed - Restore keyboard input to keyword entry field diff --git a/dzgui.sh b/dzgui.sh index 18212c2..61a74bf 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.5.0-beta.2 +version=5.5.0-beta.3 #CONSTANTS aid=221100 @@ -566,7 +566,7 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="804fd1ec88da07b7c6015fd341c5c133" + ["ui.py"]="bfdc7d510cea375731d4b92b9c3ab510" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["funcs"]="105e7be170eea48ce61fcfe7b50b8f59" diff --git a/helpers/ui.py b/helpers/ui.py index ba1e4dc..3714cd9 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -1864,9 +1864,8 @@ class FilterPanel(Gtk.Box): completion.connect("match_selected", self._on_completer_match) renderer_text = Gtk.CellRendererText(ellipsize=Pango.EllipsizeMode.END) - self.maps_combo = Gtk.ComboBox.new_with_entry() + self.maps_combo = Gtk.ComboBox.new_with_model_and_entry(map_store) self.maps_combo.set_entry_text_column(0) - self.maps_combo.set_model(map_store) # instantiate maps completer entry self.maps_entry = self.maps_combo.get_child() @@ -1876,7 +1875,6 @@ class FilterPanel(Gtk.Box): self.maps_entry.connect("key-press-event", self._on_map_entry_keypress) self.maps_combo.pack_start(renderer_text, True) - self.maps_combo.add_attribute(renderer_text, "text", 0) self.maps_combo.connect("changed", self._on_map_changed) self.maps_combo.connect("key-press-event", self._on_esc_pressed) From ce93fdf869ac4689a8b43ecd3a0b44f3b007c11a Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 1 Nov 2024 00:11:09 +0900 Subject: [PATCH 08/14] feat: make fullscreen option sticky --- CHANGELOG.md | 6 ++++++ dzgui.sh | 3 +++ helpers/funcs | 12 ++++++++++++ helpers/ui.py | 20 ++++++++++++++++---- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eb4db6..dfb4af3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # 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 ### Fixed - Prevent maps combobox from duplicating contents diff --git a/dzgui.sh b/dzgui.sh index 61a74bf..38093a0 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -193,6 +193,9 @@ debug="$debug" #Toggle stable/testing branch branch="$branch" +#Start in fullscreen +fullscreen="$fullscreen" + #Steam API key steam_api="$steam_api" diff --git a/helpers/funcs b/helpers/funcs index 6aa8790..b69640f 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -410,6 +410,7 @@ query_config(){ "name" "fav_label" "preferred_client" + "fullscreen" ) if [[ -n $key ]]; then if [[ -n ${!key} ]]; then @@ -714,6 +715,9 @@ debug="$debug" #Toggle stable/testing branch branch="$branch" +#Start in fullscreen +fullscreen="$fullscreen" + #Steam API key steam_api="$steam_api" @@ -807,6 +811,14 @@ toggle(){ else preferred_client="steam" fi + ;; + Toggle[[:space:]]DZGUI[[:space:]]fullscreen[[:space:]]boot) + if [[ $fullscreen == "true" ]]; then + fullscreen="false" + else + fullscreen="true" + fi + ;; esac update_config return 90 diff --git a/helpers/ui.py b/helpers/ui.py index 3714cd9..62d9541 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -105,6 +105,7 @@ options = [ ("Toggle release branch",), ("Toggle mod install mode",), ("Toggle Steam/Flatpak",), + ("Toggle DZGUI fullscreen boot",), ("Change player name",), ("Change Steam API key",), ("Change Battlemetrics API key",), @@ -153,6 +154,7 @@ status_tooltip = { "Toggle release branch": "Switch between stable and testing branches", "Toggle mod install mode": "Switch between manual and auto mod installation", "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 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", @@ -348,7 +350,12 @@ def process_tree_option(input, treeview): logger.info("Parsing tree option '%s' for the context '%s'" %(command, context)) 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 _background(subproc, args, dialog): @@ -374,7 +381,6 @@ def process_tree_option(input, treeview): msg = out[-1] process_shell_return_code(transient_parent, msg, rc, input) - match context: case "Help": if command == "View changelog": @@ -465,7 +471,8 @@ class OuterWindow(Gtk.Window): if is_game_mode is True: self.fullscreen() else: - self.maximize() + if query_config(None, "fullscreen")[0] == "true": + self.maximize() # Hide FilterPanel on main menu self.show_all() @@ -1237,7 +1244,8 @@ def format_metadata(row_sel): "auto_install": config_vals[2], "name": config_vals[3], "fav_label": config_vals[4], - "preferred_client": config_vals[5] + "preferred_client": config_vals[5], + "fullscreen": config_vals[6] } match row_sel: case "Quick-connect to favorite server" | "Change favorite server": @@ -1257,6 +1265,10 @@ def format_metadata(row_sel): val = "branch" case "Toggle Steam/Flatpak": val = "preferred_client" + case "Toggle DZGUI fullscreen boot": + default = "false" + alt = "true" + val = "fullscreen" case _: return prefix From a363afbbf8af9811c9ade2798faf360d1ecbcfbd Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 1 Nov 2024 00:11:55 +0900 Subject: [PATCH 09/14] fix: recent servers context menu options --- helpers/ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/ui.py b/helpers/ui.py index 62d9541..d7ec741 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -766,7 +766,7 @@ class TreeView(Gtk.TreeView): 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"], "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 if context == "Mod": @@ -779,7 +779,7 @@ class TreeView(Gtk.TreeView): return 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)) proc = call_out(widget, "is_in_favs", record) if proc.returncode == 0: From 6acc379b92a64f464af29c4db0c4277162f318c4 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 1 Nov 2024 00:13:04 +0900 Subject: [PATCH 10/14] chore: update checksums --- dzgui.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index 38093a0..64b10cc 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.5.0-beta.3 +version=5.5.0-beta.4 #CONSTANTS aid=221100 @@ -569,10 +569,10 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="bfdc7d510cea375731d4b92b9c3ab510" + ["ui.py"]="f4aaf17ec91b95b9b951fc1bc7c2b7b4" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="105e7be170eea48ce61fcfe7b50b8f59" + ["funcs"]="d8ae2662fbc3c62bdb5a51dec1935705" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" From c01f9714f8c1776a8270c0b2931208ab431ff210 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sun, 3 Nov 2024 22:22:46 +0900 Subject: [PATCH 11/14] fix: duplicate options in context menu --- CHANGELOG.md | 6 ++++++ dzgui.sh | 6 +++--- helpers/ui.py | 11 ++++++----- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfb4af3..0982e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [5.5.0-beta.5] 2024-11-03 +### Changed +- Use updated A2S_RULES logic +### Fixed +- Servers in saved servers list would populate context menu with same option when right-clicking in server browser + ## [5.5.0-beta.4] 2024-10-31 ### Added - Expose a toggle setting for whether to launch the application in fullscreen diff --git a/dzgui.sh b/dzgui.sh index 64b10cc..5a0bac8 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.5.0-beta.4 +version=5.5.0-beta.5 #CONSTANTS aid=221100 @@ -534,7 +534,7 @@ fetch_dzq(){ logger INFO "DZQ is current" return 0 fi - local sha=788e85b82189cb3485d4a08ee350c67994b29ea3 + local sha=3088bbfb147b77bc7b6a9425581b439889ff3f7f local author="aclist" local repo="dayzquery" local url="https://raw.githubusercontent.com/$author/$repo/$sha/dayzquery.py" @@ -569,7 +569,7 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="f4aaf17ec91b95b9b951fc1bc7c2b7b4" + ["ui.py"]="dd7aa34df1d374739127cca3033a3f67" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["funcs"]="d8ae2662fbc3c62bdb5a51dec1935705" diff --git a/helpers/ui.py b/helpers/ui.py index d7ec741..9508760 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -779,11 +779,12 @@ class TreeView(Gtk.TreeView): return for item in items: - 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)) - proc = call_out(widget, "is_in_favs", record) - if proc.returncode == 0: - item = "Remove from my servers" + if subcontext == "Server browser" or "Recent servers": + if item == "Add to my servers": + record = "%s:%s" %(self.get_column_at_index(7), self.get_column_at_index(8)) + proc = call_out(widget, "is_in_favs", record) + if proc.returncode == 0: + item = "Remove from my servers" item = Gtk.MenuItem(label=item) item.connect("activate", self._on_menu_click) self.menu.append(item) From 10c6a79b17bbe752cd550e12ab22833f183d4545 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 11 Nov 2024 06:05:49 +0900 Subject: [PATCH 12/14] chore: normalize changelog --- CHANGELOG.md | 73 ++++++++++++++-------------------------------------- 1 file changed, 20 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0982e75..7ba51df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,78 +1,45 @@ # Changelog -## [5.5.0-beta.5] 2024-11-03 -### Changed -- Use updated A2S_RULES logic -### Fixed -- Servers in saved servers list would populate context menu with same option when right-clicking in server browser - -## [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 -### Fixed -- Prevent maps combobox from duplicating contents - -## [5.5.0-beta.2] 2024-10-31 -### Fixed -- Restore keyboard input to keyword entry field - -## [5.5.0-beta.1] 2024-10-30 +## [5.5.0] 2024-11-10 ### Added - Support servers running DLC content (fixes Frostline servers) -- Text autocompletion in maps search field -- Add disk space warning to popup dialog +- Expose a toggle setting for whether to launch the application in fullscreen +- Text autocompletion in maps search field (partial search) +- Add disk space warning to popup dialog when downloading mods ### Fixed +- Servers in saved servers list would populate context menu with same option when right-clicking in server browser +- Enable adding/removing servers to/from My Saved Servers when in Recent Servers context +- Prevent maps combobox from duplicating contents +- Restore keyboard input to keyword entry field +### Changed - Abort fallback query method if DLC is required -## [5.4.2-beta.1] 2024-10-05 +## [5.4.2] 2024-10-05 ### Fixed - Sanitize third-party API IDs to remove UGC collisions -## [5.4.1-beta.2] 2024-09-12 -### Fixed -- Use fallback logic for modlist queries when user traverses networks - -## [5.4.1-beta.2] 2024-09-10 -### Fixed -- Fix signal handling control flow for checkbox toggles - -## [5.4.1-beta.1] 2024-09-10 +## [5.4.1] 2024-09-25 ### Added - Pre-boot validation check for users with self-compiled version of jq ### Fixed +- Use fallback logic for modlist queries when user traverses networks +- Fix signal handling control flow for checkbox toggles - When reloading the server browser, the map combobox selection would revert to the last selected map instead of All Maps - Server filter toggle signals were accessible from the main menu when switching between menu contexts - Global cooldown dialog could sometimes block filter toggles after cooldown reset - Normalized minor version number due to a previous clerical error -## [5.4.0-beta.5] 2024-08-27 -### Added -- Freedesktop application icons for system taskbar, tray, and other dialogs -### Fixed -- Errors being printed to the console when Exit button was explicitly clicked - -## [5.4.0-beta.4] 2024-08-21 -### Added -- Emit CPU model name when exporting system debug log -### Fixed -- Detect Steam Deck OLED APU variant during initial setup - -## [5.4.0-beta.3] 2024-08-04 +## [5.4.0] 2024-08-27 ### Added - Scan local area network for DayZ servers - -## [5.4.0-beta.2] 2024-08-03 -### Fixed -- Clerical hotfix for previous player names fix -- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection - -## [5.4.0-beta.1] 2024-07-16 +- Freedesktop application icons for system taskbar, tray, and other dialogs +- Emit CPU model name when exporting system debug log ### Fixed +- Errors being printed to the console when Exit button was explicitly clicked +- Detect Steam Deck OLED APU variant during initial setup - Encapsulate player names correctly so that names with whitespace in them are supported +- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection +- Report WM_CLASS name to the window manager ## [5.3.2] 2024-07-02 ### Fixed From c0ab8111fd21ecf7b84e79f163881b00878bedd7 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 11 Nov 2024 06:05:56 +0900 Subject: [PATCH 13/14] chore: bump version --- dzgui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index 5a0bac8..b9409e0 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.5.0-beta.5 +version=5.5.0 #CONSTANTS aid=221100 From 5496f914f26677decaa9089fce2ef9f3ce8783e9 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 11 Nov 2024 09:17:47 +0900 Subject: [PATCH 14/14] fix: correct typo --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd7a58a..7ba51df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,7 @@ ## [5.5.0] 2024-11-10 ### Added -- Support servers running DLC content (fixes F git push --set-upstream origin release/5.5.0-stable -rostline servers) +- Support servers running DLC content (fixes Frostline servers) - Expose a toggle setting for whether to launch the application in fullscreen - Text autocompletion in maps search field (partial search) - Add disk space warning to popup dialog when downloading mods