diff options
| author | Torne Wuff <torne@wolfpuppy.org.uk> | 2010-03-28 23:27:49 +0000 |
|---|---|---|
| committer | Torne Wuff <torne@wolfpuppy.org.uk> | 2010-03-28 23:27:49 +0000 |
| commit | 05ace8e095f3de6332560b364a158321867c7bba (patch) | |
| tree | 8a4b7e12ee6f716cf5a32765c620c65549451e52 /apps | |
| parent | 8132852bf2ed6ec9d6cc5fbcc5327b6f683dd708 (diff) | |
| download | rockbox-05ace8e095f3de6332560b364a158321867c7bba.zip rockbox-05ace8e095f3de6332560b364a158321867c7bba.tar.gz rockbox-05ace8e095f3de6332560b364a158321867c7bba.tar.bz2 rockbox-05ace8e095f3de6332560b364a158321867c7bba.tar.xz | |
Fix "bookmark on stop: ask" when idle poweroff triggers.
Previously, the prompt would come up during poweroff, and then if the user did not respond, the shutdown timeout would be hit and a hard poweroff would happen, which is bad. Now it just assumes you don't want a bookmark.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25376 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/bookmark.c | 4 | ||||
| -rw-r--r-- | apps/bookmark.h | 2 | ||||
| -rw-r--r-- | apps/gui/wps.c | 2 | ||||
| -rw-r--r-- | apps/misc.c | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c index 8557083..dd800f7 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c @@ -159,7 +159,7 @@ bool bookmark_mrb_load() /* This function handles an autobookmark creation. This is an interface */ /* function. */ /* ----------------------------------------------------------------------- */ -bool bookmark_autobookmark(void) +bool bookmark_autobookmark(bool prompt_ok) { char* bookmark; if (!system_check()) @@ -192,7 +192,7 @@ bool bookmark_autobookmark(void) const struct text_message message={lines, 2}; #endif - if(gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES) + if(prompt_ok && gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES) { if (global_settings.autocreatebookmark == BOOKMARK_RECENT_ONLY_ASK) return write_bookmark(false, bookmark); diff --git a/apps/bookmark.h b/apps/bookmark.h index e8770f5..bde8e84 100644 --- a/apps/bookmark.h +++ b/apps/bookmark.h @@ -24,7 +24,7 @@ #include <stdbool.h> bool bookmark_load_menu(void); -bool bookmark_autobookmark(void); +bool bookmark_autobookmark(bool prompt_ok); bool bookmark_create_menu(void); bool bookmark_mrb_load(void); bool bookmark_autoload(const char* file); diff --git a/apps/gui/wps.c b/apps/gui/wps.c index e2a7dcb..b6a4276 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -1258,7 +1258,7 @@ long gui_wps_show(void) fade(false, true); if (bookmark) - bookmark_autobookmark(); + bookmark_autobookmark(true); audio_stop(); #ifdef AB_REPEAT_ENABLE ab_reset_markers(); diff --git a/apps/misc.c b/apps/misc.c index 554d29e..f9c6116 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -291,7 +291,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) #ifdef SIMULATOR (void)callback; (void)parameter; - bookmark_autobookmark(); + bookmark_autobookmark(false); call_storage_idle_notifys(true); exit(0); #else @@ -356,7 +356,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) sleep(1); } #endif - bookmark_autobookmark(); + bookmark_autobookmark(false); /* audio_stop_recording == audio_stop for HWCODEC */ audio_stop(); @@ -420,7 +420,7 @@ bool list_stop_handler(void) { if (global_settings.fade_on_stop) fade(false, false); - bookmark_autobookmark(); + bookmark_autobookmark(true); audio_stop(); ret = true; /* bookmarking can make a refresh necessary */ } |