diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2009-03-01 17:55:59 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2009-03-01 17:55:59 +0000 |
| commit | d13f1a485f0e35a6fbbd0a664f14acc3798d52a0 (patch) | |
| tree | 22cacb27b6ab481c0bfc250120dde404320811f2 /apps/settings.h | |
| parent | e6c023cb64dea599bb711b2b4ddb197efdb1d187 (diff) | |
| download | rockbox-d13f1a485f0e35a6fbbd0a664f14acc3798d52a0.zip rockbox-d13f1a485f0e35a6fbbd0a664f14acc3798d52a0.tar.gz rockbox-d13f1a485f0e35a6fbbd0a664f14acc3798d52a0.tar.bz2 rockbox-d13f1a485f0e35a6fbbd0a664f14acc3798d52a0.tar.xz | |
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/settings.h')
| -rw-r--r-- | apps/settings.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/settings.h b/apps/settings.h index 7f5f025..669000e 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -147,6 +147,7 @@ enum { SHOW_ALL, SHOW_SUPPORTED, SHOW_MUSIC, SHOW_PLAYLIST, SHOW_ID3DB, /* file and dir sort options */ enum { SORT_ALPHA, SORT_DATE, SORT_DATE_REVERSED, SORT_TYPE, /* available as settings */ SORT_ALPHA_REVERSED, SORT_TYPE_REVERSED }; /* internal use only */ +enum { SORT_INTERPRET_AS_DIGIT, SORT_INTERPRET_AS_NUMBER }; /* recursive dir insert options */ enum { RECURSE_OFF, RECURSE_ON, RECURSE_ASK }; @@ -612,8 +613,9 @@ struct user_settings /* file browser sorting */ bool sort_case; /* dir sort order: 0=case insensitive, 1=sensitive */ - int sort_file; /* 0=alpha, 1=date, 2=date (new first), 3=type */ int sort_dir; /* 0=alpha, 1=date (old first), 2=date (new first) */ + int sort_file; /* 0=alpha, 1=date, 2=date (new first), 3=type */ + int interpret_numbers; /* true=strnatcmp, false=strcmp */ /* power settings */ int poweroff; /* idle power off timer */ |