[gnome-shell] Network Menu: prefer VPN connections when showing the icon
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Network Menu: prefer VPN connections when showing the icon
- Date: Tue, 17 Jan 2012 17:25:22 +0000 (UTC)
commit 11637bae4390985ee2859774188949b03d7b7533
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Nov 29 17:41:55 2011 +0100
Network Menu: prefer VPN connections when showing the icon
When VPN is active, and it's not the default routing, we should
show the vpn icon, rather than the physical connection.
https://bugzilla.gnome.org/show_bug.cgi?id=665115
js/ui/status/network.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index fcf0835..a3ce9bc 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1803,6 +1803,7 @@ const NMApplet = new Lang.Class({
let activating = null;
let default_ip4 = null;
let default_ip6 = null;
+ let active_vpn = null;
for (let i = 0; i < this._activeConnections.length; i++) {
let a = this._activeConnections[i];
@@ -1832,6 +1833,8 @@ const NMApplet = new Lang.Class({
default_ip4 = a;
if (a.default6)
default_ip6 = a;
+ if (a._type == 'vpn')
+ active_vpn = a;
if (a.state == NetworkManager.ActiveConnectionState.ACTIVATING)
activating = a;
@@ -1862,7 +1865,7 @@ const NMApplet = new Lang.Class({
}
}
- this._mainConnection = activating || default_ip4 || default_ip6 || this._activeConnections[0] || null;
+ this._mainConnection = activating || active_vpn || default_ip4 || default_ip6 || this._activeConnections[0] || null;
},
_notifyActivated: function(activeConnection) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]