diff options
Diffstat (limited to 'apps/menus/settings_menu.c')
-rw-r--r-- | apps/menus/settings_menu.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 495040d177..f2249e3a57 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -66,6 +66,21 @@ static void tagcache_update_with_splash(void) | |||
66 | splash(HZ*2, ID2P(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); | 66 | splash(HZ*2, ID2P(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); |
67 | } | 67 | } |
68 | 68 | ||
69 | static int dirs_to_scan(void) | ||
70 | { | ||
71 | if (folder_select(global_settings.tagcache_scan_paths, | ||
72 | sizeof(global_settings.tagcache_scan_paths))) | ||
73 | { | ||
74 | static const char *lines[] = {ID2P(LANG_TAGCACHE_BUSY), | ||
75 | ID2P(LANG_TAGCACHE_FORCE_UPDATE)}; | ||
76 | static const struct text_message message = {lines, 2}; | ||
77 | |||
78 | if (gui_syncyesno_run(&message, NULL, NULL) == YESNO_YES) | ||
79 | tagcache_rebuild_with_splash(); | ||
80 | } | ||
81 | return 0; | ||
82 | } | ||
83 | |||
69 | #ifdef HAVE_TC_RAMCACHE | 84 | #ifdef HAVE_TC_RAMCACHE |
70 | MENUITEM_SETTING(tagcache_ram, &global_settings.tagcache_ram, NULL); | 85 | MENUITEM_SETTING(tagcache_ram, &global_settings.tagcache_ram, NULL); |
71 | #endif | 86 | #endif |
@@ -83,12 +98,16 @@ MENUITEM_FUNCTION(tc_export, 0, ID2P(LANG_TAGCACHE_EXPORT), | |||
83 | MENUITEM_FUNCTION(tc_import, 0, ID2P(LANG_TAGCACHE_IMPORT), | 98 | MENUITEM_FUNCTION(tc_import, 0, ID2P(LANG_TAGCACHE_IMPORT), |
84 | (int(*)(void))tagtree_import, NULL, | 99 | (int(*)(void))tagtree_import, NULL, |
85 | NULL, Icon_NOICON); | 100 | NULL, Icon_NOICON); |
101 | MENUITEM_FUNCTION(tc_paths, 0, ID2P(LANG_SELECT_DATABASE_DIRS), | ||
102 | dirs_to_scan, NULL, NULL, Icon_NOICON); | ||
103 | |||
86 | MAKE_MENU(tagcache_menu, ID2P(LANG_TAGCACHE), 0, Icon_NOICON, | 104 | MAKE_MENU(tagcache_menu, ID2P(LANG_TAGCACHE), 0, Icon_NOICON, |
87 | #ifdef HAVE_TC_RAMCACHE | 105 | #ifdef HAVE_TC_RAMCACHE |
88 | &tagcache_ram, | 106 | &tagcache_ram, |
89 | #endif | 107 | #endif |
90 | &tagcache_autoupdate, &tc_init, &tc_update, &runtimedb, | 108 | &tagcache_autoupdate, &tc_init, &tc_update, &runtimedb, |
91 | &tc_export, &tc_import); | 109 | &tc_export, &tc_import, &tc_paths |
110 | ); | ||
92 | #endif /* HAVE_TAGCACHE */ | 111 | #endif /* HAVE_TAGCACHE */ |
93 | /* TAGCACHE MENU */ | 112 | /* TAGCACHE MENU */ |
94 | /***********************************/ | 113 | /***********************************/ |