Commit 67da2de6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: updated applescript binding to current API

parent e616d0df
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
*****************************************************************************/ *****************************************************************************/
#include "intf.h" #include "intf.h"
#include "applescript.h" #include "applescript.h"
#include "controls.h" #include "CoreInteraction.h"
#include "open.h"
/***************************************************************************** /*****************************************************************************
* VLGetURLScriptCommand implementation * VLGetURLScriptCommand implementation
...@@ -94,42 +93,37 @@ ...@@ -94,42 +93,37 @@
return nil; return nil;
} }
VLCControls * o_controls = [[VLCMain sharedInstance] controls]; if ( [o_command isEqualToString:@"play"] )
if ( o_controls )
{ {
if ( [o_command isEqualToString:@"play"] ) [[VLCCoreInteraction sharedInstance] play];
{ }
[o_controls play:self]; else if ( [o_command isEqualToString:@"stop"] )
} {
else if ( [o_command isEqualToString:@"stop"] ) [[VLCCoreInteraction sharedInstance] stop];
{ }
[o_controls stop:self]; else if ( [o_command isEqualToString:@"previous"] )
} {
else if ( [o_command isEqualToString:@"previous"] ) [[VLCCoreInteraction sharedInstance] previous];
{ }
[o_controls prev:self]; else if ( [o_command isEqualToString:@"next"] )
} {
else if ( [o_command isEqualToString:@"next"] ) [[VLCCoreInteraction sharedInstance] next];
{ }
[o_controls next:self]; else if ( [o_command isEqualToString:@"fullscreen"] )
} {
else if ( [o_command isEqualToString:@"fullscreen"] ) [[VLCCoreInteraction sharedInstance] toggleFullscreen];
{ }
[o_controls toogleFullscreen: self]; else if ( [o_command isEqualToString:@"mute"] )
} {
else if ( [o_command isEqualToString:@"mute"] ) [[VLCCoreInteraction sharedInstance] mute];
{ }
[o_controls mute:self]; else if ( [o_command isEqualToString:@"volumeUp"] )
} {
else if ( [o_command isEqualToString:@"volumeUp"] ) [[VLCCoreInteraction sharedInstance] volumeUp];
{ }
[o_controls volumeUp:self]; else if ( [o_command isEqualToString:@"volumeDown"] )
} {
else if ( [o_command isEqualToString:@"volumeDown"] ) [[VLCCoreInteraction sharedInstance] volumeDown];
{
[o_controls volumeDown:self];
}
} }
return nil; return nil;
} }
...@@ -147,7 +141,7 @@ ...@@ -147,7 +141,7 @@
- (void) setScriptFullscreenMode: (BOOL) mode { - (void) setScriptFullscreenMode: (BOOL) mode {
VLCControls * o_controls = [[VLCMain sharedInstance] controls]; VLCControls * o_controls = [[VLCMain sharedInstance] controls];
if (mode == [o_controls isFullscreen]) return; if (mode == [o_controls isFullscreen]) return;
[o_controls toogleFullscreen: self]; [[VLCCoreInteraction sharedInstance] toggleFullscreen];
} }
@end @end
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