Skip to content

Commit

Permalink
Install: Add QR Login Options
Browse files Browse the repository at this point in the history
  • Loading branch information
Foldex committed Oct 14, 2022
1 parent aec07f2 commit a0ec1f5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -74,6 +81,7 @@ def gen_cmd_line(options):
f"{installer}"
f"{patch}"
f"{web_theme}"
f"{qr_login}"
f"{whats_new}"
)

Expand Down
7 changes: 6 additions & 1 deletion src/window.blp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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()
}

Expand Down

0 comments on commit a0ec1f5

Please sign in to comment.