adium-1.4 3430:e83db11c295b: Better whitespace fixing
commits at adium.im
commits at adium.im
Thu Mar 17 02:57:29 UTC 2011
details: http://hg.adium.im/adium-1.4/rev/e83db11c295b
revision: 3430:e83db11c295b
branch: facebook-xmpp
author: Evan Schoenberg
date: Wed Mar 16 21:17:01 2011 -0500
Better whitespace fixing
Subject: adium-1.4 3431:07a3fd67571f: Only attempt to update the account's UID in -[AIAccountViewController saveConfiguration] if there is an input field for the UID (textField_accountUID). This prevents our Facebook account from having its UID overwritten with NULL when the window closes, which in turn means that if it is closed _after_ authorization completes it overwrites. Additionally, that led to the PurpleAccount being reconfigured with a NULL username, which led to assertions. Fixes #15061
details: http://hg.adium.im/adium-1.4/rev/07a3fd67571f
revision: 3431:07a3fd67571f
branch: facebook-xmpp
author: Evan Schoenberg
date: Wed Mar 16 21:57:14 2011 -0500
Only attempt to update the account's UID in -[AIAccountViewController saveConfiguration] if there is an input field for the UID (textField_accountUID). This prevents our Facebook account from having its UID overwritten with NULL when the window closes, which in turn means that if it is closed _after_ authorization completes it overwrites. Additionally, that led to the PurpleAccount being reconfigured with a NULL username, which led to assertions. Fixes #15061
diffs (34 lines):
diff -r 0c89a4d454d9 -r 07a3fd67571f Frameworks/Adium Framework/Source/AIAccountViewController.m
--- a/Frameworks/Adium Framework/Source/AIAccountViewController.m Wed Mar 16 21:16:32 2011 -0500
+++ b/Frameworks/Adium Framework/Source/AIAccountViewController.m Wed Mar 16 21:57:14 2011 -0500
@@ -263,10 +263,12 @@
- (void)saveConfiguration
{
//UID - account; only set if the account doesn't handle setting its own UID based on a combination of fields.
- NSString *newUID = [textField_accountUID stringValue];
- if (![account.UID isEqualToString:newUID] ||
- ![account.formattedUID isEqualToString:newUID]) {
- [account filterAndSetUID:newUID];
+ if (textField_accountUID) {
+ NSString *newUID = [textField_accountUID stringValue];
+ if (![account.UID isEqualToString:newUID] ||
+ ![account.formattedUID isEqualToString:newUID]) {
+ [account filterAndSetUID:newUID];
+ }
}
//Connect Host - save first in case the account uses the server name for password storage.
diff -r 0c89a4d454d9 -r 07a3fd67571f Plugins/Purple Service/AIFacebookXMPPOAuthWebViewWindowController.m
--- a/Plugins/Purple Service/AIFacebookXMPPOAuthWebViewWindowController.m Wed Mar 16 21:16:32 2011 -0500
+++ b/Plugins/Purple Service/AIFacebookXMPPOAuthWebViewWindowController.m Wed Mar 16 21:57:14 2011 -0500
@@ -105,7 +105,9 @@
[self.account oAuthWebViewController:self didSucceedWithToken:token];
} else {
/* Got a bad token, or the user canceled */
- } [self closeWindow:nil];
+ }
+
+ [self closeWindow:nil];
return nil;
}
More information about the commits
mailing list