mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 00:11:59 +02:00
Small cleanup
This commit is contained in:
@@ -35,17 +35,15 @@ class ClapperAppBase extends Gtk.Application
|
||||
if(!settings.get_boolean('render-shadows'))
|
||||
window.add_css_class('gpufriendly');
|
||||
|
||||
for(let action in Menu.actions) {
|
||||
const simpleAction = new Gio.SimpleAction({
|
||||
name: action
|
||||
});
|
||||
for(let name in Menu.actions) {
|
||||
const simpleAction = new Gio.SimpleAction({ name });
|
||||
simpleAction.connect(
|
||||
'activate', () => Menu.actions[action].run(this.active_window)
|
||||
'activate', () => Menu.actions[name].run(this.active_window)
|
||||
);
|
||||
this.add_action(simpleAction);
|
||||
|
||||
if(Menu.actions[action].accels)
|
||||
this.set_accels_for_action(`app.${action}`, Menu.actions[action].accels);
|
||||
if(Menu.actions[name].accels)
|
||||
this.set_accels_for_action(`app.${name}`, Menu.actions[name].accels);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user