NetworkMenu: don't clear the section when queuing an update

It's the very first thing that queueing does.

https://bugzilla.gnome.org/show_bug.cgi?id=684279
This commit is contained in:
Giovanni Campagna 2012-10-03 23:40:48 +02:00
parent c9ce1bd30f
commit 0e636ea67e

View File

@ -417,7 +417,6 @@ const NMDevice = new Lang.Class({
this._activeConnection = activeConnection; this._activeConnection = activeConnection;
this._clearSection();
this._queueCreateSection(); this._queueCreateSection();
}, },
@ -592,7 +591,6 @@ const NMDevice = new Lang.Class({
this._updateStatusItem(); this._updateStatusItem();
this._clearSection();
this._queueCreateSection(); this._queueCreateSection();
this.emit('state-changed'); this.emit('state-changed');
}, },
@ -836,7 +834,6 @@ const NMDeviceBluetooth = new Lang.Class({
_updateAutoConnectionName: function() { _updateAutoConnectionName: function() {
this._autoConnectionName = this._makeConnectionName(this.device); this._autoConnectionName = this._makeConnectionName(this.device);
this._clearSection();
this._queueCreateSection(); this._queueCreateSection();
this._updateStatusItem(); this._updateStatusItem();
} }
@ -1098,10 +1095,8 @@ const NMDeviceWireless = new Lang.Class({
this._networks.splice(res.network, 1); this._networks.splice(res.network, 1);
let newPos = Util.insertSorted(this._networks, network, Lang.bind(this, this._networkSortFunction)); let newPos = Util.insertSorted(this._networks, network, Lang.bind(this, this._networkSortFunction));
if (newPos != res.network) { if (newPos != res.network)
this._clearSection();
this._queueCreateSection(); this._queueCreateSection();
}
}, },
_accessPointAdded: function(device, accessPoint) { _accessPointAdded: function(device, accessPoint) {
@ -1154,10 +1149,8 @@ const NMDeviceWireless = new Lang.Class({
let newPos = Util.insertSorted(this._networks, apObj, this._networkSortFunction); let newPos = Util.insertSorted(this._networks, apObj, this._networkSortFunction);
// Queue an update of the UI if we changed the order // Queue an update of the UI if we changed the order
if (newPos != pos) { if (newPos != pos)
this._clearSection();
this._queueCreateSection(); this._queueCreateSection();
}
}, },
_accessPointRemoved: function(device, accessPoint) { _accessPointRemoved: function(device, accessPoint) {
@ -1217,12 +1210,10 @@ const NMDeviceWireless = new Lang.Class({
if (res.network < this._networks.length-1) if (res.network < this._networks.length-1)
okNext = this._networkSortFunction(this._networks[res.network + 1], apObj) <= 0; okNext = this._networkSortFunction(this._networks[res.network + 1], apObj) <= 0;
if (!okPrev || !okNext) { if (!okPrev || !okNext)
this._clearSection();
this._queueCreateSection(); this._queueCreateSection();
} else if (apObj.item) { else if (apObj.item)
apObj.item.updateBestAP(apObj.accessPoints[0]); apObj.item.updateBestAP(apObj.accessPoints[0]);
}
} }
}, },
@ -1298,7 +1289,6 @@ const NMDeviceWireless = new Lang.Class({
if (forceupdate) { if (forceupdate) {
this._networks.sort(this._networkSortFunction); this._networks.sort(this._networkSortFunction);
this._clearSection();
this._queueCreateSection(); this._queueCreateSection();
} }
}, },
@ -1331,7 +1321,6 @@ const NMDeviceWireless = new Lang.Class({
if (forceupdate) { if (forceupdate) {
this._networks.sort(this._networkSortFunction); this._networks.sort(this._networkSortFunction);
this._clearSection();
this._queueCreateSection(); this._queueCreateSection();
} }
}, },