[gnome-shell] network: Fix visibility of VPN section
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] network: Fix visibility of VPN section
- Date: Wed, 10 Jan 2018 09:12:09 +0000 (UTC)
commit f91fbd7728061d0f66777c91c0a981792e0fada7
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Dec 21 16:51:28 2017 +0100
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 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 9575af7..ad373f6 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() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]