diff options
author | Robert Kukla <roolku@rockbox.org> | 2008-04-09 13:50:33 +0000 |
---|---|---|
committer | Robert Kukla <roolku@rockbox.org> | 2008-04-09 13:50:33 +0000 |
commit | f617ba4a43e17fcac695be5f69cec1941834973b (patch) | |
tree | 1b05a428c274a2269cf8d566aaeb7723a84e4aad | |
parent | afc39fbfd7e87e8238e379688206a2eb511fbf37 (diff) | |
download | rockbox-f617ba4a43e17fcac695be5f69cec1941834973b.tar.gz rockbox-f617ba4a43e17fcac695be5f69cec1941834973b.zip |
fix FS#8860 - File browser context menu shows unnecessary items in an empty directory
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17047 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/onplay.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/onplay.c b/apps/onplay.c index 5374bc0a61..c36f2242ca 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -1077,16 +1077,20 @@ static int clipboard_callback(int action,const struct menu_item_ex *this_item) | |||
1077 | return (clipboard_selection[0] != 0) ? | 1077 | return (clipboard_selection[0] != 0) ? |
1078 | action : ACTION_EXIT_MENUITEM; | 1078 | action : ACTION_EXIT_MENUITEM; |
1079 | } | 1079 | } |
1080 | else if ((this_item == &create_dir_item) || | 1080 | else if (this_item == &create_dir_item) |
1081 | (this_item == &properties_item) || | 1081 | { |
1082 | /* always visible */ | ||
1083 | return action; | ||
1084 | } | ||
1085 | else if ((this_item == &properties_item) || | ||
1082 | (this_item == &rename_file_item) || | 1086 | (this_item == &rename_file_item) || |
1083 | (this_item == &clipboard_cut_item) || | 1087 | (this_item == &clipboard_cut_item) || |
1084 | (this_item == &clipboard_copy_item) || | 1088 | (this_item == &clipboard_copy_item) || |
1085 | (this_item == &add_to_faves_item) | 1089 | (this_item == &add_to_faves_item) |
1086 | ) | 1090 | ) |
1087 | { | 1091 | { |
1088 | /* always visible */ | 1092 | /* requires an actual file */ |
1089 | return action; | 1093 | return (selected_file) ? action : ACTION_EXIT_MENUITEM; |
1090 | } | 1094 | } |
1091 | #if LCD_DEPTH > 1 | 1095 | #if LCD_DEPTH > 1 |
1092 | else if (this_item == &set_backdrop_item) | 1096 | else if (this_item == &set_backdrop_item) |