Add option to launch games by clicking cover

This commit is contained in:
kramo
2023-03-26 11:03:23 +02:00
parent 2cc9f638a7
commit 228db1b2f0
6 changed files with 70 additions and 25 deletions

View File

@@ -29,6 +29,8 @@ class PreferencesWindow(Adw.PreferencesWindow):
page = Gtk.Template.Child()
exit_after_launch_switch = Gtk.Template.Child()
cover_launches_game_switch = Gtk.Template.Child()
high_quality_images_switch = Gtk.Template.Child()
steam_file_chooser_button = Gtk.Template.Child()
steam_extra_file_chooser_button = Gtk.Template.Child()
@@ -43,8 +45,6 @@ class PreferencesWindow(Adw.PreferencesWindow):
bottles_group = Gtk.Template.Child()
bottles_file_chooser_button = Gtk.Template.Child()
high_quality_images_switch = Gtk.Template.Child()
def __init__(self, parent_widget, **kwargs):
super().__init__(**kwargs)
@@ -56,6 +56,18 @@ class PreferencesWindow(Adw.PreferencesWindow):
"active",
Gio.SettingsBindFlags.DEFAULT,
)
schema.bind(
"cover-launches-game",
self.cover_launches_game_switch,
"active",
Gio.SettingsBindFlags.DEFAULT,
)
schema.bind(
"high-quality-images",
self.high_quality_images_switch,
"active",
Gio.SettingsBindFlags.DEFAULT,
)
schema.bind(
"heroic-import-epic",
self.heroic_epic_switch,
@@ -74,12 +86,6 @@ class PreferencesWindow(Adw.PreferencesWindow):
"active",
Gio.SettingsBindFlags.DEFAULT,
)
schema.bind(
"high-quality-images",
self.high_quality_images_switch,
"active",
Gio.SettingsBindFlags.DEFAULT,
)
filechooser = Gtk.FileDialog()