diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/menus/settings_menu.c | 21 | ||||
-rw-r--r-- | apps/onplay.c | 6 | ||||
-rw-r--r-- | apps/onplay.h | 1 |
3 files changed, 27 insertions, 1 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 562a89e85a..2539f17860 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include "usb-ibasso.h" | 56 | #include "usb-ibasso.h" |
57 | #endif | 57 | #endif |
58 | #include "plugin.h" | 58 | #include "plugin.h" |
59 | #include "onplay.h" | ||
59 | 60 | ||
60 | #ifndef HAS_BUTTON_HOLD | 61 | #ifndef HAS_BUTTON_HOLD |
61 | static int selectivesoftlock_callback(int action, | 62 | static int selectivesoftlock_callback(int action, |
@@ -221,12 +222,30 @@ static int fileview_callback(int action, | |||
221 | return action; | 222 | return action; |
222 | } | 223 | } |
223 | 224 | ||
224 | MAKE_MENU(file_menu, ID2P(LANG_FILE), 0, Icon_file_view_menu, | 225 | static int filemenu_callback(int action, |
226 | const struct menu_item_ex *this_item, | ||
227 | struct gui_synclist *this_list); | ||
228 | MAKE_MENU(file_menu, ID2P(LANG_FILE), filemenu_callback, Icon_file_view_menu, | ||
225 | &sort_case, &sort_dir, &sort_file, &interpret_numbers, | 229 | &sort_case, &sort_dir, &sort_file, &interpret_numbers, |
226 | &dirfilter, &show_filename_ext, &browse_current, | 230 | &dirfilter, &show_filename_ext, &browse_current, |
227 | &show_path_in_browser, | 231 | &show_path_in_browser, |
228 | &clear_start_directory_item | 232 | &clear_start_directory_item |
229 | ); | 233 | ); |
234 | static int filemenu_callback(int action, | ||
235 | const struct menu_item_ex *this_item, | ||
236 | struct gui_synclist *this_list) | ||
237 | { | ||
238 | (void)this_list; | ||
239 | |||
240 | if (action == ACTION_REQUEST_MENUITEM && | ||
241 | this_item == &file_menu && | ||
242 | get_onplay_context() == CONTEXT_ID3DB && | ||
243 | get_current_activity() != ACTIVITY_SETTINGS) | ||
244 | return ACTION_EXIT_MENUITEM; | ||
245 | |||
246 | return action; | ||
247 | } | ||
248 | |||
230 | /* FILE VIEW MENU */ | 249 | /* FILE VIEW MENU */ |
231 | /***********************************/ | 250 | /***********************************/ |
232 | 251 | ||
diff --git a/apps/onplay.c b/apps/onplay.c index ee183450fa..7245ac2016 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -1986,3 +1986,9 @@ int onplay(char* file, int attr, int from, bool hotkey) | |||
1986 | return onplay_result; | 1986 | return onplay_result; |
1987 | } | 1987 | } |
1988 | } | 1988 | } |
1989 | |||
1990 | int get_onplay_context(void) | ||
1991 | { | ||
1992 | return context; | ||
1993 | } | ||
1994 | |||
diff --git a/apps/onplay.h b/apps/onplay.h index bff8dafff0..3a259d68e6 100644 --- a/apps/onplay.h +++ b/apps/onplay.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define _ONPLAY_H_ | 22 | #define _ONPLAY_H_ |
23 | 23 | ||
24 | int onplay(char* file, int attr, int from_screen, bool hotkey); | 24 | int onplay(char* file, int attr, int from_screen, bool hotkey); |
25 | int get_onplay_context(void); | ||
25 | 26 | ||
26 | enum { | 27 | enum { |
27 | ONPLAY_MAINMENU = -1, | 28 | ONPLAY_MAINMENU = -1, |