refine the sleep option's text a little

This commit is contained in:
Mitchell Livingston 2007-08-30 12:16:11 +00:00
parent c443e88444
commit bcfaf3c56d
3 changed files with 10 additions and 10 deletions

View File

@ -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);

View File

@ -7,13 +7,13 @@
<key>IBEditorPositions</key>
<dict>
<key>153</key>
<string>558 568 583 268 0 0 1680 1028 </string>
<string>548 568 583 268 0 0 1680 1028 </string>
<key>28</key>
<string>558 511 583 348 0 0 1680 1028 </string>
<string>558 528 563 348 0 0 1680 1028 </string>
<key>41</key>
<string>548 550 583 305 0 0 1680 1028 </string>
<string>569 482 583 305 0 0 1680 1028 </string>
<key>66</key>
<string>334 527 583 144 0 0 1680 1028 </string>
<string>548 630 583 144 0 0 1680 1028 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
@ -23,7 +23,7 @@
</array>
<key>IBOpenObjects</key>
<array>
<integer>153</integer>
<integer>28</integer>
</array>
<key>IBSystem Version</key>
<string>8R4031</string>