From 406663cd7abd97ce280878cc0ee804fee407880b Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 13 Jan 2024 06:50:34 +0900 Subject: [PATCH] chore: focus in signals --- dzgui.sh | 6 +++--- helpers/funcs | 2 +- helpers/ui.py | 25 +++++++++++++------------ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index 0a17188..a7db1c9 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.0.0.rc-6 +version=5.0.0.rc-7 #CONSTANTS aid=221100 @@ -528,7 +528,7 @@ fetch_dzq(){ fetch_helpers_by_sum(){ declare -A sums sums=( - ["ui.py"]="a6d80a2cfff27e7c02e16499a0983f8e" + ["ui.py"]="a4adb00c54d71ad9268cf3cbf8df0a1e" ["query_v2.py"]="1822bd1769ce7d7cb0d686a60f9fa197" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" ["funcs"]="d9b0e6fa68314c18ac7aad565645948f" @@ -790,7 +790,7 @@ initial_setup(){ steam_deps migrate_files stale_symlinks - fetch_helpers > >(pdialog "Fetching additional helper files") +# fetch_helpers > >(pdialog "Fetching additional helper files") local_latlon is_steam_running is_dzg_downloading diff --git a/helpers/funcs b/helpers/funcs index 8ae9a4e..b8f44ef 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version="5.0.0.rc-2" +version="5.0.0.rc-7" #CONSTANTS aid=221100 diff --git a/helpers/ui.py b/helpers/ui.py index eaefb8f..b4cb48f 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -15,7 +15,7 @@ locale.setlocale(locale.LC_ALL, '') gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GLib, Gdk, GObject, Pango -# 5.0.0-rc.1 +# 5.0.0-rc.7 app_name = "DZGUI" cache = {} @@ -434,7 +434,7 @@ def reinit_checks(): class OuterWindow(Gtk.Window): - def __init__(self): + def __init__(self, is_steam_deck): super().__init__() self.connect("destroy", self.halt_proc_and_quit) @@ -447,7 +447,7 @@ class OuterWindow(Gtk.Window): app > win > grid > scrollable > treeview [row/server/mod store] app > win > grid > vbox > buttonbox > filterpanel > combo [map store] """ - self.grid = Grid() + self.grid = Grid(is_steam_deck) self.add(self.grid) self.hb = AppHeaderBar() self.set_titlebar(self.hb) @@ -1391,7 +1391,7 @@ class EntryDialog(GenericDialog): class Grid(Gtk.Grid): - def __init__(self): + def __init__(self, is_steam_deck): super().__init__() Gtk.Grid() self.set_column_homogeneous(True) @@ -1399,12 +1399,6 @@ class Grid(Gtk.Grid): _news = sys.argv[2] self._version = "%s %s" %(app_name, sys.argv[3]) - _isd = int(sys.argv[4]) - - if _isd == 1: - is_steam_deck = True - else: - is_steam_deck = False if _news != "null": self.news = NewsHeader(_news) @@ -1484,9 +1478,16 @@ def toggle_signal(owner, widget, func_name, bool): class App(Gtk.Application): def __init__(self): - self.win = OuterWindow() + _isd = sys.argv[4] + if _isd == 1: + is_steam_deck = True + else: + is_steam_deck = False - self.win.fullscreen() + self.win = OuterWindow(is_steam_deck) + + if is_steam_deck == 1: + self.win.fullscreen() accel = Gtk.AccelGroup() accel.connect(Gdk.KEY_q, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE, self._halt_window_subprocess)