1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-28 21:32:36 +01:00

Merge pull request #152 from aclist/release/5.4.1

Release/5.4.1
This commit is contained in:
aclist 2024-09-28 20:51:19 +09:00 committed by GitHub
commit 59e19510e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 78 additions and 14 deletions

View file

@ -1,15 +1,26 @@
# Changelog # Changelog
## [5.3.3] 2024-08-27 ## [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] 2024-08-27
### Added ### Added
- Scan local area network for DayZ servers - Scan local area network for DayZ servers
- Freedesktop application icons for system taskbar, tray, and other dialogs - Freedesktop application icons for system taskbar, tray, and other dialogs
- Emit CPU model name when exporting system debug log - Emit CPU model name when exporting system debug log
### Fixed ### Fixed
- Detect Steam Deck OLED APU variant during initial setup
- Errors being printed to the console when Exit button was explicitly clicked - Errors being printed to the console when Exit button was explicitly clicked
- Test if DayZ library location was moved internally on Steam by user - Detect Steam Deck OLED APU variant during initial setup
- Encapsulate player names correctly to support whitespace - 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 - Report WM_CLASS name to the window manager
## [5.3.2] 2024-07-02 ## [5.3.2] 2024-07-02

View file

@ -33,6 +33,10 @@ All dependencies are installed out of the box on Steam Deck.
- `wmctrl` or `xdotool` - `wmctrl` or `xdotool`
- `PyGObject` (`python-gobject`) - `PyGObject` (`python-gobject`)
[NOTE]
If you are using a self-compiled version of jq (e.g. gentoo), it must be configured with support for oniguruma (this is the default setting on most distributions).
=== Preparation === Preparation
==== Step 1: Download DZGUI and make it executable ==== Step 1: Download DZGUI and make it executable

View file

@ -33,6 +33,10 @@ All dependencies are installed out of the box on Steam Deck.
- `wmctrl` or `xdotool` - `wmctrl` or `xdotool`
- `PyGObject` (`python-gobject`) - `PyGObject` (`python-gobject`)
[NOTE]
If you are using a self-compiled version of jq (e.g. gentoo), it must be configured with support for oniguruma (this is the default setting on most distributions).
=== Preparation === Preparation
==== Step 1: Download DZGUI and make it executable ==== Step 1: Download DZGUI and make it executable

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version=5.3.0 version=5.4.1
#CONSTANTS #CONSTANTS
aid=221100 aid=221100
@ -220,6 +220,10 @@ depcheck(){
raise_error_and_quit "$msg" raise_error_and_quit "$msg"
fi fi
done done
local jqmsg="jq must be compiled with support for oniguruma"
local jqtest
jqtest=$(echo '{"test": "foo"}' | jq '.test | test("^foo$")')
[[ $? -ne 0 ]] && raise_error_and_quit "$jqmsg"
logger INFO "Initial dependencies satisfied" logger INFO "Initial dependencies satisfied"
} }
check_pyver(){ check_pyver(){
@ -562,10 +566,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"]="819a30c43644817a4f4a009f3df52b77" ["ui.py"]="9cac4d3b87ef292e7d30b25ca86cc438"
["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067"
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
["funcs"]="e1998f02f17776ccf2108fe5e9396d75" ["funcs"]="4a06a823b6240c518687d2a8ec20e914"
["lan"]="c62e84ddd1457b71a85ad21da662b9af" ["lan"]="c62e84ddd1457b71a85ad21da662b9af"
) )
local author="aclist" local author="aclist"

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version=5.3.0 version=5.4.1
#CONSTANTS #CONSTANTS
aid=221100 aid=221100
@ -285,7 +285,15 @@ a2s(){
local qport="$2" local qport="$2"
local mode="$3" local mode="$3"
logger INFO "Querying '$ip:$qport' with mode '$mode'" logger INFO "Querying '$ip:$qport' with mode '$mode'"
python3 "$query_helper" "$ip" "$qport" "$mode" local res
res=$(python3 "$query_helper" "$ip" "$qport" "$mode")
if [[ $? -eq 1 ]]; then
res=$(try_fallback "$ip" "$qport" "$mode")
if [[ $? -eq 1 ]]; then
return 1
fi
fi
printf "%s\n" "$res"
} }
is_in_favs(){ is_in_favs(){
shift shift
@ -1064,6 +1072,34 @@ update_symlinks(){
legacy_symlinks legacy_symlinks
symlinks symlinks
} }
try_fallback(){
local ip="$1"
local qport="$2"
local mode="$3"
if [[ $mode != "rules" ]] && [[ $mode != "names" ]]; then
return 1
fi
[[ -z $api_key ]] && return 1
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
local record=$(<<< "$res" jq -r '
.data[].attributes
|select(.status != "removed").details')
case "$mode" in
"rules")
<<< "$record" jq '.modIds[]'
;;
"names")
<<< "$record" jq '
[.modNames, .modIds] as [$n, $i]
| {names: $n, ids: $i}'
;;
esac
}
try_connect(){ try_connect(){
local record="$1" local record="$1"
local ip=$(<<< $record awk -F: '{print $1}') local ip=$(<<< $record awk -F: '{print $1}')

View file

@ -19,7 +19,7 @@ gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib, Gdk, GObject, Pango from gi.repository import Gtk, GLib, Gdk, GObject, Pango
from enum import Enum from enum import Enum
# 5.3.0 # 5.4.1
app_name = "DZGUI" app_name = "DZGUI"
start_time = 0 start_time = 0
@ -574,6 +574,7 @@ class ButtonBox(Gtk.Box):
column = Gtk.TreeViewColumn(column_title, renderer, text=i) column = Gtk.TreeViewColumn(column_title, renderer, text=i)
treeview.append_column(column) treeview.append_column(column)
self._populate(context) self._populate(context)
toggle_signal(treeview, treeview, '_on_keypress', False)
treeview.set_model(row_store) treeview.set_model(row_store)
treeview.grab_focus() treeview.grab_focus()
@ -1033,7 +1034,6 @@ class TreeView(Gtk.TreeView):
# Local server lists may have different filter toggles from remote list # Local server lists may have different filter toggles from remote list
# FIXME: tree selection updates twice here. attach signal later # FIXME: tree selection updates twice here. attach signal later
toggle_signal(self, self.selected_row, '_on_tree_selection_changed', False) toggle_signal(self, self.selected_row, '_on_tree_selection_changed', False)
# toggle_signal(self, self.selected_row, '_on_check_toggled', False)
for column in self.get_columns(): for column in self.get_columns():
self.remove_column(column) self.remove_column(column)
row_store.clear() row_store.clear()
@ -1071,6 +1071,10 @@ class TreeView(Gtk.TreeView):
self.update_first_col(mode) self.update_first_col(mode)
transient_parent = self.get_outer_window() transient_parent = self.get_outer_window()
# Reset map selection
selected_map.clear()
selected_map.append("Map=All maps")
for check in checks: for check in checks:
toggle_signal(self.get_outer_grid().right_panel.filters_vbox, check, '_on_check_toggle', True) toggle_signal(self.get_outer_grid().right_panel.filters_vbox, check, '_on_check_toggle', True)
toggle_signal(self, self, '_on_keypress', True) toggle_signal(self, self, '_on_keypress', True)
@ -1190,17 +1194,18 @@ class TreeView(Gtk.TreeView):
valid_contexts = ["Server browser", "My saved servers", "Recent servers", "Scan LAN servers"] valid_contexts = ["Server browser", "My saved servers", "Recent servers", "Scan LAN servers"]
if chosen_row in valid_contexts: if chosen_row in valid_contexts:
# server contexts share the same model type # server contexts share the same model type
for check in checks:
toggle_signal(filters_vbox, check, '_on_check_toggle', False)
if chosen_row == "Server browser": if chosen_row == "Server browser":
reinit_checks()
cooldown = call_out(self, "test_cooldown", "", "") cooldown = call_out(self, "test_cooldown", "", "")
if cooldown.returncode == 1: if cooldown.returncode == 1:
spawn_dialog(self.get_outer_window(), cooldown.stdout, "NOTIFY") spawn_dialog(self.get_outer_window(), cooldown.stdout, "NOTIFY")
return 1 return 1
for check in checks:
toggle_signal(filters_vbox, check, '_on_check_toggle', False)
reinit_checks()
else: else:
for check in checks: for check in checks:
toggle_signal(filters_vbox, check, '_on_check_toggle', False)
if check.get_label() not in toggled_checks: if check.get_label() not in toggled_checks:
toggled_checks.append(check.get_label()) toggled_checks.append(check.get_label())
check.set_active(True) check.set_active(True)