Commit cf04d7a8 authored by David Fuhrmann's avatar David Fuhrmann
Browse files

fix play / pause and rename method for better clarity

parent 57df1568
......@@ -155,7 +155,7 @@
- (IBAction)play:(id)sender
{
[[VLCCoreInteraction sharedInstance] play];
[[VLCCoreInteraction sharedInstance] playOrPause];
}
- (void)resetPreviousButton
......
......@@ -38,7 +38,7 @@
@property (readonly) NSString * nameOfCurrentPlaylistItem;
@property (nonatomic, readwrite) BOOL mute;
- (void)play;
- (void)playOrPause;
- (void)pause;
- (void)stop;
- (void)faster;
......
......@@ -78,14 +78,14 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
#pragma mark -
#pragma mark Playback Controls
- (void)play
- (void)playOrPause
{
input_thread_t * p_input;
p_input = pl_CurrentInput(VLCIntf);
playlist_t * p_playlist = pl_Get(VLCIntf);
if (p_input) {
playlist_Play(p_playlist);
playlist_Pause(p_playlist);
vlc_object_release(p_input);
} else {
bool empty;
......
......@@ -134,7 +134,7 @@
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
else if (p_vout) {
if (key == ' ')
[[VLCCoreInteraction sharedInstance] play];
[[VLCCoreInteraction sharedInstance] playOrPause];
else {
val.i_int |= (int)CocoaKeyToVLC(key);
var_Set(p_vout->p_libvlc, "key-pressed", val);
......
......@@ -88,7 +88,7 @@
playlist_t * p_playlist = pl_Get(p_intf);
if ([o_command isEqualToString:@"play"])
[[VLCCoreInteraction sharedInstance] play];
[[VLCCoreInteraction sharedInstance] playOrPause];
else if ([o_command isEqualToString:@"stop"])
[[VLCCoreInteraction sharedInstance] stop];
else if ([o_command isEqualToString:@"previous"])
......
......@@ -66,7 +66,7 @@
- (IBAction)play:(id)sender
{
[[VLCCoreInteraction sharedInstance] play];
[[VLCCoreInteraction sharedInstance] playOrPause];
}
- (IBAction)stop:(id)sender
......
......@@ -534,7 +534,7 @@
- (IBAction)play:(id)sender
{
[[VLCCoreInteraction sharedInstance] play];
[[VLCCoreInteraction sharedInstance] playOrPause];
}
- (IBAction)forward:(id)sender
......
......@@ -932,7 +932,7 @@ static VLCMain *_o_sharedMainInstance = nil;
int keyRepeat = (keyFlags & 0x1);
if (keyCode == NX_KEYTYPE_PLAY && keyState == 0)
[[VLCCoreInteraction sharedInstance] play];
[[VLCCoreInteraction sharedInstance] playOrPause];
if ((keyCode == NX_KEYTYPE_FAST || keyCode == NX_KEYTYPE_NEXT) && !b_mediakeyJustJumped) {
if (keyState == 0 && keyRepeat == 0)
......@@ -1078,13 +1078,13 @@ static VLCMain *_o_sharedMainInstance = nil;
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
break;
case k2009RemoteButtonPlay:
[[VLCCoreInteraction sharedInstance] play];
[[VLCCoreInteraction sharedInstance] playOrPause];
break;
case kRemoteButtonPlay:
if (count >= 2)
[[VLCCoreInteraction sharedInstance] toggleFullscreen];
else
[[VLCCoreInteraction sharedInstance] play];
[[VLCCoreInteraction sharedInstance] playOrPause];
break;
case kRemoteButtonVolume_Plus:
if (config_GetInt(VLCIntf, "macosx-appleremote-sysvol"))
......@@ -1192,7 +1192,7 @@ static VLCMain *_o_sharedMainInstance = nil;
}
if (key == 0x0020) { // space key
[[VLCCoreInteraction sharedInstance] play];
[[VLCCoreInteraction sharedInstance] playOrPause];
return YES;
}
......
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