From bfbbc517d54f7c2ca8f2dbd1eb0f56c0993308ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Wed, 21 Apr 2021 16:59:06 +0200 Subject: [PATCH] Small cleanup --- src/appBase.js | 12 +++++------- src/menu.js | 1 - src/player.js | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/appBase.js b/src/appBase.js index 6422c4e4..3d849eb9 100644 --- a/src/appBase.js +++ b/src/appBase.js @@ -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); } } diff --git a/src/menu.js b/src/menu.js index 00609068..313c2626 100644 --- a/src/menu.js +++ b/src/menu.js @@ -1,4 +1,3 @@ -const { GObject, Gtk } = imports.gi; const Dialogs = imports.src.dialogs; var actions = { diff --git a/src/player.js b/src/player.js index 0aff7743..5ba16ea0 100644 --- a/src/player.js +++ b/src/player.js @@ -1,4 +1,4 @@ -const { Gdk, Gio, GLib, GObject, Gst, GstClapper, Gtk } = imports.gi; +const { Gdk, Gio, GObject, Gst, GstClapper, Gtk } = imports.gi; const ByteArray = imports.byteArray; const Debug = imports.src.debug; const Misc = imports.src.misc;