MediaPlayer: Delete playlist items use plain old delete

... fixing a TODO now that #7078 is fixed.

There are 2 remove playlist actions: 'Remove' and 'Move file to Trash'

* 'Remove' playlist shortcut: Cmd+Delete => Delete
  (This also works from the main window to remove the file you're
   currently focused on/listening to from the playlist.)
* 'Remove file from playlist' shortcut has been removed. We have
  decided not to Trash files from MediaPlayer's playlist anymore,
  you'll have to trash the files from a regular Tracker window.

The 'Remove' shortcut gets plain old delete as the author intended.

Change-Id: I3b1e19405e029d9c5f398cfd7a8dbab49fb21fc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7292
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
Reviewed-by: John Scipione <[email protected]>
This commit is contained in:
John Scipione
2025-02-02 19:18:35 +00:00
parent 1e2091ced5
commit 540ae21864
6 changed files with 15 additions and 61 deletions
+4 -11
View File
@@ -2471,17 +2471,10 @@ MainWin::_KeyDown(BMessage* msg)
break;
case B_DELETE:
case 'd': // d for delete
case 't': // t for Trash
if ((modifiers() & B_COMMAND_KEY) != 0) {
BAutolock _(fPlaylist);
BMessage removeMessage(M_PLAYLIST_MOVE_TO_TRASH);
removeMessage.AddInt32("playlist index",
fPlaylist->CurrentItemIndex());
fPlaylistWindow->PostMessage(&removeMessage);
return true;
}
break;
BAutolock _(fPlaylist);
BMessage removeMessage(M_PLAYLIST_REMOVE);
fPlaylistWindow->PostMessage(&removeMessage);
return true;
}
switch (key) {