Move close action to the window class
This commit is contained in:
@@ -68,7 +68,6 @@ class CartridgesApplication(Adw.Application):
|
|||||||
self.create_actions(
|
self.create_actions(
|
||||||
{
|
{
|
||||||
("quit", ("<primary>q",)),
|
("quit", ("<primary>q",)),
|
||||||
("close_window", ("<primary>w",)),
|
|
||||||
("about",),
|
("about",),
|
||||||
("preferences", ("<primary>comma",)),
|
("preferences", ("<primary>comma",)),
|
||||||
("launch_game",),
|
("launch_game",),
|
||||||
@@ -91,6 +90,7 @@ class CartridgesApplication(Adw.Application):
|
|||||||
("escape", ("Escape",), self.win),
|
("escape", ("Escape",), self.win),
|
||||||
("undo", ("<primary>z",), self.win),
|
("undo", ("<primary>z",), self.win),
|
||||||
("open_menu", ("F10",), 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):
|
def on_hltb_search_action(self, *_args):
|
||||||
self.search("https://howlongtobeat.com/?q=")
|
self.search("https://howlongtobeat.com/?q=")
|
||||||
|
|
||||||
def on_close_window_action(self, *_args):
|
|
||||||
self.win.close()
|
|
||||||
|
|
||||||
def on_quit_action(self, *_args):
|
def on_quit_action(self, *_args):
|
||||||
self.quit()
|
self.quit()
|
||||||
|
|
||||||
|
|||||||
@@ -369,3 +369,6 @@ class CartridgesWindow(Adw.ApplicationWindow):
|
|||||||
self.primary_menu_button.popup()
|
self.primary_menu_button.popup()
|
||||||
elif self.stack.get_visible_child() == self.hidden_library_view:
|
elif self.stack.get_visible_child() == self.hidden_library_view:
|
||||||
self.hidden_primary_menu_button.popup()
|
self.hidden_primary_menu_button.popup()
|
||||||
|
|
||||||
|
def on_close_action(self, *_args):
|
||||||
|
self.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user