Use browse_folder() for browsing eq presets and languages.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27560 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-07-25 18:28:42 +00:00
parent 62f661829b
commit d904597524
2 changed files with 9 additions and 12 deletions

View file

@ -45,6 +45,7 @@
#include "gui/scrollbar.h"
#include "menu_common.h"
#include "viewport.h"
#include "exported_menus.h"
/*
* Utility functions
@ -594,18 +595,15 @@ static bool eq_save_preset(void)
}
/* Allows browsing of preset files */
bool eq_browse_presets(void)
{
return rockbox_browse(EQS_DIR, SHOW_CFG);
}
static struct browse_folder_info eqs = { EQS_DIR, SHOW_CFG };
MENUITEM_FUNCTION(eq_graphical, 0, ID2P(LANG_EQUALIZER_GRAPHICAL),
(int(*)(void))eq_menu_graphical, NULL, lowlatency_callback,
Icon_EQ);
MENUITEM_FUNCTION(eq_save, 0, ID2P(LANG_EQUALIZER_SAVE),
(int(*)(void))eq_save_preset, NULL, NULL, Icon_NOICON);
MENUITEM_FUNCTION(eq_browse, 0, ID2P(LANG_EQUALIZER_BROWSE),
(int(*)(void))eq_browse_presets, NULL, lowlatency_callback,
MENUITEM_FUNCTION(eq_browse, MENU_FUNC_USEPARAM, ID2P(LANG_EQUALIZER_BROWSE),
browse_folder, (void*)&eqs, lowlatency_callback,
Icon_NOICON);
MAKE_MENU(equalizer_menu, ID2P(LANG_EQUALIZER), NULL, Icon_EQ,

View file

@ -413,12 +413,11 @@ MAKE_MENU(hotkey_menu, ID2P(LANG_HOTKEY), 0, Icon_NOICON,
/***********************************/
/* SETTINGS MENU */
static int language_browse(void)
{
return (int)rockbox_browse(LANG_DIR, SHOW_LNG);
}
MENUITEM_FUNCTION(browse_langs, 0, ID2P(LANG_LANGUAGE), language_browse,
NULL, NULL, Icon_Language);
static struct browse_folder_info langs = { LANG_DIR, SHOW_LNG };
MENUITEM_FUNCTION(browse_langs, MENU_FUNC_USEPARAM, ID2P(LANG_LANGUAGE),
browse_folder, (void*)&langs, NULL, Icon_Language);
MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0,
Icon_General_settings_menu,