[network-manager-applet] applet: use defined setting names
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] applet: use defined setting names
- Date: Fri, 15 Apr 2011 16:32:34 +0000 (UTC)
commit 8f1689b1f4863c47f8a75e4297a2001e52c6e381
Author: Dan Williams <dcbw redhat com>
Date: Thu Apr 14 15:10:41 2011 -0500
applet: use defined setting names
Instead of grabbing it out of the setting itself, which is kind
of pointless as we know what type it should be.
src/applet-device-wifi.c | 6 +++---
src/applet-device-wired.c | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/applet-device-wifi.c b/src/applet-device-wifi.c
index 2dcf83c..1aacf65 100644
--- a/src/applet-device-wifi.c
+++ b/src/applet-device-wifi.c
@@ -472,9 +472,9 @@ wireless_new_auto_connection (NMDevice *device,
s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
g_object_set (s_con,
- NM_SETTING_CONNECTION_TYPE, nm_setting_get_name (NM_SETTING (s_wireless)),
- NM_SETTING_CONNECTION_AUTOCONNECT, !is_manufacturer_default_ssid (ap_ssid),
- NULL);
+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
+ NM_SETTING_CONNECTION_AUTOCONNECT, !is_manufacturer_default_ssid (ap_ssid),
+ NULL);
utf8_ssid = nm_utils_ssid_to_utf8 (ap_ssid);
id = g_strdup_printf ("Auto %s", utf8_ssid);
diff --git a/src/applet-device-wired.c b/src/applet-device-wired.c
index 5182a55..0980355 100644
--- a/src/applet-device-wired.c
+++ b/src/applet-device-wired.c
@@ -80,11 +80,11 @@ wired_new_auto_connection (NMDevice *device,
s_con = NM_SETTING_CONNECTION (nm_setting_connection_new ());
uuid = nm_utils_uuid_generate ();
g_object_set (s_con,
- NM_SETTING_CONNECTION_ID, DEFAULT_WIRED_NAME,
- NM_SETTING_CONNECTION_TYPE, nm_setting_get_name (NM_SETTING (s_wired)),
- NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
- NM_SETTING_CONNECTION_UUID, uuid,
- NULL);
+ NM_SETTING_CONNECTION_ID, DEFAULT_WIRED_NAME,
+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRED_SETTING_NAME,
+ NM_SETTING_CONNECTION_AUTOCONNECT, TRUE,
+ NM_SETTING_CONNECTION_UUID, uuid,
+ NULL);
g_free (uuid);
nm_connection_add_setting (connection, NM_SETTING (s_con));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]