mirror of
https://github.com/aclist/dztui.git
synced 2024-12-27 21:02:36 +01:00
fix: block/unblock signal handlers
This commit is contained in:
parent
80babbfea8
commit
06359a40ae
6 changed files with 40 additions and 14 deletions
19
CHANGELOG.md
19
CHANGELOG.md
|
@ -1,27 +1,36 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [5.3.3-beta.5] 2024-08-27
|
## [5.4.1-beta.5] 2024-09-10
|
||||||
|
### Added
|
||||||
|
- Pre-boot validation check for users with self-compiled version of jq
|
||||||
|
### Fixed
|
||||||
|
- 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
|
### Added
|
||||||
- Freedesktop application icons for system taskbar, tray, and other dialogs
|
- Freedesktop application icons for system taskbar, tray, and other dialogs
|
||||||
### Fixed
|
### Fixed
|
||||||
- Errors being printed to the console when Exit button was explicitly clicked
|
- Errors being printed to the console when Exit button was explicitly clicked
|
||||||
|
|
||||||
## [5.3.3-beta.4] 2024-08-21
|
## [5.4.0-beta.4] 2024-08-21
|
||||||
### Added
|
### Added
|
||||||
- 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
|
- Detect Steam Deck OLED APU variant during initial setup
|
||||||
|
|
||||||
## [5.3.3-beta.3] 2024-08-04
|
## [5.4.0-beta.3] 2024-08-04
|
||||||
### Added
|
### Added
|
||||||
- Scan local area network for DayZ servers
|
- Scan local area network for DayZ servers
|
||||||
|
|
||||||
## [5.3.3-beta.2] 2024-08-03
|
## [5.4.0-beta.2] 2024-08-03
|
||||||
### Fixed
|
### Fixed
|
||||||
- Clerical hotfix for previous player names fix
|
- 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
|
- Test if DayZ directory is empty at startup, implying that the game was moved to a new library collection
|
||||||
|
|
||||||
## [5.3.3-beta.1] 2024-07-16
|
## [5.4.0-beta.1] 2024-07-16
|
||||||
### Fixed
|
### Fixed
|
||||||
- Encapsulate player names correctly so that names with whitespace in them are supported
|
- Encapsulate player names correctly so that names with whitespace in them are supported
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
10
dzgui.sh
10
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
version=5.3.3-beta.7
|
version=5.4.1-beta.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"]="f89047e3fde843dbb52d343daf8d2675"
|
["ui.py"]="9a5df05a4b67af3be06e39d9d7cebff3"
|
||||||
["query_v2.py"]="55d339ba02512ac69de288eb3be41067"
|
["query_v2.py"]="55d339ba02512ac69de288eb3be41067"
|
||||||
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
|
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
|
||||||
["funcs"]="44eca80b207057423c2d298cc7cf1e29"
|
["funcs"]="b73289e0aa71a91da539c28707a6405c"
|
||||||
["lan"]="c62e84ddd1457b71a85ad21da662b9af"
|
["lan"]="c62e84ddd1457b71a85ad21da662b9af"
|
||||||
)
|
)
|
||||||
local author="aclist"
|
local author="aclist"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
version=5.3.3
|
version=5.4.1
|
||||||
|
|
||||||
#CONSTANTS
|
#CONSTANTS
|
||||||
aid=221100
|
aid=221100
|
||||||
|
|
|
@ -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.3
|
# 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,20 +1194,20 @@ 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
|
||||||
|
reinit_checks()
|
||||||
else:
|
else:
|
||||||
for check in checks:
|
for check in checks:
|
||||||
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)
|
||||||
|
for check in checks:
|
||||||
|
toggle_signal(filters_vbox, check, '_on_check_toggle', False)
|
||||||
self._update_multi_column(chosen_row)
|
self._update_multi_column(chosen_row)
|
||||||
|
|
||||||
map_store.clear()
|
map_store.clear()
|
||||||
|
@ -1812,6 +1816,7 @@ class App(Gtk.Application):
|
||||||
is_steam_deck = False
|
is_steam_deck = False
|
||||||
is_game_mode = False
|
is_game_mode = False
|
||||||
|
|
||||||
|
GLib.set_prgname(app_name)
|
||||||
self.win = OuterWindow(is_steam_deck, is_game_mode)
|
self.win = OuterWindow(is_steam_deck, is_game_mode)
|
||||||
self.win.set_icon_name("dzgui")
|
self.win.set_icon_name("dzgui")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue