[haiku-commits] r41122 - in haiku/trunk/src/apps/mediaplayer: . playlist

  • From: jonas@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 27 Mar 2011 00:21:13 +0100 (CET)

Author: kirilla
Date: 2011-03-27 00:21:13 +0100 (Sun, 27 Mar 2011)
New Revision: 41122
Changeset: https://dev.haiku-os.org/changeset/41122

Modified:
   haiku/trunk/src/apps/mediaplayer/MainWin.cpp
   haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp
   haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h
Log:
Changes to the MediaPlayer's playlist window's menu options Remove, Remove all, 
Move to Trash.

Modified: haiku/trunk/src/apps/mediaplayer/MainWin.cpp
===================================================================
--- haiku/trunk/src/apps/mediaplayer/MainWin.cpp        2011-03-26 22:07:27 UTC 
(rev 41121)
+++ haiku/trunk/src/apps/mediaplayer/MainWin.cpp        2011-03-26 23:21:13 UTC 
(rev 41122)
@@ -2176,7 +2176,7 @@
                case 't':                       // t for Trash
                        if ((modifiers() & B_COMMAND_KEY) != 0) {
                                BAutolock _(fPlaylist);
-                               BMessage 
removeMessage(M_PLAYLIST_REMOVE_AND_PUT_INTO_TRASH);
+                               BMessage 
removeMessage(M_PLAYLIST_MOVE_TO_TRASH);
                                removeMessage.AddInt32("playlist index",
                                        fPlaylist->CurrentItemIndex());
                                fPlaylistWindow->PostMessage(&removeMessage);

Modified: haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp
===================================================================
--- haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp        
2011-03-26 22:07:27 UTC (rev 41121)
+++ haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.cpp        
2011-03-26 23:21:13 UTC (rev 41122)
@@ -52,21 +52,6 @@
 // * replacing the contents by other stuff.
 
 
-enum {
-       // file
-       M_PLAYLIST_OPEN                                                 = 
'open',
-       M_PLAYLIST_SAVE                                                 = 
'save',
-       M_PLAYLIST_SAVE_AS                                              = 
'svas',
-       M_PLAYLIST_SAVE_RESULT                                  = 'psrs',
-
-       // edit
-       M_PLAYLIST_EMPTY                                                = 
'emty',
-       M_PLAYLIST_RANDOMIZE                                    = 'rand',
-
-       M_PLAYLIST_REMOVE                                               = 'rmov'
-};
-
-
 static void
 display_save_alert(const char* message)
 {
@@ -223,16 +208,13 @@
                        _SavePlaylist(message);
                        break;
 
-               case M_PLAYLIST_EMPTY:
-                       fListView->RemoveAll();
-                       break;
                case M_PLAYLIST_RANDOMIZE:
                        fListView->Randomize();
                        break;
                case M_PLAYLIST_REMOVE:
                        fListView->RemoveSelected();
                        break;
-               case M_PLAYLIST_REMOVE_AND_PUT_INTO_TRASH:
+               case M_PLAYLIST_MOVE_TO_TRASH:
                {
                        int32 index;
                        if (message->FindInt32("playlist index", &index) == 
B_OK)
@@ -280,12 +262,12 @@
        editMenu->AddItem(new BMenuItem(B_TRANSLATE("Randomize"),
                new BMessage(M_PLAYLIST_RANDOMIZE), 'R'));
        editMenu->AddSeparatorItem();
-       editMenu->AddItem(new BMenuItem(B_TRANSLATE("Remove (Del)"),
+       editMenu->AddItem(new BMenuItem(B_TRANSLATE("Remove"),
                new BMessage(M_PLAYLIST_REMOVE)/*, B_DELETE, 0*/));
-       editMenu->AddItem(new BMenuItem(B_TRANSLATE("Remove and put into 
Trash"),
-               new BMessage(M_PLAYLIST_REMOVE_AND_PUT_INTO_TRASH), 'T'));
-       editMenu->AddItem(new BMenuItem(B_TRANSLATE("Remove all"),
-               new BMessage(M_PLAYLIST_EMPTY), 'N'));
+                       // TODO: See if we can support the modifier-less 
B_DELETE
+                       // and draw it properly too. B_NO_MODIFIER?
+       editMenu->AddItem(new BMenuItem(B_TRANSLATE("Move file to Trash"),
+               new BMessage(M_PLAYLIST_MOVE_TO_TRASH), 'T'));
 
        menuBar->AddItem(editMenu);
 

Modified: haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h
===================================================================
--- haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h  2011-03-26 
22:07:27 UTC (rev 41121)
+++ haiku/trunk/src/apps/mediaplayer/playlist/PlaylistWindow.h  2011-03-26 
23:21:13 UTC (rev 41122)
@@ -29,7 +29,16 @@
 
 
 enum {
-       M_PLAYLIST_REMOVE_AND_PUT_INTO_TRASH    = 'rmtr'
+       // file
+       M_PLAYLIST_OPEN = 'open',
+       M_PLAYLIST_SAVE = 'save',
+       M_PLAYLIST_SAVE_AS = 'svas',
+       M_PLAYLIST_SAVE_RESULT = 'psrs',
+
+       // edit
+       M_PLAYLIST_RANDOMIZE = 'rand',
+       M_PLAYLIST_REMOVE = 'rmov',
+       M_PLAYLIST_MOVE_TO_TRASH = 'trsh'
 };
 
 


Other related posts: