From aad9179373cdcda5696fbf5958c191e66a85f2eb Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Sat, 19 Nov 2011 19:01:24 +0100 Subject: [PATCH] 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 --- js/ui/status/network.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/status/network.js b/js/ui/status/network.js index a68bd8c5f..fa2b8dfab 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -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); }