[network-manager-applet] applet: touch GConf less if there are no connections to migrate



commit 888e3adf13c62a9e38c8ece045cd9b2eb8170592
Author: Dan Williams <dcbw redhat com>
Date:   Thu Apr 28 14:01:04 2011 -0500

    applet: touch GConf less if there are no connections to migrate
    
    If the stamp is new enough, we've already migrated, and we don't
    need to touch GConf any more.

 src/gconf-helpers/gconf-helpers.c |   36 +++++++++++++++++++-----------------
 1 files changed, 19 insertions(+), 17 deletions(-)
---
diff --git a/src/gconf-helpers/gconf-helpers.c b/src/gconf-helpers/gconf-helpers.c
index 157979e..2327c62 100644
--- a/src/gconf-helpers/gconf-helpers.c
+++ b/src/gconf-helpers/gconf-helpers.c
@@ -1729,26 +1729,28 @@ nm_gconf_move_connections_to_system (AddToSettingsFunc add_func, gpointer user_d
 		stamp = 0;
 	}
 
-	nm_gconf_migrate_0_7_connection_uuid (client);
-	nm_gconf_migrate_0_7_keyring_items (client);
-	nm_gconf_migrate_0_7_wireless_security (client);
-	nm_gconf_migrate_0_7_netmask_to_prefix (client);
-	nm_gconf_migrate_0_7_ip4_method (client);
-	nm_gconf_migrate_0_7_ignore_dhcp_dns (client);
-	nm_gconf_migrate_0_7_vpn_routes (client);
-	nm_gconf_migrate_0_7_vpn_properties (client);
-	nm_gconf_migrate_0_7_openvpn_properties (client);
+	if (stamp < 3) {
+		nm_gconf_migrate_0_7_connection_uuid (client);
+		nm_gconf_migrate_0_7_keyring_items (client);
+		nm_gconf_migrate_0_7_wireless_security (client);
+		nm_gconf_migrate_0_7_netmask_to_prefix (client);
+		nm_gconf_migrate_0_7_ip4_method (client);
+		nm_gconf_migrate_0_7_ignore_dhcp_dns (client);
+		nm_gconf_migrate_0_7_vpn_routes (client);
+		nm_gconf_migrate_0_7_vpn_properties (client);
+		nm_gconf_migrate_0_7_openvpn_properties (client);
+
+		if (stamp < 1) {
+			nm_gconf_migrate_0_7_vpn_never_default (client);
+			nm_gconf_migrate_0_7_autoconnect_default (client);
+		}
 
-	if (stamp < 1) {
-		nm_gconf_migrate_0_7_vpn_never_default (client);
-		nm_gconf_migrate_0_7_autoconnect_default (client);
+		nm_gconf_migrate_0_7_ca_cert_ignore (client);
+		nm_gconf_migrate_0_7_certs (client);
 	}
 
-	nm_gconf_migrate_0_7_ca_cert_ignore (client);
-	nm_gconf_migrate_0_7_certs (client);
-
 	connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
-	if (!connections) {
+	if (!connections && (stamp < 3)) {
 		nm_gconf_migrate_0_6_connections (client);
 		/* Try again */
 		connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);



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