Make Batch Mode disable when a filter is applied

This commit is contained in:
heliguy4599
2024-02-14 06:48:58 -05:00
parent b88101926d
commit 92fe0207ea
2 changed files with 4 additions and 2 deletions

View File

@@ -198,6 +198,9 @@ class FilterWindow(Adw.Window):
self.add_controller(event_controller)
self.set_size_request(260, 230)
self.show_apps_switch.set_active(self.settings.get_boolean("show-apps"))
self.show_runtimes_switch.set_active(self.settings.get_boolean("show-runtimes"))
# Connections
event_controller.connect("key-pressed", self.key_handler)
self.show_apps_switch.connect("state-set", lambda button, state: self.gsettings_bool_set("show-apps", state))
@@ -215,6 +218,4 @@ class FilterWindow(Adw.Window):
else:
self.generate_runtimes()
self.show_apps_switch.set_active(self.settings.get_boolean("show-apps"))
self.show_runtimes_switch.set_active(self.settings.get_boolean("show-runtimes"))
self.present()

View File

@@ -359,6 +359,7 @@ class WarehouseWindow(Adw.ApplicationWindow):
self.apply_filter()
def apply_filter(self):
self.batch_mode_button.set_active(False)
settings = Gio.Settings.new("io.github.flattool.Warehouse.filter")
show_apps = settings.get_boolean("show-apps")
show_runtimes = settings.get_boolean("show-runtimes")