diff --git a/macosx/Controller.m b/macosx/Controller.m
index bc50fd482..88649a71a 100644
--- a/macosx/Controller.m
+++ b/macosx/Controller.m
@@ -3035,7 +3035,7 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
{
NSEnumerator * enumerator;
Torrent * torrent;
- BOOL active, canSleep;
+ BOOL active, allowSleep;
switch (messageType)
{
@@ -3060,20 +3060,20 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
case kIOMessageCanSystemSleep:
- canSleep = YES;
+ allowSleep = YES;
if ([fDefaults boolForKey: @"SleepPrevent"])
{
- //prevent idle sleep unless all inactive
+ //prevent idle sleep unless no torrents are active
enumerator = [fTorrents objectEnumerator];
while ((torrent = [enumerator nextObject]))
if ([torrent isActive] && ![torrent isStalled] && ![torrent isError])
{
- canSleep = NO;
+ allowSleep = NO;
break;
}
}
- if (canSleep)
+ if (allowSleep)
IOAllowPowerChange(fRootPort, (long) messageArgument);
else
IOCancelPowerChange(fRootPort, (long) messageArgument);
diff --git a/macosx/English.lproj/PrefsWindow.nib/info.nib b/macosx/English.lproj/PrefsWindow.nib/info.nib
index d5545df91..63cdda053 100644
--- a/macosx/English.lproj/PrefsWindow.nib/info.nib
+++ b/macosx/English.lproj/PrefsWindow.nib/info.nib
@@ -7,13 +7,13 @@
IBEditorPositions
153
- 558 568 583 268 0 0 1680 1028
+ 548 568 583 268 0 0 1680 1028
28
- 558 511 583 348 0 0 1680 1028
+ 558 528 563 348 0 0 1680 1028
41
- 548 550 583 305 0 0 1680 1028
+ 569 482 583 305 0 0 1680 1028
66
- 334 527 583 144 0 0 1680 1028
+ 548 630 583 144 0 0 1680 1028
IBFramework Version
446.1
@@ -23,7 +23,7 @@
IBOpenObjects
- 153
+ 28
IBSystem Version
8R4031
diff --git a/macosx/English.lproj/PrefsWindow.nib/keyedobjects.nib b/macosx/English.lproj/PrefsWindow.nib/keyedobjects.nib
index 2c4717afd..600d9b496 100644
Binary files a/macosx/English.lproj/PrefsWindow.nib/keyedobjects.nib and b/macosx/English.lproj/PrefsWindow.nib/keyedobjects.nib differ