Some cleanup here and there.
This commit is contained in:
parent
f5a6f4309e
commit
baee0d4398
|
@ -54,7 +54,7 @@
|
||||||
#define WINDOW_REGULAR_WIDTH 468.0
|
#define WINDOW_REGULAR_WIDTH 468.0
|
||||||
|
|
||||||
#define UPDATE_UI_SECONDS 1.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 WEBSITE_URL @"http://transmission.m0k.org/"
|
||||||
#define FORUM_URL @"http://transmission.m0k.org/forum/"
|
#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
|
//toggle if within first few seconds of hour
|
||||||
NSCalendarDate * currentDate = [NSCalendarDate calendarDate];
|
NSCalendarDate * currentDate = [NSCalendarDate calendarDate];
|
||||||
if ([currentDate minuteOfHour] == 0 && [currentDate secondOfMinute] < AUTO_SPEED_LIMIT_SECONDS
|
if ([currentDate minuteOfHour] == 0 && [currentDate secondOfMinute] < AUTO_SPEED_LIMIT_SECONDS
|
||||||
&& [currentDate hourOfDay] == (fSpeedLimitEnabled ? [fDefaults integerForKey: @"SpeedLimitAutoOffHour"]
|
&& [currentDate hourOfDay] == [fDefaults integerForKey: fSpeedLimitEnabled
|
||||||
: [fDefaults integerForKey: @"SpeedLimitAutoOnHour"]))
|
? @"SpeedLimitAutoOffHour" : @"SpeedLimitAutoOnHour"])
|
||||||
{
|
{
|
||||||
[self toggleSpeedLimit: nil];
|
[self toggleSpeedLimit: nil];
|
||||||
|
|
||||||
[GrowlApplicationBridge notifyWithTitle: [@"Speed Limit Auto " stringByAppendingString:
|
[GrowlApplicationBridge notifyWithTitle: fSpeedLimitEnabled
|
||||||
fSpeedLimitEnabled ? @"Enabled" : @"Disabled"] description: @"Bandwidth settings changed"
|
? @"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];
|
notificationName: GROWL_AUTO_SPEED_LIMIT iconData: nil priority: 0 isSticky: NO clickContext: nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
#define TAB_FILES_HEIGHT 260.0
|
#define TAB_FILES_HEIGHT 260.0
|
||||||
#define TAB_OPTIONS_HEIGHT 83.0
|
#define TAB_OPTIONS_HEIGHT 83.0
|
||||||
|
|
||||||
|
#define INVALID -99
|
||||||
|
|
||||||
@interface InfoWindowController (Private)
|
@interface InfoWindowController (Private)
|
||||||
|
|
||||||
- (void) updateInfoActivity;
|
- (void) updateInfoActivity;
|
||||||
|
@ -322,7 +324,7 @@
|
||||||
{
|
{
|
||||||
NSEnumerator * enumerator = [fTorrents objectEnumerator];
|
NSEnumerator * enumerator = [fTorrents objectEnumerator];
|
||||||
Torrent * torrent = [enumerator nextObject]; //first torrent
|
Torrent * torrent = [enumerator nextObject]; //first torrent
|
||||||
const int INVALID = -99;
|
|
||||||
int ratioSetting = [torrent stopRatioSetting];
|
int ratioSetting = [torrent stopRatioSetting];
|
||||||
float ratioLimit = [torrent ratioLimit];
|
float ratioLimit = [torrent ratioLimit];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue