From fdc3dda484b0c39f52ec3feba185bfcde09e8e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 7 Aug 2019 03:40:34 +0200 Subject: [PATCH] cleanup: Fix stray/missing spaces Those are wrong according to our style guidelines, but the previous eslint ruleset didn't catch them. https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/91 --- extensions/apps-menu/extension.js | 8 ++++---- extensions/drive-menu/extension.js | 2 +- extensions/horizontal-workspaces/extension.js | 2 +- extensions/launch-new-instance/extension.js | 2 +- extensions/native-window-placement/extension.js | 6 +++--- extensions/window-list/extension.js | 2 +- extensions/workspace-indicator/prefs.js | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js index 1d586aaf..e2c9a9c3 100644 --- a/extensions/apps-menu/extension.js +++ b/extensions/apps-menu/extension.js @@ -377,10 +377,10 @@ class ApplicationsButton extends PanelMenu.Button { this.label_actor = this._label; this._showingId = Main.overview.connect('showing', () => { - this.add_accessible_state (Atk.StateType.CHECKED); + this.add_accessible_state(Atk.StateType.CHECKED); }); this._hidingId = Main.overview.connect('hiding', () => { - this.remove_accessible_state (Atk.StateType.CHECKED); + this.remove_accessible_state(Atk.StateType.CHECKED); }); Main.layoutManager.connect('startup-complete', this._setKeybinding.bind(this)); @@ -610,7 +610,7 @@ class ApplicationsButton extends PanelMenu.Button { this.mainBox.style = 'width: 35em;'; this.mainBox.hide(); - //Load categories + // Load categories this.applicationsByCategory = {}; this._tree.load_sync(); let root = this._tree.get_root_directory(); @@ -635,7 +635,7 @@ class ApplicationsButton extends PanelMenu.Button { } } - //Load applications + // Load applications this._displayButtons(this._listApplications(null)); let themeContext = St.ThemeContext.get_for_stage(global.stage); diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js index 40b44774..9bb30d21 100644 --- a/extensions/drive-menu/extension.js +++ b/extensions/drive-menu/extension.js @@ -173,7 +173,7 @@ class DriveMenu extends PanelMenu.Button { return; } } - log ('Removing a mount that was never added to the menu'); + log('Removing a mount that was never added to the menu'); } _onDestroy() { diff --git a/extensions/horizontal-workspaces/extension.js b/extensions/horizontal-workspaces/extension.js index b5f04355..3f984b5a 100644 --- a/extensions/horizontal-workspaces/extension.js +++ b/extensions/horizontal-workspaces/extension.js @@ -16,7 +16,7 @@ class Extension { 1, -1); - ThumbnailsBox.prototype._updateSwitcherVisibility = function() { + ThumbnailsBox.prototype._updateSwitcherVisibility = function () { this.hide(); }; } diff --git a/extensions/launch-new-instance/extension.js b/extensions/launch-new-instance/extension.js index 7df9bb9f..12a8df28 100644 --- a/extensions/launch-new-instance/extension.js +++ b/extensions/launch-new-instance/extension.js @@ -5,7 +5,7 @@ let _activateOriginal = null; function enable() { _activateOriginal = AppDisplay.AppIcon.prototype.activate; - AppDisplay.AppIcon.prototype.activate = function() { + AppDisplay.AppIcon.prototype.activate = function () { _activateOriginal.call(this, 2); }; } diff --git a/extensions/native-window-placement/extension.js b/extensions/native-window-placement/extension.js index 62cb3f8c..8d39d0f9 100644 --- a/extensions/native-window-placement/extension.js +++ b/extensions/native-window-placement/extension.js @@ -128,7 +128,7 @@ class NaturalLayoutStrategy extends Workspace.LayoutStrategy { if (diff[0] == 0 && diff[1] == 0) diff[0] = 1; // Try to keep screen/workspace aspect ratio - if ( bounds.height / bounds.width > areaRect.height / areaRect.width ) + if (bounds.height / bounds.width > areaRect.height / areaRect.width) diff[0] *= 2; else diff[1] *= 2; @@ -242,7 +242,7 @@ function enable() { let settings = ExtensionUtils.getSettings(); workspaceInjections['_getBestLayout'] = Workspace.Workspace.prototype._getBestLayout; - Workspace.Workspace.prototype._getBestLayout = function(windows) { + Workspace.Workspace.prototype._getBestLayout = function (windows) { let strategy = new NaturalLayoutStrategy(settings); let layout = { strategy }; strategy.computeLayout(windows, layout); @@ -252,7 +252,7 @@ function enable() { // position window titles on top of windows in overlay winInjections['relayout'] = Workspace.WindowOverlay.prototype.relayout; - Workspace.WindowOverlay.prototype.relayout = function(animate) { + Workspace.WindowOverlay.prototype.relayout = function (animate) { if (settings.get_boolean('window-captions-on-top')) { let [, , , cloneHeight] = this._windowClone.slot; this.title.translation_y = -cloneHeight; diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index f7f64d03..11ebaf5f 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -1060,7 +1060,7 @@ const WindowList = GObject.registerClass({ _removeActivateTimeout() { if (this._dndTimeoutId) - GLib.source_remove (this._dndTimeoutId); + GLib.source_remove(this._dndTimeoutId); this._dndTimeoutId = 0; this._dndWindow = null; } diff --git a/extensions/workspace-indicator/prefs.js b/extensions/workspace-indicator/prefs.js index cf23621c..b97b88a1 100644 --- a/extensions/workspace-indicator/prefs.js +++ b/extensions/workspace-indicator/prefs.js @@ -51,7 +51,7 @@ class WorkspaceNameModel extends Gtk.ListStore { while (ok) ok = this.remove(iter); - for ( ; i < newNames.length; i++) { + for (; i < newNames.length; i++) { iter = this.append(); this.set(iter, [this.Columns.LABEL], [newNames[i]]); }