on 10.6 get the modifier keys from NSEvent's class method

This commit is contained in:
Mitchell Livingston 2009-08-30 16:22:51 +00:00
parent 26d89427de
commit a32cdcc255
2 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ typedef enum
if ([identifier isEqualToString: @"Check"])
{
NSIndexSet * indexSet;
if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask)
if (([NSApp isOnSnowLeopardOrBetter] ? [NSEvent modifierFlags] : [[NSApp currentEvent] modifierFlags]) & NSAlternateKeyMask)
indexSet = [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, [fTorrent fileCount])];
else
indexSet = [(FileListNode *)item indexes];

View File

@ -539,7 +539,7 @@
[fController stopTorrents: [NSArray arrayWithObject: torrent]];
else
{
if ([[NSApp currentEvent] modifierFlags] & NSAlternateKeyMask)
if (([NSApp isOnSnowLeopardOrBetter] ? [NSEvent modifierFlags] : [[NSApp currentEvent] modifierFlags]) & NSAlternateKeyMask)
[fController resumeTorrentsNoWait: [NSArray arrayWithObject: torrent]];
else if ([torrent waitingToStart])
[fController stopTorrents: [NSArray arrayWithObject: torrent]];