Fixed broken percentage reflecting connection progress in Accounts.
authorPatrick Steinhardt <steinhardt.p@me.com>
Wed, 04 May 2011 10:23:27 +0200
changeset 3899 b737e71520e4
parent 3898 1a4106e45d37
child 3900 09afa7a64d97
Fixed broken percentage reflecting connection progress in Accounts.

r=xnyhps. Fixes #15163
Plugins/Purple Service/CBPurpleAccount.m
Source/AIAccountListPreferences.m
--- a/Plugins/Purple Service/CBPurpleAccount.m	Sun May 08 22:21:51 2011 +0200
+++ b/Plugins/Purple Service/CBPurpleAccount.m	Wed May 04 10:23:27 2011 +0200
@@ -2137,7 +2137,7 @@
 	NSString	*progressString = [self connectionStringForStep:[step integerValue]];
 
 	[self setValue:progressString forProperty:@"connectionProgressString" notify:NO];
-	[self setValue:connectionProgressPrecent forProperty:@"connectionProgressPercent" notify:NO];	
+	[self setValue:[NSNumber numberWithDouble:[connectionProgressPrecent doubleValue] * 100] forProperty:@"connectionProgressPercent" notify:NO];
 
 	//Apply any changes
 	[self notifyOfChangedPropertiesSilently:NO];
--- a/Source/AIAccountListPreferences.m	Sun May 08 22:21:51 2011 +0200
+++ b/Source/AIAccountListPreferences.m	Wed May 04 10:23:27 2011 +0200
@@ -706,7 +706,7 @@
 	
 	if ([account valueForProperty:@"connectionProgressString"] && [account boolValueForProperty:@"isConnecting"]) {
 		// Connection status if we're currently connecting, with the percent at the end
-		statusMessage = [[account valueForProperty:@"connectionProgressString"] stringByAppendingFormat:@" (%2.f%%)", [[account valueForProperty:@"connectionProgressPercent"] doubleValue]*100.0];
+		statusMessage = [[account valueForProperty:@"connectionProgressString"] stringByAppendingFormat:@" (%2.f%%)", [[account valueForProperty:@"connectionProgressPercent"] doubleValue]];
 	} else if ([account lastDisconnectionError] && ![account boolValueForProperty:@"isOnline"] && ![account boolValueForProperty:@"isConnecting"]) {
 		// If there's an error and we're not online and not connecting
 		NSMutableString *returnedMessage = [[[account lastDisconnectionError] mutableCopy] autorelease];