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
This commit is contained in:
parent
f40ad89c9f
commit
f91fbd7728
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user