Add file view menu to file browser

Allows changing file sort options directly through context menu in the file browser
rather than having to exit the browser and go through General Settings>File_View

Change-Id: Iec124d512dcb934bd261b2144a699c23f536c165
This commit is contained in:
William Wilgus 2017-09-07 12:27:54 +02:00
parent 641e033e33
commit 0c06e5fe90
2 changed files with 3 additions and 1 deletions

View File

@ -69,6 +69,7 @@ static int context;
static const char *selected_file = NULL;
static int selected_file_attr = 0;
static int onplay_result = ONPLAY_OK;
extern struct menu_item_ex file_menu; /* settings_menu.c */
/* redefine MAKE_MENU so the MENU_EXITAFTERTHISMENU flag can be added easily */
#define MAKE_ONPLAYMENU( name, str, callback, icon, ... ) \
@ -1397,7 +1398,7 @@ MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),
#ifdef HAVE_RECORDING
&set_recdir_item,
#endif
&set_startdir_item, &add_to_faves_item,
&set_startdir_item, &add_to_faves_item, &file_menu,
);
static int onplaymenu_callback(int action,const struct menu_item_ex *this_item)
{

View File

@ -359,6 +359,7 @@ static int update_dir(void)
else
#endif
{
tc.sort_dir = global_settings.sort_dir;
/* if the tc.currdir has been changed, reload it ...*/
if (strncmp(tc.currdir, lastdir, sizeof(lastdir)) || reload_dir)
{