[gnome-control-center] network: adapt to yesterdays libnm-glib api changes



commit ea13583edd0616759a75a5b05319772835dcf15c
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Mar 16 07:31:01 2011 -0400

    network: adapt to yesterdays libnm-glib api changes
    
    That's what you get for complaining about inconsistent api...more work :-)

 panels/network/cc-network-panel.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c
index e705626..496499e 100644
--- a/panels/network/cc-network-panel.c
+++ b/panels/network/cc-network-panel.c
@@ -885,18 +885,20 @@ device_off_toggled (GtkSwitch      *sw,
 
                 if (NET_IS_VPN (net_dev)) {
                         NMConnection *connection;
-                        const gchar *path;
 
                         connection = net_vpn_get_connection (NET_VPN (net_dev));
-                        path = nm_connection_get_path (connection);
                         if (active)
                                 nm_client_activate_connection (panel->priv->client,
-                                                               path, NULL, NULL, NULL, NULL);
+                                                               connection, NULL, NULL,
+                                                               NULL, NULL);
                         else {
+                                const gchar *path;
                                 NMActiveConnection *a;
                                 const GPtrArray *acs;
                                 gint i;
 
+                                path = nm_connection_get_path (connection);
+
                                 acs = nm_client_get_active_connections (panel->priv->client);
                                 for (i = 0; i < acs->len; i++) {
                                         a = (NMActiveConnection*)acs->pdata[i];



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]