From ae54b06af42d166f74618f0de97e3cfc87d25980 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sat, 19 Apr 2025 00:46:28 +0200 Subject: [PATCH] playlist catalog: Hide Copy/Cut/Open With It may make sense to only show these in the file browser, where you'd expect to do more general file operations involving other folders. Change-Id: I008569d2017811ee54b4449acb30359843f35294 --- apps/onplay.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/apps/onplay.c b/apps/onplay.c index b7e1110b1b..8a1d676eb6 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -1049,9 +1049,13 @@ static int clipboard_callback(int action, else if (selected_file.path) { /* requires an actual file */ - if (this_item == &rename_file_item || - this_item == &clipboard_cut_item || - this_item == &clipboard_copy_item || + if (this_item == &clipboard_cut_item || + this_item == &clipboard_copy_item) + { + if (*tree_get_context()->dirfilter != SHOW_M3U) + return action; + } + else if (this_item == &rename_file_item || (this_item == &track_info_item && (selected_file.attr & FILE_ATTR_MASK) == FILE_ATTR_AUDIO) || (this_item == &properties_item && @@ -1076,12 +1080,14 @@ static int clipboard_callback(int action, ) return action; } - else if (this_item == &delete_file_item || - this_item == &list_viewers_item) - { /* only for files */ - return action; + else if (this_item == &list_viewers_item) + { + if (*tree_get_context()->dirfilter != SHOW_M3U) + return action; } + else if (this_item == &delete_file_item) + return action; #if LCD_DEPTH > 1 else if (this_item == &set_backdrop_item) {