diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-05-29 04:39:11 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-05-29 04:39:11 +0000 |
commit | 9adf056b7b4e267a1f509376e6fad72334157cf1 (patch) | |
tree | 8b60743d91c3e4fc89c7ed2262cf95a126a899d9 /apps/menus/recording_menu.c | |
parent | d696769a82e349645fbe2ad7820460169fe5e58f (diff) | |
download | rockbox-9adf056b7b4e267a1f509376e6fad72334157cf1.tar.gz rockbox-9adf056b7b4e267a1f509376e6fad72334157cf1.zip |
this adds 2 options to the recording settings menu to let you save all the recording settings to a .cfg and view your saved presets.
saves them in /.rockbox/recpresets.
also moves the default location for "write theme config" to /.rockbox/themes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13510 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/recording_menu.c')
-rw-r--r-- | apps/menus/recording_menu.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c index 62af2f94fe..50b49c9db9 100644 --- a/apps/menus/recording_menu.c +++ b/apps/menus/recording_menu.c @@ -62,6 +62,7 @@ #endif #include "action.h" + static bool no_source_in_menu = true; int recmenu_callback(int action,const struct menu_item_ex *this_item); @@ -803,9 +804,24 @@ MENUITEM_FUNCTION(rectrigger_item, 0, ID2P(LANG_RECORD_TRIGGER), +/* from main_menu.c */ +struct browse_folder_info { + const char* dir; + int show_options; +}; +static struct browse_folder_info rec_config_browse = {RECPRESETS_DIR, SHOW_CFG}; +int browse_folder(void *param); +MENUITEM_FUNCTION(browse_recconfigs, MENU_FUNC_USEPARAM, ID2P(LANG_CUSTOM_CFG), + browse_folder, (void*)&rec_config_browse, NULL, Icon_Config); +static int write_settings_file(void) +{ + return settings_save_config(SETTINGS_SAVE_RECPRESETS); +} +MENUITEM_FUNCTION(save_recpresets_item, 0, ID2P(LANG_SAVE_SETTINGS), + write_settings_file, NULL, NULL, Icon_Config); - -MAKE_MENU(recording_setting_menu, ID2P(LANG_RECORDING_SETTINGS), NULL, Icon_Recording, +MAKE_MENU(recording_setting_menu, ID2P(LANG_RECORDING_SETTINGS), + NULL, Icon_Recording, #if CONFIG_CODEC == MAS3587F &rec_quality, #endif @@ -827,6 +843,7 @@ MAKE_MENU(recording_setting_menu, ID2P(LANG_RECORDING_SETTINGS), NULL, Icon_Reco #ifdef HAVE_AGC &agc_preset, &agc_cliptime, #endif + &browse_recconfigs, &save_recpresets_item ); bool recording_menu(bool no_source) |