From a0ec1f51e8e971ebc36d805673ecd93e615d271c Mon Sep 17 00:00:00 2001 From: Foldex Date: Thu, 13 Oct 2022 20:21:53 -0400 Subject: [PATCH] Install: Add QR Login Options --- src/install.py | 8 ++++++++ src/window.blp | 7 ++++++- src/window.py | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/install.py b/src/install.py index 794b0e4..bf04f1c 100644 --- a/src/install.py +++ b/src/install.py @@ -65,6 +65,13 @@ def gen_cmd_line(options): else: web_theme = "-w base " + if options["qr_login"] == "Hover Only": + qr_login = "-we login/hover_qr " + elif options["qr_login"] == "Hide": + qr_login = "-we login/hide_qr " + else: + qr_login = "" + if options["whats_new"]: whats_new = "-we library/hide_whats_new " else: @@ -74,6 +81,7 @@ def gen_cmd_line(options): f"{installer}" f"{patch}" f"{web_theme}" + f"{qr_login}" f"{whats_new}" ) diff --git a/src/window.blp b/src/window.blp index 75f86a9..adcee69 100644 --- a/src/window.blp +++ b/src/window.blp @@ -44,8 +44,13 @@ template AdwaitaSteamGtkWindow : ApplicationWindow { model: StringList { strings [_("Base"), _("Full"), _("None")] }; } + Adw.ComboRow qr_login_options { + title: _("QR Code Login"); + model: StringList { strings [_("Show"), _("Hover Only"), _("Hide")] }; + } + Adw.ActionRow { - title: _("Disable Library What's New Shelf"); + title: _("Hide Library What's New Shelf"); activatable-widget: whats_new_switch; Switch whats_new_switch { diff --git a/src/window.py b/src/window.py index 1c52bff..46a6d5b 100644 --- a/src/window.py +++ b/src/window.py @@ -28,6 +28,7 @@ class AdwaitaSteamGtkWindow(Gtk.ApplicationWindow): window_controls_options = Gtk.Template.Child() web_theme_options = Gtk.Template.Child() + qr_login_options = Gtk.Template.Child() whats_new_switch = Gtk.Template.Child() @@ -72,6 +73,7 @@ def install_theme(self, action, _): options = { "win_controls": self.get_selected_pref(self.window_controls_options), "web_theme": self.get_selected_pref(self.web_theme_options), + "qr_login": self.get_selected_pref(self.qr_login_options), "whats_new": self.whats_new_switch.get_active() }