[gnome-control-center] network: Use the parameters property for 8021x



commit fc181a2d6481fe1234a458df8a707a9ca9e94a1d
Author: Gary Ching-Pang Lin <chingpang gmail com>
Date:   Mon Oct 7 15:34:06 2013 +0800

    network: Use the parameters property for 8021x
    
    The argv property was deprecated. This commit converts the 8021x
    settings to the parameters property so that the user is able to
    setup the 8021x connections.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=709545

 panels/network/net-device-wifi.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 3f0d624..005cda6 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -757,19 +757,20 @@ wireless_try_to_connect (NetDeviceWifi *device_wifi,
                                                        connection_add_activate_cb, device_wifi);
         } else {
                 CcNetworkPanel *panel;
-                GPtrArray *array;
+                GVariantBuilder *builder;
+                GVariant *parameters;
 
                 g_debug ("no existing connection found for %s, creating", ssid_target);
-                array = g_ptr_array_new ();
-                g_ptr_array_add (array, "connect-8021x-wifi");
-                g_ptr_array_add (array, (gpointer) nm_object_get_path (NM_OBJECT (device)));
-                g_ptr_array_add (array, (gpointer) ap_object_path);
-                g_ptr_array_add (array, NULL);
+                builder = g_variant_builder_new (G_VARIANT_TYPE ("av"));
+                g_variant_builder_add (builder, "v", g_variant_new_string ("connect-8021x-wifi"));
+                g_variant_builder_add (builder, "v", g_variant_new_string (nm_object_get_path (NM_OBJECT 
(device))));
+                g_variant_builder_add (builder, "v", g_variant_new_string (ap_object_path));
+                parameters = g_variant_new ("av", builder);
 
                 panel = net_object_get_panel (NET_OBJECT (device_wifi));
-                g_object_set (G_OBJECT (panel), "argv", array->pdata, NULL);
+                g_object_set (G_OBJECT (panel), "parameters", parameters, NULL);
 
-                g_ptr_array_free (array, FALSE);
+                g_variant_builder_unref (builder);
         }
 out:
         return;


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