mirror of
https://github.com/Rafostar/clapper.git
synced 2025-09-02 17:32:01 +02:00
Support accels for menu items
Add support for keyboard shortcuts for menu items. Additionally enable a common Ctrl+O for opening new file(s) and Ctrl+U for opening an URI. Closes #45
This commit is contained in:
@@ -44,9 +44,12 @@ class ClapperAppBase extends Gtk.Application
|
||||
name: action
|
||||
});
|
||||
simpleAction.connect(
|
||||
'activate', () => Menu.actions[action](this.active_window)
|
||||
'activate', () => Menu.actions[action].run(this.active_window)
|
||||
);
|
||||
this.add_action(simpleAction);
|
||||
|
||||
if(Menu.actions[action].accels)
|
||||
this.set_accels_for_action(`app.${action}`, Menu.actions[action].accels);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user