summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2021-03-10 13:53:28 +0100
committerChristian Soffke <christian.soffke@gmail.com>2021-03-10 14:10:25 +0100
commitb3b8310e4e07902a8280a120948f0c32c85e67de (patch)
treeec32acf63cca075d8b276a93c0a630f695fddff3
parent73ec3971f791838ecd4da1e8c4933e543d0f7663 (diff)
downloadrockbox-b3b8310e4e.tar.gz
rockbox-b3b8310e4e.zip
Move "View" option for playlists up one level
The "View" option for playlists/.m3u files is currently part of the "Current Playlist" submenu even though it refers to the selected file/playlist and has nothing to do with the current playlist. It has been relocated to the context menu of the playlist file where it makes more sense and is easier to get to. Change-Id: I806ed46a7315293d7d20f29ed004cc8ab58cdcb7
-rw-r--r--apps/onplay.c31
-rw-r--r--manual/rockbox_interface/browsing_and_playing.tex2
2 files changed, 17 insertions, 16 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index a777807b9f..35d9a82bfd 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -644,17 +644,10 @@ MENUITEM_FUNCTION(replace_pl_item, MENU_FUNC_USEPARAM, ID2P(LANG_CLEAR_LIST_AND_
playlist_insert_func, (intptr_t*)PLAYLIST_REPLACE,
NULL, Icon_Playlist);
-/* others */
-MENUITEM_FUNCTION(view_playlist_item, 0, ID2P(LANG_VIEW),
- view_playlist, NULL,
- treeplaylist_callback, Icon_Playlist);
MAKE_ONPLAYMENU( tree_playlist_menu, ID2P(LANG_CURRENT_PLAYLIST),
treeplaylist_callback, Icon_Playlist,
- /* view */
- &view_playlist_item,
-
/* insert */
&i_pl_item, &i_first_pl_item, &i_last_pl_item,
&i_shuf_pl_item, &i_last_shuf_pl_item,
@@ -684,14 +677,6 @@ static int treeplaylist_callback(int action,
return action;
}
}
- else if (this_item == &view_playlist_item)
- {
- if ((selected_file_attr & FILE_ATTR_MASK) == FILE_ATTR_M3U &&
- context == CONTEXT_TREE)
- {
- return action;
- }
- }
else if (this_item == &i_pl_item)
{
if (global_status.resume_index != -1)
@@ -1679,10 +1664,15 @@ MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),
&pitch_screen_item,
#endif
);
+
+MENUITEM_FUNCTION(view_playlist_item, 0, ID2P(LANG_VIEW),
+ view_playlist, NULL,
+ onplaymenu_callback, Icon_Playlist);
+
/* used when onplay() is not called in the CONTEXT_WPS context */
MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),
onplaymenu_callback, Icon_file_view_menu,
- &tree_playlist_menu, &cat_playlist_menu,
+ &view_playlist_item, &tree_playlist_menu, &cat_playlist_menu,
&rename_file_item, &clipboard_cut_item, &clipboard_copy_item,
&clipboard_paste_item, &delete_file_item, &delete_dir_item,
#if LCD_DEPTH > 1
@@ -1708,6 +1698,15 @@ static int onplaymenu_callback(int action,
return ACTION_STD_CANCEL;
}
break;
+ case ACTION_REQUEST_MENUITEM:
+ if (this_item == &view_playlist_item)
+ {
+ if ((selected_file_attr & FILE_ATTR_MASK) == FILE_ATTR_M3U &&
+ context == CONTEXT_TREE)
+ return action;
+ }
+ return ACTION_EXIT_MENUITEM;
+ break;
case ACTION_EXIT_MENUITEM:
return ACTION_EXIT_AFTER_THIS_MENUITEM;
break;
diff --git a/manual/rockbox_interface/browsing_and_playing.tex b/manual/rockbox_interface/browsing_and_playing.tex
index 8a7c844059..1c8e6ed5d2 100644
--- a/manual/rockbox_interface/browsing_and_playing.tex
+++ b/manual/rockbox_interface/browsing_and_playing.tex
@@ -119,6 +119,8 @@ The \setting{Context Menu} contains the following options (unless otherwise note
each option pertains both to files and directories):
\begin{description}
+\item [View.]
+ Displays the contents of the selected playlist file.
\item [Current Playlist.]
Enters the \setting{Current Playlist Submenu} (see \reference{ref:currentplaylist_submenu}).
\item [Playlist Catalogue.]