Added ID3 database dirfilter

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5574 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2005-01-17 11:37:36 +00:00
parent 025f5c0084
commit fc53fd708f
5 changed files with 19 additions and 8 deletions

View file

@ -2872,4 +2872,8 @@ eng: "Custom"
voice: "Custom"
new:
id: LANG_FILTER_ID3DB
desc: show ID3 database
eng: "ID3 database"
voice: "ID3 database"
new:

View file

@ -557,6 +557,10 @@ bool quick_screen(int context, int button)
case SHOW_PLAYLIST:
ptr = str(LANG_FILTER_PLAYLIST);
break;
case SHOW_ID3DB:
ptr = str(LANG_FILTER_ID3DB);
break;
}
snprintf(buf, sizeof buf, "%s:", str(LANG_FILTER));

View file

@ -277,8 +277,8 @@ static const struct bit_entry hd_bits[] =
{8, S_O(disk_spindown), 5, "disk spindown", NULL },
#endif
/* browser */
{2, S_O(dirfilter), SHOW_MUSIC,
"show files", "all,supported,music,playlists" },
{3, S_O(dirfilter), SHOW_MUSIC,
"show files", "all,supported,music,playlists,id3 database" },
{1, S_O(sort_case), false, "sort case", off_on },
{1, S_O(browse_current), false, "follow playlist", off_on },
/* playlist */

View file

@ -194,7 +194,8 @@ struct user_settings
/* misc options */
int repeat_mode; /* 0=off 1=repeat all 2=repeat one */
int dirfilter; /* 0=display all, 1=only supported, 2=only music */
int dirfilter; /* 0=display all, 1=only supported, 2=only music,
3=dirs+playlists, 4=ID3 database */
bool sort_case; /* dir sort order: 0=case insensitive, 1=sensitive */
int volume_type; /* how volume is displayed: 0=graphic, 1=percent */
int battery_type; /* how battery is displayed: 0=graphic, 1=percent */
@ -351,8 +352,9 @@ enum { REPEAT_OFF, REPEAT_ALL, REPEAT_ONE, NUM_REPEAT_MODES };
/* Note: Any new filter modes need to be added before NUM_FILTER_MODES.
* Any new rockbox browse filter modes (accessible through the menu)
* must be added after NUM_FILTER_MODES. */
enum { SHOW_ALL, SHOW_SUPPORTED, SHOW_MUSIC, SHOW_PLAYLIST, NUM_FILTER_MODES,
SHOW_WPS, SHOW_CFG, SHOW_LNG, SHOW_MOD, SHOW_FONT, SHOW_PLUGINS};
enum { SHOW_ALL, SHOW_SUPPORTED, SHOW_MUSIC, SHOW_PLAYLIST, SHOW_ID3DB,
NUM_FILTER_MODES,
SHOW_WPS, SHOW_CFG, SHOW_LNG, SHOW_MOD, SHOW_FONT, SHOW_PLUGINS};
/* recursive dir insert options */
enum { RECURSE_OFF, RECURSE_ON, RECURSE_ASK };

View file

@ -471,10 +471,11 @@ static bool dir_filter(void)
{ STR(LANG_FILTER_ALL) },
{ STR(LANG_FILTER_SUPPORTED) },
{ STR(LANG_FILTER_MUSIC) },
{ STR(LANG_FILTER_PLAYLIST) }
{ STR(LANG_FILTER_PLAYLIST) },
{ STR(LANG_FILTER_ID3DB) }
};
return set_option( str(LANG_FILTER), &global_settings.dirfilter, INT,
names, 4, NULL );
names, 5, NULL );
}
static bool sort_case(void)