summaryrefslogtreecommitdiff
path: root/apps/menus/settings_menu.c
diff options
context:
space:
mode:
authorMichael Hohmuth <sideral@rockbox.org>2011-02-08 20:31:22 +0000
committerMichael Hohmuth <sideral@rockbox.org>2011-02-08 20:31:22 +0000
commitf0ce1886814d597b5bbe58fe36556356d42b7db6 (patch)
treed97172e9bcbe4246455bfd3ea55d417126dde92b /apps/menus/settings_menu.c
parent5f037ac015e6d76d030a163753db5ff58cdff49b (diff)
downloadrockbox-f0ce1886814d597b5bbe58fe36556356d42b7db6.tar.gz
rockbox-f0ce1886814d597b5bbe58fe36556356d42b7db6.zip
Make enable-autoresume option more consistent with other settings.
Rename "Enable automatic resume" to "Automatic resume", and make it a simple Yes/No option. Offer the user to initialize the database in case it is not yet ready when enabling autoresume. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29249 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/settings_menu.c')
-rw-r--r--apps/menus/settings_menu.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index cc3871a4d6..ce03e1a646 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -34,6 +34,7 @@
34#include "tagtree.h" 34#include "tagtree.h"
35#include "usb.h" 35#include "usb.h"
36#include "splash.h" 36#include "splash.h"
37#include "yesno.h"
37#include "talk.h" 38#include "talk.h"
38#include "powermgmt.h" 39#include "powermgmt.h"
39#if CONFIG_CODEC == SWCODEC 40#if CONFIG_CODEC == SWCODEC
@@ -426,7 +427,26 @@ MAKE_MENU(hotkey_menu, ID2P(LANG_HOTKEY), 0, Icon_NOICON,
426 427
427#ifdef HAVE_TAGCACHE 428#ifdef HAVE_TAGCACHE
428#if CONFIG_CODEC == SWCODEC 429#if CONFIG_CODEC == SWCODEC
429MENUITEM_SETTING(autoresume_enable, &global_settings.autoresume_enable, NULL); 430static int autoresume_callback(int action, const struct menu_item_ex *this_item)
431{
432 (void)this_item;
433
434 if (action == ACTION_EXIT_MENUITEM /* on exit */
435 && global_settings.autoresume_enable
436 && !tagcache_is_usable())
437 {
438 static const char *lines[] = {ID2P(LANG_TAGCACHE_BUSY),
439 ID2P(LANG_TAGCACHE_FORCE_UPDATE)};
440 static const struct text_message message = {lines, 2};
441
442 if (gui_syncyesno_run(&message, NULL, NULL) == YESNO_YES)
443 tagcache_rebuild_with_splash();
444 }
445 return action;
446}
447
448MENUITEM_SETTING(autoresume_enable, &global_settings.autoresume_enable,
449 autoresume_callback);
430#endif 450#endif
431#endif 451#endif
432 452