location: disconnect from 'g-properties-changed' signal

https://bugzilla.gnome.org/show_bug.cgi?id=723684
This commit is contained in:
Zeeshan Ali (Khattak) 2014-02-17 01:17:46 +00:00
parent 19406a238b
commit 7c3892f5a2

View File

@ -119,7 +119,8 @@ const Indicator = new Lang.Class({
}
this._proxy = proxy;
this._proxy.connect('g-properties-changed', Lang.bind(this, this._onGeocluePropsChanged));
this._propertiesChangedId = this._proxy.connect('g-properties-changed',
Lang.bind(this, this._onGeocluePropsChanged));
this._updateMenuVisibility();
this._syncIndicator();
@ -136,6 +137,10 @@ const Indicator = new Lang.Class({
},
_onGeoclueVanished: function() {
if (this._propertiesChangedId) {
this._proxy.disconnect(this._propertiesChangedId);
this._propertiesChangedId = 0;
}
this._proxy = null;
this._syncIndicator();