[gnome-shell-extensions/wip/fmuellner/cleanups: 9/13] style: Fix stray/missing spaces
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/wip/fmuellner/cleanups: 9/13] style: Fix stray/missing spaces
- Date: Mon, 28 Jan 2019 04:15:33 +0000 (UTC)
commit a4157f0e472626f4f0bd366261ddcc4638b9851c
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Jan 26 19:51:38 2019 +0100
style: Fix stray/missing spaces
Spotted by eslint.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49
extensions/apps-menu/extension.js | 6 +++---
extensions/auto-move-windows/prefs.js | 4 ++--
extensions/drive-menu/extension.js | 2 +-
extensions/native-window-placement/extension.js | 2 +-
extensions/places-menu/extension.js | 2 +-
extensions/places-menu/placeDisplay.js | 16 ++++++++--------
extensions/window-list/extension.js | 8 ++++----
extensions/windowsNavigator/extension.js | 14 +++++++-------
extensions/workspace-indicator/extension.js | 6 +++---
extensions/workspace-indicator/prefs.js | 2 +-
10 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index 3db70d8..d5369aa 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -521,7 +521,7 @@ class ApplicationsButton extends PanelMenu.Button {
let [width, height] = area.get_surface_size();
let stippleColor = themeNode.get_color('-stipple-color');
let stippleWidth = themeNode.get_length('-stipple-width');
- let x = Math.floor(width/2) + 0.5;
+ let x = Math.floor(width / 2) + 0.5;
cr.moveTo(x, 0);
cr.lineTo(x, height);
Clutter.cairo_set_source_color(cr, stippleColor);
@@ -649,14 +649,14 @@ class ApplicationsButton extends PanelMenu.Button {
this.categoriesScrollBox.add_actor(this.categoriesBox);
this.mainBox.add(this.leftBox);
- this.mainBox.add(this._createVertSeparator(), { expand: false, x_fill: false, y_fill: true});
+ this.mainBox.add(this._createVertSeparator(), { expand: false, x_fill: false, y_fill: true });
this.mainBox.add(this.applicationsScrollBox, { expand: true, x_fill: true, y_fill: true });
section.actor.add_actor(this.mainBox);
}
_display() {
this._applicationsButtons.clear();
- this.mainBox.style=('width: 35em;');
+ this.mainBox.style = 'width: 35em;';
this.mainBox.hide();
//Load categories
diff --git a/extensions/auto-move-windows/prefs.js b/extensions/auto-move-windows/prefs.js
index f163a19..56f50e7 100644
--- a/extensions/auto-move-windows/prefs.js
+++ b/extensions/auto-move-windows/prefs.js
@@ -40,7 +40,7 @@ const Widget = GObject.registerClass({
this._store.set_column_types([Gio.AppInfo, GObject.TYPE_STRING, Gio.Icon, GObject.TYPE_INT,
Gtk.Adjustment]);
- let scrolled = new Gtk.ScrolledWindow({ shadow_type: Gtk.ShadowType.IN});
+ let scrolled = new Gtk.ScrolledWindow({ shadow_type: Gtk.ShadowType.IN });
scrolled.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC);
this.add(scrolled);
@@ -192,7 +192,7 @@ const Widget = GObject.registerClass({
this._store.clear();
let currentItems = this._settings.get_strv(SETTINGS_KEY);
- let validItems = [ ];
+ let validItems = [];
for (let i = 0; i < currentItems.length; i++) {
let [id, index] = currentItems[i].split(':');
let appInfo = Gio.DesktopAppInfo.new(id);
diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js
index e571392..ab9e740 100644
--- a/extensions/drive-menu/extension.js
+++ b/extensions/drive-menu/extension.js
@@ -135,7 +135,7 @@ class DriveMenu extends PanelMenu.Button {
this._updateMenuVisibility();
});
- this._mounts = [ ];
+ this._mounts = [];
this._monitor.get_mounts().forEach(this._addMount.bind(this));
diff --git a/extensions/native-window-placement/extension.js b/extensions/native-window-placement/extension.js
index 1aeccbf..7a4ea7d 100644
--- a/extensions/native-window-placement/extension.js
+++ b/extensions/native-window-placement/extension.js
@@ -188,7 +188,7 @@ class NaturalLayoutStrategy extends Workspace.LayoutStrategy {
diff[1] = bounds.y + bounds.height - i_center[1];
}
if (diff[0] != 0 || diff[1] != 0) {
- let length = Math.sqrt(diff[0]*diff[0] + diff[1]*diff[1]);
+ let length = Math.sqrt(diff[0] * diff[0] + diff[1] * diff[1]);
diff[0] *= WINDOW_PLACEMENT_NATURAL_ACCURACY / length / 2; // /2 to make
it less influencing than the normal center-move above
diff[1] *= WINDOW_PLACEMENT_NATURAL_ACCURACY / length / 2;
rects[i].translate(diff[0], diff[1]);
diff --git a/extensions/places-menu/extension.js b/extensions/places-menu/extension.js
index fc5e40d..e9e9914 100644
--- a/extensions/places-menu/extension.js
+++ b/extensions/places-menu/extension.js
@@ -88,7 +88,7 @@ class PlacesMenu extends PanelMenu.Button {
this._sections = { };
- for (let i=0; i < SECTIONS.length; i++) {
+ for (let i = 0; i < SECTIONS.length; i++) {
let id = SECTIONS[i];
this._sections[id] = new PopupMenu.PopupMenuSection();
this.placesManager.connect(id + '-updated', () => {
diff --git a/extensions/places-menu/placeDisplay.js b/extensions/places-menu/placeDisplay.js
index 2890ab3..133e778 100644
--- a/extensions/places-menu/placeDisplay.js
+++ b/extensions/places-menu/placeDisplay.js
@@ -386,13 +386,13 @@ var PlacesManager = class {
for (let i = 0; i < drives.length; i++) {
let volumes = drives[i].get_volumes();
- for(let j = 0; j < volumes.length; j++) {
+ for (let j = 0; j < volumes.length; j++) {
let identifier = volumes[j].get_identifier('class');
if (identifier && identifier.includes('network')) {
networkVolumes.push(volumes[j]);
} else {
let mount = volumes[j].get_mount();
- if(mount != null)
+ if (mount != null)
this._addMount('devices', mount);
}
}
@@ -400,8 +400,8 @@ var PlacesManager = class {
/* add all volumes that is not associated with a drive */
let volumes = this._volumeMonitor.get_volumes();
- for(let i = 0; i < volumes.length; i++) {
- if(volumes[i].get_drive() != null)
+ for (let i = 0; i < volumes.length; i++) {
+ if (volumes[i].get_drive() != null)
continue;
let identifier = volumes[i].get_identifier('class');
@@ -409,18 +409,18 @@ var PlacesManager = class {
networkVolumes.push(volumes[i]);
} else {
let mount = volumes[i].get_mount();
- if(mount != null)
+ if (mount != null)
this._addMount('devices', mount);
}
}
/* add mounts that have no volume (/etc/mtab mounts, ftp, sftp,...) */
let mounts = this._volumeMonitor.get_mounts();
- for(let i = 0; i < mounts.length; i++) {
- if(mounts[i].is_shadowed())
+ for (let i = 0; i < mounts.length; i++) {
+ if (mounts[i].is_shadowed())
continue;
- if(mounts[i].get_volume())
+ if (mounts[i].get_volume())
continue;
let root = mounts[i].get_default_location();
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index dcbf8c2..9fe9054 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -714,7 +714,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
this.workspacesItems = [];
this._currentWorkspace = workspaceManager.get_active_workspace().index();
- for(let i = 0; i < workspaceManager.n_workspaces; i++) {
+ for (let i = 0; i < workspaceManager.n_workspaces; i++) {
let name = Meta.prefs_get_workspace_name(i);
let item = new PopupMenu.PopupMenuItem(name);
item.workspaceId = i;
@@ -736,7 +736,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
_activate(index) {
let workspaceManager = global.workspace_manager;
- if(index >= 0 && index < workspaceManager.n_workspaces) {
+ if (index >= 0 && index < workspaceManager.n_workspaces) {
let metaWorkspace = workspaceManager.get_workspace_by_index(index);
metaWorkspace.activate(global.get_current_time());
}
@@ -772,7 +772,7 @@ class WindowList {
style_class: 'bottom-panel solid',
reactive: true,
track_hover: true,
- layout_manager: new Clutter.BinLayout()});
+ layout_manager: new Clutter.BinLayout() });
this.actor.connect('destroy', this._onDestroy.bind(this));
let box = new St.BoxLayout({ x_expand: true, y_expand: true });
@@ -904,7 +904,7 @@ class WindowList {
.filter(c => c.visible)
.map(a => a._delegate);
let active = children.findIndex(c => c.active);
- let newActive = Math.max(0, Math.min(active + diff, children.length-1));
+ let newActive = Math.max(0, Math.min(active + diff, children.length - 1));
children[newActive].activate();
}
diff --git a/extensions/windowsNavigator/extension.js b/extensions/windowsNavigator/extension.js
index 1af3f0b..b6d8911 100644
--- a/extensions/windowsNavigator/extension.js
+++ b/extensions/windowsNavigator/extension.js
@@ -21,11 +21,11 @@ function injectToFunction(parent, name, func) {
let winInjections, workspaceInjections, workViewInjections, createdActors, connectedSignals;
function resetState() {
- winInjections = { };
- workspaceInjections = { };
- workViewInjections = { };
- createdActors = [ ];
- connectedSignals = [ ];
+ winInjections = {};
+ workspaceInjections = {};
+ workViewInjections = {};
+ createdActors = [];
+ connectedSignals = [];
}
function enable() {
@@ -131,7 +131,7 @@ function enable() {
workViewInjections['_onKeyRelease'] = undefined;
WorkspacesView.WorkspacesView.prototype._onKeyPress = function(s, o) {
- if(Main.overview.viewSelector._activePage != Main.overview.viewSelector._workspacesPage)
+ if (Main.overview.viewSelector._activePage != Main.overview.viewSelector._workspacesPage)
return false;
let workspaceManager = global.workspace_manager;
@@ -255,7 +255,7 @@ function enable() {
workViewInjections['_onDestroy'] = injectToFunction(WorkspacesView.WorkspacesView.prototype,
'_onDestroy', function() {
global.stage.disconnect(this._keyPressEventId);
global.stage.disconnect(this._keyReleaseEventId);
- connectedSignals = [ ];
+ connectedSignals = [];
});
}
diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js
index 5f14c4e..bd36b77 100644
--- a/extensions/workspace-indicator/extension.js
+++ b/extensions/workspace-indicator/extension.js
@@ -78,7 +78,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
}
_labelText(workspaceIndex) {
- if(workspaceIndex == undefined) {
+ if (workspaceIndex == undefined) {
workspaceIndex = this._currentWorkspace;
return (workspaceIndex + 1).toString();
}
@@ -93,7 +93,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
this._currentWorkspace = workspaceManager.get_active_workspace().index();
let i = 0;
- for(; i < workspaceManager.n_workspaces; i++) {
+ for (; i < workspaceManager.n_workspaces; i++) {
this.workspacesItems[i] = new PopupMenu.PopupMenuItem(this._labelText(i));
this._workspaceSection.addMenuItem(this.workspacesItems[i]);
this.workspacesItems[i].workspaceId = i;
@@ -112,7 +112,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
_activate(index) {
let workspaceManager = global.workspace_manager;
- if(index >= 0 && index < workspaceManager.n_workspaces) {
+ if (index >= 0 && index < workspaceManager.n_workspaces) {
let metaWorkspace = workspaceManager.get_workspace_by_index(index);
metaWorkspace.activate(global.get_current_time());
}
diff --git a/extensions/workspace-indicator/prefs.js b/extensions/workspace-indicator/prefs.js
index 810f4ec..f5b33dc 100644
--- a/extensions/workspace-indicator/prefs.js
+++ b/extensions/workspace-indicator/prefs.js
@@ -114,7 +114,7 @@ class WorkspaceNameModel extends Gtk.ListStore {
names.splice(index, 1);
// compact the array
- for (let i = names.length -1; i >= 0 && !names[i]; i++)
+ for (let i = names.length - 1; i >= 0 && !names[i]; i++)
names.pop();
this._settings.set_strv(WORKSPACE_KEY, names);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]