From 30a23fdd6de8fb46e7b1349126a9ae6921cf7555 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 11 Nov 2021 00:05:29 -0500 Subject: folder_select.c move to plugin as db_folder_select handles the folder selection for autoresume paths and database paths folder_select uses the pluginbuf to build the directory tree hopefully having it as a plugin will make it stop corrupting TSR plugins like battery_bench and announce_status I left the original include and source in the gui directory for now there are currently no other users.. Change-Id: If40ccb5a2bec4286a0616c10dfa7e1479a592808 --- apps/menus/settings_menu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'apps/menus/settings_menu.c') diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index a5e747651a..94b697aada 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c @@ -48,7 +48,6 @@ #ifdef HAVE_DIRCACHE #include "dircache.h" #endif -#include "folder_select.h" #ifndef HAS_BUTTON_HOLD #include "mask_select.h" #endif @@ -56,6 +55,7 @@ #include "governor-ibasso.h" #include "usb-ibasso.h" #endif +#include "plugin.h" #ifndef HAS_BUTTON_HOLD static int selectivesoftlock_callback(int action, @@ -133,8 +133,7 @@ static void tagcache_update_with_splash(void) static int dirs_to_scan(void) { - if (folder_select(global_settings.tagcache_scan_paths, - sizeof(global_settings.tagcache_scan_paths))) + if(plugin_load(VIEWERS_DIR"/db_folder_select.rock", NULL) > PLUGIN_OK) { static const char *lines[] = {ID2P(LANG_TAGCACHE_BUSY), ID2P(LANG_TAGCACHE_FORCE_UPDATE)}; @@ -650,8 +649,8 @@ static int autoresume_nexttrack_callback(int action, break; case ACTION_EXIT_MENUITEM: if (global_settings.autoresume_automatic == AUTORESUME_NEXTTRACK_CUSTOM - && !folder_select(global_settings.autoresume_paths, - MAX_PATHNAME+1)) + && plugin_load(VIEWERS_DIR"/db_folder_select.rock", + str(LANG_AUTORESUME)) == PLUGIN_OK) { global_settings.autoresume_automatic = oldval; } -- cgit v1.2.3