1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +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)
return [NSLocalizedString(@"Announce in progress", "Tracker next announce") stringByAppendingEllipsis]; {
else if (fStat.willAnnounce) case TR_TRACKER_ACTIVE:
return [NSString stringWithFormat: NSLocalizedString(@"Next announce in %@", "Tracker next announce"), return [NSLocalizedString(@"Announce in progress", "Tracker next announce") stringByAppendingEllipsis];
[NSString timeString: fStat.nextAnnounceTime - [[NSDate date] timeIntervalSince1970] showSeconds: YES]];
else if (fStat.isActive) case TR_TRACKER_WAITING:
return NSLocalizedString(@"Announce not scheduled", "Tracker next announce"); return [NSString stringWithFormat: NSLocalizedString(@"Next announce in %@", "Tracker next announce"),
else [NSString timeString: fStat.nextAnnounceTime - [[NSDate date] timeIntervalSince1970] showSeconds: YES]];
return NSLocalizedString(@"Tracker will be used as a backup", "Tracker next announce");
case TR_TRACKER_QUEUED:
return [NSLocalizedString(@"Announce is queued", "Tracker next announce") stringByAppendingEllipsis];
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