// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- const Main = imports.ui.main; const ExtensionUtils = imports.misc.extensionUtils; const Me = ExtensionUtils.getCurrentExtension(); const Docking = Me.imports.docking; const ExtensionSystem = imports.ui.extensionSystem; // We declare this with var so it can be accessed by other extensions in // GNOME Shell 3.26+ (mozjs52+). var dockManager; let _extensionlistenerId; function init() { ExtensionUtils.initTranslations('dashtodock'); } function enable() { /* * Listen to enabled extension, if Dash to Dock is on the list or become active, * we disable this dock. */ _extensionlistenerId = Main.extensionManager.connect('extension-state-changed', conditionallyenabledock); conditionallyenabledock(); } function disable() { try { if (dockManager != null) { dockManager.destroy(); } } catch(e) { log('Failed to destroy dockManager: %s'.format(e.message)); } finally { if (_extensionlistenerId) { Main.extensionManager.disconnect(_extensionlistenerId); _extensionlistenerId = 0; } } } function conditionallyenabledock() { let to_enable = Main.extensionManager._extensionOrder.every((e) => { return e != 'dash-to-dock@micxgx.gmail.com'; }); // enable or disable dock depending on dock status and to_enable state if (to_enable && !dockManager) { dockManager = new Docking.DockManager(); } else if (!to_enable && dockManager) { dockManager.destroy(); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
media | Folder | 0755 |
|
|
README.md | File | 1.39 KB | 0644 |
|
Settings.ui | File | 181.9 KB | 0644 |
|
appIconIndicators.js | File | 38.94 KB | 0644 |
|
appIcons.js | File | 44.88 KB | 0644 |
|
dash.js | File | 35.85 KB | 0644 |
|
docking.js | File | 74.27 KB | 0644 |
|
extension.js | File | 1.61 KB | 0644 |
|
fileManager1API.js | File | 7.33 KB | 0644 |
|
intellihide.js | File | 10.5 KB | 0644 |
|
launcherAPI.js | File | 7.04 KB | 0644 |
|
locations.js | File | 9.52 KB | 0644 |
|
metadata.json | File | 480 B | 0644 |
|
stylesheet.css | File | 5.33 KB | 0644 |
|
theming.js | File | 20.62 KB | 0644 |
|
ubuntu.css | File | 0 B | 0644 |
|
utils.js | File | 7.68 KB | 0644 |
|
windowPreview.js | File | 19.74 KB | 0644 |
|
yaru.css | File | 0 B | 0644 |
|