network: adapt to yesterdays libnm-glib api changes

That's what you get for complaining about inconsistent api...more work :-)
This commit is contained in:
Matthias Clasen 2011-03-16 07:31:01 -04:00
parent 677a7744e2
commit ea13583edd

View file

@ -885,18 +885,20 @@ device_off_toggled (GtkSwitch *sw,
if (NET_IS_VPN (net_dev)) { if (NET_IS_VPN (net_dev)) {
NMConnection *connection; NMConnection *connection;
const gchar *path;
connection = net_vpn_get_connection (NET_VPN (net_dev)); connection = net_vpn_get_connection (NET_VPN (net_dev));
path = nm_connection_get_path (connection);
if (active) if (active)
nm_client_activate_connection (panel->priv->client, nm_client_activate_connection (panel->priv->client,
path, NULL, NULL, NULL, NULL); connection, NULL, NULL,
NULL, NULL);
else { else {
const gchar *path;
NMActiveConnection *a; NMActiveConnection *a;
const GPtrArray *acs; const GPtrArray *acs;
gint i; gint i;
path = nm_connection_get_path (connection);
acs = nm_client_get_active_connections (panel->priv->client); acs = nm_client_get_active_connections (panel->priv->client);
for (i = 0; i < acs->len; i++) { for (i = 0; i < acs->len; i++) {
a = (NMActiveConnection*)acs->pdata[i]; a = (NMActiveConnection*)acs->pdata[i];