From fb30d013729f5dc8f256b6d5269f65e4b864d47c Mon Sep 17 00:00:00 2001 From: Osborne Jacobs Date: Sun, 11 Mar 2012 00:47:28 -0500 Subject: Fix minor bookmark problems/Enhance bookmark functions This fix: -fixes when the bookmark menu and submenus are displayed and hidden in the context menu. -'Create Bookmark' should be hidden when tracks are queued in the playlist or nothing is currently playing (previously it was never hidden) -'List Bookmarks' should be hidden if and only if no bookmark file exists for the current playlist (previously it was hidden if tracks were queued or nothing was playing neither of which hinder loading bookmarks) -'Bookmarks' main menu should be hidden if both 'Create Bookmarks' and 'List Bookmarks' submenus are hidden -fixes a problem where the 'Bookmark Error' message was not always displayed on bookmarking failure -adds BOOKMARK_USB_CONNECTED return value to the bookmark functions to distinguish if the bookmark list was exited due to a USB connection. -fixes other minor logic problems in the bookmarking functions Change-Id: If6394b2e77f027773a7c94ffdcb52dbb15e2922b Reviewed-on: http://gerrit.rockbox.org/177 Reviewed-by: Osborne Jacobs Tested-by: Osborne Jacobs Reviewed-by: Jonathan Gordon --- apps/bookmark.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps/bookmark.h') diff --git a/apps/bookmark.h b/apps/bookmark.h index 4b61edba9b..ff7b87c1bf 100644 --- a/apps/bookmark.h +++ b/apps/bookmark.h @@ -23,13 +23,20 @@ #include -bool bookmark_load_menu(void); +enum { + BOOKMARK_FAIL = -1, + BOOKMARK_SUCCESS = 0, + BOOKMARK_USB_CONNECTED = 1 +}; + +int bookmark_load_menu(void); bool bookmark_autobookmark(bool prompt_ok); bool bookmark_create_menu(void); bool bookmark_mrb_load(void); bool bookmark_autoload(const char* file); bool bookmark_load(const char* file, bool autoload); bool bookmark_exists(void); +bool bookmark_is_bookmarkable_state(void); #endif /* __BOOKMARK_H__ */ -- cgit v1.2.3