summaryrefslogtreecommitdiff
path: root/apps/settings_menu.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-07-10 16:22:03 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-07-10 16:22:03 +0000
commit9cd5c3e1195d872cbac2e8744bac5430490f6636 (patch)
tree8e70af5786bf38379333c38f63bea6e379f01b07 /apps/settings_menu.c
parentdae39989db4809d02cb4f6743c5f152a78ea0f8b (diff)
downloadrockbox-9cd5c3e1195d872cbac2e8744bac5430490f6636.zip
rockbox-9cd5c3e1195d872cbac2e8744bac5430490f6636.tar.gz
rockbox-9cd5c3e1195d872cbac2e8744bac5430490f6636.tar.bz2
rockbox-9cd5c3e1195d872cbac2e8744bac5430490f6636.tar.xz
Tagcache update: Support removal of entries and no longer the need for
dircache to load tagcache in ram (however, dircache with tagcache is still strongly recommended). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10192 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_menu.c')
-rw-r--r--apps/settings_menu.c46
1 files changed, 38 insertions, 8 deletions
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index 821ad53..5d24431 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -1520,18 +1520,51 @@ static bool dircache(void)
return result;
}
+#endif /* HAVE_DIRCACHE */
+#ifdef HAVE_TC_RAMCACHE
static bool tagcache_ram(void)
{
- bool result = set_bool_options(str(LANG_TAGCACHE),
+ bool result = set_bool_options(str(LANG_TAGCACHE_RAM),
&global_settings.tagcache_ram,
- STR(LANG_TAGCACHE_RAM),
- STR(LANG_TAGCACHE_DISK),
+ STR(LANG_SET_BOOL_YES),
+ STR(LANG_SET_BOOL_NO),
NULL);
return result;
}
-#endif /* HAVE_DIRCACHE */
+#endif
+
+static bool tagcache_autoupdate(void)
+{
+ bool rc = set_bool_options(str(LANG_TAGCACHE_AUTOUPDATE),
+ &global_settings.tagcache_autoupdate,
+ STR(LANG_ON),
+ STR(LANG_OFF),
+ NULL);
+ return rc;
+}
+
+static bool tagcache_settings_menu(void)
+{
+ int m;
+ bool result;
+
+ static const struct menu_item items[] = {
+#ifdef HAVE_TC_RAMCACHE
+ { ID2P(LANG_TAGCACHE_RAM), tagcache_ram },
+#endif
+ { ID2P(LANG_TAGCACHE_AUTOUPDATE), tagcache_autoupdate },
+ { ID2P(LANG_TAGCACHE_INITIALIZE), tagcache_rebuild },
+ { ID2P(LANG_TAGCACHE_UPDATE), tagcache_update },
+ };
+
+ m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
+ NULL, NULL, NULL);
+ result = menu_run(m);
+ menu_exit(m);
+ return result;
+}
static bool playback_settings_menu(void)
{
@@ -1641,10 +1674,7 @@ static bool fileview_settings_menu(void)
{ ID2P(LANG_FILTER), dir_filter },
{ ID2P(LANG_FOLLOW), browse_current },
{ ID2P(LANG_SHOW_ICONS), show_icons },
-#ifdef HAVE_DIRCACHE
- { ID2P(LANG_TAGCACHE), tagcache_ram },
-#endif
- { ID2P(LANG_TAGCACHE_FORCE_UPDATE), tagcache_force_update },
+ { ID2P(LANG_TAGCACHE), tagcache_settings_menu},
};
m=menu_init( items, sizeof(items) / sizeof(*items), NULL,