Move close action to the window class

This commit is contained in:
kramo
2023-05-23 14:04:57 +02:00
parent 0e24c8c50b
commit 4ca8e140aa
2 changed files with 4 additions and 4 deletions

View File

@@ -68,7 +68,6 @@ class CartridgesApplication(Adw.Application):
self.create_actions(
{
("quit", ("<primary>q",)),
("close_window", ("<primary>w",)),
("about",),
("preferences", ("<primary>comma",)),
("launch_game",),
@@ -91,6 +90,7 @@ class CartridgesApplication(Adw.Application):
("escape", ("Escape",), self.win),
("undo", ("<primary>z",), self.win),
("open_menu", ("F10",), self.win),
("close", ("<primary>w",), self.win),
}
)
@@ -201,9 +201,6 @@ class CartridgesApplication(Adw.Application):
def on_hltb_search_action(self, *_args):
self.search("https://howlongtobeat.com/?q=")
def on_close_window_action(self, *_args):
self.win.close()
def on_quit_action(self, *_args):
self.quit()

View File

@@ -369,3 +369,6 @@ class CartridgesWindow(Adw.ApplicationWindow):
self.primary_menu_button.popup()
elif self.stack.get_visible_child() == self.hidden_library_view:
self.hidden_primary_menu_button.popup()
def on_close_action(self, *_args):
self.close()