From d5e676ba29c112ff170402df0352a43416b82690 Mon Sep 17 00:00:00 2001 From: Osborne Jacobs Date: Fri, 2 Mar 2012 23:30:07 -0500 Subject: [PATCH] Add a %cs(current screen) state for the "Track Info" screen Added a new state (current activity) to the %cs tag for the Track Info screen. This will allow the Track Info screen to be detectable when skinning using sbs files. Change-Id: I9319ebce2f8e64b0c974f4a6e3b44f9accee32c5 Reviewed-on: http://gerrit.rockbox.org/170 Reviewed-by: Jonathan Gordon --- apps/misc.h | 3 ++- apps/screens.c | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apps/misc.h b/apps/misc.h index a41a8319ac..a3d9ffd582 100644 --- a/apps/misc.h +++ b/apps/misc.h @@ -127,7 +127,8 @@ enum current_activity { ACTIVITY_SYSTEMSCREEN, ACTIVITY_TIMEDATESCREEN, ACTIVITY_BOOKMARKSLIST, - ACTIVITY_SHORTCUTSMENU + ACTIVITY_SHORTCUTSMENU, + ACTIVITY_ID3SCREEN }; #if CONFIG_CODEC == SWCODEC diff --git a/apps/screens.c b/apps/screens.c index 8d4585f7b3..866ec587de 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -767,6 +767,8 @@ bool browse_id3(void) struct id3view_info info; info.count = 0; info.id3 = id3; + bool ret = false; + push_current_activity(ACTIVITY_ID3SCREEN); for (i = 0; i < ARRAYLEN(id3_headers); i++) { char temp[8]; @@ -783,12 +785,21 @@ bool browse_id3(void) if(!gui_synclist_do_button(&id3_lists, &key,LIST_WRAP_UNLESS_HELD)) { if (key == ACTION_STD_OK || key == ACTION_STD_CANCEL) - return false; + { + ret = false; + break; + } else if (key == ACTION_STD_MENU || default_event_handler(key) == SYS_USB_CONNECTED) - return true; + { + ret = true; + break; + } } } + + pop_current_activity(); + return ret; } static const char* runtime_get_data(int selected_item, void* data,