-
Notifications
You must be signed in to change notification settings - Fork 6
/
extension.js
65 lines (45 loc) · 1.44 KB
/
extension.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
'use strict';
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Main = imports.ui.main;
const OpenWindowsTracker = Me.imports.openWindowsTracker;
const Indicator = Me.imports.indicator;
const Autostart = Me.imports.ui.autostart;
const Autoclose = Me.imports.ui.autoclose;
const WindowTilingSupport = Me.imports.windowTilingSupport.WindowTilingSupport;
Me.imports.utils.string;
const Log = Me.imports.utils.log;
let _indicator;
let _autostartServiceProvider;
let _openWindowsTracker;
let _autoclose;
function enable() {
_indicator = new Indicator.AwsIndicator();
Main.panel.addToStatusArea('Another Window Session Manager', _indicator);
_autostartServiceProvider = new Autostart.AutostartServiceProvider();
WindowTilingSupport.initialize();
_openWindowsTracker = new OpenWindowsTracker.OpenWindowsTracker();
_autoclose = new Autoclose.Autoclose();
}
function disable() {
if (_indicator) {
_indicator.destroy();
_indicator = null;
}
if (_autostartServiceProvider) {
_autostartServiceProvider.disable();
_autostartServiceProvider = null;
}
if (_openWindowsTracker) {
_openWindowsTracker.destroy();
_openWindowsTracker = null;
}
WindowTilingSupport.destroy();
if (_autoclose) {
_autoclose.destroy();
_autoclose = null;
}
Log.Log.destroyDefault();
}
function init() {
}