lookingGlass: Reformat command header

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2842>
This commit is contained in:
Florian Müllner 2023-07-12 21:32:56 +02:00 committed by Marge Bot
parent c0fbd74d07
commit 85a8a6f46c

View File

@ -26,15 +26,19 @@ const { ExtensionState } = ExtensionUtils;
const CHEVRON = '>>> '; const CHEVRON = '>>> ';
/* Imports...feel free to add here as needed */ /* Imports...feel free to add here as needed */
var commandHeader = 'const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi; ' + const commandHeader = `
'const Main = imports.ui.main; ' + const {Clutter, Gio, GLib, GObject, Meta, Shell, St} = imports.gi;
/* Utility functions...we should probably be able to use these const Main = imports.ui.main;
* in the shell core code too. */
'const stage = global.stage; ' + /* Utility functions...we should probably be able to use these
/* Special lookingGlass functions */ * in the shell core code too. */
'const inspect = Main.lookingGlass.inspect.bind(Main.lookingGlass); ' + const stage = global.stage;
'const it = Main.lookingGlass.getIt(); ' +
'const r = Main.lookingGlass.getResult.bind(Main.lookingGlass); '; /* Special lookingGlass functions */
const inspect = Main.lookingGlass.inspect.bind(Main.lookingGlass);
const it = Main.lookingGlass.getIt();
const r = Main.lookingGlass.getResult.bind(Main.lookingGlass);
`;
const HISTORY_KEY = 'looking-glass-history'; const HISTORY_KEY = 'looking-glass-history';
// Time between tabs for them to count as a double-tab event // Time between tabs for them to count as a double-tab event