mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
move all imports to the top
This commit is contained in:
@@ -31,14 +31,10 @@ import * as Signals from 'resource:///org/gnome/shell/misc/signals.js';
|
||||
import Meta from 'gi://Meta';
|
||||
import Shell from 'gi://Shell';
|
||||
import St from 'gi://St';
|
||||
const Mainloop = imports.mainloop;
|
||||
|
||||
import * as Config from 'resource:///org/gnome/shell/misc/config.js';
|
||||
import * as AppDisplay from 'resource:///org/gnome/shell/ui/appDisplay.js';
|
||||
import * as AppMenu from 'resource:///org/gnome/shell/ui/appMenu.js';
|
||||
if (Config.PACKAGE_VERSION < '42') {
|
||||
const AppMenu = imports.ui.appDisplay;
|
||||
}
|
||||
import * as AppFavorites from 'resource:///org/gnome/shell/ui/appFavorites.js';
|
||||
import * as Dash from 'resource:///org/gnome/shell/ui/dash.js';
|
||||
import * as DND from 'resource:///org/gnome/shell/ui/dnd.js';
|
||||
@@ -56,6 +52,8 @@ import * as Taskbar from './taskbar.js';
|
||||
import * as Progress from './progress.js';
|
||||
const _ = imports.gettext.domain(Utils.TRANSLATION_DOMAIN).gettext;
|
||||
|
||||
const Mainloop = imports.mainloop;
|
||||
|
||||
//timeout names
|
||||
const T2 = 'mouseScrollTimeout';
|
||||
const T3 = 'showDotsTimeout';
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
import GLib from 'gi://GLib';
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
|
||||
import * as ExtensionUtils from 'resource:///org/gnome/shell/misc/extensionUtils.js';;
|
||||
import * as ExtensionUtils from 'resource:///org/gnome/shell/misc/extensionUtils.js';
|
||||
|
||||
const IDENTIFIER_UUID = "130cbc66-235c-4bd6-8571-98d2d8bba5e2";
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ import Shell from 'gi://Shell';
|
||||
import St from 'gi://St';
|
||||
import * as WindowManager from 'resource:///org/gnome/shell/ui/windowManager.js';
|
||||
import * as ExtensionUtils from 'resource:///org/gnome/shell/misc/extensionUtils.js';;
|
||||
const Mainloop = imports.mainloop;
|
||||
import * as Signals from 'resource:///org/gnome/shell/misc/signals.js';
|
||||
|
||||
import * as PanelManager from './panelManager.js';
|
||||
@@ -35,6 +34,8 @@ import * as AppIcons from './appIcons.js';
|
||||
|
||||
import {Extension, gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js';
|
||||
|
||||
const Mainloop = imports.mainloop;
|
||||
|
||||
const UBUNTU_DOCK_UUID = 'ubuntu-dock@ubuntu.com';
|
||||
|
||||
let panelManager;
|
||||
|
||||
7
panel.js
7
panel.js
@@ -31,7 +31,6 @@ import Clutter from 'gi://Clutter';
|
||||
import * as Config from 'resource:///org/gnome/shell/misc/config.js';
|
||||
import Gtk from 'gi://Gtk';
|
||||
import GObject from 'gi://GObject';
|
||||
const Gi = imports._gi;
|
||||
import * as AppIcons from './appIcons.js';
|
||||
import * as Utils from './utils.js';
|
||||
import * as Taskbar from './taskbar.js';
|
||||
@@ -40,7 +39,6 @@ import * as Pos from './panelPositions.js';
|
||||
import * as PanelSettings from './panelSettings.js';
|
||||
import * as PanelStyle from './panelStyle.js';
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
const Mainloop = imports.mainloop;
|
||||
import * as Dash from 'resource:///org/gnome/shell/ui/dash.js';
|
||||
import * as CtrlAltTab from 'resource:///org/gnome/shell/ui/ctrlAltTab.js';
|
||||
import * as GSPanel from 'resource:///org/gnome/shell/ui/panel.js';
|
||||
@@ -54,13 +52,16 @@ import Shell from 'gi://Shell';
|
||||
import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js';
|
||||
import * as IconGrid from 'resource:///org/gnome/shell/ui/iconGrid.js';
|
||||
import * as DateMenu from 'resource:///org/gnome/shell/ui/dateMenu.js';
|
||||
import * as Volume from 'resource:///org/gnome/shell/ui/volume.js';
|
||||
import * as Volume from 'resource:///org/gnome/shell/ui/status/volume.js';
|
||||
import * as Progress from './progress.js';
|
||||
|
||||
import * as Intellihide from './intellihide.js';
|
||||
import * as Transparency from './transparency.js';
|
||||
const _ = imports.gettext.domain(Me.imports.utils.TRANSLATION_DOMAIN).gettext;
|
||||
|
||||
const Mainloop = imports.mainloop;
|
||||
const Gi = imports._gi;
|
||||
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
var panelBoxes = ['_leftBox', '_centerBox', '_rightBox'];
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ import * as Taskbar from './taskbar.js';
|
||||
import * as Utils from './utils.js';
|
||||
import * as DesktopIconsIntegration from './desktopIconsIntegration.js';
|
||||
|
||||
const Gi = imports._gi;
|
||||
import GLib from 'gi://GLib';
|
||||
import GObject from 'gi://GObject';
|
||||
import Clutter from 'gi://Clutter';
|
||||
@@ -55,6 +54,8 @@ import * as Layout from 'resource:///org/gnome/shell/ui/layout.js';
|
||||
import * as WM from 'resource:///org/gnome/shell/ui/windowManager.js';
|
||||
import { SecondaryMonitorDisplay, WorkspacesView } from 'resource:///org/gnome/shell/ui/workspacesView.js';
|
||||
|
||||
const Gi = imports._gi;
|
||||
|
||||
var PanelManager = class {
|
||||
|
||||
constructor() {
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
import * as ExtensionUtils from 'resource:///org/gnome/shell/misc/extensionUtils.js';;
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
const Mainloop = imports.mainloop;
|
||||
import St from 'gi://St';
|
||||
import Shell from 'gi://Shell';
|
||||
|
||||
@@ -31,6 +30,8 @@ import * as Panel from './panel.js';
|
||||
import * as Taskbar from './taskbar.js';
|
||||
import * as Utils from './utils.js';
|
||||
|
||||
const Mainloop = imports.mainloop;
|
||||
|
||||
var PanelStyle = class {
|
||||
|
||||
enable(panel) {
|
||||
|
||||
@@ -20,13 +20,14 @@
|
||||
*/
|
||||
|
||||
import Gio from 'gi://Gio';
|
||||
const Cairo = imports.cairo;
|
||||
import Clutter from 'gi://Clutter';
|
||||
import Pango from 'gi://Pango';
|
||||
import St from 'gi://St';
|
||||
import * as Signals from 'resource:///org/gnome/shell/misc/signals.js';
|
||||
import * as Utils from './utils.js';
|
||||
|
||||
const Cairo = imports.cairo;
|
||||
|
||||
|
||||
var ProgressManager = class {
|
||||
|
||||
|
||||
@@ -31,10 +31,7 @@ import * as Signals from 'resource:///org/gnome/shell/misc/signals.js';
|
||||
import Meta from 'gi://Meta';
|
||||
import Shell from 'gi://Shell';
|
||||
import St from 'gi://St';
|
||||
const Mainloop = imports.mainloop;
|
||||
|
||||
const SearchController = imports.ui.main.overview._overview._controls._searchController;
|
||||
const AppDisplay = imports.ui.main.overview._overview._controls.appDisplay;
|
||||
import * as AppFavorites from 'resource:///org/gnome/shell/ui/appFavorites.js';
|
||||
import * as Dash from 'resource:///org/gnome/shell/ui/dash.js';
|
||||
import * as DND from 'resource:///org/gnome/shell/ui/dnd.js';
|
||||
@@ -51,6 +48,11 @@ import * as Pos from './panelPositions.js';
|
||||
import * as Utils from './utils.js';
|
||||
import * as WindowPreview from './windowPreview.js';
|
||||
|
||||
const Mainloop = imports.mainloop;
|
||||
|
||||
const SearchController = imports.ui.main.overview._overview._controls._searchController;
|
||||
const AppDisplay = imports.ui.main.overview._overview._controls.appDisplay;
|
||||
|
||||
var DASH_ANIMATION_TIME = Dash.DASH_ANIMATION_TIME / (Dash.DASH_ANIMATION_TIME > 1 ? 1000 : 1);
|
||||
var DASH_ITEM_HOVER_TIMEOUT = Dash.DASH_ITEM_HOVER_TIMEOUT;
|
||||
var MIN_ICON_SIZE = 4;
|
||||
|
||||
5
utils.js
5
utils.js
@@ -23,19 +23,20 @@
|
||||
|
||||
import Clutter from 'gi://Clutter';
|
||||
import GdkPixbuf from 'gi://GdkPixbuf';
|
||||
const Gi = imports._gi;
|
||||
import Gio from 'gi://Gio';
|
||||
import GLib from 'gi://GLib';
|
||||
import Gtk from 'gi://Gtk';
|
||||
import Meta from 'gi://Meta';
|
||||
import Shell from 'gi://Shell';
|
||||
import St from 'gi://St';
|
||||
const Mainloop = imports.mainloop;
|
||||
import * as Config from 'resource:///org/gnome/shell/misc/config.js';
|
||||
import * as Util from 'resource:///org/gnome/shell/misc/util.js';
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
import * as MessageTray from 'resource:///org/gnome/shell/ui/messageTray.js';
|
||||
|
||||
const Gi = imports._gi;
|
||||
const Mainloop = imports.mainloop;
|
||||
|
||||
var TRANSLATION_DOMAIN = imports.misc.extensionUtils.getCurrentExtension().metadata['gettext-domain'];
|
||||
var SCROLL_TIME = Util.SCROLL_TIME / (Util.SCROLL_TIME > 1 ? 1000 : 1);
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import GLib from 'gi://GLib';
|
||||
import Graphene from 'gi://Graphene';
|
||||
import Gtk from 'gi://Gtk';
|
||||
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
|
||||
const Mainloop = imports.mainloop;
|
||||
import Meta from 'gi://Meta';
|
||||
import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js';
|
||||
import * as Signals from 'resource:///org/gnome/shell/misc/signals.js';
|
||||
@@ -33,6 +32,8 @@ import * as Panel from './panel.js';
|
||||
import * as Taskbar from './taskbar.js';
|
||||
import * as Utils from './utils.js';
|
||||
|
||||
const Mainloop = imports.mainloop;
|
||||
|
||||
//timeout intervals
|
||||
const ENSURE_VISIBLE_MS = 200;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user