forked from len0rd/rockbox
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
This commit is contained in:
parent
e6c023cb64
commit
d13f1a485f
10 changed files with 332 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue