diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 78e49ac4f8..0e52323dc2 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -829,6 +829,8 @@ long gui_wps_show(void) if (retval == ONPLAY_MAINMENU || !audio_status()) return GO_TO_ROOT; + else if (retval == ONPLAY_REVEAL_FILE) + return GO_TO_FILEBROWSER; else if (retval == ONPLAY_PLAYLIST) return GO_TO_PLAYLIST_VIEWER; else if (retval == ONPLAY_PLUGIN) diff --git a/apps/lang/english.lang b/apps/lang/english.lang index aeedbc2541..d0afa75c43 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -17057,3 +17057,31 @@ *: "U S B" + + id: LANG_FILE_NOT_FOUND + desc: When file does not exist + user: core + + *: "File not found" + + + *: "File not found" + + + *: "File not found" + + + + id: LANG_SHOW_IN_FILES + desc: Reveal item in File Browser + user: core + + *: "Show in Files" + + + *: "Show in Files" + + + *: "Show in Files" + + diff --git a/apps/onplay.c b/apps/onplay.c index 15b519871f..974a65298d 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -897,6 +897,22 @@ static bool onplay_load_plugin(void *param) return false; } +static int reveal(void) +{ + if (!file_exists(selected_file.path)) + { + splash(HZ*2, ID2P(LANG_FILE_NOT_FOUND)); + return 0; + } + + strmemccpy(global_status.browse_last_folder, selected_file.path, + sizeof global_status.browse_last_folder); + onplay_result = ONPLAY_REVEAL_FILE; + return 0; +} + +MENUITEM_FUNCTION(reveal_item, 0, ID2P(LANG_SHOW_IN_FILES), + reveal, NULL, Icon_file_view_menu); MENUITEM_FUNCTION(list_viewers_item, 0, ID2P(LANG_ONPLAY_OPEN_WITH), list_viewers, clipboard_callback, Icon_NOICON); MENUITEM_FUNCTION_W_PARAM(properties_item, 0, ID2P(LANG_PROPERTIES), @@ -1124,8 +1140,8 @@ MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), #endif &bookmark_menu, &plugin_item, - &browse_id3_item, &list_viewers_item, - &delete_file_item, &view_cue_item, + &browse_id3_item, + &reveal_item, &view_cue_item, #ifdef HAVE_PITCHCONTROL &pitch_menu, #endif diff --git a/apps/onplay.h b/apps/onplay.h index 26b1247f7b..4e5e6eeb69 100644 --- a/apps/onplay.h +++ b/apps/onplay.h @@ -38,6 +38,7 @@ enum { ONPLAY_MAINMENU = -1, ONPLAY_OK = 0, ONPLAY_RELOAD_DIR, + ONPLAY_REVEAL_FILE, ONPLAY_START_PLAY, ONPLAY_PLAYLIST, ONPLAY_PLUGIN, diff --git a/manual/rockbox_interface/browsing_and_playing.tex b/manual/rockbox_interface/browsing_and_playing.tex index 45a145ad3a..c6443a9351 100644 --- a/manual/rockbox_interface/browsing_and_playing.tex +++ b/manual/rockbox_interface/browsing_and_playing.tex @@ -143,7 +143,9 @@ each option pertains both to files and directories): Deletes the currently selected file. This option applies only to files, and not to directories. Rockbox will ask for confirmation before deleting a file. Press \ActionYesNoAccept{} - to confirm deletion or any other key to cancel. + to confirm deletion or any other key to cancel. When deleting a currently + playing file, the part of the file that has already been buffered (i.e. read + into the \daps\ memory) will continue playing. This may even be the whole track. \item [Delete Directory.] Deletes the currently selected directory and all of the files and subdirectories it may contain. Deleted directories cannot be recovered. Use this feature with diff --git a/manual/rockbox_interface/wps.tex b/manual/rockbox_interface/wps.tex index 3ed0d961e6..918d62a436 100644 --- a/manual/rockbox_interface/wps.tex +++ b/manual/rockbox_interface/wps.tex @@ -254,15 +254,8 @@ from the WPS, % \setting{Context Menu}. Then select \setting{Show Track Info}. The same steps work in the Playlist Viewer as well.} -\subsubsection{Open With...} -This \setting{Open With} function is the same as the \setting{Open With} -function in the file browser's \setting{Context Menu}. - -\subsubsection{Delete} -Delete the currently playing file. The file will be deleted but the playback -of the file will not stop immediately. Instead, the part of the file that -has already been buffered (i.e. read into the \daps\ memory) will be played. -This may even be the whole track. +\subsubsection{Show in Files} +Reveal the currently playing track in the \setting{File Browser}. \opt{pitchscreen}{ \subsubsection{\label{sec:pitchscreen}Pitch}