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

chore: update geolocation records

This commit is contained in:
aclist 2024-04-23 11:59:42 +09:00
parent bb31ccbf5d
commit dce4ad75db
4 changed files with 39 additions and 35 deletions

View file

@ -1,5 +1,16 @@
# 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
### Added
- Cover artwork/icons for Steam "Recent Games" and tree view

View file

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

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -o pipefail
version=5.2.2
version=5.2.3
#CONSTANTS
aid=221100
@ -653,9 +653,6 @@ debug="$debug"
#Toggle stable/testing branch
branch="$branch"
#Last seen news item
seen_news="$seen_news"
#Steam API key
steam_api="$steam_api"
@ -1269,7 +1266,7 @@ launch(){
update_symlinks
if [[ $debug -eq 1 ]]; then
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
fi
echo "$concat" > "$_cache_launch"

View file

@ -18,7 +18,7 @@ locale.setlocale(locale.LC_ALL, '')
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib, Gdk, GObject, Pango
# 5.2.2
# 5.2.3
app_name = "DZGUI"
start_time = 0
@ -493,14 +493,29 @@ class RightPanel(Gtk.Box):
self.pack_start(self.button_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.set_margin_top(10)
self.question_button.set_margin_start(50)
self.question_button.set_margin_end(50)
self.question_button.connect("clicked", self._on_button_clicked)
self.pack_start(self.debug_toggle, False, True, 0)
if is_steam_deck is False:
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):
grid = self.get_parent()
grid.scrollable_treelist.treeview.spawn_keys_dialog(button)
@ -838,6 +853,12 @@ class TreeView(Gtk.TreeView):
window = self.get_outer_window()
grid = self.get_outer_grid()
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:
grid.right_panel.focus_button_box()
case Gdk.KEY_question:
@ -855,14 +876,6 @@ class TreeView(Gtk.TreeView):
cur_proc = grid.scrollable_treelist.treeview.current_proc
if event.state is Gdk.ModifierType.CONTROL_MASK:
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:
self._on_button_release(self, event)
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("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.keyword_entry, False, False, True)
@ -1688,14 +1696,6 @@ class FilterPanel(Gtk.Box):
for i, check in enumerate(checks[0:]):
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):
self.keyword_entry.grab_focus()