mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-14 00:04:08 +09:00
Make Batch Mode disable when a filter is applied
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user