summaryrefslogtreecommitdiff
path: root/apps/menus/settings_menu.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-03-01 17:55:59 +0000
committerThomas Martitz <kugel@rockbox.org>2009-03-01 17:55:59 +0000
commitd13f1a485f0e35a6fbbd0a664f14acc3798d52a0 (patch)
tree22cacb27b6ab481c0bfc250120dde404320811f2 /apps/menus/settings_menu.c
parente6c023cb64dea599bb711b2b4ddb197efdb1d187 (diff)
Commit FS#8314. This adds strnat[case]cmp written by Martin Pool, which respects numbers within strings, and gives a more intuitive
sorting. This also adds a setting, so that the sorting can be used in the file browser. The implementation is very generic, and can possibly be used in other places. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20155 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/settings_menu.c')
-rw-r--r--apps/menus/settings_menu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index 85e4f9649f..35db9b49e6 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -100,6 +100,7 @@ static int fileview_callback(int action,const struct menu_item_ex *this_item);
MENUITEM_SETTING(sort_case, &global_settings.sort_case, NULL);
MENUITEM_SETTING(sort_dir, &global_settings.sort_dir, fileview_callback);
MENUITEM_SETTING(sort_file, &global_settings.sort_file, fileview_callback);
+MENUITEM_SETTING(interpret_numbers, &global_settings.interpret_numbers, fileview_callback);
MENUITEM_SETTING(dirfilter, &global_settings.dirfilter, NULL);
MENUITEM_SETTING(show_filename_ext, &global_settings.show_filename_ext, NULL);
MENUITEM_SETTING(browse_current, &global_settings.browse_current, NULL);
@@ -124,7 +125,7 @@ static int fileview_callback(int action,const struct menu_item_ex *this_item)
}
MAKE_MENU(file_menu, ID2P(LANG_FILE), 0, Icon_file_view_menu,
- &sort_case, &sort_dir, &sort_file,
+ &sort_case, &sort_dir, &sort_file, &interpret_numbers,
&dirfilter, &show_filename_ext, &browse_current,
#ifdef HAVE_LCD_BITMAP
&show_path_in_browser