[gnome-shell-extensions: 25/25] all status area indicators: adapt to gnome-shell API changes
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions: 25/25] all status area indicators: adapt to gnome-shell API changes
- Date: Thu, 25 Aug 2011 09:28:56 +0000 (UTC)
commit 8276e6d583ccc9d8f116ec7cf5aa86a4ff4ff684
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Thu Aug 25 11:26:27 2011 +0200
all status area indicators: adapt to gnome-shell API changes
removeFromStatusArea was replaced with a destroy method on the
indicator itself. Cope with that.
extensions/apps-menu/extension.js | 3 +--
extensions/drive-menu/extension.js | 7 +++++--
extensions/places-menu/extension.js | 8 +++++---
extensions/workspace-indicator/extension.js | 7 +++++--
extensions/xrandr-indicator/extension.js | 7 +++++--
5 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index 810a691..11f4866 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -102,8 +102,7 @@ function enable() {
}
function disable() {
- appsMenuButton.actor.destroy();
- appsMenuButton.menu.destroy();
+ appsMenuButton.destroy();
}
function init() {
diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js
index aac2ffe..c455111 100644
--- a/extensions/drive-menu/extension.js
+++ b/extensions/drive-menu/extension.js
@@ -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();
}
diff --git a/extensions/places-menu/extension.js b/extensions/places-menu/extension.js
index cd4724c..9907bde 100644
--- a/extensions/places-menu/extension.js
+++ b/extensions/places-menu/extension.js
@@ -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();
}
diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js
index 109ea04..f2c6749 100644
--- a/extensions/workspace-indicator/extension.js
+++ b/extensions/workspace-indicator/extension.js
@@ -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();
}
diff --git a/extensions/xrandr-indicator/extension.js b/extensions/xrandr-indicator/extension.js
index 9e83fad..979e549 100644
--- a/extensions/xrandr-indicator/extension.js
+++ b/extensions/xrandr-indicator/extension.js
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]