network-manager-applet r901 - in trunk: . src/gconf-helpers



Author: dcbw
Date: Wed Sep 24 10:17:42 2008
New Revision: 901
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=901&view=rev

Log:
2008-09-24  Dan Williams  <dcbw redhat com>

	* src/gconf-helpers/gconf-upgrade.c
		- (nm_gconf_migrate_0_7_vpn_properties): don't set empty values in GConf
		- (move_one_vpn_string_bool, move_one_vpn_string_string): fix stray
			semicolon that caused values to not get converted and removed
			(second part of fix for bgo #553465)



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

Modified: trunk/src/gconf-helpers/gconf-upgrade.c
==============================================================================
--- trunk/src/gconf-helpers/gconf-upgrade.c	(original)
+++ trunk/src/gconf-helpers/gconf-upgrade.c	Wed Sep 24 10:17:42 2008
@@ -1195,10 +1195,13 @@
 
 			switch (entry->value->type) {
 			case GCONF_VALUE_STRING:
-				nm_gconf_set_string_helper (client, (const char *) iter->data,
-				                            key_name,
-				                            NM_SETTING_VPN_SETTING_NAME,
-				                            gconf_value_get_string (entry->value));
+				tmp = (char *) gconf_value_get_string (entry->value);
+				if (tmp && strlen (tmp)) {
+					nm_gconf_set_string_helper (client, (const char *) iter->data,
+					                            key_name,
+					                            NM_SETTING_VPN_SETTING_NAME,
+					                            gconf_value_get_string (entry->value));
+				}
 				break;
 			case GCONF_VALUE_INT:
 				tmp = g_strdup_printf ("%d", gconf_value_get_int (entry->value));
@@ -1244,7 +1247,7 @@
 	if (!nm_gconf_get_string_helper (client, path,
 	                                 old_key,
 	                                 NM_SETTING_VPN_SETTING_NAME,
-	                                 &value));
+	                                 &value))
 		return;
 
 	if (value && !strcmp (value, "yes")) {
@@ -1270,7 +1273,7 @@
 	if (!nm_gconf_get_string_helper (client, path,
 	                                 old_key,
 	                                 NM_SETTING_VPN_SETTING_NAME,
-	                                 &value));
+	                                 &value))
 		return;
 
 	if (value && strlen (value)) {



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