# HG changeset patch # User Patrick Steinhardt # Date 1304497407 -7200 # Node ID b737e71520e4e793be1e8e1096c6d7b5cbe8ee2b # Parent 1a4106e45d37577d89bc70c35b36b7ff64b1479e Fixed broken percentage reflecting connection progress in Accounts. r=xnyhps. Fixes #15163 diff -r 1a4106e45d37 -r b737e71520e4 Plugins/Purple Service/CBPurpleAccount.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]; diff -r 1a4106e45d37 -r b737e71520e4 Source/AIAccountListPreferences.m --- 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];