network-manager-applet r1054 - in trunk: . src/connection-editor src/gconf-helpers
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r1054 - in trunk: . src/connection-editor src/gconf-helpers
- Date: Fri, 5 Dec 2008 18:17:07 +0000 (UTC)
Author: dcbw
Date: Fri Dec 5 18:17:07 2008
New Revision: 1054
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=1054&view=rev
Log:
2008-12-05 Dan Williams <dcbw redhat com>
* src/gconf-helpers/gconf-helpers.c
src/gconf-helpers/gconf-helpers.h
- (nm_gconf_clear_private_connection_values): new function to clear
applet private values from a connection
* src/connection-editor/page-wired-security.c
- (ce_page_wired_security_new): ensure setting gets updated when
security is changed
- (validate): copy applet private values to the real connection when
using 802.1x security; clear applet private values when there's no
security
* src/connection-editor/page-wireless-security.c
- (validate): clear applet private values when there's no security
Modified:
trunk/ChangeLog
trunk/src/connection-editor/page-wired-security.c
trunk/src/connection-editor/page-wireless-security.c
trunk/src/gconf-helpers/gconf-helpers.c
trunk/src/gconf-helpers/gconf-helpers.h
Modified: trunk/src/connection-editor/page-wired-security.c
==============================================================================
--- trunk/src/connection-editor/page-wired-security.c (original)
+++ trunk/src/connection-editor/page-wired-security.c Fri Dec 5 18:17:07 2008
@@ -93,6 +93,7 @@
G_CALLBACK (enable_toggled), self);
gtk_toggle_button_set_active (priv->enabled, setting != NULL);
+ g_signal_connect_swapped (priv->enabled, "toggled", G_CALLBACK (ce_page_changed), self);
gtk_widget_set_sensitive (priv->security_widget, setting != NULL);
gtk_box_pack_start (GTK_BOX (parent->page), GTK_WIDGET (priv->enabled), FALSE, TRUE, 12);
@@ -123,13 +124,15 @@
s_8021x = nm_connection_get_setting (tmp_connection, NM_TYPE_SETTING_802_1X);
nm_connection_add_setting (connection, NM_SETTING (g_object_ref (s_8021x)));
+ nm_gconf_copy_private_connection_values (connection, tmp_connection);
g_object_unref (tmp_connection);
} else
g_set_error (error, 0, 0, "Invalid 802.1x security");
} else {
- valid = TRUE;
nm_connection_remove_setting (connection, NM_TYPE_SETTING_802_1X);
+ nm_gconf_clear_private_connection_values (connection);
+ valid = TRUE;
}
return valid;
Modified: trunk/src/connection-editor/page-wireless-security.c
==============================================================================
--- trunk/src/connection-editor/page-wireless-security.c (original)
+++ trunk/src/connection-editor/page-wireless-security.c Fri Dec 5 18:17:07 2008
@@ -29,6 +29,7 @@
#include <nm-setting-connection.h>
#include <nm-setting-wireless.h>
#include <nm-setting-wireless-security.h>
+#include <nm-setting-8021x.h>
#include <nm-utils.h>
#include "wireless-security.h"
@@ -407,6 +408,9 @@
} else {
/* No security, unencrypted */
g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NULL, NULL);
+ nm_connection_remove_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ nm_connection_remove_setting (connection, NM_TYPE_SETTING_802_1X);
+ nm_gconf_clear_private_connection_values (connection);
valid = TRUE;
}
Modified: trunk/src/gconf-helpers/gconf-helpers.c
==============================================================================
--- trunk/src/gconf-helpers/gconf-helpers.c (original)
+++ trunk/src/gconf-helpers/gconf-helpers.c Fri Dec 5 18:17:07 2008
@@ -1830,6 +1830,24 @@
copy_str_item (dst, src, NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG);
}
+void
+nm_gconf_clear_private_connection_values (NMConnection *connection)
+{
+ g_return_if_fail (NM_IS_CONNECTION (connection));
+
+ g_object_set_data (G_OBJECT (connection), NMA_CA_CERT_IGNORE_TAG, NULL);
+ g_object_set_data (G_OBJECT (connection), NMA_PHASE2_CA_CERT_IGNORE_TAG, NULL);
+
+ g_object_set_data (G_OBJECT (connection), NMA_PATH_CLIENT_CERT_TAG, NULL);
+ g_object_set_data (G_OBJECT (connection), NMA_PATH_PHASE2_CLIENT_CERT_TAG, NULL);
+ g_object_set_data (G_OBJECT (connection), NMA_PATH_CA_CERT_TAG, NULL);
+ g_object_set_data (G_OBJECT (connection), NMA_PATH_PHASE2_CA_CERT_TAG, NULL);
+ g_object_set_data (G_OBJECT (connection), NMA_PATH_PRIVATE_KEY_TAG, NULL);
+ g_object_set_data (G_OBJECT (connection), NMA_PRIVATE_KEY_PASSWORD_TAG, NULL);
+ g_object_set_data (G_OBJECT (connection), NMA_PATH_PHASE2_PRIVATE_KEY_TAG, NULL);
+ g_object_set_data (G_OBJECT (connection), NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG, NULL);
+}
+
NMConnection *
nm_gconf_connection_duplicate (NMConnection *connection)
{
Modified: trunk/src/gconf-helpers/gconf-helpers.h
==============================================================================
--- trunk/src/gconf-helpers/gconf-helpers.h (original)
+++ trunk/src/gconf-helpers/gconf-helpers.h Fri Dec 5 18:17:07 2008
@@ -48,6 +48,7 @@
NMConnection *nm_gconf_connection_duplicate (NMConnection *connection);
void nm_gconf_copy_private_connection_values (NMConnection *dst, NMConnection *src);
+void nm_gconf_clear_private_connection_values (NMConnection *connection);
#define KEYRING_UUID_TAG "connection-uuid"
#define KEYRING_SN_TAG "setting-name"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]