Properly set list title in tagcache mode and removed one incorrect

entry from tagnavi.config.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11001 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2006-09-19 12:36:21 +00:00
parent ba34c37967
commit 1e6b227164
4 changed files with 35 additions and 7 deletions

View file

@ -15,7 +15,6 @@
# Define the search sub menu # Define the search sub menu
%menu_start "search" "Search by..." %menu_start "search" "Search by..."
"Artist" -> artist ? artist ~ "" -> album -> title = "%02d. %s" tracknum title "Artist" -> artist ? artist ~ "" -> album -> title = "%02d. %s" tracknum title
"Artist -> (score > 85)" artist ? artist ~ "" & autoscore >= "85" -> album -> title = "%02d. %s" tracknum title
"Album" -> album ? album ~ "" -> title = "%02d. %s" tracknum title "Album" -> album ? album ~ "" -> title = "%02d. %s" tracknum title
"Title" -> title ? title ~ "" "Title" -> title ? title ~ ""
"Filename" -> filename ? filename ~ "" "Filename" -> filename ? filename ~ ""

View file

@ -1401,6 +1401,23 @@ struct tagentry* tagtree_get_entry(struct tree_context *c, int id)
return &entry[realid]; return &entry[realid];
} }
char *tagtree_get_title(struct tree_context* c)
{
switch (c->currtable)
{
case root:
return menu->title;
case navibrowse:
return (char *)tagcache_tag_to_str(csi->tagorder[c->currextra]);
case allsubentries:
return "Tracks";
}
return "?";
}
int tagtree_get_attr(struct tree_context* c) int tagtree_get_attr(struct tree_context* c)
{ {
int attr = -1; int attr = -1;

View file

@ -38,6 +38,7 @@ void tagtree_exit(struct tree_context* c);
int tagtree_load(struct tree_context* c); int tagtree_load(struct tree_context* c);
struct tagentry* tagtree_get_entry(struct tree_context *c, int id); struct tagentry* tagtree_get_entry(struct tree_context *c, int id);
bool tagtree_insert_selection_playlist(int position, bool queue); bool tagtree_insert_selection_playlist(int position, bool queue);
char *tagtree_get_title(struct tree_context* c);
int tagtree_get_attr(struct tree_context* c); int tagtree_get_attr(struct tree_context* c);
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
const unsigned char* tagtree_get_icon(struct tree_context* c); const unsigned char* tagtree_get_icon(struct tree_context* c);

View file

@ -349,7 +349,22 @@ static int update_dir(void)
gui_syncsplash(HZ, true, str(LANG_SHOWDIR_BUFFER_FULL)); gui_syncsplash(HZ, true, str(LANG_SHOWDIR_BUFFER_FULL));
} }
} }
if (!id3db) { if (id3db)
{
if (global_settings.show_path_in_browser == SHOW_PATH_FULL
|| global_settings.show_path_in_browser == SHOW_PATH_CURRENT)
{
gui_synclist_set_title(&tree_lists, tagtree_get_title(&tc),
filetype_get_icon(ATTR_DIRECTORY));
}
else
{
/* Must clear the title as the list is reused */
gui_synclist_set_title(&tree_lists, NULL, NOICON);
}
}
else
{
if (global_settings.show_path_in_browser == SHOW_PATH_FULL) if (global_settings.show_path_in_browser == SHOW_PATH_FULL)
{ {
gui_synclist_set_title(&tree_lists, tc.currdir, gui_synclist_set_title(&tree_lists, tc.currdir,
@ -373,11 +388,7 @@ static int update_dir(void)
gui_synclist_set_title(&tree_lists, NULL, NOICON); gui_synclist_set_title(&tree_lists, NULL, NOICON);
} }
} }
else
{
/* This currently doesn't work too well in id3db so turn it off */
gui_synclist_set_title(&tree_lists, NULL, NOICON);
}
gui_synclist_set_nb_items(&tree_lists, tc.filesindir); gui_synclist_set_nb_items(&tree_lists, tc.filesindir);
gui_synclist_set_icon_callback(&tree_lists, gui_synclist_set_icon_callback(&tree_lists,
global_settings.show_icons?&tree_get_fileicon:NULL); global_settings.show_icons?&tree_get_fileicon:NULL);