Extend app menu including shortcuts (close #23)
Add several global actions to the application menu and assign shortcuts (accels) to them.
This commit is contained in:
parent
e34a253645
commit
e7474c744e
3 changed files with 91 additions and 3 deletions
|
|
@ -67,7 +67,7 @@ class Application(Gtk.Application):
|
|||
self._window.present()
|
||||
|
||||
|
||||
def on_quit(self, action, param):
|
||||
def on_menu_quit(self, action, value):
|
||||
self.quit()
|
||||
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ class Application(Gtk.Application):
|
|||
|
||||
def _setup_actions(self):
|
||||
action = Gio.SimpleAction.new("quit", None)
|
||||
action.connect('activate', self.on_quit)
|
||||
action.connect('activate', self.on_menu_quit)
|
||||
self.add_action(action)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue