summaryrefslogtreecommitdiff
path: root/apps/menus/settings_menu.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-10-04 10:34:38 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-10-04 10:34:38 +0000
commitefbcece07b3a91f4b475559997f892e24751f0e6 (patch)
treec7ee12626dbd268df4a94bd46b29f6fc7126d2d4 /apps/menus/settings_menu.c
parentae75c6eb0ae9c75173ab1b06a26cad30fc5344c9 (diff)
New setting to control the file browser start location.
Set using the menu item in folder context menus, clear in the filebrowser settings. Can be abused to start selecting a *file* (or have a folder selected) instead of a starting inside a folder by removing the trailing / in the .cfg This only affects the file browser when it would open in / before (on boot, or when entereing after backing out of the browser before (*not* when exited with the menu action) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28206 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/settings_menu.c')
-rw-r--r--apps/menus/settings_menu.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index b49a8a813d..5de3a305f9 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -103,6 +103,15 @@ MENUITEM_SETTING(browse_current, &global_settings.browse_current, NULL);
#ifdef HAVE_LCD_BITMAP
MENUITEM_SETTING(show_path_in_browser, &global_settings.show_path_in_browser, NULL);
#endif
+static int clear_start_directory(void)
+{
+ strcpy(global_settings.start_directory, "/");
+ settings_save();
+ splash(HZ, ID2P(LANG_RESET_DONE_CLEAR));
+ return false;
+}
+MENUITEM_FUNCTION(clear_start_directory_item, 0, ID2P(LANG_RESET_START_DIR),
+ clear_start_directory, NULL, NULL, Icon_file_view_menu);
static int fileview_callback(int action,const struct menu_item_ex *this_item)
{
static int oldval;
@@ -124,8 +133,9 @@ MAKE_MENU(file_menu, ID2P(LANG_FILE), 0, Icon_file_view_menu,
&sort_case, &sort_dir, &sort_file, &interpret_numbers,
&dirfilter, &show_filename_ext, &browse_current,
#ifdef HAVE_LCD_BITMAP
- &show_path_in_browser
+ &show_path_in_browser,
#endif
+ &clear_start_directory_item
);
/* FILE VIEW MENU */
/***********************************/