[gnome-shell-extensions/wip/fmuellner/fix-auto-move: 2/4] auto-move-windows: Minor style cleanups
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/wip/fmuellner/fix-auto-move: 2/4] auto-move-windows: Minor style cleanups
- Date: Fri, 22 Dec 2017 19:56:14 +0000 (UTC)
commit 62a92047e891eac0b474fb16127abaf7c45c15f4
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Dec 22 01:58:12 2017 +0100
auto-move-windows: Minor style cleanups
Use camelCase for variable names, call the first index variable 'i'
instead of 'j', and fix some whitespace errors.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/33
extensions/auto-move-windows/extension.js | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/extensions/auto-move-windows/extension.js b/extensions/auto-move-windows/extension.js
index 0b7445f..8ec9714 100644
--- a/extensions/auto-move-windows/extension.js
+++ b/extensions/auto-move-windows/extension.js
@@ -36,8 +36,8 @@ class WindowMover {
}
_ensureAtLeastWorkspaces(num, window) {
- for (let j = global.screen.n_workspaces; j <= num; j++) {
- window.change_workspace_by_index(j-1, false);
+ for (let i = global.screen.n_workspaces; i <= num; i++) {
+ window.change_workspace_by_index(i - 1, false);
global.screen.append_new_workspace(false, 0);
}
}
@@ -61,16 +61,16 @@ class WindowMover {
return;
}
let app_id = app.get_id();
- for ( let j = 0 ; j < spaces.length; j++ ) {
- let apps_to_space = spaces[j].split(":");
+ for (let i = 0; i < spaces.length; i++) {
+ let appsToSpace = spaces[i].split(":");
// Match application id
- if (apps_to_space[0] == app_id) {
- let workspace_num = parseInt(apps_to_space[1]) - 1;
+ if (appsToSpace[0] == app_id) {
+ let workspaceNum = parseInt(appsToSpace[1]) - 1;
- if (workspace_num >= global.screen.n_workspaces)
+ if (workspaceNum >= global.screen.n_workspaces)
this._ensureAtLeastWorkspaces(workspace_num, window);
- window.change_workspace_by_index(workspace_num, false);
+ window.change_workspace_by_index(workspaceNum, false);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]