Commit 9a73999a authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: allow the user to sleep his/her Mac using the Apple Remote using the...

macosx: allow the user to sleep his/her Mac using the Apple Remote using the designated AR event (close #4383)

This code uses NSAppleScript. Hence, it is likely going to be incompatible with the current sandbox implementation.
parent 8548e873
......@@ -1029,6 +1029,13 @@ static VLCMain *_o_sharedMainInstance = nil;
case kRemoteButtonMenu:
[o_controls showPosition: self]; //FIXME
break;
case kRemoteButtonPlay_Sleep:
{
NSAppleScript * script = [[NSAppleScript alloc] initWithSource:@"tell application \"System Events\" to sleep"];
[script executeAndReturnError:nil];
[script release];
break;
}
default:
/* Add here whatever you want other buttons to do */
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment