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
%menu_start "search" "Search by..."
"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
"Title" -> title ? title ~ ""
"Filename" -> filename ? filename ~ ""

View File

@ -1401,6 +1401,23 @@ struct tagentry* tagtree_get_entry(struct tree_context *c, int id)
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 attr = -1;

View File

@ -38,6 +38,7 @@ void tagtree_exit(struct tree_context* c);
int tagtree_load(struct tree_context* c);
struct tagentry* tagtree_get_entry(struct tree_context *c, int id);
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);
#ifdef HAVE_LCD_BITMAP
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));
}
}
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)
{
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);
}
}
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_icon_callback(&tree_lists,
global_settings.show_icons?&tree_get_fileicon:NULL);