1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-29 13:52:03 +01:00

Merge pull request #110 from aclist/release/5.2.3

Release/5.2.3
This commit is contained in:
aclist 2024-04-23 12:08:20 +09:00 committed by GitHub
commit 05cc4d5656
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 43 additions and 35 deletions

View file

@ -1,5 +1,16 @@
# Changelog # Changelog
## [5.2.3] 2024-04-19
### Added
- Added Debug Mode button to main menu
### Changed
- Reworded debug mode notification dialog
- Updated geolocation records
### Dropped
- Dropped seen_news key from configs
## [5.2.2] 2024-04-18 ## [5.2.2] 2024-04-18
### Added ### Added
- Cover artwork/icons for Steam "Recent Games" and tree view - Cover artwork/icons for Steam "Recent Games" and tree view

View file

@ -17,3 +17,7 @@ Other options include the ability to connect by IP or ID or set a favorite serv
Refer to the [manual](https://aclist.github.io/dzgui/dzgui.html) for installation and setup instructions, a feature-by-feature breakdown, and Steam integration tutorials. Refer to the [manual](https://aclist.github.io/dzgui/dzgui.html) for installation and setup instructions, a feature-by-feature breakdown, and Steam integration tutorials.
![Alt text](/images/example.png) ![Alt text](/images/example.png)
## Attribution
Geolocation records from [DB-IP](https://db-ip.com) under [CC 4.0 license](https://creativecommons.org/licenses/by/4.0/)

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version=5.2.2 version=5.2.3
#CONSTANTS #CONSTANTS
aid=221100 aid=221100
@ -109,7 +109,6 @@ setup_state_files(){
print_config_vals(){ print_config_vals(){
local keys=( local keys=(
"branch" "branch"
"seen_news"
"name" "name"
"fav_server" "fav_server"
"fav_label" "fav_label"
@ -192,9 +191,6 @@ debug="$debug"
#Toggle stable/testing branch #Toggle stable/testing branch
branch="$branch" branch="$branch"
#Last seen news item
seen_news="$seen_news"
#Steam API key #Steam API key
steam_api="$steam_api" steam_api="$steam_api"
@ -537,10 +533,10 @@ fetch_helpers_by_sum(){
source "$config_file" source "$config_file"
declare -A sums declare -A sums
sums=( sums=(
["ui.py"]="7b9dc3cd70c9d388536c03d18d3ba0b5" ["ui.py"]="1e692d9c658aba4402c1c998263f6184"
["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197" ["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197"
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
["funcs"]="35db0238f3bb8691107aefd2aee51d0f" ["funcs"]="47ba5f1b5da5d1e7f42a5a088b29ec9d"
) )
local author="aclist" local author="aclist"
local repo="dztui" local repo="dztui"
@ -583,7 +579,7 @@ fetch_helpers_by_sum(){
} }
fetch_geo_file(){ fetch_geo_file(){
# for binary releases # for binary releases
local geo_sum="e7f3b25223ac4dfd5e30a0b55bb3ff6c" local geo_sum="7b6668eb4535bb432acb42016ba9cc47"
local km_sum="b038fdb8f655798207bd28de3a004706" local km_sum="b038fdb8f655798207bd28de3a004706"
local gzip="$helpers_path/ips.csv.gz" local gzip="$helpers_path/ips.csv.gz"
if [[ ! -f $geo_file ]] || [[ $(get_hash $geo_file) != $geo_sum ]]; then if [[ ! -f $geo_file ]] || [[ $(get_hash $geo_file) != $geo_sum ]]; then

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o pipefail set -o pipefail
version=5.2.2 version=5.2.3
#CONSTANTS #CONSTANTS
aid=221100 aid=221100
@ -653,9 +653,6 @@ debug="$debug"
#Toggle stable/testing branch #Toggle stable/testing branch
branch="$branch" branch="$branch"
#Last seen news item
seen_news="$seen_news"
#Steam API key #Steam API key
steam_api="$steam_api" steam_api="$steam_api"
@ -1269,7 +1266,7 @@ launch(){
update_symlinks update_symlinks
if [[ $debug -eq 1 ]]; then if [[ $debug -eq 1 ]]; then
local launch_options="$steam_cmd -applaunch $aid -connect=$ip:$gameport -nolauncher -nosplash -name=$name -skipintro \"-mod=$concat\"" local launch_options="$steam_cmd -applaunch $aid -connect=$ip:$gameport -nolauncher -nosplash -name=$name -skipintro \"-mod=$concat\""
printf "Dry-run mode: these options would have been used to launch the game: $launch_options" printf "Debug mode: these options would have been used to launch the game: $launch_options"
return 0 return 0
fi fi
echo "$concat" > "$_cache_launch" echo "$concat" > "$_cache_launch"

View file

@ -18,7 +18,7 @@ locale.setlocale(locale.LC_ALL, '')
gi.require_version("Gtk", "3.0") gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib, Gdk, GObject, Pango from gi.repository import Gtk, GLib, Gdk, GObject, Pango
# 5.2.2 # 5.2.3
app_name = "DZGUI" app_name = "DZGUI"
start_time = 0 start_time = 0
@ -493,14 +493,29 @@ class RightPanel(Gtk.Box):
self.pack_start(self.button_vbox, False, False, 0) self.pack_start(self.button_vbox, False, False, 0)
self.pack_start(self.filters_vbox, False, False, 0) self.pack_start(self.filters_vbox, False, False, 0)
self.debug_toggle = Gtk.ToggleButton(label="Debug mode")
if query_config(None, "debug")[0] == '1':
self.debug_toggle.set_active(True)
self.debug_toggle.connect("toggled", self._on_button_toggled, "Toggle debug mode")
set_surrounding_margins(self.debug_toggle, 10)
self.question_button = Gtk.Button(label="?") self.question_button = Gtk.Button(label="?")
self.question_button.set_margin_top(10) self.question_button.set_margin_top(10)
self.question_button.set_margin_start(50) self.question_button.set_margin_start(50)
self.question_button.set_margin_end(50) self.question_button.set_margin_end(50)
self.question_button.connect("clicked", self._on_button_clicked) self.question_button.connect("clicked", self._on_button_clicked)
self.pack_start(self.debug_toggle, False, True, 0)
if is_steam_deck is False: if is_steam_deck is False:
self.pack_start(self.question_button, False, True, 0) self.pack_start(self.question_button, False, True, 0)
def _on_button_toggled(self, button, command):
grid = self.get_parent()
transient_parent = grid.get_parent()
call_out(transient_parent, "toggle", command)
grid.update_right_statusbar()
grid.scrollable_treelist.treeview.grab_focus()
def _on_button_clicked(self, button): def _on_button_clicked(self, button):
grid = self.get_parent() grid = self.get_parent()
grid.scrollable_treelist.treeview.spawn_keys_dialog(button) grid.scrollable_treelist.treeview.spawn_keys_dialog(button)
@ -838,6 +853,12 @@ class TreeView(Gtk.TreeView):
window = self.get_outer_window() window = self.get_outer_window()
grid = self.get_outer_grid() grid = self.get_outer_grid()
match event.keyval: match event.keyval:
case Gdk.KEY_d:
debug = grid.right_panel.debug_toggle
if debug.get_active():
debug.set_active(False)
else:
debug.set_active(True)
case Gdk.KEY_Right: case Gdk.KEY_Right:
grid.right_panel.focus_button_box() grid.right_panel.focus_button_box()
case Gdk.KEY_question: case Gdk.KEY_question:
@ -855,14 +876,6 @@ class TreeView(Gtk.TreeView):
cur_proc = grid.scrollable_treelist.treeview.current_proc cur_proc = grid.scrollable_treelist.treeview.current_proc
if event.state is Gdk.ModifierType.CONTROL_MASK: if event.state is Gdk.ModifierType.CONTROL_MASK:
match event.keyval: match event.keyval:
case Gdk.KEY_d:
if self.get_first_col() == "Mod":
return
debug = grid.right_panel.filters_vbox.debug_toggle
if debug.get_active():
debug.set_active(False)
else:
debug.set_active(True)
case Gdk.KEY_l: case Gdk.KEY_l:
self._on_button_release(self, event) self._on_button_release(self, event)
case Gdk.KEY_r: case Gdk.KEY_r:
@ -1675,11 +1688,6 @@ class FilterPanel(Gtk.Box):
self.maps_combo.connect("changed", self._on_map_changed) self.maps_combo.connect("changed", self._on_map_changed)
self.maps_combo.connect("key-press-event", self._on_esc_pressed) self.maps_combo.connect("key-press-event", self._on_esc_pressed)
self.debug_toggle = Gtk.ToggleButton(label="Debug mode")
if query_config(None, "debug")[0] == '1':
self.debug_toggle.set_active(True)
self.debug_toggle.connect("toggled", self._on_button_toggled, "Toggle debug mode")
set_surrounding_margins(self.debug_toggle, 10)
self.pack_start(self.filters_label, False, False, True) self.pack_start(self.filters_label, False, False, True)
self.pack_start(self.keyword_entry, False, False, True) self.pack_start(self.keyword_entry, False, False, True)
@ -1688,14 +1696,6 @@ class FilterPanel(Gtk.Box):
for i, check in enumerate(checks[0:]): for i, check in enumerate(checks[0:]):
self.pack_start(checks[i], False, False, True) self.pack_start(checks[i], False, False, True)
self.pack_start(self.debug_toggle, False, False, 0)
def _on_button_toggled(self, button, command):
transient_parent = self.get_outer_window()
grid = self.get_outer_grid()
call_out(transient_parent, "toggle", command)
grid.update_right_statusbar()
grid.scrollable_treelist.treeview.grab_focus()
def grab_keyword_focus(self): def grab_keyword_focus(self):
self.keyword_entry.grab_focus() self.keyword_entry.grab_focus()