mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Small cleanup
This commit is contained in:
@@ -35,17 +35,15 @@ class ClapperAppBase extends Gtk.Application
|
|||||||
if(!settings.get_boolean('render-shadows'))
|
if(!settings.get_boolean('render-shadows'))
|
||||||
window.add_css_class('gpufriendly');
|
window.add_css_class('gpufriendly');
|
||||||
|
|
||||||
for(let action in Menu.actions) {
|
for(let name in Menu.actions) {
|
||||||
const simpleAction = new Gio.SimpleAction({
|
const simpleAction = new Gio.SimpleAction({ name });
|
||||||
name: action
|
|
||||||
});
|
|
||||||
simpleAction.connect(
|
simpleAction.connect(
|
||||||
'activate', () => Menu.actions[action].run(this.active_window)
|
'activate', () => Menu.actions[name].run(this.active_window)
|
||||||
);
|
);
|
||||||
this.add_action(simpleAction);
|
this.add_action(simpleAction);
|
||||||
|
|
||||||
if(Menu.actions[action].accels)
|
if(Menu.actions[name].accels)
|
||||||
this.set_accels_for_action(`app.${action}`, Menu.actions[action].accels);
|
this.set_accels_for_action(`app.${name}`, Menu.actions[name].accels);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
const { GObject, Gtk } = imports.gi;
|
|
||||||
const Dialogs = imports.src.dialogs;
|
const Dialogs = imports.src.dialogs;
|
||||||
|
|
||||||
var actions = {
|
var actions = {
|
||||||
|
@@ -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 ByteArray = imports.byteArray;
|
||||||
const Debug = imports.src.debug;
|
const Debug = imports.src.debug;
|
||||||
const Misc = imports.src.misc;
|
const Misc = imports.src.misc;
|
||||||
|
Reference in New Issue
Block a user