Show the plugin category name in the list title in the plugin browsers.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14370 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2007-08-16 13:55:37 +00:00
parent fc6d57f9a3
commit da727b5ace

View file

@ -368,7 +368,20 @@ static int update_dir(void)
else else
#endif #endif
{ {
if (global_settings.show_path_in_browser == SHOW_PATH_FULL) if (global_settings.show_path_in_browser &&
*(tc.dirfilter) == SHOW_PLUGINS)
{
char *title;
if (!strcmp(tc.currdir, PLUGIN_GAMES_DIR))
title = str(LANG_PLUGIN_GAMES);
else if (!strcmp(tc.currdir, PLUGIN_APPS_DIR))
title = str(LANG_PLUGIN_APPS);
else if (!strcmp(tc.currdir, PLUGIN_DEMOS_DIR))
title = str(LANG_PLUGIN_DEMOS);
else title = str(LANG_PLUGINS);
gui_synclist_set_title(&tree_lists, title, Icon_Plugin);
}
else 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,
filetype_get_icon(ATTR_DIRECTORY)); filetype_get_icon(ATTR_DIRECTORY));
@ -382,12 +395,6 @@ static int update_dir(void)
gui_synclist_set_title(&tree_lists, str(LANG_DIR_BROWSER), gui_synclist_set_title(&tree_lists, str(LANG_DIR_BROWSER),
filetype_get_icon(ATTR_DIRECTORY)); filetype_get_icon(ATTR_DIRECTORY));
} }
else if(0 == strcasecmp(tc.currdir, PLUGIN_DIR))
{
/* Display "Plugins" for the rocks dir */
gui_synclist_set_title(&tree_lists, str(LANG_PLUGINS),
filetype_get_icon(ATTR_DIRECTORY));
}
else else
gui_synclist_set_title(&tree_lists, title, gui_synclist_set_title(&tree_lists, title,
filetype_get_icon(ATTR_DIRECTORY)); filetype_get_icon(ATTR_DIRECTORY));