[gnome-shell-extensions/gnome-3-2] alternative-status-menu: disconnect signals for IMStatusChooserItem
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/gnome-3-2] alternative-status-menu: disconnect signals for IMStatusChooserItem
- Date: Wed, 7 Dec 2011 14:07:51 +0000 (UTC)
commit a6c379f5ede72f5bf76f243d5f5e9188ba1864f7
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat Dec 3 14:05:41 2011 +0100
alternative-status-menu: disconnect signals for IMStatusChooserItem
In master shell, calling destroy does this automatically, but the
patch was not backported, so we need to hack around this here.
extensions/alternative-status-menu/extension.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/extensions/alternative-status-menu/extension.js b/extensions/alternative-status-menu/extension.js
index 404e47d..9b04ea6 100644
--- a/extensions/alternative-status-menu/extension.js
+++ b/extensions/alternative-status-menu/extension.js
@@ -124,7 +124,14 @@ function enable() {
function disable() {
// not guarranteed to work, if more extensions operate in the same place
let statusMenu = Main.panel._statusArea.userMenu;
+
+ // HACK! disconnect signals to avoid references to destroyed objects
+ let imstatusitem = statusMenu.menu._getMenuItems()[0];
+ imstatusitem._user.disconnect(imstatusitem._userLoadedId);
+ imstatusitem._user.disconnect(imstatusitem._userChangedId);
+
statusMenu.menu.removeAll();
+
statusMenu._createSubMenu();
reset(statusMenu);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]