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] 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)