We were not listening for state changes on the ActiveConnection
objects representing actual connections, but only listened for
active connections appearing or disappearing. This caused
the VPN tab to get stuck on 'Authentication required' or similar
'intermediate' states until you manually switch tabs and back.
Also keep the switch from jumping back to off while the
vpn auth dialog is up, by adjusting the states we consider 'off'.
It is not something the user did wrong so we shouldn't use a mean
looking error icon. We use computer-fail when something is wrong
with the setup of the computer that the user can't fix.
If you choose Automatic and then don't fill in any configuration URL, it
defaults to WPAD.
But really, WPAD is a bad default anyway; if you enable it on an untrusted
network, then anyone else on that network can tell your machine that it should
proxy all of your web traffic through them.
The best bet might be to just add some explanatory text to the (otherwise
nearly-empty) Automatic page.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=641793
When a device is unavailable / off, we show only the hardware address.
Otherwise, we show speed / security / ssid.
Other connection parameters are only shown when the connection is active.
Remove the ID parameter from the model, and move it to the NetDevice object.
Remove the devices GPtrArray and use the mode for everything.
Connect up the changed and deleted signals from NetObject and DTRT in the UI.
In the short term, cheat by bringing up nm-connection-editor.
In the future, we will do something better here.
The newly created connections do net get picked up in the list
of devices/connections yet.
In the short term, we cheat here by bringing up nm-connection-editor
for an individual connection. This will be replaced by something
better in the future.
The connection that gets passed to NetVPN is not a state-carrying
NMActiveConnection, but just a configuration-carrying NmRemoteConnection.
So asking it for the VPN connection state is never giving us anything
interesting. Instead, we need to fish out the active connection
corresponding to the VPN config (if any), and get the state from there.
Still todo: state change notification.
A recent change to the NetworkManager API combined the
NM_DEVICE_TYPE_GSM and NM_DEVICE_TYPE_CDMA types as
NM_DEVICE_TYPE_MODEM and provided an alternative API for accessing the
modem device's capabilities (including GSM_UMTS and CDMA_EVDO).
https://bugzilla.gnome.org/show_bug.cgi?id=643390
Signed-off-by: Richard Hughes <richard@hughsie.com>