From cb2e26ff10ce842531b207d632afcfed61b3bb50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 21 Dec 2017 16:51:28 +0100 Subject: [PATCH] network: Fix visibility of VPN section Commit f2a9467f91b was too eager to simplify the code, and removed the bits that hid the section in case no VPNs are set up - add them back to fix the visibility. https://bugzilla.gnome.org/show_bug.cgi?id=787845 --- js/ui/status/network.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 9575af7de..ad373f6e6 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1492,6 +1492,15 @@ var NMVPNSection = new Lang.Class({ this.parent(client); this.item.menu.addSettingsAction(_("VPN Settings"), 'gnome-network-panel.desktop'); + + this._sync(); + }, + + _sync: function() { + let nItems = this._connectionItems.size; + this.item.actor.visible = (nItems > 0); + + this.parent(); }, _getDescription: function() {