From 9a3913d4a02b3eff2f6e9047d7ebb61637a051fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 7 Aug 2023 01:45:22 +0200 Subject: [PATCH] cleanup: Use consistent 4-space indent This is another bit where we've made good progress, and just need a final push to complete the transition. Part-of: --- js/gdm/loginDialog.js | 37 ++++++++++-------- js/gdm/realmd.js | 12 +++--- js/gdm/util.js | 2 +- js/misc/gnomeSession.js | 6 ++- js/misc/history.js | 4 +- js/misc/inputMethod.js | 2 +- js/misc/introspect.js | 26 ++++++------- js/misc/loginManager.js | 27 ++++++------- js/misc/permissionStore.js | 6 +-- js/misc/systemActions.js | 20 +++++----- js/misc/util.js | 5 ++- js/misc/weather.js | 15 +++---- js/ui/accessDialog.js | 25 ++++++------ js/ui/altTab.js | 14 ++++--- js/ui/audioDeviceSelection.js | 13 ++++--- js/ui/background.js | 51 ++++++++++++------------ js/ui/boxpointer.js | 20 ++++++---- js/ui/closeDialog.js | 2 +- js/ui/components/automountManager.js | 17 ++++---- js/ui/components/autorunManager.js | 6 +-- js/ui/components/keyring.js | 2 +- js/ui/components/networkAgent.js | 2 +- js/ui/components/telepathyClient.js | 14 ++++--- js/ui/ctrlAltTab.js | 9 ++--- js/ui/dash.js | 32 ++++++++------- js/ui/dnd.js | 28 +++++++------- js/ui/endSessionDialog.js | 46 +++++++++++----------- js/ui/ibusCandidatePopup.js | 12 +++--- js/ui/kbdA11yDialog.js | 2 +- js/ui/keyboard.js | 4 +- js/ui/layout.js | 51 ++++++++++++------------ js/ui/lightbox.js | 2 +- js/ui/lookingGlass.js | 25 ++++++------ js/ui/magnifier.js | 39 ++++++++++--------- js/ui/main.js | 9 ++--- js/ui/messageList.js | 14 +++---- js/ui/messageTray.js | 35 ++++++++--------- js/ui/modalDialog.js | 11 +++--- js/ui/mpris.js | 8 ++-- js/ui/notificationDaemon.js | 19 +++++---- js/ui/osdMonitorLabeler.js | 11 +++--- js/ui/osdWindow.js | 2 +- js/ui/overview.js | 4 +- js/ui/padOsd.js | 39 +++++++++---------- js/ui/panel.js | 25 ++++++------ js/ui/popupMenu.js | 16 ++++---- js/ui/remoteSearch.js | 9 ++++- js/ui/screenShield.js | 2 +- js/ui/screenshot.js | 19 ++++----- js/ui/scripting.js | 20 +++++----- js/ui/search.js | 5 ++- js/ui/sessionMode.js | 5 ++- js/ui/shellDBus.js | 12 +++--- js/ui/shellEntry.js | 5 ++- js/ui/shellMountOperation.js | 15 +++---- js/ui/status/accessibility.js | 27 +++++++------ js/ui/status/keyboard.js | 58 ++++++++++++++-------------- js/ui/status/location.js | 14 +++---- js/ui/status/thunderbolt.js | 8 ++-- js/ui/userWidget.js | 5 ++- js/ui/windowManager.js | 25 ++++++------ js/ui/workspace.js | 2 +- js/ui/workspaceThumbnail.js | 7 ++-- js/ui/xdndHandler.js | 8 ++-- lint/eslintrc-legacy.yml | 7 ---- 65 files changed, 530 insertions(+), 494 deletions(-) diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index a9c6c997d..ca70a3c80 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -70,8 +70,9 @@ export const UserListItem = GObject.registerClass({ this._userWidget = new UserWidget.UserWidget(this.user); layout.add(this._userWidget); - this._userWidget.bind_property('label-actor', this, 'label-actor', - GObject.BindingFlags.SYNC_CREATE); + this._userWidget.bind_property('label-actor', + this, 'label-actor', + GObject.BindingFlags.SYNC_CREATE); this._timedLoginIndicator = new St.Bin({ style_class: 'login-dialog-timed-login-indicator', @@ -168,8 +169,9 @@ const UserList = GObject.registerClass({ x_expand: true, y_expand: true, }); - this.set_policy(St.PolicyType.NEVER, - St.PolicyType.AUTOMATIC); + this.set_policy( + St.PolicyType.NEVER, + St.PolicyType.AUTOMATIC); this._box = new St.BoxLayout({ vertical: true, @@ -342,7 +344,7 @@ const SessionMenuButton = GObject.registerClass({ }); this._manager = new PopupMenu.PopupMenuManager(this._button, - {actionMode: Shell.ActionMode.NONE}); + {actionMode: Shell.ActionMode.NONE}); this._manager.addMenu(this._menu); this._button.connect('clicked', () => this._menu.toggle()); @@ -432,13 +434,13 @@ export const LoginDialog = GObject.registerClass({ this._settings = new Gio.Settings({schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA}); this._settings.connect(`changed::${GdmUtil.BANNER_MESSAGE_KEY}`, - this._updateBanner.bind(this)); + this._updateBanner.bind(this)); this._settings.connect(`changed::${GdmUtil.BANNER_MESSAGE_TEXT_KEY}`, - this._updateBanner.bind(this)); + this._updateBanner.bind(this)); this._settings.connect(`changed::${GdmUtil.DISABLE_USER_LIST_KEY}`, - this._updateDisableUserList.bind(this)); + this._updateDisableUserList.bind(this)); this._settings.connect(`changed::${GdmUtil.LOGO_KEY}`, - this._updateLogo.bind(this)); + this._updateLogo.bind(this)); this._textureCache = St.TextureCache.get_default(); this._textureCache.connectObject('texture-file-changed', @@ -833,11 +835,12 @@ export const LoginDialog = GObject.registerClass({ this._logoBin.destroy_all_children(); const resourceScale = this._logoBin.get_resource_scale(); if (this._logoFile) { - let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; - this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile, - -1, -1, - scaleFactor, - resourceScale)); + const scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; + const texture = this._textureCache.load_file_async( + this._logoFile, + -1, -1, + scaleFactor, resourceScale); + this._logoBin.add_child(texture); } } @@ -1262,9 +1265,9 @@ export const LoginDialog = GObject.registerClass({ open() { Main.ctrlAltTabManager.addGroup(this, - _('Login Window'), - 'dialog-password-symbolic', - {sortGroup: CtrlAltTab.SortGroup.MIDDLE}); + _('Login Window'), + 'dialog-password-symbolic', + {sortGroup: CtrlAltTab.SortGroup.MIDDLE}); this.activate(); this.opacity = 0; diff --git a/js/gdm/realmd.js b/js/gdm/realmd.js index 09c19e125..b13b01b19 100644 --- a/js/gdm/realmd.js +++ b/js/gdm/realmd.js @@ -19,9 +19,9 @@ export class Manager extends Signals.EventEmitter { super(); this._aggregateProvider = Provider(Gio.DBus.system, - 'org.freedesktop.realmd', - '/org/freedesktop/realmd', - this._reloadRealms.bind(this)); + 'org.freedesktop.realmd', + '/org/freedesktop/realmd', + this._reloadRealms.bind(this)); this._realms = {}; this._loginFormat = null; @@ -41,9 +41,9 @@ export class Manager extends Signals.EventEmitter { for (let i = 0; i < realmPaths.length; i++) { Realm(Gio.DBus.system, - 'org.freedesktop.realmd', - realmPaths[i], - this._onRealmLoaded.bind(this)); + 'org.freedesktop.realmd', + realmPaths[i], + this._onRealmLoaded.bind(this)); } } diff --git a/js/gdm/util.js b/js/gdm/util.js index c304c706a..6048bc580 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -109,7 +109,7 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._settings = new Gio.Settings({schema_id: LOGIN_SCREEN_SCHEMA}); this._settings.connect('changed', - this._updateDefaultService.bind(this)); + this._updateDefaultService.bind(this)); this._updateDefaultService(); this._fprintManager = new FprintManagerProxy(Gio.DBus.system, diff --git a/js/misc/gnomeSession.js b/js/misc/gnomeSession.js index 0ff179c19..29a287d98 100644 --- a/js/misc/gnomeSession.js +++ b/js/misc/gnomeSession.js @@ -22,8 +22,10 @@ const PresenceProxy = Gio.DBusProxy.makeProxyWrapper(PresenceIface); * @returns {Gio.DBusProxy} */ export function Presence(initCallback, cancellable) { - return new PresenceProxy(Gio.DBus.session, 'org.gnome.SessionManager', - '/org/gnome/SessionManager/Presence', initCallback, cancellable); + return new PresenceProxy(Gio.DBus.session, + 'org.gnome.SessionManager', + '/org/gnome/SessionManager/Presence', + initCallback, cancellable); } // Note inhibitors are immutable objects, so they don't diff --git a/js/misc/history.js b/js/misc/history.js index 613ce612d..db781d45c 100644 --- a/js/misc/history.js +++ b/js/misc/history.js @@ -23,7 +23,7 @@ export class HistoryManager extends Signals.EventEmitter { if (this._key) { this._history = global.settings.get_strv(this._key); global.settings.connect(`changed::${this._key}`, - this._historyChanged.bind(this)); + this._historyChanged.bind(this)); } else { this._history = []; } @@ -32,7 +32,7 @@ export class HistoryManager extends Signals.EventEmitter { if (this._entry) { this._entry.connect('key-press-event', - this._onEntryKeyPress.bind(this)); + this._onEntryKeyPress.bind(this)); } } diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js index 9f1659758..76e615d78 100644 --- a/js/misc/inputMethod.js +++ b/js/misc/inputMethod.js @@ -42,7 +42,7 @@ export const InputMethod = GObject.registerClass({ this._inputSourceManager = Keyboard.getInputSourceManager(); this._sourceChangedId = this._inputSourceManager.connect('current-source-changed', - this._onSourceChanged.bind(this)); + this._onSourceChanged.bind(this)); this._currentSource = this._inputSourceManager.currentSource; if (this._ibus.is_connected()) diff --git a/js/misc/introspect.js b/js/misc/introspect.js index 163919aa6..b8b34c7bf 100644 --- a/js/misc/introspect.js +++ b/js/misc/introspect.js @@ -18,12 +18,12 @@ const IntrospectDBusIface = loadInterfaceXML('org.gnome.Shell.Introspect'); export class IntrospectService { constructor() { - this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(IntrospectDBusIface, - this); + this._dbusImpl = + Gio.DBusExportedObject.wrapJSObject(IntrospectDBusIface, this); this._dbusImpl.export(Gio.DBus.session, '/org/gnome/Shell/Introspect'); Gio.DBus.session.own_name('org.gnome.Shell.Introspect', - Gio.BusNameOwnerFlags.REPLACE, - null, null); + Gio.BusNameOwnerFlags.REPLACE, + null, null); this._runningApplications = {}; this._runningApplicationsDirty = true; @@ -32,18 +32,16 @@ export class IntrospectService { this._animationsEnabled = true; this._appSystem = Shell.AppSystem.get_default(); - this._appSystem.connect('app-state-changed', - () => { - this._runningApplicationsDirty = true; - this._syncRunningApplications(); - }); + this._appSystem.connect('app-state-changed', () => { + this._runningApplicationsDirty = true; + this._syncRunningApplications(); + }); let tracker = Shell.WindowTracker.get_default(); - tracker.connect('notify::focus-app', - () => { - this._activeApplicationDirty = true; - this._syncRunningApplications(); - }); + tracker.connect('notify::focus-app', () => { + this._activeApplicationDirty = true; + this._syncRunningApplications(); + }); tracker.connect('tracked-windows-changed', () => this._dbusImpl.emit_signal('WindowsChanged', null)); diff --git a/js/misc/loginManager.js b/js/misc/loginManager.js index 408bab863..067e2e87e 100644 --- a/js/misc/loginManager.js +++ b/js/misc/loginManager.js @@ -38,12 +38,13 @@ function versionCompare(required, reference) { export function canLock() { try { let params = GLib.Variant.new('(ss)', ['org.gnome.DisplayManager.Manager', 'Version']); - let result = Gio.DBus.system.call_sync('org.gnome.DisplayManager', - '/org/gnome/DisplayManager/Manager', - 'org.freedesktop.DBus.Properties', - 'Get', params, null, - Gio.DBusCallFlags.NONE, - -1, null); + let result = Gio.DBus.system.call_sync( + 'org.gnome.DisplayManager', + '/org/gnome/DisplayManager/Manager', + 'org.freedesktop.DBus.Properties', + 'Get', params, null, + Gio.DBusCallFlags.NONE, + -1, null); let version = result.deepUnpack()[0].deepUnpack(); return haveSystemd() && versionCompare('3.5.91', version); @@ -93,13 +94,13 @@ class LoginManagerSystemd extends Signals.EventEmitter { super(); this._proxy = new SystemdLoginManager(Gio.DBus.system, - 'org.freedesktop.login1', - '/org/freedesktop/login1'); + 'org.freedesktop.login1', + '/org/freedesktop/login1'); this._userProxy = new SystemdLoginUser(Gio.DBus.system, - 'org.freedesktop.login1', - '/org/freedesktop/login1/user/self'); + 'org.freedesktop.login1', + '/org/freedesktop/login1/user/self'); this._proxy.connectSignal('PrepareForSleep', - this._prepareForSleep.bind(this)); + this._prepareForSleep.bind(this)); } async getCurrentSessionProxy() { @@ -118,8 +119,8 @@ class LoginManagerSystemd extends Signals.EventEmitter { for ([session, objectPath] of this._userProxy.Sessions) { let sessionProxy = new SystemdLoginSession(Gio.DBus.system, - 'org.freedesktop.login1', - objectPath); + 'org.freedesktop.login1', + objectPath); log(`Considering ${session}, class=${sessionProxy.Class}`); if (sessionProxy.Class == 'greeter') { log(`Yes, will monitor session ${session}`); diff --git a/js/misc/permissionStore.js b/js/misc/permissionStore.js index 0659bcadc..07b5c8bdd 100644 --- a/js/misc/permissionStore.js +++ b/js/misc/permissionStore.js @@ -14,7 +14,7 @@ const PermissionStoreProxy = Gio.DBusProxy.makeProxyWrapper(PermissionStoreIface */ export function PermissionStore(initCallback, cancellable) { return new PermissionStoreProxy(Gio.DBus.session, - 'org.freedesktop.impl.portal.PermissionStore', - '/org/freedesktop/impl/portal/PermissionStore', - initCallback, cancellable); + 'org.freedesktop.impl.portal.PermissionStore', + '/org/freedesktop/impl/portal/PermissionStore', + initCallback, cancellable); } diff --git a/js/misc/systemActions.js b/js/misc/systemActions.js index de5362d65..efb875bac 100644 --- a/js/misc/systemActions.js +++ b/js/misc/systemActions.js @@ -161,26 +161,26 @@ const SystemActions = GObject.registerClass({ this._userManager = AccountsService.UserManager.get_default(); this._userManager.connect('notify::is-loaded', - () => this._updateMultiUser()); + () => this._updateMultiUser()); this._userManager.connect('notify::has-multiple-users', - () => this._updateMultiUser()); + () => this._updateMultiUser()); this._userManager.connect('user-added', - () => this._updateMultiUser()); + () => this._updateMultiUser()); this._userManager.connect('user-removed', - () => this._updateMultiUser()); + () => this._updateMultiUser()); this._lockdownSettings.connect(`changed::${DISABLE_USER_SWITCH_KEY}`, - () => this._updateSwitchUser()); + () => this._updateSwitchUser()); this._lockdownSettings.connect(`changed::${DISABLE_LOG_OUT_KEY}`, - () => this._updateLogout()); + () => this._updateLogout()); global.settings.connect(`changed::${ALWAYS_SHOW_LOG_OUT_KEY}`, - () => this._updateLogout()); + () => this._updateLogout()); this._lockdownSettings.connect(`changed::${DISABLE_LOCK_SCREEN_KEY}`, - () => this._updateLockScreen()); + () => this._updateLockScreen()); this._lockdownSettings.connect(`changed::${DISABLE_LOG_OUT_KEY}`, - () => this._updateHaveShutdown()); + () => this._updateHaveShutdown()); this.forceUpdate(); @@ -189,7 +189,7 @@ const SystemActions = GObject.registerClass({ this._updateOrientationLockStatus(); }); Main.layoutManager.connect('monitors-changed', - () => this._updateOrientationLock()); + () => this._updateOrientationLock()); this._monitorManager.connect('notify::panel-orientation-managed', () => this._updateOrientationLock()); this._updateOrientationLock(); diff --git a/js/misc/util.js b/js/misc/util.js index 7fe9fe8c0..3bca893f4 100644 --- a/js/misc/util.js +++ b/js/misc/util.js @@ -98,8 +98,9 @@ export function spawnCommandLine(commandLine) { */ export function spawnApp(argv) { try { - let app = Gio.AppInfo.create_from_commandline(argv.join(' '), null, - Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION); + const app = Gio.AppInfo.create_from_commandline(argv.join(' '), + null, + Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION); let context = global.create_app_launch_context(0, -1); app.launch([], context); diff --git a/js/misc/weather.js b/js/misc/weather.js index b49dc04ca..7dcc78acf 100644 --- a/js/misc/weather.js +++ b/js/misc/weather.js @@ -67,11 +67,11 @@ export class WeatherClient extends Signals.EventEmitter { this._onPermStoreChanged(this._permStore, '', params); }); this._permStore.connectSignal('Changed', - this._onPermStoreChanged.bind(this)); + this._onPermStoreChanged.bind(this)); this._locationSettings = new Gio.Settings({schema_id: 'org.gnome.system.location'}); this._locationSettings.connect('changed::enabled', - this._updateAutoLocation.bind(this)); + this._updateAutoLocation.bind(this)); this._world = GWeather.Location.get_world(); @@ -240,7 +240,7 @@ export class WeatherClient extends Signals.EventEmitter { this._gclueLocationChangedId = this._gclueService.connect('notify::location', - this._onGClueLocationChanged.bind(this)); + this._onGClueLocationChanged.bind(this)); this._onGClueLocationChanged(); } else { if (this._gclueLocationChangedId) @@ -270,10 +270,11 @@ export class WeatherClient extends Signals.EventEmitter { _onGClueLocationChanged() { let geoLocation = this._gclueService.location; - let location = GWeather.Location.new_detached(geoLocation.description, - null, - geoLocation.latitude, - geoLocation.longitude); + let location = GWeather.Location.new_detached( + geoLocation.description, + null, + geoLocation.latitude, + geoLocation.longitude); this._setLocation(location); } diff --git a/js/ui/accessDialog.js b/js/ui/accessDialog.js index a731081d6..809ec3612 100644 --- a/js/ui/accessDialog.js +++ b/js/ui/accessDialog.js @@ -96,9 +96,10 @@ class AccessDialog extends ModalDialog.ModalDialog { CloseAsync(invocation, _params) { if (this._invocation.get_sender() != invocation.get_sender()) { - invocation.return_error_literal(Gio.DBusError, - Gio.DBusError.ACCESS_DENIED, - ''); + invocation.return_error_literal( + Gio.DBusError, + Gio.DBusError.ACCESS_DENIED, + ''); return; } @@ -120,8 +121,8 @@ class AccessDialog extends ModalDialog.ModalDialog { // Delay actual response until the end of the close animation (if any) this.connect('closed', () => { - this._invocation.return_value(new GLib.Variant('(ua{sv})', - [response, results])); + this._invocation.return_value( + new GLib.Variant('(ua{sv})', [response, results])); }); this.close(); } @@ -141,9 +142,10 @@ export class AccessDialogDBus { AccessDialogAsync(params, invocation) { if (this._accessDialog) { - invocation.return_error_literal(Gio.DBusError, - Gio.DBusError.LIMITS_EXCEEDED, - 'Already showing a system access dialog'); + invocation.return_error_literal( + Gio.DBusError, + Gio.DBusError.LIMITS_EXCEEDED, + 'Already showing a system access dialog'); return; } @@ -151,9 +153,10 @@ export class AccessDialogDBus { // We probably want to use parentWindow and global.display.focus_window // for this check in the future if (appId && `${appId}.desktop` !== this._windowTracker.focus_app.id) { - invocation.return_error_literal(Gio.DBusError, - Gio.DBusError.ACCESS_DENIED, - 'Only the focused app is allowed to show a system access dialog'); + invocation.return_error_literal( + Gio.DBusError, + Gio.DBusError.ACCESS_DENIED, + 'Only the focused app is allowed to show a system access dialog'); return; } diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 4929cf2c3..bc04f8273 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -142,16 +142,18 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup { // We actually want the second window if we're in the unset state if (this._currentWindow == -1) this._currentWindow = 0; - return SwitcherPopup.mod(this._currentWindow + 1, - this._items[this._selectedIndex].cachedWindows.length); + return SwitcherPopup.mod( + this._currentWindow + 1, + this._items[this._selectedIndex].cachedWindows.length); } _previousWindow() { // Also assume second window here if (this._currentWindow == -1) this._currentWindow = 1; - return SwitcherPopup.mod(this._currentWindow - 1, - this._items[this._selectedIndex].cachedWindows.length); + return SwitcherPopup.mod( + this._currentWindow - 1, + this._items[this._selectedIndex].cachedWindows.length); } _closeAppWindow(appIndex, windowIndex) { @@ -1032,8 +1034,8 @@ class WindowIcon extends St.BoxLayout { this._icon.add_actor(_createWindowClone(mutterWindow, size * scaleFactor)); if (this.app) { - this._icon.add_actor(this._createAppIcon(this.app, - APP_ICON_SIZE_SMALL)); + this._icon.add_actor( + this._createAppIcon(this.app, APP_ICON_SIZE_SMALL)); } break; diff --git a/js/ui/audioDeviceSelection.js b/js/ui/audioDeviceSelection.js index e6fb33246..dab447f9d 100644 --- a/js/ui/audioDeviceSelection.js +++ b/js/ui/audioDeviceSelection.js @@ -168,11 +168,12 @@ export class AudioDeviceSelectionDBus { let info = this._dbusImpl.get_info(); const deviceName = Object.keys(AudioDevice) .filter(dev => AudioDevice[dev] === device)[0].toLowerCase(); - connection.emit_signal(this._audioSelectionDialog._sender, - this._dbusImpl.get_object_path(), - info ? info.name : null, - 'DeviceSelected', - GLib.Variant.new('(s)', [deviceName])); + connection.emit_signal( + this._audioSelectionDialog._sender, + this._dbusImpl.get_object_path(), + info ? info.name : null, + 'DeviceSelected', + GLib.Variant.new('(s)', [deviceName])); } OpenAsync(params, invocation) { @@ -196,7 +197,7 @@ export class AudioDeviceSelectionDBus { dialog.connect('closed', this._onDialogClosed.bind(this)); dialog.connect('device-selected', - this._onDeviceSelected.bind(this)); + this._onDeviceSelected.bind(this)); dialog.open(); this._audioSelectionDialog = dialog; diff --git a/js/ui/background.js b/js/ui/background.js index 24733869a..e9cf8fe4a 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -157,13 +157,13 @@ class BackgroundCache extends Signals.EventEmitter { let monitor = file.monitor(Gio.FileMonitorFlags.NONE, null); monitor.connect('changed', - (obj, theFile, otherFile, eventType) => { - // Ignore CHANGED and CREATED events, since in both cases - // we'll get a CHANGES_DONE_HINT event when done. - if (eventType != Gio.FileMonitorEvent.CHANGED && - eventType != Gio.FileMonitorEvent.CREATED) - this.emit('file-changed', file); - }); + (obj, theFile, otherFile, eventType) => { + // Ignore CHANGED and CREATED events, since in both cases + // we'll get a CHANGES_DONE_HINT event when done. + if (eventType != Gio.FileMonitorEvent.CHANGED && + eventType != Gio.FileMonitorEvent.CREATED) + this.emit('file-changed', file); + }); this._fileMonitors[key] = monitor; } @@ -374,13 +374,13 @@ const Background = GObject.registerClass({ this._cache.monitorFile(file); let signalId = this._cache.connect('file-changed', - (cache, changedFile) => { - if (changedFile.equal(file)) { - let imageCache = Meta.BackgroundImageCache.get_default(); - imageCache.purge(changedFile); - this._emitChangedSignal(); - } - }); + (cache, changedFile) => { + if (changedFile.equal(file)) { + let imageCache = Meta.BackgroundImageCache.get_default(); + imageCache.purge(changedFile); + this._emitChangedSignal(); + } + }); this._fileWatches[key] = signalId; } @@ -401,8 +401,8 @@ const Background = GObject.registerClass({ this._setLoaded(); if (files.length > 1) { this.set_blend(files[0], files[1], - this._animation.transitionProgress, - this._style); + this._animation.transitionProgress, + this._style); } else if (files.length > 0) { this.set_file(files[0], this._style); } else { @@ -445,19 +445,20 @@ const Background = GObject.registerClass({ let nSteps = 255 / ANIMATION_OPACITY_STEP_INCREMENT; let timePerStep = (this._animation.transitionDuration * 1000) / nSteps; - let interval = Math.max(ANIMATION_MIN_WAKEUP_INTERVAL * 1000, - timePerStep); + let interval = Math.max( + ANIMATION_MIN_WAKEUP_INTERVAL * 1000, + timePerStep); if (interval > GLib.MAXUINT32) return; this._updateAnimationTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, - interval, - () => { - this._updateAnimationTimeoutId = 0; - this._updateAnimation(); - return GLib.SOURCE_REMOVE; - }); + interval, + () => { + this._updateAnimationTimeoutId = 0; + this._updateAnimation(); + return GLib.SOURCE_REMOVE; + }); GLib.Source.set_name_by_id(this._updateAnimationTimeoutId, '[gnome-shell] this._updateAnimation'); } @@ -565,7 +566,7 @@ class BackgroundSource { const monitorManager = global.backend.get_monitor_manager(); this._monitorsChangedId = monitorManager.connect('monitors-changed', - this._onMonitorsChanged.bind(this)); + this._onMonitorsChanged.bind(this)); this._interfaceSettings = new Gio.Settings({schema_id: INTERFACE_SCHEMA}); } diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js index 8d95ffb08..834c42246 100644 --- a/js/ui/boxpointer.js +++ b/js/ui/boxpointer.js @@ -348,8 +348,9 @@ export const BoxPointer = GObject.registerClass({ if (!skipTopRight) { cr.lineTo(x2 - borderRadius, y1); - cr.arc(x2 - borderRadius, y1 + borderRadius, borderRadius, - 3 * Math.PI / 2, Math.PI * 2); + cr.arc( + x2 - borderRadius, y1 + borderRadius, borderRadius, + 3 * Math.PI / 2, Math.PI * 2); } if (this._arrowSide == St.Side.RIGHT && rise) { @@ -369,8 +370,9 @@ export const BoxPointer = GObject.registerClass({ if (!skipBottomRight) { cr.lineTo(x2, y2 - borderRadius); - cr.arc(x2 - borderRadius, y2 - borderRadius, borderRadius, - 0, Math.PI / 2); + cr.arc( + x2 - borderRadius, y2 - borderRadius, borderRadius, + 0, Math.PI / 2); } if (this._arrowSide == St.Side.BOTTOM && rise) { @@ -390,8 +392,9 @@ export const BoxPointer = GObject.registerClass({ if (!skipBottomLeft) { cr.lineTo(x1 + borderRadius, y2); - cr.arc(x1 + borderRadius, y2 - borderRadius, borderRadius, - Math.PI / 2, Math.PI); + cr.arc( + x1 + borderRadius, y2 - borderRadius, borderRadius, + Math.PI / 2, Math.PI); } if (this._arrowSide == St.Side.LEFT && rise) { @@ -411,8 +414,9 @@ export const BoxPointer = GObject.registerClass({ if (!skipTopLeft) { cr.lineTo(x1, y1 + borderRadius); - cr.arc(x1 + borderRadius, y1 + borderRadius, borderRadius, - Math.PI, 3 * Math.PI / 2); + cr.arc( + x1 + borderRadius, y1 + borderRadius, borderRadius, + Math.PI, 3 * Math.PI / 2); } const [hasColor, bgColor] = diff --git a/js/ui/closeDialog.js b/js/ui/closeDialog.js index dea2f978c..4d3942833 100644 --- a/js/ui/closeDialog.js +++ b/js/ui/closeDialog.js @@ -131,7 +131,7 @@ export const CloseDialog = GObject.registerClass({ if (shouldTrack) { Main.layoutManager.trackChrome(this._dialog, - {affectsInputRegion: true}); + {affectsInputRegion: true}); } else { Main.layoutManager.untrackChrome(this._dialog); } diff --git a/js/ui/components/automountManager.js b/js/ui/components/automountManager.js index 71c786f87..899c6a0d8 100644 --- a/js/ui/components/automountManager.js +++ b/js/ui/components/automountManager.js @@ -22,9 +22,9 @@ class AutomountManager { this._activeOperations = new Map(); this._session = new GnomeSession.SessionManager(); this._session.connectSignal('InhibitorAdded', - this._InhibitorsChanged.bind(this)); + this._InhibitorsChanged.bind(this)); this._session.connectSignal('InhibitorRemoved', - this._InhibitorsChanged.bind(this)); + this._InhibitorsChanged.bind(this)); this._inhibited = false; this._volumeMonitor = Gio.VolumeMonitor.get(); @@ -81,8 +81,8 @@ class AutomountManager { let player = global.display.get_sound_player(); player.play_from_theme('device-added-media', - _('External drive connected'), - null); + _('External drive connected'), + null); } _onDriveDisconnected() { @@ -93,8 +93,8 @@ class AutomountManager { let player = global.display.get_sound_player(); player.play_from_theme('device-removed-media', - _('External drive disconnected'), - null); + _('External drive disconnected'), + null); } _onDriveEjectButton(monitor, drive) { @@ -180,7 +180,7 @@ class AutomountManager { this._activeOperations.set(volume, operation); volume.mount(0, mountOp, null, - this._onVolumeMounted.bind(this)); + this._onVolumeMounted.bind(this)); } _onVolumeMounted(volume, res) { @@ -226,8 +226,7 @@ class AutomountManager { let prevOperation = this._activeOperations.get(volume); const existingDialog = prevOperation?.borrowDialog(); let operation = - new ShellMountOperation.ShellMountOperation(volume, - {existingDialog}); + new ShellMountOperation.ShellMountOperation(volume, {existingDialog}); this._mountVolume(volume, operation); } diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js index 26de39883..674bfd3ff 100644 --- a/js/ui/components/autorunManager.js +++ b/js/ui/components/autorunManager.js @@ -69,7 +69,7 @@ function startAppForMount(app, mount) { try { retval = app.launch(files, - global.create_app_launch_context(0, -1)); + global.create_app_launch_context(0, -1)); } catch (e) { log(`Unable to launch the app ${app.get_name()}: ${e}`); } @@ -81,8 +81,8 @@ const HotplugSnifferIface = loadInterfaceXML('org.gnome.Shell.HotplugSniffer'); const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface); function HotplugSniffer() { return new HotplugSnifferProxy(Gio.DBus.session, - 'org.gnome.Shell.HotplugSniffer', - '/org/gnome/Shell/HotplugSniffer'); + 'org.gnome.Shell.HotplugSniffer', + '/org/gnome/Shell/HotplugSniffer'); } class ContentTypeDiscoverer { diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js index 5b7b983dc..cfa9b5ec9 100644 --- a/js/ui/components/keyring.js +++ b/js/ui/components/keyring.js @@ -216,7 +216,7 @@ class KeyringPrompter extends Gcr.SystemPrompter { if (!this._registered) { this.register(Gio.DBus.session); this._dbusId = Gio.DBus.session.own_name('org.gnome.keyring.SystemPrompter', - Gio.BusNameOwnerFlags.ALLOW_REPLACEMENT, null, null); + Gio.BusNameOwnerFlags.ALLOW_REPLACEMENT, null, null); this._registered = true; } this._enabled = true; diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index 242271b5a..d06a339fa 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -480,7 +480,7 @@ class VPNRequestHandler extends Signals.EventEmitter { this._readStdoutOldStyle(); this._childWatch = GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, - this._vpnChildFinished.bind(this)); + this._vpnChildFinished.bind(this)); this._writeConnection(); } catch (e) { diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js index f02ea6dac..2ce501ab6 100644 --- a/js/ui/components/telepathyClient.js +++ b/js/ui/components/telepathyClient.js @@ -425,9 +425,10 @@ class ChatSource extends MessageTray.Source { _updateAvatarIcon() { this.iconUpdated(); if (this._notification) { - this._notification.update(this._notification.title, - this._notification.bannerBodyText, - {gicon: this.getIcon()}); + this._notification.update( + this._notification.title, + this._notification.bannerBodyText, + {gicon: this.getIcon()}); } } @@ -631,9 +632,10 @@ class ChatSource extends MessageTray.Source { _presenceChanged(_contact, _presence, _status, _message) { if (this._notification) { - this._notification.update(this._notification.title, - this._notification.bannerBodyText, - {secondaryGIcon: this.getSecondaryIcon()}); + this._notification.update( + this._notification.title, + this._notification.bannerBodyText, + {secondaryGIcon: this.getSecondaryIcon()}); } } diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js index 0cac42537..00a036833 100644 --- a/js/ui/ctrlAltTab.js +++ b/js/ui/ctrlAltTab.js @@ -88,7 +88,7 @@ export class CtrlAltTabManager { let workspaceManager = global.workspace_manager; let activeWorkspace = workspaceManager.get_active_workspace(); let windows = display.get_tab_list(Meta.TabList.DOCKS, - activeWorkspace); + activeWorkspace); let windowTracker = Shell.WindowTracker.get_default(); let textureCache = St.TextureCache.get_default(); for (let i = 0; i < windows.length; i++) { @@ -130,10 +130,9 @@ export class CtrlAltTabManager { this._popup = new CtrlAltTabPopup(items); this._popup.show(backward, binding, mask); - this._popup.connect('destroy', - () => { - this._popup = null; - }); + this._popup.connect('destroy', () => { + this._popup = null; + }); } } diff --git a/js/ui/dash.js b/js/ui/dash.js index f7312dbc6..2f80a4eee 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -99,16 +99,18 @@ class DashItemContainer extends St.Widget { let themeNode = this.get_theme_node(); forWidth = themeNode.adjust_for_width(forWidth); let [minHeight, natHeight] = super.vfunc_get_preferred_height(forWidth); - return themeNode.adjust_preferred_height(minHeight * this.scale_y, - natHeight * this.scale_y); + return themeNode.adjust_preferred_height( + minHeight * this.scale_y, + natHeight * this.scale_y); } vfunc_get_preferred_width(forHeight) { let themeNode = this.get_theme_node(); forHeight = themeNode.adjust_for_height(forHeight); let [minWidth, natWidth] = super.vfunc_get_preferred_width(forHeight); - return themeNode.adjust_preferred_width(minWidth * this.scale_x, - natWidth * this.scale_x); + return themeNode.adjust_preferred_width( + minWidth * this.scale_x, + natWidth * this.scale_x); } showLabel() { @@ -512,10 +514,9 @@ export const Dash = GObject.registerClass({ _createAppItem(app) { let appIcon = new DashIcon(app); - appIcon.connect('menu-state-changed', - (o, opened) => { - this._itemMenuStateChanged(item, opened); - }); + appIcon.connect('menu-state-changed', (o, opened) => { + this._itemMenuStateChanged(item, opened); + }); let item = new DashItemContainer(); item.setChild(appIcon); @@ -663,8 +664,9 @@ export const Dash = GObject.registerClass({ // Scale the icon's texture to the previous size and // tween to the new size - icon.icon.set_size(icon.icon.width * scale, - icon.icon.height * scale); + icon.icon.set_size( + icon.icon.width * scale, + icon.icon.height * scale); icon.icon.ease({ width: targetWidth, @@ -782,8 +784,9 @@ export const Dash = GObject.registerClass({ } for (let i = 0; i < addedItems.length; i++) { - this._box.insert_child_at_index(addedItems[i].item, - addedItems[i].pos); + this._box.insert_child_at_index( + addedItems[i].item, + addedItems[i].pos); } for (let i = 0; i < removedActors.length; i++) { @@ -925,8 +928,9 @@ export const Dash = GObject.registerClass({ this._dragPlaceholder = new DragPlaceholderItem(); this._dragPlaceholder.child.set_width(this.iconSize); this._dragPlaceholder.child.set_height(this.iconSize / 2); - this._box.insert_child_at_index(this._dragPlaceholder, - this._dragPlaceholderPos); + this._box.insert_child_at_index( + this._dragPlaceholder, + this._dragPlaceholderPos); this._dragPlaceholder.show(fadeIn); } diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 4bf352201..96762204c 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -238,7 +238,7 @@ class _Draggable extends Signals.EventEmitter { _grabActor(device, touchSequence) { this._grabDevice(this.actor, device, touchSequence); this._onEventId = this.actor.connect('event', - this._onEvent.bind(this)); + this._onEvent.bind(this)); } _ungrabActor() { @@ -573,8 +573,8 @@ class _Draggable extends Signals.EventEmitter { } _pickTargetActor() { - return this._dragActor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL, - this._dragX, this._dragY); + return this._dragActor.get_stage().get_actor_at_pos( + Clutter.PickMode.ALL, this._dragX, this._dragY); } _updateDragHover() { @@ -619,11 +619,12 @@ class _Draggable extends Signals.EventEmitter { // We currently loop through all parents on drag-over even if one of the children has handled it. // We can check the return value of the function and break the loop if it's true if we don't want // to continue checking the parents. - let result = target._delegate.handleDragOver(this.actor._delegate, - this._dragActor, - targX, - targY, - 0); + let result = target._delegate.handleDragOver( + this.actor._delegate, + this._dragActor, + targX, + targY, + 0); if (result != DragMotionResult.CONTINUE) { global.display.set_cursor(DRAG_CURSOR_MAP[result]); return GLib.SOURCE_REMOVE; @@ -640,7 +641,7 @@ class _Draggable extends Signals.EventEmitter { return; this._updateHoverId = GLib.idle_add(GLib.PRIORITY_DEFAULT, - this._updateDragHover.bind(this)); + this._updateDragHover.bind(this)); GLib.Source.set_name_by_id(this._updateHoverId, '[gnome-shell] this._updateDragHover'); } @@ -648,8 +649,9 @@ class _Draggable extends Signals.EventEmitter { let [stageX, stageY] = event.get_coords(); this._dragX = stageX; this._dragY = stageY; - this._dragActor.set_position(stageX + this._dragOffsetX, - stageY + this._dragOffsetY); + this._dragActor.set_position( + stageX + this._dragOffsetX, + stageY + this._dragOffsetY); this._queueUpdateDragHover(); return true; @@ -657,8 +659,8 @@ class _Draggable extends Signals.EventEmitter { _dragActorDropped(event) { let [dropX, dropY] = event.get_coords(); - let target = this._dragActor.get_stage().get_actor_at_pos(Clutter.PickMode.ALL, - dropX, dropY); + let target = this._dragActor.get_stage().get_actor_at_pos( + Clutter.PickMode.ALL, dropX, dropY); // We call observers only once per motion with the innermost // target actor. If necessary, the observer can walk the diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js index 8479ed659..d730627da 100644 --- a/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js @@ -247,22 +247,22 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._updatesPermission = null; this._pkOfflineProxy = new PkOfflineProxy(Gio.DBus.system, - 'org.freedesktop.PackageKit', - '/org/freedesktop/PackageKit', - this._onPkOfflineProxyCreated.bind(this)); + 'org.freedesktop.PackageKit', + '/org/freedesktop/PackageKit', + this._onPkOfflineProxyCreated.bind(this)); this._powerProxy = new UPowerProxy(Gio.DBus.system, - 'org.freedesktop.UPower', - '/org/freedesktop/UPower/devices/DisplayDevice', - (proxy, error) => { - if (error) { - log(error.message); - return; - } - this._powerProxy.connect('g-properties-changed', - this._sync.bind(this)); - this._sync(); - }); + 'org.freedesktop.UPower', + '/org/freedesktop/UPower/devices/DisplayDevice', + (proxy, error) => { + if (error) { + log(error.message); + return; + } + this._powerProxy.connect('g-properties-changed', + this._sync.bind(this)); + this._sync(); + }); this._secondsLeft = 0; this._totalSecondsToStayOpen = 0; @@ -272,8 +272,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._rebootButton = null; this._rebootButtonAlt = null; - this.connect('opened', - this._onOpened.bind(this)); + this.connect('opened', this._onOpened.bind(this)); this._user.connectObject( 'notify::is-loaded', this._sync.bind(this), @@ -379,9 +378,8 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._batteryWarning.visible = this._shouldShowLowBatteryWarning(dialogContent); let description; - let displayTime = _roundSecondsToInterval(this._totalSecondsToStayOpen, - this._secondsLeft, - 10); + let displayTime = _roundSecondsToInterval( + this._totalSecondsToStayOpen, this._secondsLeft, 10); if (this._user.is_loaded) { let realName = this._user.get_real_name(); @@ -748,8 +746,9 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._sessionSection.list.destroy_all_children(); if (!(this._type in DialogContent)) { - invocation.return_dbus_error('org.gnome.Shell.ModalDialog.TypeError', - 'Unknown dialog type requested'); + invocation.return_dbus_error( + 'org.gnome.Shell.ModalDialog.TypeError', + 'Unknown dialog type requested'); return; } @@ -781,8 +780,9 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._updateButtons(); if (!this.open(timestamp)) { - invocation.return_dbus_error('org.gnome.Shell.ModalDialog.GrabError', - 'Cannot grab pointer and keyboard'); + invocation.return_dbus_error( + 'org.gnome.Shell.ModalDialog.GrabError', + 'Cannot grab pointer and keyboard'); return; } diff --git a/js/ui/ibusCandidatePopup.js b/js/ui/ibusCandidatePopup.js index bfe7e35fa..aae3f299d 100644 --- a/js/ui/ibusCandidatePopup.js +++ b/js/ui/ibusCandidatePopup.js @@ -227,10 +227,8 @@ class IbusCandidatePopup extends BoxPointer.BoxPointer { this._preeditText.text = text.get_text(); let attrs = text.get_attributes(); - if (attrs) { - this._setTextAttributes(this._preeditText.clutter_text, - attrs); - } + if (attrs) + this._setTextAttributes(this._preeditText.clutter_text, attrs); }); panelService.connect('show-preedit-text', () => { this._preeditText.show(); @@ -285,9 +283,9 @@ class IbusCandidatePopup extends BoxPointer.BoxPointer { } this._candidateArea.setCandidates(indexes, - candidates, - cursorPos % pageSize, - lookupTable.is_cursor_visible()); + candidates, + cursorPos % pageSize, + lookupTable.is_cursor_visible()); this._candidateArea.setOrientation(lookupTable.get_orientation()); this._candidateArea.updateButtons(lookupTable.is_round(), page, nPages); }); diff --git a/js/ui/kbdA11yDialog.js b/js/ui/kbdA11yDialog.js index 40aae5d2e..2b054f7c5 100644 --- a/js/ui/kbdA11yDialog.js +++ b/js/ui/kbdA11yDialog.js @@ -19,7 +19,7 @@ class KbdA11yDialog extends GObject.Object { let seat = Clutter.get_default_backend().get_default_seat(); seat.connect('kbd-a11y-flags-changed', - this._showKbdA11yDialog.bind(this)); + this._showKbdA11yDialog.bind(this)); } _showKbdA11yDialog(seat, newFlags, whatChanged) { diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 1d5b10a35..3842a21f5 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -2270,11 +2270,11 @@ class KeyboardController extends Signals.EventEmitter { keyvalPress(keyval) { this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000, - keyval, Clutter.KeyState.PRESSED); + keyval, Clutter.KeyState.PRESSED); } keyvalRelease(keyval) { this._virtualDevice.notify_keyval(Clutter.get_current_event_time() * 1000, - keyval, Clutter.KeyState.RELEASED); + keyval, Clutter.KeyState.RELEASED); } } diff --git a/js/ui/layout.js b/js/ui/layout.js index 7e1f60cda..9bb6b82aa 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -39,18 +39,18 @@ function isPopupMetaWindow(actor) { export const MonitorConstraint = GObject.registerClass({ Properties: { - 'primary': GObject.ParamSpec.boolean('primary', - 'Primary', 'Track primary monitor', - GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, - false), - 'index': GObject.ParamSpec.int('index', - 'Monitor index', 'Track specific monitor', - GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, - -1, 64, -1), - 'work-area': GObject.ParamSpec.boolean('work-area', - 'Work-area', 'Track monitor\'s work-area', - GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, - false), + 'primary': GObject.ParamSpec.boolean( + 'primary', 'Primary', 'Track primary monitor', + GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, + false), + 'index': GObject.ParamSpec.int( + 'index', 'Monitor index', 'Track specific monitor', + GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, + -1, 64, -1), + 'work-area': GObject.ParamSpec.boolean( + 'work-area', 'Work-area', 'Track monitor\'s work-area', + GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, + false), }, }, class MonitorConstraint extends Clutter.Constraint { _init(props) { @@ -284,7 +284,7 @@ export const LayoutManager = GObject.registerClass({ trackFullscreen: true, }); this.panelBox.connect('notify::allocation', - this._panelBoxChanged.bind(this)); + this._panelBoxChanged.bind(this)); this.modalDialogGroup = new St.Widget({ name: 'modalDialogGroup', @@ -325,12 +325,12 @@ export const LayoutManager = GObject.registerClass({ }); this._interfaceSettings.connect('changed::enable-hot-corners', - this._updateHotCorners.bind(this)); + this._updateHotCorners.bind(this)); // Need to update struts on new workspaces when they are added let workspaceManager = global.workspace_manager; workspaceManager.connect('notify::n-workspaces', - this._queueUpdateRegions.bind(this)); + this._queueUpdateRegions.bind(this)); let display = global.display; display.connect('restacked', @@ -387,8 +387,8 @@ export const LayoutManager = GObject.registerClass({ let nMonitors = display.get_n_monitors(); for (let i = 0; i < nMonitors; i++) { this.monitors.push(new Monitor(i, - display.get_monitor_geometry(i), - display.get_monitor_scale(i))); + display.get_monitor_geometry(i), + display.get_monitor_scale(i))); } if (nMonitors == 0) { @@ -548,8 +548,9 @@ export const LayoutManager = GObject.registerClass({ } _updateKeyboardBox() { - this.keyboardBox.set_position(this.keyboardMonitor.x, - this.keyboardMonitor.y + this.keyboardMonitor.height); + this.keyboardBox.set_position( + this.keyboardMonitor.x, + this.keyboardMonitor.y + this.keyboardMonitor.height); this.keyboardBox.set_size(this.keyboardMonitor.width, -1); } @@ -1148,10 +1149,10 @@ class HotCorner extends Clutter.Actor { this._setupFallbackCornerIfNeeded(layoutManager); - this._pressureBarrier = new PressureBarrier(HOT_CORNER_PRESSURE_THRESHOLD, - HOT_CORNER_PRESSURE_TIMEOUT, - Shell.ActionMode.NORMAL | - Shell.ActionMode.OVERVIEW); + this._pressureBarrier = new PressureBarrier( + HOT_CORNER_PRESSURE_THRESHOLD, + HOT_CORNER_PRESSURE_TIMEOUT, + Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW); this._pressureBarrier.connect('trigger', this._toggleOverview.bind(this)); let px = 0.0; @@ -1242,9 +1243,9 @@ class HotCorner extends Clutter.Actor { } this._corner.connect('enter-event', - this._onCornerEntered.bind(this)); + this._onCornerEntered.bind(this)); this._corner.connect('leave-event', - this._onCornerLeft.bind(this)); + this._onCornerLeft.bind(this)); } } diff --git a/js/ui/lightbox.js b/js/ui/lightbox.js index 4908fab24..2e456bea6 100644 --- a/js/ui/lightbox.js +++ b/js/ui/lightbox.js @@ -55,7 +55,7 @@ const RadialShaderEffect = GObject.registerClass({ vfunc_build_pipeline() { this.add_glsl_snippet(Shell.SnippetHook.FRAGMENT, - VIGNETTE_DECLARATIONS, VIGNETTE_CODE, true); + VIGNETTE_DECLARATIONS, VIGNETTE_CODE, true); } get brightness() { diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index dbc77937f..f8e81bf9a 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -699,9 +699,8 @@ const Inspector = GObject.registerClass({ _update(event) { let [stageX, stageY] = event.get_coords(); - let target = global.stage.get_actor_at_pos(Clutter.PickMode.ALL, - stageX, - stageY); + let target = global.stage.get_actor_at_pos( + Clutter.PickMode.ALL, stageX, stageY); if (target != this._pointerTarget) this._target = target; @@ -738,7 +737,7 @@ const Extensions = GObject.registerClass({ }); Main.extensionManager.connect('extension-loaded', - this._loadExtension.bind(this)); + this._loadExtension.bind(this)); } _loadExtension(o, uuid) { @@ -1300,17 +1299,17 @@ class LookingGlass extends St.BoxLayout { this._interfaceSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.interface'}); this._interfaceSettings.connect('changed::monospace-font-name', - this._updateFont.bind(this)); + this._updateFont.bind(this)); this._updateFont(); // We want it to appear to slide out from underneath the panel Main.uiGroup.add_actor(this); Main.uiGroup.set_child_below_sibling(this, - Main.layoutManager.panelBox); + Main.layoutManager.panelBox); Main.layoutManager.panelBox.connect('notify::allocation', - this._queueResize.bind(this)); + this._queueResize.bind(this)); Main.layoutManager.keyboardBox.connect('notify::allocation', - this._queueResize.bind(this)); + this._queueResize.bind(this)); this._objInspector = new ObjInspector(this); Main.uiGroup.add_actor(this._objInspector); @@ -1590,8 +1589,9 @@ class LookingGlass extends St.BoxLayout { this.width = myWidth; this.height = myHeight; this._objInspector.set_size(Math.floor(myWidth * 0.8), Math.floor(myHeight * 0.8)); - this._objInspector.set_position(this.x + Math.floor(myWidth * 0.1), - this._targetY + Math.floor(myHeight * 0.1)); + this._objInspector.set_position( + this.x + Math.floor(myWidth * 0.1), + this._targetY + Math.floor(myHeight * 0.1)); } insertObject(obj) { @@ -1663,8 +1663,9 @@ class LookingGlass extends St.BoxLayout { this.setBorderPaintTarget(null); let settings = St.Settings.get(); - let duration = Math.min(LG_ANIMATION_TIME / settings.slow_down_factor, - LG_ANIMATION_TIME); + let duration = Math.min( + LG_ANIMATION_TIME / settings.slow_down_factor, + LG_ANIMATION_TIME); this.ease({ y: this._hiddenY, duration, diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index 3c8a915f5..9bfd97300 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -68,7 +68,7 @@ const MouseSpriteContent = GObject.registerClass({ let color = Clutter.Color.get_static(Clutter.StaticColor.WHITE); let [minFilter, magFilter] = actor.get_content_scaling_filters(); let textureNode = new Clutter.TextureNode(this._texture, - color, minFilter, magFilter); + color, minFilter, magFilter); textureNode.set_name('MouseSpriteContent'); node.add_child(textureNode); @@ -556,38 +556,38 @@ export class Magnifier extends Signals.EventEmitter { this._settings = new Gio.Settings({schema_id: MAGNIFIER_SCHEMA}); this._settings.connect(`changed::${SCREEN_POSITION_KEY}`, - this._updateScreenPosition.bind(this)); + this._updateScreenPosition.bind(this)); this._settings.connect(`changed::${MAG_FACTOR_KEY}`, - this._updateMagFactor.bind(this)); + this._updateMagFactor.bind(this)); this._settings.connect(`changed::${LENS_MODE_KEY}`, - this._updateLensMode.bind(this)); + this._updateLensMode.bind(this)); this._settings.connect(`changed::${CLAMP_MODE_KEY}`, - this._updateClampMode.bind(this)); + this._updateClampMode.bind(this)); this._settings.connect(`changed::${MOUSE_TRACKING_KEY}`, - this._updateMouseTrackingMode.bind(this)); + this._updateMouseTrackingMode.bind(this)); this._settings.connect(`changed::${FOCUS_TRACKING_KEY}`, - this._updateFocusTrackingMode.bind(this)); + this._updateFocusTrackingMode.bind(this)); this._settings.connect(`changed::${CARET_TRACKING_KEY}`, - this._updateCaretTrackingMode.bind(this)); + this._updateCaretTrackingMode.bind(this)); this._settings.connect(`changed::${INVERT_LIGHTNESS_KEY}`, - this._updateInvertLightness.bind(this)); + this._updateInvertLightness.bind(this)); this._settings.connect(`changed::${COLOR_SATURATION_KEY}`, - this._updateColorSaturation.bind(this)); + this._updateColorSaturation.bind(this)); this._settings.connect(`changed::${BRIGHT_RED_KEY}`, - this._updateBrightness.bind(this)); + this._updateBrightness.bind(this)); this._settings.connect(`changed::${BRIGHT_GREEN_KEY}`, - this._updateBrightness.bind(this)); + this._updateBrightness.bind(this)); this._settings.connect(`changed::${BRIGHT_BLUE_KEY}`, - this._updateBrightness.bind(this)); + this._updateBrightness.bind(this)); this._settings.connect(`changed::${CONTRAST_RED_KEY}`, - this._updateContrast.bind(this)); + this._updateContrast.bind(this)); this._settings.connect(`changed::${CONTRAST_GREEN_KEY}`, - this._updateContrast.bind(this)); + this._updateContrast.bind(this)); this._settings.connect(`changed::${CONTRAST_BLUE_KEY}`, - this._updateContrast.bind(this)); + this._updateContrast.bind(this)); this._settings.connect(`changed::${SHOW_CROSS_HAIRS_KEY}`, () => { this.setCrosshairsVisible(this._settings.get_boolean(SHOW_CROSS_HAIRS_KEY)); @@ -807,7 +807,7 @@ class ZoomRegion { this._signalConnections = []; let id = Main.layoutManager.connect('monitors-changed', - this._monitorsChanged.bind(this)); + this._monitorsChanged.bind(this)); this._signalConnections.push([Main.layoutManager, id]); id = this._focusCaretTracker.connect('caret-moved', this._updateCaret.bind(this)); @@ -1889,8 +1889,9 @@ class Crosshairs extends Clutter.Actor { this._clones.push(crosshairsActor); // Clones don't share visibility. - this.bind_property('visible', crosshairsActor, 'visible', - GObject.BindingFlags.SYNC_CREATE); + this.bind_property('visible', + crosshairsActor, 'visible', + GObject.BindingFlags.SYNC_CREATE); } container.add_actor(crosshairsActor); diff --git a/js/ui/main.js b/js/ui/main.js index 6742b7f4a..6dd7185c3 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -107,15 +107,14 @@ function _sessionUpdated() { if (sessionMode.isPrimary) _loadDefaultStylesheet(); - wm.allowKeybinding('overlay-key', Shell.ActionMode.NORMAL | - Shell.ActionMode.OVERVIEW); + wm.allowKeybinding('overlay-key', + Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW); wm.allowKeybinding('locate-pointer-key', Shell.ActionMode.ALL); wm.setCustomKeybindingHandler('panel-run-dialog', - Shell.ActionMode.NORMAL | - Shell.ActionMode.OVERVIEW, - sessionMode.hasRunDialog ? openRunDialog : null); + Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW, + sessionMode.hasRunDialog ? openRunDialog : null); if (!sessionMode.hasRunDialog) { if (runDialog) diff --git a/js/ui/messageList.js b/js/ui/messageList.js index cc768a42b..30b2af1f9 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -216,12 +216,10 @@ class ScaleLayout extends Clutter.BinLayout { const LabelExpanderLayout = GObject.registerClass({ Properties: { - 'expansion': GObject.ParamSpec.double('expansion', - 'Expansion', - 'Expansion of the layout, between 0 (collapsed) ' + - 'and 1 (fully expanded', - GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, - 0, 1, 0), + 'expansion': GObject.ParamSpec.double( + 'expansion', 'Expansion', 'Expansion', + GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, + 0, 1, 0), }, }, class LabelExpanderLayout extends Clutter.LayoutManager { _init(params) { @@ -418,7 +416,7 @@ export const Message = GObject.registerClass({ setBody(text) { this._bodyText = text; this.bodyLabel.setMarkup(text ? text.replace(/\n/g, ' ') : '', - this._useBodyMarkup); + this._useBodyMarkup); if (this._expandedLabel) this._expandedLabel.setMarkup(text, this._useBodyMarkup); } @@ -479,7 +477,7 @@ export const Message = GObject.registerClass({ if (this._bodyStack.get_n_children() < 2) { this._expandedLabel = new URLHighlighter(this._bodyText, - true, this._useBodyMarkup); + true, this._useBodyMarkup); this.setExpandedBody(this._expandedLabel); } diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 2bdf0af62..ec411ff20 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -831,8 +831,8 @@ export const MessageTray = GObject.registerClass({ let constraint = new Layout.MonitorConstraint({primary: true}); Main.layoutManager.panelBox.bind_property('visible', - constraint, 'work-area', - GObject.BindingFlags.SYNC_CREATE); + constraint, 'work-area', + GObject.BindingFlags.SYNC_CREATE); this.add_constraint(constraint); this._bannerBin = new St.Widget({ @@ -846,9 +846,9 @@ export const MessageTray = GObject.registerClass({ layout_manager: new Clutter.BinLayout(), }); this._bannerBin.connect('key-release-event', - this._onNotificationKeyRelease.bind(this)); + this._onNotificationKeyRelease.bind(this)); this._bannerBin.connect('notify::hover', - this._onNotificationHoverChanged.bind(this)); + this._onNotificationHoverChanged.bind(this)); this.add_actor(this._bannerBin); this._notificationFocusGrabber = new FocusGrabber(this._bannerBin); @@ -885,30 +885,29 @@ export const MessageTray = GObject.registerClass({ Main.sessionMode.connect('updated', this._sessionUpdated.bind(this)); Main.overview.connect('window-drag-begin', - this._onDragBegin.bind(this)); + this._onDragBegin.bind(this)); Main.overview.connect('window-drag-cancelled', - this._onDragEnd.bind(this)); + this._onDragEnd.bind(this)); Main.overview.connect('window-drag-end', - this._onDragEnd.bind(this)); + this._onDragEnd.bind(this)); Main.overview.connect('item-drag-begin', - this._onDragBegin.bind(this)); + this._onDragBegin.bind(this)); Main.overview.connect('item-drag-cancelled', - this._onDragEnd.bind(this)); + this._onDragEnd.bind(this)); Main.overview.connect('item-drag-end', - this._onDragEnd.bind(this)); + this._onDragEnd.bind(this)); Main.xdndHandler.connect('drag-begin', - this._onDragBegin.bind(this)); + this._onDragBegin.bind(this)); Main.xdndHandler.connect('drag-end', - this._onDragEnd.bind(this)); + this._onDragEnd.bind(this)); Main.wm.addKeybinding('focus-active-notification', - new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}), - Meta.KeyBindingFlags.NONE, - Shell.ActionMode.NORMAL | - Shell.ActionMode.OVERVIEW, - this._expandActiveNotification.bind(this)); + new Gio.Settings({schema_id: SHELL_KEYBINDINGS_SCHEMA}), + Meta.KeyBindingFlags.NONE, + Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW, + this._expandActiveNotification.bind(this)); this._sources = new Set(); @@ -1044,7 +1043,7 @@ export const MessageTray = GObject.registerClass({ let full = this.queueCount + bannerCount >= MAX_NOTIFICATIONS_IN_QUEUE; if (!full || notification.urgency == Urgency.CRITICAL) { notification.connect('destroy', - this._onNotificationDestroy.bind(this)); + this._onNotificationDestroy.bind(this)); this._notificationQueue.push(notification); this._notificationQueue.sort( (n1, n2) => n2.urgency - n1.urgency); diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 9fa2b7dad..c0ddabd60 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -26,11 +26,12 @@ export const State = { export const ModalDialog = GObject.registerClass({ Properties: { - 'state': GObject.ParamSpec.int('state', 'Dialog state', 'state', - GObject.ParamFlags.READABLE, - Math.min(...Object.values(State)), - Math.max(...Object.values(State)), - State.CLOSED), + 'state': GObject.ParamSpec.int( + 'state', 'Dialog state', 'state', + GObject.ParamFlags.READABLE, + Math.min(...Object.values(State)), + Math.max(...Object.values(State)), + State.CLOSED), }, Signals: {'opened': {}, 'closed': {}}, }, class ModalDialog extends St.Widget { diff --git a/js/ui/mpris.js b/js/ui/mpris.js index e040bf2da..1b11c4c6f 100644 --- a/js/ui/mpris.js +++ b/js/ui/mpris.js @@ -254,9 +254,9 @@ class MediaSection extends MessageList.MessageListSection { this._players = new Map(); this._proxy = new DBusProxy(Gio.DBus.session, - 'org.freedesktop.DBus', - '/org/freedesktop/DBus', - this._onProxyReady.bind(this)); + 'org.freedesktop.DBus', + '/org/freedesktop/DBus', + this._onProxyReady.bind(this)); } get allowed() { @@ -294,7 +294,7 @@ class MediaSection extends MessageList.MessageListSection { this._addPlayer(name); }); this._proxy.connectSignal('NameOwnerChanged', - this._onNameOwnerChanged.bind(this)); + this._onNameOwnerChanged.bind(this)); } _onNameOwnerChanged(proxy, sender, [name, oldOwner, newOwner]) { diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index 3f134b624..4e49b911a 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -48,8 +48,13 @@ class FdoNotificationDaemon { width, height, rowStride, hasAlpha, bitsPerSample, nChannels_, data, ] = hints['image-data']; - return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha, - bitsPerSample, width, height, rowStride); + return Shell.util_create_pixbuf_from_data(data, + GdkPixbuf.Colorspace.RGB, + hasAlpha, + bitsPerSample, + width, + height, + rowStride); } else if (hints['image-path']) { return this._iconForNotificationData(hints['image-path']); } @@ -329,12 +334,12 @@ class FdoNotificationDaemon { _emitNotificationClosed(id, reason) { this._dbusImpl.emit_signal('NotificationClosed', - GLib.Variant.new('(uu)', [id, reason])); + GLib.Variant.new('(uu)', [id, reason])); } _emitActionInvoked(id, action) { this._dbusImpl.emit_signal('ActionInvoked', - GLib.Variant.new('(us)', [id, action])); + GLib.Variant.new('(us)', [id, action])); } } @@ -354,9 +359,9 @@ class FdoNotificationDaemonSource extends MessageTray.Source { if (sender) { this._nameWatcherId = Gio.DBus.session.watch_name(sender, - Gio.BusNameWatcherFlags.NONE, - null, - this._onNameVanished.bind(this)); + Gio.BusNameWatcherFlags.NONE, + null, + this._onNameVanished.bind(this)); } else { this._nameWatcherId = 0; } diff --git a/js/ui/osdMonitorLabeler.js b/js/ui/osdMonitorLabeler.js index 1e6aff740..b27973af1 100644 --- a/js/ui/osdMonitorLabeler.js +++ b/js/ui/osdMonitorLabeler.js @@ -57,7 +57,7 @@ export class OsdMonitorLabeler { this._osdLabels = []; this._monitorLabels = null; Main.layoutManager.connect('monitors-changed', - this._reset.bind(this)); + this._reset.bind(this)); this._reset(); } @@ -76,10 +76,11 @@ export class OsdMonitorLabeler { return this._client == client; this._client = client; - this._clientWatchId = Gio.bus_watch_name(Gio.BusType.SESSION, client, 0, null, - (c, name) => { - this.hide(name); - }); + this._clientWatchId = Gio.bus_watch_name(Gio.BusType.SESSION, + client, 0, null, + (c, name) => { + this.hide(name); + }); return true; } diff --git a/js/ui/osdWindow.js b/js/ui/osdWindow.js index 2dfde9c5d..76dc1620a 100644 --- a/js/ui/osdWindow.js +++ b/js/ui/osdWindow.js @@ -148,7 +148,7 @@ export class OsdWindowManager { constructor() { this._osdWindows = []; Main.layoutManager.connect('monitors-changed', - this._monitorsChanged.bind(this)); + this._monitorsChanged.bind(this)); this._monitorsChanged(); } diff --git a/js/ui/overview.js b/js/ui/overview.js index d7858182d..fb68c85a4 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -223,7 +223,7 @@ export class Overview extends Signals.EventEmitter { Main.layoutManager.overviewGroup.connect('scroll-event', - this._onScrollEvent.bind(this)); + this._onScrollEvent.bind(this)); Main.xdndHandler.connect('drag-begin', this._onDragBegin.bind(this)); Main.xdndHandler.connect('drag-end', this._onDragEnd.bind(this)); @@ -367,7 +367,7 @@ export class Overview extends Signals.EventEmitter { () => { this._windowSwitchTimeoutId = 0; Main.activateWindow(dragEvent.targetActor._delegate.metaWindow, - this._windowSwitchTimestamp); + this._windowSwitchTimestamp); this.hide(); this._lastHoveredWindow = null; return GLib.SOURCE_REMOVE; diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js index 22de8e1bb..5e8ed80f5 100644 --- a/js/ui/padOsd.js +++ b/js/ui/padOsd.js @@ -292,21 +292,18 @@ const ActionEditor = GObject.registerClass({ const PadDiagram = GObject.registerClass({ Properties: { - 'left-handed': GObject.ParamSpec.boolean('left-handed', - 'left-handed', 'Left handed', - GObject.ParamFlags.READWRITE | - GObject.ParamFlags.CONSTRUCT_ONLY, - false), - 'image': GObject.ParamSpec.string('image', 'image', 'Image', - GObject.ParamFlags.READWRITE | - GObject.ParamFlags.CONSTRUCT_ONLY, - null), - 'editor-actor': GObject.ParamSpec.object('editor-actor', - 'editor-actor', - 'Editor actor', - GObject.ParamFlags.READWRITE | - GObject.ParamFlags.CONSTRUCT_ONLY, - Clutter.Actor.$gtype), + 'left-handed': GObject.ParamSpec.boolean( + 'left-handed', 'left-handed', 'Left handed', + GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY, + false), + 'image': GObject.ParamSpec.string( + 'image', 'image', 'Image', + GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY, + null), + 'editor-actor': GObject.ParamSpec.object( + 'editor-actor', 'editor-actor', 'Editor actor', + GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY, + Clutter.Actor.$gtype), }, }, class PadDiagram extends St.DrawingArea { _init(params) { @@ -899,8 +896,9 @@ export const PadOsd = GObject.registerClass({ this._editedAction = {type, number, dir, mode}; const settingsPath = `${this._settings.path}${key}/`; - this._editedActionSettings = Gio.Settings.new_with_path('org.gnome.desktop.peripherals.tablet.pad-button', - settingsPath); + this._editedActionSettings = Gio.Settings.new_with_path( + 'org.gnome.desktop.peripherals.tablet.pad-button', + settingsPath); this._actionEditor.setSettings(this._editedActionSettings, type); this._padDiagram.startEdition(type, number, dir); } @@ -964,9 +962,10 @@ export class PadOsdService extends Signals.EventEmitter { }); if (padDevice == null) { - invocation.return_error_literal(Gio.IOErrorEnum, - Gio.IOErrorEnum.CANCELLED, - 'Invalid params'); + invocation.return_error_literal( + Gio.IOErrorEnum, + Gio.IOErrorEnum.CANCELLED, + 'Invalid params'); return; } diff --git a/js/ui/panel.js b/js/ui/panel.js index 750708353..237505622 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -79,7 +79,7 @@ const AppMenuButton = GObject.registerClass({ let textureCache = St.TextureCache.get_default(); textureCache.connect('icon-theme-changed', - this._onIconThemeChanged.bind(this)); + this._onIconThemeChanged.bind(this)); let iconEffect = new Clutter.DesaturateEffect(); this._iconBox = new St.Bin({ @@ -496,8 +496,9 @@ class Panel extends St.Widget { }); Main.layoutManager.panelBox.add(this); - Main.ctrlAltTabManager.addGroup(this, _('Top Bar'), 'focus-top-bar-symbolic', - {sortGroup: CtrlAltTab.SortGroup.TOP}); + Main.ctrlAltTabManager.addGroup(this, + _('Top Bar'), 'focus-top-bar-symbolic', + {sortGroup: CtrlAltTab.SortGroup.TOP}); Main.sessionMode.connect('updated', this._updatePanel.bind(this)); @@ -542,14 +543,13 @@ class Panel extends St.Widget { childBox.y1 = 0; childBox.y2 = allocHeight; if (this.get_text_direction() == Clutter.TextDirection.RTL) { - childBox.x1 = Math.max(allocWidth - Math.min(Math.floor(sideWidth), - leftNaturalWidth), - 0); + childBox.x1 = Math.max( + allocWidth - Math.min(Math.floor(sideWidth), leftNaturalWidth), + 0); childBox.x2 = allocWidth; } else { childBox.x1 = 0; - childBox.x2 = Math.min(Math.floor(sideWidth), - leftNaturalWidth); + childBox.x2 = Math.min(Math.floor(sideWidth), leftNaturalWidth); } this._leftBox.allocate(childBox); @@ -563,12 +563,11 @@ class Panel extends St.Widget { childBox.y2 = allocHeight; if (this.get_text_direction() == Clutter.TextDirection.RTL) { childBox.x1 = 0; - childBox.x2 = Math.min(Math.floor(sideWidth), - rightNaturalWidth); + childBox.x2 = Math.min(Math.floor(sideWidth), rightNaturalWidth); } else { - childBox.x1 = Math.max(allocWidth - Math.min(Math.floor(sideWidth), - rightNaturalWidth), - 0); + childBox.x1 = Math.max( + allocWidth - Math.min(Math.floor(sideWidth), rightNaturalWidth), + 0); childBox.x2 = allocWidth; } this._rightBox.allocate(childBox); diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 08a359528..1bf78086c 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -65,12 +65,14 @@ export function arrowIcon(side) { export const PopupBaseMenuItem = GObject.registerClass({ Properties: { - 'active': GObject.ParamSpec.boolean('active', 'active', 'active', - GObject.ParamFlags.READWRITE, - false), - 'sensitive': GObject.ParamSpec.boolean('sensitive', 'sensitive', 'sensitive', - GObject.ParamFlags.READWRITE, - true), + 'active': GObject.ParamSpec.boolean( + 'active', 'active', 'active', + GObject.ParamFlags.READWRITE, + false), + 'sensitive': GObject.ParamSpec.boolean( + 'sensitive', 'sensitive', 'sensitive', + GObject.ParamFlags.READWRITE, + true), }, Signals: { 'activate': {param_types: [Clutter.Event.$gtype]}, @@ -296,7 +298,7 @@ class PopupSeparatorMenuItem extends PopupBaseMenuItem { this.label_actor = this.label; this.label.connect('notify::text', - this._syncVisibility.bind(this)); + this._syncVisibility.bind(this)); this._syncVisibility(); this._separator = new St.Widget({ diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js index 03f0edc77..97c84f122 100644 --- a/js/ui/remoteSearch.js +++ b/js/ui/remoteSearch.js @@ -232,8 +232,13 @@ class RemoteSearchProvider { width, height, rowStride, hasAlpha, bitsPerSample, nChannels_, data, ] = meta['icon-data']; - gicon = Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha, - bitsPerSample, width, height, rowStride); + gicon = Shell.util_create_pixbuf_from_data(data, + GdkPixbuf.Colorspace.RGB, + hasAlpha, + bitsPerSample, + width, + height, + rowStride); } if (gicon) diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index b39242136..27bbb11b0 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -103,7 +103,7 @@ export class ScreenShield extends Signals.EventEmitter { this._loginManager = LoginManager.getLoginManager(); this._loginManager.connect('prepare-for-sleep', - this._prepareForSleep.bind(this)); + this._prepareForSleep.bind(this)); this._loginSession = null; this._getLoginSession(); diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index c412ecdd3..92b6f1ce0 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -2328,9 +2328,8 @@ export class ScreenshotService { } let shooter = new Shell.Screenshot(); - shooter._watchNameId = - Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null, - this._onNameVanished.bind(this)); + shooter._watchNameId = Gio.bus_watch_name(Gio.BusType.SESSION, + sender, 0, null, this._onNameVanished.bind(this)); this._screenShooter.set(sender, shooter); @@ -2460,9 +2459,10 @@ export class ScreenshotService { let [x, y, width, height, flash, filename] = params; [x, y, width, height] = this._scaleArea(x, y, width, height); if (!this._checkArea(x, y, width, height)) { - invocation.return_error_literal(Gio.IOErrorEnum, - Gio.IOErrorEnum.CANCELLED, - 'Invalid params'); + invocation.return_error_literal( + Gio.IOErrorEnum, + Gio.IOErrorEnum.CANCELLED, + 'Invalid params'); return; } let screenshot = await this._createScreenshot(invocation); @@ -2565,9 +2565,10 @@ export class ScreenshotService { let [x, y, width, height] = params; [x, y, width, height] = this._scaleArea(x, y, width, height); if (!this._checkArea(x, y, width, height)) { - invocation.return_error_literal(Gio.IOErrorEnum, - Gio.IOErrorEnum.CANCELLED, - 'Invalid params'); + invocation.return_error_literal( + Gio.IOErrorEnum, + Gio.IOErrorEnum.CANCELLED, + 'Invalid params'); return; } let flashspot = new Flashspot({x, y, width, height}); diff --git a/js/ui/scripting.js b/js/ui/scripting.js index d0413e609..9a32149c8 100644 --- a/js/ui/scripting.js +++ b/js/ui/scripting.js @@ -172,9 +172,8 @@ export async function disableHelperAutoExit() { * within a performance automation script */ export function defineScriptEvent(name, description) { - Shell.PerfLog.get_default().define_event(`script.${name}`, - description, - ''); + Shell.PerfLog.get_default().define_event( + `script.${name}`, description, ''); } /** @@ -218,9 +217,10 @@ function _collect(scriptModule, outputFile) { if (outputFile) { let f = Gio.file_new_for_path(outputFile); - let raw = f.replace(null, false, - Gio.FileCreateFlags.NONE, - null); + let raw = f.replace(null, + false, + Gio.FileCreateFlags.NONE, + null); let out = Gio.BufferedOutputStream.new_sized(raw, 4096); Shell.write_string_to_stream(out, '{\n'); @@ -264,10 +264,10 @@ function _collect(scriptModule, outputFile) { first = false; Shell.write_string_to_stream(out, - `{ "name": ${JSON.stringify(name)},\n` + - ` "description": ${JSON.stringify(metric.description)},\n` + - ` "units": ${JSON.stringify(metric.units)},\n` + - ` "value": ${JSON.stringify(metric.value)} }`); + `{ "name": ${JSON.stringify(name)},\n` + + ` "description": ${JSON.stringify(metric.description)},\n` + + ` "units": ${JSON.stringify(metric.units)},\n` + + ` "value": ${JSON.stringify(metric.value)} }`); } Shell.write_string_to_stream(out, ' ]'); diff --git a/js/ui/search.js b/js/ui/search.js index d1cfcd51d..b332e24d6 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -135,8 +135,9 @@ class GridSearchResult extends SearchResult { this.style_class = 'grid-search-result'; - this.icon = new IconGrid.BaseIcon(this.metaInfo['name'], - {createIcon: this.metaInfo['createIcon']}); + this.icon = new IconGrid.BaseIcon(this.metaInfo['name'], { + createIcon: this.metaInfo['createIcon'], + }); let content = new St.Bin({ child: this.icon, x_align: Clutter.ActorAlign.START, diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js index bdb15d224..897000d85 100644 --- a/js/ui/sessionMode.js +++ b/js/ui/sessionMode.js @@ -194,8 +194,9 @@ export class SessionMode extends Signals.EventEmitter { let params = _modes[this.currentMode]; let defaults; if (params.parentMode) { - defaults = Params.parse(_modes[params.parentMode], - _modes[DEFAULT_MODE]); + defaults = Params.parse( + _modes[params.parentMode], + _modes[DEFAULT_MODE]); } else { defaults = _modes[DEFAULT_MODE]; } diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index eb37eff3b..c71169da7 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -41,9 +41,9 @@ export class GnomeShell { this._cachedOverviewVisible = false; Main.overview.connect('showing', - this._checkOverviewVisibleChanged.bind(this)); + this._checkOverviewVisibleChanged.bind(this)); Main.overview.connect('hidden', - this._checkOverviewVisibleChanged.bind(this)); + this._checkOverviewVisibleChanged.bind(this)); } /** @@ -303,8 +303,8 @@ export class GnomeShell { this._grabbedAccelerators.set(bindingAction, sender); if (!this._grabbers.has(sender)) { - let id = Gio.bus_watch_name(Gio.BusType.SESSION, sender, 0, null, - this._onGrabberBusNameVanished.bind(this)); + let id = Gio.bus_watch_name(Gio.BusType.SESSION, + sender, 0, null, this._onGrabberBusNameVanished.bind(this)); this._grabbers.set(sender, id); } @@ -409,7 +409,7 @@ class GnomeShellExtensions { }); Main.extensionManager.connect('extension-state-changed', - this._extensionStateChanged.bind(this)); + this._extensionStateChanged.bind(this)); } ListExtensions() { @@ -490,7 +490,7 @@ class GnomeShellExtensions { new GLib.Variant('(sa{sv})', [newState.uuid, state])); this._dbusImpl.emit_signal('ExtensionStatusChanged', - GLib.Variant.new('(sis)', [newState.uuid, newState.state, newState.error])); + new GLib.Variant('(sis)', [newState.uuid, newState.state, newState.error])); } } diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index ffcf9c384..0b53af6b0 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -141,8 +141,9 @@ export function addContextMenu(entry, params) { params = Params.parse(params, {actionMode: Shell.ActionMode.POPUP}); entry.menu = new EntryMenu(entry); - entry._menuManager = new PopupMenu.PopupMenuManager(entry, - {actionMode: params.actionMode}); + entry._menuManager = new PopupMenu.PopupMenuManager(entry, { + actionMode: params.actionMode, + }); entry._menuManager.addMenu(entry.menu); // Add an event handler to both the entry and its clutter_text; the former diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index cc3d15148..39f1ab598 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -65,15 +65,15 @@ export class ShellMountOperation { this.mountOp = new Shell.MountOperation(); this.mountOp.connect('ask-question', - this._onAskQuestion.bind(this)); + this._onAskQuestion.bind(this)); this.mountOp.connect('ask-password', - this._onAskPassword.bind(this)); + this._onAskPassword.bind(this)); this.mountOp.connect('show-processes-2', - this._onShowProcesses2.bind(this)); + this._onShowProcesses2.bind(this)); this.mountOp.connect('aborted', - this.close.bind(this)); + this.close.bind(this)); this.mountOp.connect('show-unmount-progress', - this._onShowUnmountProgress.bind(this)); + this._onShowUnmountProgress.bind(this)); } _closeExistingDialog() { @@ -543,8 +543,9 @@ export class GnomeShellMountOpHandler { constructor() { this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(GnomeShellMountOpIface, this); this._dbusImpl.export(Gio.DBus.session, '/org/gtk/MountOperationHandler'); - Gio.bus_own_name_on_connection(Gio.DBus.session, 'org.gtk.MountOperationHandler', - Gio.BusNameOwnerFlags.REPLACE, null, null); + Gio.bus_own_name_on_connection(Gio.DBus.session, + 'org.gtk.MountOperationHandler', + Gio.BusNameOwnerFlags.REPLACE, null, null); this._dialog = null; diff --git a/js/ui/status/accessibility.js b/js/ui/status/accessibility.js index e3c26c66f..92d26a7fe 100644 --- a/js/ui/status/accessibility.js +++ b/js/ui/status/accessibility.js @@ -46,34 +46,39 @@ class ATIndicator extends PanelMenu.Button { let highContrast = this._buildItem(_('High Contrast'), A11Y_INTERFACE_SCHEMA, KEY_HIGH_CONTRAST); this.menu.addMenuItem(highContrast); - let magnifier = this._buildItem(_('Zoom'), APPLICATIONS_SCHEMA, - 'screen-magnifier-enabled'); + const magnifier = this._buildItem(_('Zoom'), + APPLICATIONS_SCHEMA, 'screen-magnifier-enabled'); this.menu.addMenuItem(magnifier); let textZoom = this._buildFontItem(); this.menu.addMenuItem(textZoom); - let screenReader = this._buildItem(_('Screen Reader'), APPLICATIONS_SCHEMA, - 'screen-reader-enabled'); + const screenReader = this._buildItem(_('Screen Reader'), + APPLICATIONS_SCHEMA, 'screen-reader-enabled'); this.menu.addMenuItem(screenReader); - let screenKeyboard = this._buildItem(_('Screen Keyboard'), APPLICATIONS_SCHEMA, - 'screen-keyboard-enabled'); + const screenKeyboard = this._buildItem(_('Screen Keyboard'), + APPLICATIONS_SCHEMA, 'screen-keyboard-enabled'); this.menu.addMenuItem(screenKeyboard); - let visualBell = this._buildItem(_('Visual Alerts'), WM_SCHEMA, KEY_VISUAL_BELL); + const visualBell = this._buildItem(_('Visual Alerts'), + WM_SCHEMA, KEY_VISUAL_BELL); this.menu.addMenuItem(visualBell); - let stickyKeys = this._buildItem(_('Sticky Keys'), A11Y_KEYBOARD_SCHEMA, KEY_STICKY_KEYS_ENABLED); + const stickyKeys = this._buildItem(_('Sticky Keys'), + A11Y_KEYBOARD_SCHEMA, KEY_STICKY_KEYS_ENABLED); this.menu.addMenuItem(stickyKeys); - let slowKeys = this._buildItem(_('Slow Keys'), A11Y_KEYBOARD_SCHEMA, KEY_SLOW_KEYS_ENABLED); + const slowKeys = this._buildItem(_('Slow Keys'), + A11Y_KEYBOARD_SCHEMA, KEY_SLOW_KEYS_ENABLED); this.menu.addMenuItem(slowKeys); - let bounceKeys = this._buildItem(_('Bounce Keys'), A11Y_KEYBOARD_SCHEMA, KEY_BOUNCE_KEYS_ENABLED); + const bounceKeys = this._buildItem(_('Bounce Keys'), + A11Y_KEYBOARD_SCHEMA, KEY_BOUNCE_KEYS_ENABLED); this.menu.addMenuItem(bounceKeys); - let mouseKeys = this._buildItem(_('Mouse Keys'), A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED); + const mouseKeys = this._buildItem(_('Mouse Keys'), + A11Y_KEYBOARD_SCHEMA, KEY_MOUSE_KEYS_ENABLED); this.menu.addMenuItem(mouseKeys); this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index fe90f10b6..49c7fb407 100644 --- a/js/ui/status/keyboard.js +++ b/js/ui/status/keyboard.js @@ -201,12 +201,12 @@ class InputSourceSystemSettings extends InputSourceSettings { this._reload(); Gio.DBus.system.signal_subscribe(this._BUS_NAME, - this._BUS_PROPS_IFACE, - 'PropertiesChanged', - this._BUS_PATH, - null, - Gio.DBusSignalFlags.NONE, - this._reload.bind(this)); + this._BUS_PROPS_IFACE, + 'PropertiesChanged', + this._BUS_PATH, + null, + Gio.DBusSignalFlags.NONE, + this._reload.bind(this)); } async _reload() { @@ -330,16 +330,16 @@ export class InputSourceManager extends Signals.EventEmitter { this._mruSourcesBackup = null; this._keybindingAction = Main.wm.addKeybinding('switch-input-source', - new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}), - Meta.KeyBindingFlags.NONE, - Shell.ActionMode.ALL, - this._switchInputSource.bind(this)); + new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}), + Meta.KeyBindingFlags.NONE, + Shell.ActionMode.ALL, + this._switchInputSource.bind(this)); this._keybindingActionBackward = Main.wm.addKeybinding('switch-input-source-backward', - new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}), - Meta.KeyBindingFlags.IS_REVERSED, - Shell.ActionMode.ALL, - this._switchInputSource.bind(this)); + new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}), + Meta.KeyBindingFlags.IS_REVERSED, + Shell.ActionMode.ALL, + this._switchInputSource.bind(this)); if (Main.sessionMode.isGreeter) this._settings = new InputSourceSystemSettings(); else @@ -601,10 +601,10 @@ export class InputSourceManager extends Signals.EventEmitter { let inputSourcesByShortName = {}; for (let i = 0; i < infosList.length; i++) { let is = new InputSource(infosList[i].type, - infosList[i].id, - infosList[i].displayName, - infosList[i].shortName, - i); + infosList[i].id, + infosList[i].displayName, + infosList[i].shortName, + i); is.connect('activate', this.activateInputSource.bind(this)); if (!(is.shortName in inputSourcesByShortName)) @@ -752,7 +752,7 @@ export class InputSourceManager extends Signals.EventEmitter { if (this._sourcesPerWindow && this._focusWindowNotifyId == 0) { this._focusWindowNotifyId = global.display.connect('notify::focus-window', - this._setPerWindowInputSource.bind(this)); + this._setPerWindowInputSource.bind(this)); Main.overview.connectObject( 'showing', this._setPerWindowInputSource.bind(this), 'hidden', this._setPerWindowInputSource.bind(this), this); @@ -1020,13 +1020,13 @@ class InputSourceIndicator extends PanelMenu.Button { if (group[j] == item) { item.setOrnament(PopupMenu.Ornament.DOT); item.prop.set_state(IBus.PropState.CHECKED); - ibusManager.activateProperty(item.prop.get_key(), - IBus.PropState.CHECKED); + ibusManager.activateProperty( + item.prop.get_key(), IBus.PropState.CHECKED); } else { group[j].setOrnament(PopupMenu.Ornament.NONE); group[j].prop.set_state(IBus.PropState.UNCHECKED); - ibusManager.activateProperty(group[j].prop.get_key(), - IBus.PropState.UNCHECKED); + ibusManager.activateProperty( + group[j].prop.get_key(), IBus.PropState.UNCHECKED); } } }); @@ -1038,12 +1038,12 @@ class InputSourceIndicator extends PanelMenu.Button { item.connect('toggled', () => { if (item.state) { item.prop.set_state(IBus.PropState.CHECKED); - ibusManager.activateProperty(item.prop.get_key(), - IBus.PropState.CHECKED); + ibusManager.activateProperty( + item.prop.get_key(), IBus.PropState.CHECKED); } else { item.prop.set_state(IBus.PropState.UNCHECKED); - ibusManager.activateProperty(item.prop.get_key(), - IBus.PropState.UNCHECKED); + ibusManager.activateProperty( + item.prop.get_key(), IBus.PropState.UNCHECKED); } }); break; @@ -1052,8 +1052,8 @@ class InputSourceIndicator extends PanelMenu.Button { item = new PopupMenu.PopupMenuItem(prop.get_label().get_text()); item.prop = prop; item.connect('activate', () => { - ibusManager.activateProperty(item.prop.get_key(), - item.prop.get_state()); + ibusManager.activateProperty( + item.prop.get_key(), item.prop.get_state()); }); break; diff --git a/js/ui/status/location.js b/js/ui/status/location.js index 020feb4f8..c9553f8c1 100644 --- a/js/ui/status/location.js +++ b/js/ui/status/location.js @@ -87,10 +87,10 @@ const GeoclueAgent = GObject.registerClass({ this.connect('notify::enabled', this._onMaxAccuracyLevelChanged.bind(this)); this._watchId = Gio.bus_watch_name(Gio.BusType.SYSTEM, - 'org.freedesktop.GeoClue2', - 0, - this._connectToGeoclue.bind(this), - this._onGeoclueVanished.bind(this)); + 'org.freedesktop.GeoClue2', + 0, + this._connectToGeoclue.bind(this), + this._onGeoclueVanished.bind(this)); this._onMaxAccuracyLevelChanged(); this._connectToGeoclue(); this._connectToPermissionStore(); @@ -140,9 +140,9 @@ const GeoclueAgent = GObject.registerClass({ this._connecting = true; new GeoclueManager(Gio.DBus.system, - 'org.freedesktop.GeoClue2', - '/org/freedesktop/GeoClue2/Manager', - this._onManagerProxyReady.bind(this)); + 'org.freedesktop.GeoClue2', + '/org/freedesktop/GeoClue2/Manager', + this._onManagerProxyReady.bind(this)); return true; } diff --git a/js/ui/status/thunderbolt.js b/js/ui/status/thunderbolt.js index 218ff58dd..0005339d0 100644 --- a/js/ui/status/thunderbolt.js +++ b/js/ui/status/thunderbolt.js @@ -97,9 +97,7 @@ class Client extends Signals.EventEmitter { _onDeviceAdded(proxy, emitter, params) { let [path] = params; - let device = new BoltDeviceProxy(Gio.DBus.system, - BOLT_DBUS_NAME, - path); + let device = new BoltDeviceProxy(Gio.DBus.system, BOLT_DBUS_NAME, path); this.emit('device-added', device); } @@ -187,7 +185,7 @@ class AuthRobot extends Signals.EventEmitter { this._enrolling = true; GLib.idle_add(GLib.PRIORITY_DEFAULT, - this._enrollDevicesIdle.bind(this)); + this._enrollDevicesIdle.bind(this)); } async _enrollDevicesIdle() { @@ -259,7 +257,7 @@ class Indicator extends SystemIndicator { _ensureSource() { if (!this._source) { this._source = new MessageTray.Source(_('Thunderbolt'), - 'thunderbolt-symbolic'); + 'thunderbolt-symbolic'); this._source.connect('destroy', () => (this._source = null)); Main.messageTray.add(this._source); diff --git a/js/ui/userWidget.js b/js/ui/userWidget.js index c050ce1b2..a606e70be 100644 --- a/js/ui/userWidget.js +++ b/js/ui/userWidget.js @@ -190,8 +190,9 @@ class UserWidget extends St.BoxLayout { this._label = new UserWidgetLabel(user); this.add_child(this._label); - this._label.bind_property('label-actor', this, 'label-actor', - GObject.BindingFlags.SYNC_CREATE); + this._label.bind_property('label-actor', + this, 'label-actor', + GObject.BindingFlags.SYNC_CREATE); this._user.connectObject( 'notify::is-loaded', this._updateUser.bind(this), diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 579577082..30da3002c 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -196,17 +196,17 @@ class WorkspaceTracker { let workspaceManager = global.workspace_manager; workspaceManager.connect('notify::n-workspaces', - this._nWorkspacesChanged.bind(this)); + this._nWorkspacesChanged.bind(this)); workspaceManager.connect('workspaces-reordered', () => { this._workspaces.sort((a, b) => a.index() - b.index()); }); global.window_manager.connect('switch-workspace', - this._queueCheckWorkspaces.bind(this)); + this._queueCheckWorkspaces.bind(this)); global.display.connect('window-entered-monitor', - this._windowEnteredMonitor.bind(this)); + this._windowEnteredMonitor.bind(this)); global.display.connect('window-left-monitor', - this._windowLeftMonitor.bind(this)); + this._windowLeftMonitor.bind(this)); this._workspaceSettings = new Gio.Settings({schema_id: 'org.gnome.mutter'}); this._workspaceSettings.connect('changed::dynamic-workspaces', this._queueCheckWorkspaces.bind(this)); @@ -897,12 +897,12 @@ export class WindowManager { Main.osdWindowManager.show(monitorIndex, icon, label, null); }); - this._gsdWacomProxy = new GsdWacomProxy(Gio.DBus.session, GSD_WACOM_BUS_NAME, - GSD_WACOM_OBJECT_PATH, - (proxy, error) => { - if (error) - log(error.message); - }); + this._gsdWacomProxy = new GsdWacomProxy(Gio.DBus.session, + GSD_WACOM_BUS_NAME, GSD_WACOM_OBJECT_PATH, + (proxy, error) => { + if (error) + log(error.message); + }); global.display.connect('pad-mode-switch', (display, pad, _group, _mode) => { let labels = []; @@ -1243,8 +1243,9 @@ export class WindowManager { let [success, geom] = actor.meta_window.get_icon_geometry(); if (success) { actor.set_position(geom.x, geom.y); - actor.set_scale(geom.width / actor.width, - geom.height / actor.height); + actor.set_scale( + geom.width / actor.width, + geom.height / actor.height); } else { let monitor = Main.layoutManager.monitors[actor.meta_window.get_monitor()]; if (!monitor) { diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 6ffe9469e..28246fce6 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1350,7 +1350,7 @@ class Workspace extends St.Widget { let clone = new WindowPreview(metaWindow, this, this._overviewAdjustment); clone.connect('selected', - this._onCloneSelected.bind(this)); + this._onCloneSelected.bind(this)); clone.connect('drag-begin', () => { Main.overview.beginWindowDrag(metaWindow); }); diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index de1a0ae5e..206ef5dee 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -904,7 +904,7 @@ export const ThumbnailsBox = GObject.registerClass({ // workspace while we wait for the startup sequence to load. let workspaceManager = global.workspace_manager; Main.wm.keepWorkspaceAlive(workspaceManager.get_workspace_by_index(newWorkspaceIndex), - WORKSPACE_KEEP_ALIVE_TIME); + WORKSPACE_KEEP_ALIVE_TIME); } // Start the animation on the workspace (which is actually @@ -998,8 +998,9 @@ export const ThumbnailsBox = GObject.registerClass({ for (let k = start; k < start + count; k++) { let metaWorkspace = workspaceManager.get_workspace_by_index(k); let thumbnail = new WorkspaceThumbnail(metaWorkspace, this._monitorIndex); - thumbnail.setPorthole(this._porthole.x, this._porthole.y, - this._porthole.width, this._porthole.height); + thumbnail.setPorthole( + this._porthole.x, this._porthole.y, + this._porthole.width, this._porthole.height); this._thumbnails.push(thumbnail); this.add_actor(thumbnail); diff --git a/js/ui/xdndHandler.js b/js/ui/xdndHandler.js index a14ee5bcf..70317e100 100644 --- a/js/ui/xdndHandler.js +++ b/js/ui/xdndHandler.js @@ -102,10 +102,10 @@ export class XdndHandler extends Signals.EventEmitter { if (pickedActor._delegate && pickedActor._delegate.handleDragOver) { let [r_, targX, targY] = pickedActor.transform_stage_point(x, y); let result = pickedActor._delegate.handleDragOver(this, - dragEvent.dragActor, - targX, - targY, - global.get_current_time()); + dragEvent.dragActor, + targX, + targY, + global.get_current_time()); if (result != DND.DragMotionResult.CONTINUE) return; } diff --git a/lint/eslintrc-legacy.yml b/lint/eslintrc-legacy.yml index dc8e9926e..afa9ac7d8 100644 --- a/lint/eslintrc-legacy.yml +++ b/lint/eslintrc-legacy.yml @@ -1,12 +1,5 @@ rules: eqeqeq: off - indent: - - error - - 4 - - ignoredNodes: - - 'CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child' - CallExpression: - arguments: first jsdoc/check-alignment: off jsdoc/check-param-names: off jsdoc/check-tag-names: off