forked from ozonos/atom-launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextension.js
32 lines (27 loc) · 1.27 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
const Me = imports.misc.extensionUtils.getCurrentExtension();
const FreqView = Me.imports.freqView;
const St = imports.gi.St;
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
let freqAllView, prevAllView;
function init() {
}
function enable() {
freqAllView = new FreqView.FreqAllView();
prevAllView = Main.overview.viewSelector.appDisplay._views[1].view;
Main.overview.viewSelector.appDisplay._views[1].view = freqAllView;
Main.overview.viewSelector.appDisplay._views[0].view.actor.hide();
Main.overview.viewSelector.appDisplay._viewStack.remove_actor(prevAllView.actor);
Main.overview.viewSelector.appDisplay._viewStack.add_actor(freqAllView.actor);
Main.overview.viewSelector.appDisplay._views[0].view._redisplay();
Main.overview.viewSelector.appDisplay._views[1].view._redisplay();
Main.overview.viewSelector.appDisplay._controls.hide();
}
function disable() {
Main.overview.viewSelector.appDisplay._viewStack.remove_actor(freqAllView.actor);
Main.overview.viewSelector.appDisplay._views[1].view = prevAllView;
Main.overview.viewSelector.appDisplay._viewStack.add_actor(prevAllView.actor);
freqAllView = null;
Main.overview.viewSelector.appDisplay._redisplay();
Main.overview.viewSelector.appDisplay._controls.show();
}