[gnome-shell-extensions] cleanup: Re-order imports
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] cleanup: Re-order imports
- Date: Fri, 28 Jun 2019 19:55:07 +0000 (UTC)
commit 2db4589dea3a5efe905c69401ec43c79e8429ec0
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jun 28 21:33:24 2019 +0200
cleanup: Re-order imports
They should be grouped between external (GI/gjs) and shell and in
alphabetical order. Until commit bab4be1a ExtensionUtils was special
as it was required for some imports, but that's no longer the case
for most extensions.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/76
extensions/apps-menu/extension.js | 6 +++---
extensions/auto-move-windows/extension.js | 3 +--
extensions/drive-menu/extension.js | 3 +--
extensions/native-window-placement/extension.js | 3 +--
extensions/places-menu/extension.js | 2 +-
extensions/screenshot-window-sizer/extension.js | 3 +--
extensions/user-theme/extension.js | 4 ++--
extensions/window-list/extension.js | 2 +-
extensions/workspace-indicator/extension.js | 7 +++----
9 files changed, 14 insertions(+), 19 deletions(-)
---
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index 6828ebc..685e885 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -4,17 +4,17 @@
const {
Atk, Clutter, Gio, GLib, GMenu, GObject, Gtk, Meta, Shell, St
} = imports.gi;
+const Signals = imports.signals;
+
const DND = imports.ui.dnd;
+const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
-const Signals = imports.signals;
const Gettext = imports.gettext.domain('gnome-shell-extensions');
const _ = Gettext.gettext;
-const ExtensionUtils = imports.misc.extensionUtils;
-
const appSys = Shell.AppSystem.get_default();
const APPLICATION_ICON_SIZE = 32;
diff --git a/extensions/auto-move-windows/extension.js b/extensions/auto-move-windows/extension.js
index 07de008..aec7bc3 100644
--- a/extensions/auto-move-windows/extension.js
+++ b/extensions/auto-move-windows/extension.js
@@ -4,9 +4,8 @@
const Shell = imports.gi.Shell;
-const Main = imports.ui.main;
-
const ExtensionUtils = imports.misc.extensionUtils;
+const Main = imports.ui.main;
class WindowMover {
constructor() {
diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js
index 41e30a3..3b17f56 100644
--- a/extensions/drive-menu/extension.js
+++ b/extensions/drive-menu/extension.js
@@ -5,13 +5,12 @@ const { Gio, GObject, Shell, St } = imports.gi;
const Gettext = imports.gettext.domain('gnome-shell-extensions');
const _ = Gettext.gettext;
+const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const ShellMountOperation = imports.ui.shellMountOperation;
-const ExtensionUtils = imports.misc.extensionUtils;
-
var MountMenuItem = GObject.registerClass(
class MountMenuItem extends PopupMenu.PopupBaseMenuItem {
_init(mount) {
diff --git a/extensions/native-window-placement/extension.js b/extensions/native-window-placement/extension.js
index 608c1f6..04ad250 100644
--- a/extensions/native-window-placement/extension.js
+++ b/extensions/native-window-placement/extension.js
@@ -1,8 +1,7 @@
// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
/* exported enable disable */
-const Workspace = imports.ui.workspace;
-
const ExtensionUtils = imports.misc.extensionUtils;
+const Workspace = imports.ui.workspace;
// testing settings for natural window placement strategy:
const WINDOW_PLACEMENT_NATURAL_ACCURACY = 20; // accuracy of window translate moves
(KDE-default: 20)
diff --git a/extensions/places-menu/extension.js b/extensions/places-menu/extension.js
index 00aa04d..76be829 100644
--- a/extensions/places-menu/extension.js
+++ b/extensions/places-menu/extension.js
@@ -3,6 +3,7 @@
const { Clutter, GObject, St } = imports.gi;
+const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
@@ -11,7 +12,6 @@ const Gettext = imports.gettext.domain('gnome-shell-extensions');
const _ = Gettext.gettext;
const N_ = x => x;
-const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const PlaceDisplay = Me.imports.placeDisplay;
diff --git a/extensions/screenshot-window-sizer/extension.js b/extensions/screenshot-window-sizer/extension.js
index 4d21212..2644ea3 100644
--- a/extensions/screenshot-window-sizer/extension.js
+++ b/extensions/screenshot-window-sizer/extension.js
@@ -21,11 +21,10 @@
const { Meta, Shell, St } = imports.gi;
+const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
-const ExtensionUtils = imports.misc.extensionUtils;
-
const MESSAGE_FADE_TIME = 2;
let text;
diff --git a/extensions/user-theme/extension.js b/extensions/user-theme/extension.js
index d00c077..0c31684 100644
--- a/extensions/user-theme/extension.js
+++ b/extensions/user-theme/extension.js
@@ -3,12 +3,12 @@
/* exported init */
const { Gio, GLib } = imports.gi;
+
+const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
const SETTINGS_KEY = 'name';
-const ExtensionUtils = imports.misc.extensionUtils;
-
class ThemeManager {
constructor() {
this._settings = ExtensionUtils.getSettings();
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 738da21..8a1d956 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -2,11 +2,11 @@
const { Clutter, Gio, GLib, GObject, Gtk, Meta, Shell, St } = imports.gi;
const DND = imports.ui.dnd;
+const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
-const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Gettext = imports.gettext.domain('gnome-shell-extensions');
diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js
index 7c81cd4..2c92a4d 100644
--- a/extensions/workspace-indicator/extension.js
+++ b/extensions/workspace-indicator/extension.js
@@ -2,16 +2,15 @@
/* exported init enable disable */
const { Clutter, Gio, GObject, Meta, St } = imports.gi;
+
+const ExtensionUtils = imports.misc.extensionUtils;
+const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Gettext = imports.gettext.domain('gnome-shell-extensions');
const _ = Gettext.gettext;
-const Main = imports.ui.main;
-
-const ExtensionUtils = imports.misc.extensionUtils;
-
const WORKSPACE_SCHEMA = 'org.gnome.desktop.wm.preferences';
const WORKSPACE_KEY = 'workspace-names';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]