Commit 2b6abd65 authored by Giovanni Campagna's avatar Giovanni Campagna
Browse files

all status are indicators: adapt to gnome-shell API changes

removeFromStatusArea was replaced with a destroy method on the
indicator itself. Cope with that.
parent dad3c317
......@@ -102,8 +102,7 @@ function enable() {
}
function disable() {
appsMenuButton.actor.destroy();
appsMenuButton.menu.destroy();
appsMenuButton.destroy();
}
function init() {
......
......@@ -94,10 +94,13 @@ function init(metadata) {
imports.gettext.bindtextdomain('gnome-shell-extensions', metadata.localedir);
}
let _indicator;
function enable() {
Main.panel.addToStatusArea('drive-menu', new DriveMenu);
_indicator = new DriveMenu;
Main.panel.addToStatusArea('drive-menu', _indicator);
}
function disable() {
Main.panel.removeFromStatusArea('drive-menu');
_indicator.destroy();
}
......@@ -115,13 +115,15 @@ PlacesMenu.prototype = {
function init(metadata) {
imports.gettext.bindtextdomain('gnome-shell-extensions', metadata.localedir);
Panel.STANDARD_TRAY_ICON_ORDER.unshift('places-menu');
}
let _indicator;
function enable() {
Main.panel.addToStatusArea('places-menu', new PlacesMenu);
_indicator = new PlacesMenu;
Main.panel.addToStatusArea('places-menu', _indicator);
}
function disable() {
Main.panel.removeFromStatusArea('places-menu');
_indicator.destroy();
}
......@@ -97,10 +97,13 @@ function init(meta) {
Panel.STANDARD_TRAY_ICON_ORDER.unshift('workspace-indicator');
}
let _indicator;
function enable() {
Main.panel.addToStatusArea('workspace-indicator', new WorkspaceIndicator);
_indicator = new WorkspaceIndicator;
Main.panel.addToStatusArea('workspace-indicator', _indicator);
}
function disable() {
Main.panel.removeFromStatusArea('workspace-indicator');
_indicator.destroy();
}
......@@ -140,10 +140,13 @@ function init(metadata) {
imports.gettext.bindtextdomain('gnome-shell-extensions', metadata.localedir);
}
let _indicator;
function enable() {
Main.panel.addToStatusArea('display', new Indicator());
_indicator = new Indicator();
Main.panel.addToStatusArea('display', _indicator);
}
function disable() {
Main.panel.removeFromStatusArea('display');
_indicator.destroy();
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment