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)
downloadrockbox-efbcece07b3a91f4b475559997f892e24751f0e6.tar.gz
rockbox-efbcece07b3a91f4b475559997f892e24751f0e6.zip
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);
103#ifdef HAVE_LCD_BITMAP 103#ifdef HAVE_LCD_BITMAP
104MENUITEM_SETTING(show_path_in_browser, &global_settings.show_path_in_browser, NULL); 104MENUITEM_SETTING(show_path_in_browser, &global_settings.show_path_in_browser, NULL);
105#endif 105#endif
106static int clear_start_directory(void)
107{
108 strcpy(global_settings.start_directory, "/");
109 settings_save();
110 splash(HZ, ID2P(LANG_RESET_DONE_CLEAR));
111 return false;
112}
113MENUITEM_FUNCTION(clear_start_directory_item, 0, ID2P(LANG_RESET_START_DIR),
114 clear_start_directory, NULL, NULL, Icon_file_view_menu);
106static int fileview_callback(int action,const struct menu_item_ex *this_item) 115static int fileview_callback(int action,const struct menu_item_ex *this_item)
107{ 116{
108 static int oldval; 117 static int oldval;
@@ -124,8 +133,9 @@ MAKE_MENU(file_menu, ID2P(LANG_FILE), 0, Icon_file_view_menu,
124 &sort_case, &sort_dir, &sort_file, &interpret_numbers, 133 &sort_case, &sort_dir, &sort_file, &interpret_numbers,
125 &dirfilter, &show_filename_ext, &browse_current, 134 &dirfilter, &show_filename_ext, &browse_current,
126#ifdef HAVE_LCD_BITMAP 135#ifdef HAVE_LCD_BITMAP
127 &show_path_in_browser 136 &show_path_in_browser,
128#endif 137#endif
138 &clear_start_directory_item
129 ); 139 );
130/* FILE VIEW MENU */ 140/* FILE VIEW MENU */
131/***********************************/ 141/***********************************/