Fixed broken percentage reflecting connection progress in Accounts.
authorPatrick Steinhardt <steinhardt.p@me.com>
Wed, 04 May 2011 10:23:27 +0200
changeset 3899b737e71520e4
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
     1.1 --- a/Plugins/Purple Service/CBPurpleAccount.m	Sun May 08 22:21:51 2011 +0200
     1.2 +++ b/Plugins/Purple Service/CBPurpleAccount.m	Wed May 04 10:23:27 2011 +0200
     1.3 @@ -2137,7 +2137,7 @@
     1.4  	NSString	*progressString = [self connectionStringForStep:[step integerValue]];
     1.5  
     1.6  	[self setValue:progressString forProperty:@"connectionProgressString" notify:NO];
     1.7 -	[self setValue:connectionProgressPrecent forProperty:@"connectionProgressPercent" notify:NO];	
     1.8 +	[self setValue:[NSNumber numberWithDouble:[connectionProgressPrecent doubleValue] * 100] forProperty:@"connectionProgressPercent" notify:NO];
     1.9  
    1.10  	//Apply any changes
    1.11  	[self notifyOfChangedPropertiesSilently:NO];
     2.1 --- a/Source/AIAccountListPreferences.m	Sun May 08 22:21:51 2011 +0200
     2.2 +++ b/Source/AIAccountListPreferences.m	Wed May 04 10:23:27 2011 +0200
     2.3 @@ -706,7 +706,7 @@
     2.4  	
     2.5  	if ([account valueForProperty:@"connectionProgressString"] && [account boolValueForProperty:@"isConnecting"]) {
     2.6  		// Connection status if we're currently connecting, with the percent at the end
     2.7 -		statusMessage = [[account valueForProperty:@"connectionProgressString"] stringByAppendingFormat:@" (%2.f%%)", [[account valueForProperty:@"connectionProgressPercent"] doubleValue]*100.0];
     2.8 +		statusMessage = [[account valueForProperty:@"connectionProgressString"] stringByAppendingFormat:@" (%2.f%%)", [[account valueForProperty:@"connectionProgressPercent"] doubleValue]];
     2.9  	} else if ([account lastDisconnectionError] && ![account boolValueForProperty:@"isOnline"] && ![account boolValueForProperty:@"isConnecting"]) {
    2.10  		// If there's an error and we're not online and not connecting
    2.11  		NSMutableString *returnedMessage = [[[account lastDisconnectionError] mutableCopy] autorelease];