From dcba74155e96ef8e6da757cba239241469b5859a Mon Sep 17 00:00:00 2001 From: Richard Quirk Date: Tue, 5 Mar 2013 19:31:36 +0100 Subject: [PATCH] bookmark: add cancelling of autoload bookmark When autoload bookmark is set to "Ask", navigate to a file with bookmarks in that directory. Select the file and the bookmark list appears. Even if you chose to cancel, the track started prior to this patch. Change-Id: I453999a9bc20faae97f9cf2080ef613c602ad8e1 Reviewed-on: http://gerrit.rockbox.org/416 Reviewed-by: Jonathan Gordon --- apps/bookmark.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/bookmark.c b/apps/bookmark.c index 12ec1edd0f..543e89331a 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c @@ -435,7 +435,7 @@ bool bookmark_autoload(const char* file) } else { - select_bookmark(global_bookmark_file_name, true, &bookmark); + int ret = select_bookmark(global_bookmark_file_name, true, &bookmark); if (bookmark != NULL) { @@ -451,7 +451,7 @@ bool bookmark_autoload(const char* file) return true; } - return false; + return ret != BOOKMARK_SUCCESS; } } @@ -801,8 +801,9 @@ static int select_bookmark(const char* bookmark_file_name, bool show_dont_resume *selected_bookmark = bookmarks->items[item - bookmarks->start]; return BOOKMARK_SUCCESS; } - - /* Else fall through */ + exit = true; + ret = BOOKMARK_SUCCESS; + break; case ACTION_TREE_WPS: case ACTION_STD_CANCEL: