%cs (current screen) changes:

* Every top level menu item now has a different screen number
* Playlist viewer and Playlist Catalogue browsers no longer share the same number

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30261 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2011-08-07 08:39:56 +00:00
parent a668072d9e
commit 835683b442
6 changed files with 24 additions and 7 deletions

View file

@ -149,13 +149,17 @@ bool bookmark_load_menu(void)
/* ----------------------------------------------------------------------- */
bool bookmark_mrb_load()
{
char* bookmark = select_bookmark(RECENT_BOOKMARK_FILE, false);
char* bookmark;
bool ret = false;
push_current_activity(ACTIVITY_BOOKMARKSLIST);
bookmark = select_bookmark(RECENT_BOOKMARK_FILE, false);
if (bookmark != NULL)
{
return play_bookmark(bookmark);
ret = play_bookmark(bookmark);
}
pop_current_activity();
return false;
}

View file

@ -254,6 +254,8 @@ int time_screen(void* ignored)
int i, nb_lines, font_h, ret;
menu_was_pressed = false;
push_current_activity(ACTIVITY_TIMEDATESCREEN);
FOR_NB_SCREENS(i)
{
viewport_set_defaults(&clock_vps[i], i);
@ -283,6 +285,7 @@ int time_screen(void* ignored)
}
ret = do_menu(&time_menu, NULL, menu, false);
pop_current_activity();
/* see comments above in the button callback */
if (!menu_was_pressed && ret == GO_TO_PREVIOUS)
return 0;

View file

@ -116,7 +116,10 @@ enum current_activity {
ACTIVITY_OPTIONSELECT,
ACTIVITY_PLAYLISTBROWSER,
ACTIVITY_PLUGIN,
ACTIVITY_CONTEXTMENU
ACTIVITY_CONTEXTMENU,
ACTIVITY_SYSTEMSCREEN,
ACTIVITY_TIMEDATESCREEN,
ACTIVITY_BOOKMARKSLIST
};
#if CONFIG_CODEC == SWCODEC

View file

@ -640,6 +640,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename)
if (!playlist_viewer_init(&viewer, filename, false))
goto exit;
push_current_activity(ACTIVITY_PLAYLISTVIEWER);
gui_synclist_init(&playlist_lists, playlist_callback_name,
&viewer, false, 1, NULL);
gui_synclist_set_voice_callback(&playlist_lists, playlist_callback_voice);
@ -806,6 +807,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename)
}
exit:
pop_current_activity();
if (viewer.playlist)
{
if(dirty && yesno_pop(ID2P(LANG_SAVE_CHANGES)))

View file

@ -552,6 +552,8 @@ static inline int load_screen(int screen)
activity = ACTIVITY_PLUGINBROWSER;
else if (screen == GO_TO_MAINMENU)
activity = ACTIVITY_SETTINGS;
else if (screen == GO_TO_SYSTEM_SCREEN)
activity = ACTIVITY_SYSTEMSCREEN;
if (activity != ACTIVITY_UNKNOWN)
push_current_activity(activity);
@ -569,6 +571,8 @@ static inline int load_screen(int screen)
static int load_context_screen(int selection)
{
const struct menu_item_ex *context_menu = NULL;
int retval = GO_TO_PREVIOUS;
push_current_activity(ACTIVITY_CONTEXTMENU);
if ((root_menu__[selection]->flags&MENU_TYPE_MASK) == MT_RETURN_VALUE)
{
int item = root_menu__[selection]->value;
@ -581,9 +585,9 @@ static int load_context_screen(int selection)
}
if (context_menu)
return do_menu(context_menu, NULL, NULL, false);
else
return GO_TO_PREVIOUS;
retval = do_menu(context_menu, NULL, NULL, false);
pop_current_activity();
return retval;
}
#ifdef HAVE_PICTUREFLOW_INTEGRATION

View file

@ -270,7 +270,8 @@ Example: \config{\%?mp<Stop|Play|Pause|Ffwd|Rew|Rec|Rec pause|FM|FM pause>}
Menus, WPS, Recording screen, FM Radio screen, Current Playlist screen,
Settings menus, File browser, Database, Plugins, Quickscreen,
Pitchscreen, Setting chooser, Playlist Catalog Viewer, Plugin,
Conext Menu\\
Conext Menu, System Info screen, Time and Date Screen,
Bookmarks\\
\end{tagmap}
The tag can also be used as the switch in a conditional tag. For players without
some capabilities (e.g. having no FM radio) some values will be never yielded.