network: use the VPN state to compute the icon for VPN items

We watch changes in the VPN state, not the active connection state,
so if we use the active connection state, we might miss an update
(because the VPN property is notified before the other one)

https://bugzilla.gnome.org/show_bug.cgi?id=706262
This commit is contained in:
Giovanni Campagna 2013-08-19 23:30:06 +02:00
parent 5a9f0c24b4
commit fc5aadd6dd

View File

@ -1137,7 +1137,7 @@ const NMVPNConnectionItem = new Lang.Class({
getIndicatorIcon: function() {
if (this._activeConnection) {
if (this._activeConnection.state == NetworkManager.ActiveConnectionState.ACTIVATING)
if (this._activeConnection.vpn_state < NetworkManager.VPNConnectionState.ACTIVATED)
return 'network-vpn-acquiring-symbolic';
else
return 'network-vpn-symbolic';