1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00

fix Mac build

This commit is contained in:
Mitchell Livingston 2009-10-09 22:29:34 +00:00
parent f607c7591a
commit 391b009c58

View file

@ -77,7 +77,7 @@
- (NSString *) lastAnnounceStatusString - (NSString *) lastAnnounceStatusString
{ {
NSString * dateString; NSString * dateString;
if (fStat.hasAnnounced && fStat.lastAnnounceTime != 0) if (fStat.hasAnnounced)
{ {
NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateStyle: NSDateFormatterFullStyle]; [dateFormatter setDateStyle: NSDateFormatterFullStyle];
@ -111,15 +111,26 @@
- (NSString *) nextAnnounceStatusString - (NSString *) nextAnnounceStatusString
{ {
if (fStat.isAnnouncing) switch (fStat.announceState)
{
case TR_TRACKER_ACTIVE:
return [NSLocalizedString(@"Announce in progress", "Tracker next announce") stringByAppendingEllipsis]; return [NSLocalizedString(@"Announce in progress", "Tracker next announce") stringByAppendingEllipsis];
else if (fStat.willAnnounce)
case TR_TRACKER_WAITING:
return [NSString stringWithFormat: NSLocalizedString(@"Next announce in %@", "Tracker next announce"), return [NSString stringWithFormat: NSLocalizedString(@"Next announce in %@", "Tracker next announce"),
[NSString timeString: fStat.nextAnnounceTime - [[NSDate date] timeIntervalSince1970] showSeconds: YES]]; [NSString timeString: fStat.nextAnnounceTime - [[NSDate date] timeIntervalSince1970] showSeconds: YES]];
else if (fStat.isActive)
return NSLocalizedString(@"Announce not scheduled", "Tracker next announce"); case TR_TRACKER_QUEUED:
else return [NSLocalizedString(@"Announce is queued", "Tracker next announce") stringByAppendingEllipsis];
return NSLocalizedString(@"Tracker will be used as a backup", "Tracker next announce");
case TR_TRACKER_INACTIVE:
return fStat.isActive ? NSLocalizedString(@"Announce not scheduled", "Tracker next announce")
: NSLocalizedString(@"Tracker will be used as a backup", "Tracker next announce");
default:
NSAssert(NO, @"unknown announce state: %d", fStat.announceState);
return nil;
}
} }
- (NSString *) lastScrapeStatusString - (NSString *) lastScrapeStatusString