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_controls )
{
if ( [o_command isEqualToString:@"play"] ) if ( [o_command isEqualToString:@"play"] )
{ {
[o_controls play:self]; [[VLCCoreInteraction sharedInstance] play];
} }
else if ( [o_command isEqualToString:@"stop"] ) else if ( [o_command isEqualToString:@"stop"] )
{ {
[o_controls stop:self]; [[VLCCoreInteraction sharedInstance] stop];
} }
else if ( [o_command isEqualToString:@"previous"] ) else if ( [o_command isEqualToString:@"previous"] )
{ {
[o_controls prev:self]; [[VLCCoreInteraction sharedInstance] previous];
} }
else if ( [o_command isEqualToString:@"next"] ) else if ( [o_command isEqualToString:@"next"] )
{ {
[o_controls next:self]; [[VLCCoreInteraction sharedInstance] next];
} }
else if ( [o_command isEqualToString:@"fullscreen"] ) else if ( [o_command isEqualToString:@"fullscreen"] )
{ {
[o_controls toogleFullscreen: self]; [[VLCCoreInteraction sharedInstance] toggleFullscreen];
} }
else if ( [o_command isEqualToString:@"mute"] ) else if ( [o_command isEqualToString:@"mute"] )
{ {
[o_controls mute:self]; [[VLCCoreInteraction sharedInstance] mute];
} }
else if ( [o_command isEqualToString:@"volumeUp"] ) else if ( [o_command isEqualToString:@"volumeUp"] )
{ {
[o_controls volumeUp:self]; [[VLCCoreInteraction sharedInstance] volumeUp];
} }
else if ( [o_command isEqualToString:@"volumeDown"] ) else if ( [o_command isEqualToString:@"volumeDown"] )
{ {
[o_controls volumeDown:self]; [[VLCCoreInteraction sharedInstance] volumeDown];
}
} }
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