diff --git a/apps/filetree.c b/apps/filetree.c index 851556e274d..b115cb8f507 100644 --- a/apps/filetree.c +++ b/apps/filetree.c @@ -361,6 +361,10 @@ int ft_load(struct tree_context* c, const char* tempdir) file_attr != FILE_ATTR_M3U) || ((*c->dirfilter == SHOW_MUSIC && file_attr != FILE_ATTR_AUDIO) && file_attr != FILE_ATTR_M3U) || + (*c->dirfilter == SHOW_PLUGINS_TREE && + (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_ROCK && + (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_LUA && + (dptr->attr & FILE_ATTR_MASK) != FILE_ATTR_OPX) || (*c->dirfilter == SHOW_SUPPORTED && !filetype_supported(dptr->attr)))) || (*c->dirfilter == SHOW_WPS && file_attr != FILE_ATTR_WPS) || (*c->dirfilter == SHOW_FONT && file_attr != FILE_ATTR_FONT) || diff --git a/apps/open_plugin.c b/apps/open_plugin.c index afe59b38e39..39b0a6a136e 100644 --- a/apps/open_plugin.c +++ b/apps/open_plugin.c @@ -387,7 +387,7 @@ void open_plugin_browse(const char *key) strcpy(op_entry->path, PLUGIN_DIR"/"); struct browse_context browse = { - .dirfilter = SHOW_ALL, + .dirfilter = SHOW_PLUGINS_TREE, .flags = BROWSE_SELECTONLY | BROWSE_NO_CONTEXT_MENU | BROWSE_DIRFILTER, .title = str(LANG_OPEN_PLUGIN), .icon = Icon_Plugin, diff --git a/apps/settings.h b/apps/settings.h index fa1f0392f52..13ec21c95b5 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -147,7 +147,7 @@ enum enum { SHOW_ALL, SHOW_SUPPORTED, SHOW_MUSIC, SHOW_PLAYLIST, SHOW_ID3DB, NUM_FILTER_MODES, SHOW_WPS, SHOW_RWPS, SHOW_FMS, SHOW_RFMS, SHOW_SBS, SHOW_RSBS, SHOW_FMR, SHOW_CFG, - SHOW_LNG, SHOW_MOD, SHOW_FONT, SHOW_PLUGINS, SHOW_M3U}; + SHOW_LNG, SHOW_MOD, SHOW_FONT, SHOW_PLUGINS, SHOW_M3U, SHOW_PLUGINS_TREE}; /* file and dir sort options */ enum { SORT_ALPHA, SORT_DATE, SORT_DATE_REVERSED, SORT_TYPE, /* available as settings */ diff --git a/apps/tree.c b/apps/tree.c index 016445d60d8..9ad04ca64f1 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -1028,7 +1028,7 @@ int rockbox_browse(struct browse_context *browse) } else { - if (*tc.dirfilter >= NUM_FILTER_MODES) + if (*tc.dirfilter >= NUM_FILTER_MODES && *tc.dirfilter != SHOW_PLUGINS_TREE) { int last_context; /* don't reset if its the same browse already loaded */ @@ -1057,10 +1057,13 @@ int rockbox_browse(struct browse_context *browse) } else { - if (dirfilter != SHOW_ID3DB && (browse->flags & BROWSE_DIRFILTER) == 0) - tc.dirfilter = &global_settings.dirfilter; tc.browse = browse; set_current_file(browse->root); + if (dirfilter == SHOW_PLUGINS_TREE) + tc.dirlevel = 0; + else if (dirfilter != SHOW_ID3DB) + tc.dirfilter = &global_settings.dirfilter; + if (browse->flags&BROWSE_RUNFILE) ret_val = ft_enter(&tc); else