[gnome-shell] network: fix NMConnectionSection destruction
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] network: fix NMConnectionSection destruction
- Date: Wed, 2 Oct 2013 22:50:18 +0000 (UTC)
commit 33896a4e8f54e1636e9b79f99dc355dbec3fa602
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Oct 3 00:11:48 2013 +0200
network: fix NMConnectionSection destruction
The patch fixes the following warning, and along with it, the proper
destruction of the NMConnectionSection is performed so that items get
correctly removed from the menu.
(gnome-shell:24528): Gjs-WARNING **: JS ERROR: TypeError:
this.statusItem is undefined
NMConnectionSection<.destroy@/home/aleksander/gnome/install/share/gnome-shell/js/ui/status/network.js:173
wrapper@/home/aleksander/gnome/install/share/gjs-1.0/lang.js:213
_parent@/home/aleksander/gnome/install/share/gjs-1.0/lang.js:175
NMConnectionDevice<.destroy@/home/aleksander/gnome/install/share/gnome-shell/js/ui/status/network.js:292
wrapper@/home/aleksander/gnome/install/share/gjs-1.0/lang.js:213
_parent@/home/aleksander/gnome/install/share/gjs-1.0/lang.js:175
NMDeviceModem<.destroy@/home/aleksander/gnome/install/share/gnome-shell/js/ui/status/network.js:448
wrapper@/home/aleksander/gnome/install/share/gjs-1.0/lang.js:213
NMApplet<._removeDeviceWrapper@/home/aleksander/gnome/install/share/gnome-shell/js/ui/status/network.js:1421
wrapper@/home/aleksander/gnome/install/share/gjs-1.0/lang.js:213
NMApplet<._deviceRemoved@/home/aleksander/gnome/install/share/gnome-shell/js/ui/status/network.js:1416
wrapper@/home/aleksander/gnome/install/share/gjs-1.0/lang.js:213
https://bugzilla.gnome.org/show_bug.cgi?id=709248
js/ui/status/network.js | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 7fc28b4..2a830c8 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -170,8 +170,7 @@ const NMConnectionSection = new Lang.Class({
},
destroy: function() {
- this.statusItem.destroy();
- this.section.destroy();
+ this.item.destroy();
},
_sync: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]