From d7414025a5e0ce56df80c43ba596ecbdd8ab93bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 27 Jan 2019 22:11:14 +0100 Subject: [PATCH] cleanup: Remove unused variables Spotted by eslint. https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/49 --- extensions/native-window-placement/extension.js | 9 --------- extensions/screenshot-window-sizer/extension.js | 2 +- extensions/workspace-indicator/extension.js | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/extensions/native-window-placement/extension.js b/extensions/native-window-placement/extension.js index bf0a4827..5c6c9d83 100644 --- a/extensions/native-window-placement/extension.js +++ b/extensions/native-window-placement/extension.js @@ -6,8 +6,6 @@ const Me = ExtensionUtils.getCurrentExtension(); const Convenience = Me.imports.convenience; // testing settings for natural window placement strategy: -const WINDOW_PLACEMENT_NATURAL_FILLGAPS = true; // enlarge windows at the end to fill gaps // not implemented yet -const WINDOW_PLACEMENT_NATURAL_GRID_FALLBACK = true; // fallback to grid mode if all windows have the same size and positions. // not implemented yet const WINDOW_PLACEMENT_NATURAL_ACCURACY = 20; // accuracy of window translate moves (KDE-default: 20) const WINDOW_PLACEMENT_NATURAL_GAPS = 5; // half of the minimum gap between windows const WINDOW_PLACEMENT_NATURAL_MAX_TRANSLATIONS = 5000; // safety limit for preventing endless loop if something is wrong in the algorithm @@ -222,14 +220,7 @@ class NaturalLayoutStrategy extends Workspace.LayoutStrategy { rects[i].translate(-bounds.x, -bounds.y); } - // TODO: Implement the KDE part "Try to fill the gaps by enlarging windows if they have the space" here. (If this is wanted) - // rescale to workspace - let scales = []; - - let buttonOuterHeight, captionHeight; - let buttonOuterWidth = 0; - let slots = []; for (let i = 0; i < rects.length; i++) { rects[i].x = rects[i].x * scale + area_rect.x; diff --git a/extensions/screenshot-window-sizer/extension.js b/extensions/screenshot-window-sizer/extension.js index ae76b49e..5aa6b1d8 100644 --- a/extensions/screenshot-window-sizer/extension.js +++ b/extensions/screenshot-window-sizer/extension.js @@ -31,7 +31,7 @@ const Convenience = Me.imports.convenience; const MESSAGE_FADE_TIME = 2; -let text, button; +let text; function hideMessage() { text.destroy(); diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js index 00025355..f7288fb9 100644 --- a/extensions/workspace-indicator/extension.js +++ b/extensions/workspace-indicator/extension.js @@ -98,7 +98,6 @@ class WorkspaceIndicator extends PanelMenu.Button { this._workspaceSection.addMenuItem(this.workspacesItems[i]); this.workspacesItems[i].workspaceId = i; this.workspacesItems[i].label_actor = this.statusLabel; - let self = this; this.workspacesItems[i].connect('activate', (actor, event) => { this._activate(actor.workspaceId); });