diff --git a/macosx/Controller.m b/macosx/Controller.m index 954051803..64ea29e58 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -54,7 +54,7 @@ #define WINDOW_REGULAR_WIDTH 468.0 #define UPDATE_UI_SECONDS 1.0 -#define AUTO_SPEED_LIMIT_SECONDS 10.0 +#define AUTO_SPEED_LIMIT_SECONDS 5.0 #define WEBSITE_URL @"http://transmission.m0k.org/" #define FORUM_URL @"http://transmission.m0k.org/forum/" @@ -1328,13 +1328,14 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy //toggle if within first few seconds of hour NSCalendarDate * currentDate = [NSCalendarDate calendarDate]; if ([currentDate minuteOfHour] == 0 && [currentDate secondOfMinute] < AUTO_SPEED_LIMIT_SECONDS - && [currentDate hourOfDay] == (fSpeedLimitEnabled ? [fDefaults integerForKey: @"SpeedLimitAutoOffHour"] - : [fDefaults integerForKey: @"SpeedLimitAutoOnHour"])) + && [currentDate hourOfDay] == [fDefaults integerForKey: fSpeedLimitEnabled + ? @"SpeedLimitAutoOffHour" : @"SpeedLimitAutoOnHour"]) { [self toggleSpeedLimit: nil]; - [GrowlApplicationBridge notifyWithTitle: [@"Speed Limit Auto " stringByAppendingString: - fSpeedLimitEnabled ? @"Enabled" : @"Disabled"] description: @"Bandwidth settings changed" + [GrowlApplicationBridge notifyWithTitle: fSpeedLimitEnabled + ? @"Speed Limit Auto Enabled" : @"Speed Limit Auto Disabled" + description: @"Bandwidth settings changed" notificationName: GROWL_AUTO_SPEED_LIMIT iconData: nil priority: 0 isSticky: NO clickContext: nil]; } } diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 48961ef11..33c3adbc8 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -45,6 +45,8 @@ #define TAB_FILES_HEIGHT 260.0 #define TAB_OPTIONS_HEIGHT 83.0 +#define INVALID -99 + @interface InfoWindowController (Private) - (void) updateInfoActivity; @@ -322,7 +324,7 @@ { NSEnumerator * enumerator = [fTorrents objectEnumerator]; Torrent * torrent = [enumerator nextObject]; //first torrent - const int INVALID = -99; + int ratioSetting = [torrent stopRatioSetting]; float ratioLimit = [torrent ratioLimit];