adium 3899:b737e71520e4: Fixed broken percentage reflecting conn...
commits at adium.im
commits at adium.im
Wed May 11 22:51:52 UTC 2011
details: http://hg.adium.im/adium/rev/b737e71520e4
revision: 3899:b737e71520e4
branch: (none)
author: Patrick Steinhardt <steinhardt.p at me.com>
date: Wed May 04 10:23:27 2011 +0200
Fixed broken percentage reflecting connection progress in Accounts.
r=xnyhps. Fixes #15163
diffs (24 lines):
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];
More information about the commits
mailing list