[network-manager-applet/NMA_0_8] applet: use defined setting names
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/NMA_0_8] applet: use defined setting names
- Date: Thu, 14 Apr 2011 20:12:13 +0000 (UTC)
commit 24fede04aabce952eff9fa62e35dfab71928d1f1
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 af726cd..7d41779 100644
--- a/src/applet-device-wifi.c
+++ b/src/applet-device-wifi.c
@@ -439,9 +439,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);
memset (buf, 0, sizeof (buf));
buf_len = MIN(ap_ssid->len, sizeof (buf) - 1);
diff --git a/src/applet-device-wired.c b/src/applet-device-wired.c
index d073770..4e6dae6 100644
--- a/src/applet-device-wired.c
+++ b/src/applet-device-wired.c
@@ -81,11 +81,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]