Database: Remove File View menu

These options don't seem to
apply to the database...

Change-Id: I777073eeaed4099acf44996b95fa05b4c2b3abc4
This commit is contained in:
Christian Soffke 2022-04-12 19:31:24 +02:00 committed by Solomon Peachy
parent a234df30df
commit 1c66e97522
3 changed files with 27 additions and 1 deletions

View file

@ -56,6 +56,7 @@
#include "usb-ibasso.h" #include "usb-ibasso.h"
#endif #endif
#include "plugin.h" #include "plugin.h"
#include "onplay.h"
#ifndef HAS_BUTTON_HOLD #ifndef HAS_BUTTON_HOLD
static int selectivesoftlock_callback(int action, static int selectivesoftlock_callback(int action,
@ -221,12 +222,30 @@ static int fileview_callback(int action,
return action; return action;
} }
MAKE_MENU(file_menu, ID2P(LANG_FILE), 0, Icon_file_view_menu, static int filemenu_callback(int action,
const struct menu_item_ex *this_item,
struct gui_synclist *this_list);
MAKE_MENU(file_menu, ID2P(LANG_FILE), filemenu_callback, Icon_file_view_menu,
&sort_case, &sort_dir, &sort_file, &interpret_numbers, &sort_case, &sort_dir, &sort_file, &interpret_numbers,
&dirfilter, &show_filename_ext, &browse_current, &dirfilter, &show_filename_ext, &browse_current,
&show_path_in_browser, &show_path_in_browser,
&clear_start_directory_item &clear_start_directory_item
); );
static int filemenu_callback(int action,
const struct menu_item_ex *this_item,
struct gui_synclist *this_list)
{
(void)this_list;
if (action == ACTION_REQUEST_MENUITEM &&
this_item == &file_menu &&
get_onplay_context() == CONTEXT_ID3DB &&
get_current_activity() != ACTIVITY_SETTINGS)
return ACTION_EXIT_MENUITEM;
return action;
}
/* FILE VIEW MENU */ /* FILE VIEW MENU */
/***********************************/ /***********************************/

View file

@ -1986,3 +1986,9 @@ int onplay(char* file, int attr, int from, bool hotkey)
return onplay_result; return onplay_result;
} }
} }
int get_onplay_context(void)
{
return context;
}

View file

@ -22,6 +22,7 @@
#define _ONPLAY_H_ #define _ONPLAY_H_
int onplay(char* file, int attr, int from_screen, bool hotkey); int onplay(char* file, int attr, int from_screen, bool hotkey);
int get_onplay_context(void);
enum { enum {
ONPLAY_MAINMENU = -1, ONPLAY_MAINMENU = -1,