mirror of
https://github.com/aclist/dztui.git
synced 2024-12-29 13:52:03 +01:00
fix: restore URLs
This commit is contained in:
parent
af1bed9319
commit
87ba21a26a
3 changed files with 22 additions and 38 deletions
6
dzgui.sh
6
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
version=5.0.0.rc-19
|
version=5.0.0.rc-20
|
||||||
|
|
||||||
#CONSTANTS
|
#CONSTANTS
|
||||||
aid=221100
|
aid=221100
|
||||||
|
@ -527,10 +527,10 @@ fetch_dzq(){
|
||||||
fetch_helpers_by_sum(){
|
fetch_helpers_by_sum(){
|
||||||
declare -A sums
|
declare -A sums
|
||||||
sums=(
|
sums=(
|
||||||
["ui.py"]="67d9b617cf53213965bebfc91aae1e6e"
|
["ui.py"]="62133c6c603584a283e86b4629c9c5aa"
|
||||||
["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197"
|
["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197"
|
||||||
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
|
["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397"
|
||||||
["funcs"]="d9b0e6fa68314c18ac7aad565645948f"
|
["funcs"]="8b5f43cb3647d96ffdcb8ce17822e104"
|
||||||
)
|
)
|
||||||
local author="aclist"
|
local author="aclist"
|
||||||
local repo="dztui"
|
local repo="dztui"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
version=5.0.0.rc-19
|
version=5.0.0.rc-20
|
||||||
|
|
||||||
#CONSTANTS
|
#CONSTANTS
|
||||||
aid=221100
|
aid=221100
|
||||||
|
@ -299,33 +299,6 @@ list_mods(){
|
||||||
installed_mods(){
|
installed_mods(){
|
||||||
ls -1 "$workshop_dir"
|
ls -1 "$workshop_dir"
|
||||||
}
|
}
|
||||||
open_url(){
|
|
||||||
local context="$1"
|
|
||||||
local url
|
|
||||||
case "$context" in
|
|
||||||
"Help file ⧉")
|
|
||||||
url="$help_url"
|
|
||||||
;;
|
|
||||||
"Report a bug ⧉")
|
|
||||||
url="$issues_url"
|
|
||||||
;;
|
|
||||||
"Forum ⧉")
|
|
||||||
url="$forum_url"
|
|
||||||
;;
|
|
||||||
"Sponsor ⧉")
|
|
||||||
url="$sponsor_url"
|
|
||||||
;;
|
|
||||||
"Hall of fame ⧉")
|
|
||||||
url="${help_url}#_hall_of_fame"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ -n "$BROWSER" ]]; then
|
|
||||||
"$BROWSER" "$url" 2>/dev/null
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
xdg-open "$url" 2>/dev/null
|
|
||||||
}
|
|
||||||
local_latlon(){
|
local_latlon(){
|
||||||
local url="http://ip-api.com/json/$local_ip"
|
local url="http://ip-api.com/json/$local_ip"
|
||||||
local local_ip
|
local local_ip
|
||||||
|
@ -897,10 +870,25 @@ open_link(){
|
||||||
"Open Battlemetrics API page")
|
"Open Battlemetrics API page")
|
||||||
url="$battlemetrics_api_url"
|
url="$battlemetrics_api_url"
|
||||||
;;
|
;;
|
||||||
|
"Help file ⧉")
|
||||||
|
url="$help_url"
|
||||||
|
;;
|
||||||
|
"Report a bug ⧉")
|
||||||
|
url="$issues_url"
|
||||||
|
;;
|
||||||
|
"Forum ⧉")
|
||||||
|
url="$forum_url"
|
||||||
|
;;
|
||||||
|
"Sponsor ⧉")
|
||||||
|
url="$sponsor_url"
|
||||||
|
;;
|
||||||
|
"Hall of fame ⧉")
|
||||||
|
url="${help_url}#_hall_of_fame"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#if [[ $is_steam_deck -eq 1 ]]; then
|
#if [[ $is_steam_deck -eq 1 ]]; then
|
||||||
#$steam_cmd steam://openurl/"$1" 2>/dev/null
|
#$steam_cmd steam://openurl/"$1" 2>/dev/null
|
||||||
if [[ -n "$BROWSER" ]]; then
|
if [[ -n "$BROWSER" ]]; then
|
||||||
logger INFO "Opening '$url' in '$BROWSER'"
|
logger INFO "Opening '$url' in '$BROWSER'"
|
||||||
"$BROWSER" "$url"
|
"$BROWSER" "$url"
|
||||||
|
|
|
@ -15,7 +15,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.0.0-rc.19
|
# 5.0.0-rc.20
|
||||||
app_name = "DZGUI"
|
app_name = "DZGUI"
|
||||||
|
|
||||||
cache = {}
|
cache = {}
|
||||||
|
@ -493,7 +493,6 @@ class RightPanel(Gtk.Box):
|
||||||
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)
|
||||||
set_surrounding_margins(self.question_button, 50)
|
|
||||||
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)
|
||||||
|
|
||||||
|
@ -646,9 +645,6 @@ class TreeView(Gtk.TreeView):
|
||||||
renderer = Gtk.CellRendererText()
|
renderer = Gtk.CellRendererText()
|
||||||
column = Gtk.TreeViewColumn(column_title, renderer, text=i)
|
column = Gtk.TreeViewColumn(column_title, renderer, text=i)
|
||||||
self.append_column(column)
|
self.append_column(column)
|
||||||
# TODO: change font size on the fly
|
|
||||||
if is_steam_deck is True:
|
|
||||||
renderer.set_property("size-points", 20)
|
|
||||||
|
|
||||||
self.connect("row-activated", self._on_row_activated)
|
self.connect("row-activated", self._on_row_activated)
|
||||||
self.connect("key-press-event", self._on_keypress)
|
self.connect("key-press-event", self._on_keypress)
|
||||||
|
|
Loading…
Reference in a new issue