adium-1.4 3454:b30921efd7f0: Migrate when initialising an accoun...

commits at adium.im commits at adium.im
Sun Apr 17 12:03:53 UTC 2011


details:	http://hg.adium.im/adium-1.4/rev/b30921efd7f0
revision:	3454:b30921efd7f0
branch:		(none)
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Sun Apr 17 14:03:31 2011 +0200

Migrate when initialising an account, don't wait until it connects.

diffs (32 lines):

diff -r 260b42847138 -r b30921efd7f0 Plugins/Purple Service/CBPurpleOscarAccount.m
--- a/Plugins/Purple Service/CBPurpleOscarAccount.m	Sun Apr 17 12:51:21 2011 +0200
+++ b/Plugins/Purple Service/CBPurpleOscarAccount.m	Sun Apr 17 14:03:31 2011 +0200
@@ -119,7 +119,14 @@
 		[encoderGroupChat setAllowJavascriptURLs:YES];
 		
 		createdEncoders = YES;
-	}	
+	}
+	
+	// Migrate from SSL/no SSL to the tri-state radio button
+	if (![self preferenceForKey:PREFERENCE_ENCRYPTION_TYPE group:GROUP_ACCOUNT_STATUS]) {
+		AILogWithSignature(@"Migrating %@ to new encryption settings", self);
+		[self migrateSSL];
+		[self setPreference:nil forKey:PREFERENCE_SSL_CONNECTION group:GROUP_ACCOUNT_STATUS];
+	}
 
 	[super initAccount];
 }
@@ -157,12 +164,6 @@
 	// Always yes, so SSL on ICQ works again.
 	purple_account_set_bool(account, "use_clientlogin", TRUE);
 	
-	// Migrate from SSL/no SSL to the tri-state popup button 
-	if (![self preferenceForKey:PREFERENCE_ENCRYPTION_TYPE group:GROUP_ACCOUNT_STATUS]) {
-		[self migrateSSL];
-		[self setPreference:nil forKey:PREFERENCE_SSL_CONNECTION group:GROUP_ACCOUNT_STATUS];
-	}
-	
 	if ([[self preferenceForKey:PREFERENCE_ENCRYPTION_TYPE group:GROUP_ACCOUNT_STATUS] isEqualToString:PREFERENCE_ENCRYPTION_TYPE_OPPORTUNISTIC]) {
 		purple_account_set_string(account, "encryption", "opportunistic_encryption");
 	} else if ([[self preferenceForKey:PREFERENCE_ENCRYPTION_TYPE group:GROUP_ACCOUNT_STATUS] isEqualToString:PREFERENCE_ENCRYPTION_TYPE_REQUIRED]) {




More information about the commits mailing list