NetworkMenu: fix number of visible networks
When placing networks in _createSection, we were taking in consideration that _activeNetwork is always first, by adding 1, but then kept this offset also for networks following it (normally, all of them, since _activeNetwork is also the most recently used), that instead should not be affected by the movement. This resulted in the menu showing 4 networks + More... instead of 5. https://bugzilla.gnome.org/show_bug.cgi?id=664124
This commit is contained in:
parent
d5b4e30eb7
commit
aad9179373
@ -1524,8 +1524,10 @@ const NMDeviceWireless = new Lang.Class({
|
||||
|
||||
for(let j = 0; j < this._networks.length; j++) {
|
||||
let apObj = this._networks[j];
|
||||
if (apObj == this._activeNetwork)
|
||||
if (apObj == this._activeNetwork) {
|
||||
activeOffset--;
|
||||
continue;
|
||||
}
|
||||
|
||||
this._createNetworkItem(apObj, j + activeOffset);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user