From 595427c095df06ad0560dfbaa96710034a51d9c8 Mon Sep 17 00:00:00 2001 From: Osborne Jacobs Date: Sat, 3 Mar 2012 00:15:31 -0500 Subject: Add new actions to %Tp (Touchscreen areas) Add the following actions to %Tp: createbookmark create a new bookmark from the wps listbookmarks list bookmarks from the wps trackinfo show track info from the wps My main motivation was to allow bookmarking and jumping around audio books from the wps on touch enabled targets. You can do it now through the context menu but it requires 4 screen presses instead of 1. Change-Id: I1fa1bf0064dfd22b897eca7c56acc1ce8956f14c Reviewed-on: http://gerrit.rockbox.org/171 Reviewed-by: Jonathan Gordon --- apps/gui/skin_engine/skin_parser.c | 5 ++++- apps/gui/wps.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'apps/gui') diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 4e4b9d14d2..2d9d7cd807 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -1287,7 +1287,10 @@ static const struct touchaction touchactions[] = { {"browse", ACTION_WPS_BROWSE }, {"play", ACTION_WPS_PLAY }, {"stop", ACTION_WPS_STOP }, {"shuffle", ACTION_TOUCH_SHUFFLE }, {"repmode", ACTION_TOUCH_REPMODE }, - {"pitch", ACTION_WPS_PITCHSCREEN}, {"playlist", ACTION_WPS_VIEW_PLAYLIST }, + {"pitch", ACTION_WPS_PITCHSCREEN}, {"trackinfo", ACTION_WPS_ID3SCREEN }, + {"playlist", ACTION_WPS_VIEW_PLAYLIST }, + {"listbookmarks", ACTION_WPS_LIST_BOOKMARKS }, + {"createbookmark", ACTION_WPS_CREATE_BOOKMARK }, #if CONFIG_TUNER /* FM screen actions */ diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 1e48e80202..313ac2cd76 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -1042,6 +1042,21 @@ long gui_wps_show(void) exit = true; break; + case ACTION_WPS_LIST_BOOKMARKS: + gwps_leave_wps(); + if (bookmark_load_menu() == BOOKMARK_USB_CONNECTED) + { + return GO_TO_ROOT; + } + restore = true; + break; + + case ACTION_WPS_CREATE_BOOKMARK: + gwps_leave_wps(); + bookmark_create_menu(); + restore = true; + break; + case ACTION_WPS_ID3SCREEN: { gwps_leave_wps(); -- cgit v1.2.3