network-manager-applet r875 - trunk/src/gconf-helpers



Author: dcbw
Date: Wed Sep  3 20:00:29 2008
New Revision: 875
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=875&view=rev

Log:
Fix spacing; ensure secrets don't get saved to GConf

Modified:
   trunk/src/gconf-helpers/gconf-helpers.c

Modified: trunk/src/gconf-helpers/gconf-helpers.c
==============================================================================
--- trunk/src/gconf-helpers/gconf-helpers.c	(original)
+++ trunk/src/gconf-helpers/gconf-helpers.c	Wed Sep  3 20:00:29 2008
@@ -900,6 +900,10 @@
 	if (!strcmp (key, NM_SETTING_NAME))
 		return;
 
+	/* Secrets don't get stored in GConf */
+	if (secret)
+		return;
+
 	/* Some keys (like certs) aren't read directly from GConf but are handled
 	 * separately.
 	 */
@@ -1193,17 +1197,21 @@
 			return;
 	}
 
+	/* Secrets don't get stored in GConf */
+	if (secret)
+		return;
+
 	/* If the value is the default value, remove the item from GConf */
 	pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (setting), key);
 	if (pspec) {
 		if (g_param_value_defaults (pspec, (GValue *) value)) {
-		char *path;
+			char *path;
 
-		path = g_strdup_printf ("%s/%s/%s", info->dir, setting->name, key);
-		if (path)
-			gconf_client_unset (info->client, path, NULL);
-		g_free (path);		
-		return;
+			path = g_strdup_printf ("%s/%s/%s", info->dir, setting->name, key);
+			if (path)
+				gconf_client_unset (info->client, path, NULL);
+			g_free (path);		
+			return;
 		}
 	}
 



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