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 <rockbox@jdgordon.info>
This commit is contained in:
Richard Quirk 2013-03-05 19:31:36 +01:00 committed by Jonathan Gordon
parent 703bc407b4
commit dcba74155e

View file

@ -435,7 +435,7 @@ bool bookmark_autoload(const char* file)
} }
else else
{ {
select_bookmark(global_bookmark_file_name, true, &bookmark); int ret = select_bookmark(global_bookmark_file_name, true, &bookmark);
if (bookmark != NULL) if (bookmark != NULL)
{ {
@ -451,7 +451,7 @@ bool bookmark_autoload(const char* file)
return true; 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]; *selected_bookmark = bookmarks->items[item - bookmarks->start];
return BOOKMARK_SUCCESS; return BOOKMARK_SUCCESS;
} }
exit = true;
/* Else fall through */ ret = BOOKMARK_SUCCESS;
break;
case ACTION_TREE_WPS: case ACTION_TREE_WPS:
case ACTION_STD_CANCEL: case ACTION_STD_CANCEL: