[haiku-commits] haiku: hrev48330 - src/apps/mediaplayer

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 18 Nov 2014 11:10:32 +0100 (CET)

hrev48330 adds 1 changeset to branch 'master'
old head: 09c2f0cb5505cb0e052ea95d39d8db706361ccd7
new head: 6f08ef0ac2811266a9b689c9d416200f39d75e12
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=6f08ef0+%5E09c2f0c

----------------------------------------------------------------------------

6f08ef0: MediaPlayer: some shortcuts tweaks
  
  * F: toggle fullscreen (like tab)
  * V: removed. Stopping the replay would lose the current position, and
  we don't want non-undoable lossy operation on single keystrokes
  * X: toggles play/pause instead of forcing play (like space)
  * Alt+Shift+0/1/2/3 changes the aspecdt ratio to "raw", "default",
  "4/3", "16/9".
  
  Fixes remaining parts of #2495.

                                 [ Adrien Destugues <pulkomandy@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev48330
Commit:      6f08ef0ac2811266a9b689c9d416200f39d75e12
URL:         http://cgit.haiku-os.org/haiku/commit/?id=6f08ef0
Author:      Adrien Destugues <pulkomandy@xxxxxxxxx>
Date:        Tue Nov 18 10:08:30 2014 UTC

Ticket:      https://dev.haiku-os.org/ticket/2495

----------------------------------------------------------------------------

1 file changed, 9 insertions(+), 9 deletions(-)
src/apps/mediaplayer/MainWin.cpp | 18 +++++++++---------

----------------------------------------------------------------------------

diff --git a/src/apps/mediaplayer/MainWin.cpp b/src/apps/mediaplayer/MainWin.cpp
index 3229867..5c37053 100644
--- a/src/apps/mediaplayer/MainWin.cpp
+++ b/src/apps/mediaplayer/MainWin.cpp
@@ -1592,21 +1592,21 @@ MainWin::_SetupVideoAspectItems(BMenu* menu)
        // be "16 : 9".
 
        menu->AddItem(item = new BMenuItem(B_TRANSLATE("Stream settings"),
-               new BMessage(M_ASPECT_SAME_AS_SOURCE)));
+               new BMessage(M_ASPECT_SAME_AS_SOURCE), '1', B_SHIFT_KEY));
        item->SetMarked(widthAspect == fWidthAspect
                && heightAspect == fHeightAspect);
 
        menu->AddItem(item = new BMenuItem(B_TRANSLATE("No aspect correction"),
-               new BMessage(M_ASPECT_NO_DISTORTION)));
+               new BMessage(M_ASPECT_NO_DISTORTION), '0', B_SHIFT_KEY));
        item->SetMarked(width == fWidthAspect && height == fHeightAspect);
 
        menu->AddSeparatorItem();
 
        menu->AddItem(item = new BMenuItem("4 : 3",
-               new BMessage(M_ASPECT_4_3)));
+               new BMessage(M_ASPECT_4_3), 2, B_SHIFT_KEY));
        item->SetMarked(fWidthAspect == 4 && fHeightAspect == 3);
        menu->AddItem(item = new BMenuItem("16 : 9",
-               new BMessage(M_ASPECT_16_9)));
+               new BMessage(M_ASPECT_16_9), 3, B_SHIFT_KEY));
        item->SetMarked(fWidthAspect == 16 && fHeightAspect == 9);
 
        menu->AddSeparatorItem();
@@ -2123,6 +2123,7 @@ MainWin::_KeyDown(BMessage* msg)
                        break;
 
                case B_TAB:
+               case 'f':
                        if ((modifier & (B_COMMAND_KEY | B_CONTROL_KEY | 
B_OPTION_KEY
                                        | B_MENU_KEY)) == 0) {
                                PostMessage(M_TOGGLE_FULLSCREEN);
@@ -2246,19 +2247,18 @@ MainWin::_KeyDown(BMessage* msg)
                        return true;
 
                // Playback controls along the bottom of the keyboard:
-               // Z X C V B  for US International
+               // Z X C (V) B  for US International
                case 0x4c:
                        PostMessage(M_SKIP_PREV);
                        return true;
                case 0x4d:
-                       fController->Play();
+                       fController->TogglePlaying();
                        return true;
                case 0x4e:
                        fController->Pause();
                        return true;
-               case 0x4f:
-                       fController->Stop();
-                       return true;
+               // 0x4f would be the "stop" button, but this is too dangerous 
to be
+               // triggered with a single key (it loses the current position)
                case 0x50:
                        PostMessage(M_SKIP_NEXT);
                        return true;


Other related posts: