diff --git a/src/main.py b/src/main.py index 66cf7b2..b2bf237 100644 --- a/src/main.py +++ b/src/main.py @@ -42,25 +42,13 @@ class WarehouseApplication(Adw.Application): self.create_action("preferences", self.on_preferences_action) self.create_action("search", self.on_search_action, ["f"]) self.create_action("manage-data-folders", self.on_manage_data_folders_action) - self.create_action( - "toggle-batch-mode", - self.batch_mode_shortcut, - ["b", "Return"], - ) - self.create_action( - "select-all-in-batch-mode", self.select_all_shortcut, ["a"] - ) - self.create_action( - "manage-data-folders", self.manage_data_shortcut, ["d"] - ) - self.create_action( - "refresh-list", self.refresh_list_shortcut, ["r", "F5"] - ) + self.create_action("toggle-batch-mode", self.batch_mode_shortcut, ["b", "Return"]) + self.create_action("select-all-in-batch-mode", self.select_all_shortcut, ["a"]) + self.create_action("manage-data-folders", self.manage_data_shortcut, ["d"]) + self.create_action("refresh-list", self.refresh_list_shortcut, ["r", "F5"]) self.create_action("show-runtimes", self.show_runtimes_shortcut, ["t"]) - self.show_runtimes_stateful = Gio.SimpleAction.new_stateful( - "show-runtimes", None, GLib.Variant.new_boolean(False) - ) + self.show_runtimes_stateful = Gio.SimpleAction.new_stateful("show-runtimes", None, GLib.Variant.new_boolean(False)) self.show_runtimes_stateful.connect("activate", self.on_show_runtimes_action) self.add_action(self.show_runtimes_stateful) @@ -108,17 +96,10 @@ class WarehouseApplication(Adw.Application): application_icon="io.github.heliguy4599.Warehouse", developer_name="Heliguy", version="0.3.0", - developers=[ - "Heliguy https://github.com/heliguy4599", - "kramo https://kramo.hu", - ], - artists=[ - "Heliguy https://github.com/heliguy4599", - "kramo https://kramo.hu", - "eryn https://github.com/hericiumvevo", - ], - copyright='© 2023 The Files Authors\n\nThis application comes with absolutely no warranty. See the GNU General Public License, version 3 only for details.', - ) + developers=["Heliguy https://github.com/heliguy4599", "kramo https://kramo.hu"], + artists=["Heliguy https://github.com/heliguy4599", "kramo https://kramo.hu", "eryn https://github.com/hericiumvevo"], + copyright='© 2023 The Files Authors', + license_type=Gtk.License.GPL_3_0_ONLY) about.present() def on_preferences_action(self, widget, _): @@ -126,21 +107,13 @@ class WarehouseApplication(Adw.Application): print("app.preferences action activated") def on_search_action(self, widget, _): - self.props.active_window.search_bar.set_search_mode( - not self.props.active_window.search_bar.get_search_mode() - ) + self.props.active_window.search_bar.set_search_mode(not self.props.active_window.search_bar.get_search_mode()) def on_manage_data_folders_action(self, widget, _): self.props.active_window.orphans_window() def on_show_runtimes_action(self, widget, _): - self.show_runtimes_stateful.set_state( - GLib.Variant.new_boolean( - state := ( - not self.show_runtimes_stateful.get_property("state").get_boolean() - ) - ) - ) + self.show_runtimes_stateful.set_state(GLib.Variant.new_boolean(state := (not self.show_runtimes_stateful.get_property("state").get_boolean()))) self.props.active_window.show_runtimes_toggle_handler(state) def create_action(self, name, callback, shortcuts=None):