[vlc-commits] fix play / pause and rename method for better clarity
David Fuhrmann
git at videolan.org
Fri Feb 15 20:23:48 CET 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Fri Feb 15 19:27:39 2013 +0100| [cf04d7a8a59430d9e15df30abb8c8e5c4ba31f61] | committer: David Fuhrmann
fix play / pause and rename method for better clarity
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf04d7a8a59430d9e15df30abb8c8e5c4ba31f61
---
modules/gui/macosx/ControlsBar.m | 2 +-
modules/gui/macosx/CoreInteraction.h | 2 +-
modules/gui/macosx/CoreInteraction.m | 4 ++--
modules/gui/macosx/VideoView.m | 2 +-
modules/gui/macosx/applescript.m | 2 +-
modules/gui/macosx/controls.m | 2 +-
modules/gui/macosx/fspanel.m | 2 +-
modules/gui/macosx/intf.m | 8 ++++----
8 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/modules/gui/macosx/ControlsBar.m b/modules/gui/macosx/ControlsBar.m
index 00e1db9..1ebcef1 100644
--- a/modules/gui/macosx/ControlsBar.m
+++ b/modules/gui/macosx/ControlsBar.m
@@ -155,7 +155,7 @@
- (IBAction)play:(id)sender
{
- [[VLCCoreInteraction sharedInstance] play];
+ [[VLCCoreInteraction sharedInstance] playOrPause];
}
- (void)resetPreviousButton
diff --git a/modules/gui/macosx/CoreInteraction.h b/modules/gui/macosx/CoreInteraction.h
index c673c2c..2db0a04 100644
--- a/modules/gui/macosx/CoreInteraction.h
+++ b/modules/gui/macosx/CoreInteraction.h
@@ -38,7 +38,7 @@
@property (readonly) NSString * nameOfCurrentPlaylistItem;
@property (nonatomic, readwrite) BOOL mute;
-- (void)play;
+- (void)playOrPause;
- (void)pause;
- (void)stop;
- (void)faster;
diff --git a/modules/gui/macosx/CoreInteraction.m b/modules/gui/macosx/CoreInteraction.m
index 933b1fe..d5d9abb 100644
--- a/modules/gui/macosx/CoreInteraction.m
+++ b/modules/gui/macosx/CoreInteraction.m
@@ -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;
diff --git a/modules/gui/macosx/VideoView.m b/modules/gui/macosx/VideoView.m
index 90b8881..9d32c39 100644
--- a/modules/gui/macosx/VideoView.m
+++ b/modules/gui/macosx/VideoView.m
@@ -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);
diff --git a/modules/gui/macosx/applescript.m b/modules/gui/macosx/applescript.m
index 4806edf..d9082ca 100644
--- a/modules/gui/macosx/applescript.m
+++ b/modules/gui/macosx/applescript.m
@@ -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"])
diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m
index cc7195b..72607bd 100644
--- a/modules/gui/macosx/controls.m
+++ b/modules/gui/macosx/controls.m
@@ -66,7 +66,7 @@
- (IBAction)play:(id)sender
{
- [[VLCCoreInteraction sharedInstance] play];
+ [[VLCCoreInteraction sharedInstance] playOrPause];
}
- (IBAction)stop:(id)sender
diff --git a/modules/gui/macosx/fspanel.m b/modules/gui/macosx/fspanel.m
index 54a1ee6..0de70bd 100644
--- a/modules/gui/macosx/fspanel.m
+++ b/modules/gui/macosx/fspanel.m
@@ -534,7 +534,7 @@
- (IBAction)play:(id)sender
{
- [[VLCCoreInteraction sharedInstance] play];
+ [[VLCCoreInteraction sharedInstance] playOrPause];
}
- (IBAction)forward:(id)sender
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 7223d50..8da95b9 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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;
}
More information about the vlc-commits
mailing list