From 4f86bbcea337039db9ec6610da54033a3f3e110d Mon Sep 17 00:00:00 2001 From: Eric Petit Date: Fri, 10 Feb 2006 20:06:39 +0000 Subject: [PATCH] Simplifications --- macosx/Controller.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index c843ca975..e0e28ad53 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -184,7 +184,7 @@ static void sleepCallBack( void * controller, io_service_t y, - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { int active = fDownloading + fSeeding; - if (active > 0 && [[NSUserDefaults standardUserDefaults] boolForKey: @"CheckQuit"]) + if (active > 0 && [fDefaults boolForKey: @"CheckQuit"]) { NSString * message = active == 1 ? @"There is an active torrent. Do you really want to quit?" @@ -590,11 +590,10 @@ static void sleepCallBack( void * controller, io_service_t y, } //badge dock - NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults]; [fBadger updateBadgeWithCompleted: fCompleted - uploadRate: ul >= 0.1 && [defaults boolForKey: @"BadgeUploadRate"] + uploadRate: ul >= 0.1 && [fDefaults boolForKey: @"BadgeUploadRate"] ? [NSString stringForSpeedAbbrev: ul] : nil - downloadRate: dl >= 0.1 && [defaults boolForKey: @"BadgeDownloadRate"] + downloadRate: dl >= 0.1 && [fDefaults boolForKey: @"BadgeDownloadRate"] ? [NSString stringForSpeedAbbrev: dl] : nil]; }