summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-07-25 18:28:42 +0000
committerThomas Martitz <kugel@rockbox.org>2010-07-25 18:28:42 +0000
commitd904597524f0dfeee537149f11c4472dc5f4d36e (patch)
tree64dde7905a743489095f2cd84983ea87eee6a577
parent62f661829b8e3067dc638c1e8f2dfaacb5dbf4e0 (diff)
downloadrockbox-d904597524f0dfeee537149f11c4472dc5f4d36e.tar.gz
rockbox-d904597524f0dfeee537149f11c4472dc5f4d36e.tar.bz2
rockbox-d904597524f0dfeee537149f11c4472dc5f4d36e.zip
Use browse_folder() for browsing eq presets and languages.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27560 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/menus/eq_menu.c10
-rw-r--r--apps/menus/settings_menu.c11
2 files changed, 9 insertions, 12 deletions
diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c
index 066787a896..720b98d7ae 100644
--- a/apps/menus/eq_menu.c
+++ b/apps/menus/eq_menu.c
@@ -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,
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index efd18b2204..f619bb7db7 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -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,