From da727b5acec72f93292a86bbecf7bb502e5a8b76 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 16 Aug 2007 13:55:37 +0000 Subject: [PATCH] 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 --- apps/tree.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/tree.c b/apps/tree.c index d6c6d3eca4..5122f55a82 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -368,7 +368,20 @@ static int update_dir(void) else #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, filetype_get_icon(ATTR_DIRECTORY)); @@ -382,12 +395,6 @@ static int update_dir(void) gui_synclist_set_title(&tree_lists, str(LANG_DIR_BROWSER), 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 gui_synclist_set_title(&tree_lists, title, filetype_get_icon(ATTR_DIRECTORY));