| 1 |
// SPDX-FileCopyrightText: 2011 Erick Pérez Castellanos <[email protected]> |
| 2 |
// SPDX-FileCopyrightText: 2011 Giovanni Campagna <[email protected]> |
| 3 |
// SPDX-FileCopyrightText: 2017 Florian Müllner <[email protected]> |
| 4 |
// |
| 5 |
// SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
|
| 7 |
import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js'; |
| 8 |
|
| 9 |
import * as Main from 'resource:///org/gnome/shell/ui/main.js'; |
| 10 |
|
| 11 |
import {WorkspaceIndicator} from './workspaceIndicator.js'; |
| 12 |
|
| 13 |
export default class WorkspaceIndicatorExtension extends Extension { |
| 14 |
enable() { |
| 15 |
this._indicator = new WorkspaceIndicator({ |
| 16 |
extension: this, |
| 17 |
}); |
| 18 |
Main.panel.addToStatusArea('workspace-indicator', this._indicator); |
| 19 |
} |
| 20 |
|
| 21 |
disable() { |
| 22 |
this._indicator.destroy(); |
| 23 |
this._indicator = null; |
| 24 |
} |
| 25 |
} |