]> git.sesse.net Git - vlc/commitdiff
fix play / pause and rename method for better clarity
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Fri, 15 Feb 2013 18:27:39 +0000 (19:27 +0100)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Fri, 15 Feb 2013 19:22:39 +0000 (20:22 +0100)
modules/gui/macosx/ControlsBar.m
modules/gui/macosx/CoreInteraction.h
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/VideoView.m
modules/gui/macosx/applescript.m
modules/gui/macosx/controls.m
modules/gui/macosx/fspanel.m
modules/gui/macosx/intf.m

index 00e1db91c8fd807da9c12f82e31f93ef970b69f4..1ebcef105dd460146ccf680abaf7cdf73c9f9796 100644 (file)
 
 - (IBAction)play:(id)sender
 {
-    [[VLCCoreInteraction sharedInstance] play];
+    [[VLCCoreInteraction sharedInstance] playOrPause];
 }
 
 - (void)resetPreviousButton
index c673c2c9e2ab1fe1fcf6d63bf52123c1f1ca1473..2db0a04c2d7f3ac569b07121570f5feacf84c452 100644 (file)
@@ -38,7 +38,7 @@
 @property (readonly) NSString * nameOfCurrentPlaylistItem;
 @property (nonatomic, readwrite) BOOL mute;
 
-- (void)play;
+- (void)playOrPause;
 - (void)pause;
 - (void)stop;
 - (void)faster;
index 933b1fe940f44819fed90e720e3ced52a720113a..d5d9abbf8d9d6a0029f3869eb39fa01d3ae93d04 100644 (file)
@@ -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;
index 90b888104405a195e949183ff9e308e678b5ab83..9d32c3907eb5326dbd1d5d8adeab8eef63849aa8 100644 (file)
                 [[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);
index 4806edfeadc966b6bb469e8c3a0e84f1ee048584..d9082caad49a86062580421ae9b027a27399b61e 100644 (file)
@@ -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"])
index cc7195b0167806a710d02dd6a0c9fdfdb2e17334..72607bd867f65cac342df3b72f9875063db023a5 100644 (file)
@@ -66,7 +66,7 @@
 
 - (IBAction)play:(id)sender
 {
-    [[VLCCoreInteraction sharedInstance] play];
+    [[VLCCoreInteraction sharedInstance] playOrPause];
 }
 
 - (IBAction)stop:(id)sender
index 54a1ee69e8a0d681b5393b7aa84b23c9a0baf8ff..0de70bd01db8b4a953e1544b53da6d16b206079d 100644 (file)
 
 - (IBAction)play:(id)sender
 {
-    [[VLCCoreInteraction sharedInstance] play];
+    [[VLCCoreInteraction sharedInstance] playOrPause];
 }
 
 - (IBAction)forward:(id)sender
index 7223d50ae8a9d0338f092825a94cb726a5bea5df..8da95b962fddd0e4f7fb9f7d0802c75904855da6 100644 (file)
@@ -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;
         }