SteamGridDB cleanups
This commit is contained in:
@@ -210,7 +210,6 @@ template PreferencesWindow : Adw.PreferencesWindow {
|
||||
|
||||
Adw.PreferencesGroup sgdb_key_group {
|
||||
title: _("Authentication");
|
||||
description: _("An API Key is required to use SteamGridDB. You can generate one <a href=\"https://www.steamgriddb.com/profile/preferences/api\">here</a>.");
|
||||
|
||||
Adw.EntryRow sgdb_key_entry_row {
|
||||
title: _("API Key");
|
||||
@@ -221,7 +220,7 @@ template PreferencesWindow : Adw.PreferencesWindow {
|
||||
title: _("Behavior");
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Download Images Automatically");
|
||||
title: _("Use SteamGridDB");
|
||||
subtitle: _("Download images when adding or importing games");
|
||||
|
||||
Switch sgdb_download_switch {
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<key name="sgdb-key" type="s">
|
||||
<default>""</default>
|
||||
</key>
|
||||
<key name="sgdb-import" type="b">
|
||||
<key name="sgdb" type="b">
|
||||
<default>false</default>
|
||||
</key>
|
||||
<key name="sgdb-prefer" type="b">
|
||||
|
||||
@@ -114,6 +114,7 @@ class PreferencesWindow(Adw.PreferencesWindow):
|
||||
itch_expander_row = Gtk.Template.Child()
|
||||
itch_file_chooser_button = Gtk.Template.Child()
|
||||
|
||||
sgdb_key_group = Gtk.Template.Child()
|
||||
sgdb_key_entry_row = Gtk.Template.Child()
|
||||
sgdb_download_switch = Gtk.Template.Child()
|
||||
sgdb_prefer_switch = Gtk.Template.Child()
|
||||
@@ -303,7 +304,7 @@ class PreferencesWindow(Adw.PreferencesWindow):
|
||||
|
||||
# SteamGridDB
|
||||
self.schema.bind(
|
||||
"sgdb-import",
|
||||
"sgdb",
|
||||
self.sgdb_download_switch,
|
||||
"active",
|
||||
Gio.SettingsBindFlags.DEFAULT,
|
||||
@@ -322,6 +323,14 @@ class PreferencesWindow(Adw.PreferencesWindow):
|
||||
self.sgdb_key_entry_row.set_text(self.schema.get_string("sgdb-key"))
|
||||
self.sgdb_key_entry_row.connect("changed", sgdb_key_changed)
|
||||
|
||||
self.sgdb_key_group.set_description(
|
||||
_(
|
||||
"An API Key is required to use SteamGridDB. You can generate one {}here{}."
|
||||
).format(
|
||||
'<a href="https://www.steamgriddb.com/profile/preferences/api">', "</a>"
|
||||
)
|
||||
)
|
||||
|
||||
def choose_folder(self, _widget, function):
|
||||
self.file_chooser.select_folder(self.parent_widget, None, function, None)
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ class SGDBSave:
|
||||
Gio.Task.new(None, None, self.task_done).run_in_thread(create_func(game))
|
||||
|
||||
def update_cover(self, task, game):
|
||||
if self.parent_widget.schema.get_boolean("sgdb-prefer") or (
|
||||
self.parent_widget.schema.get_boolean("sgdb-import")
|
||||
and not (
|
||||
if self.parent_widget.schema.get_boolean("sgdb") and (
|
||||
self.parent_widget.schema.get_boolean("sgdb-prefer")
|
||||
or not (
|
||||
self.parent_widget.data_dir
|
||||
/ "cartridges"
|
||||
/ "covers"
|
||||
|
||||
Reference in New Issue
Block a user