%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:
parent
a668072d9e
commit
835683b442
6 changed files with 24 additions and 7 deletions
|
@ -149,13 +149,17 @@ bool bookmark_load_menu(void)
|
||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
bool bookmark_mrb_load()
|
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)
|
if (bookmark != NULL)
|
||||||
{
|
{
|
||||||
return play_bookmark(bookmark);
|
ret = play_bookmark(bookmark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pop_current_activity();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,6 +254,8 @@ int time_screen(void* ignored)
|
||||||
int i, nb_lines, font_h, ret;
|
int i, nb_lines, font_h, ret;
|
||||||
menu_was_pressed = false;
|
menu_was_pressed = false;
|
||||||
|
|
||||||
|
push_current_activity(ACTIVITY_TIMEDATESCREEN);
|
||||||
|
|
||||||
FOR_NB_SCREENS(i)
|
FOR_NB_SCREENS(i)
|
||||||
{
|
{
|
||||||
viewport_set_defaults(&clock_vps[i], 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);
|
ret = do_menu(&time_menu, NULL, menu, false);
|
||||||
|
pop_current_activity();
|
||||||
/* see comments above in the button callback */
|
/* see comments above in the button callback */
|
||||||
if (!menu_was_pressed && ret == GO_TO_PREVIOUS)
|
if (!menu_was_pressed && ret == GO_TO_PREVIOUS)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -116,7 +116,10 @@ enum current_activity {
|
||||||
ACTIVITY_OPTIONSELECT,
|
ACTIVITY_OPTIONSELECT,
|
||||||
ACTIVITY_PLAYLISTBROWSER,
|
ACTIVITY_PLAYLISTBROWSER,
|
||||||
ACTIVITY_PLUGIN,
|
ACTIVITY_PLUGIN,
|
||||||
ACTIVITY_CONTEXTMENU
|
ACTIVITY_CONTEXTMENU,
|
||||||
|
ACTIVITY_SYSTEMSCREEN,
|
||||||
|
ACTIVITY_TIMEDATESCREEN,
|
||||||
|
ACTIVITY_BOOKMARKSLIST
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_CODEC == SWCODEC
|
#if CONFIG_CODEC == SWCODEC
|
||||||
|
|
|
@ -640,6 +640,7 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename)
|
||||||
if (!playlist_viewer_init(&viewer, filename, false))
|
if (!playlist_viewer_init(&viewer, filename, false))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
push_current_activity(ACTIVITY_PLAYLISTVIEWER);
|
||||||
gui_synclist_init(&playlist_lists, playlist_callback_name,
|
gui_synclist_init(&playlist_lists, playlist_callback_name,
|
||||||
&viewer, false, 1, NULL);
|
&viewer, false, 1, NULL);
|
||||||
gui_synclist_set_voice_callback(&playlist_lists, playlist_callback_voice);
|
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:
|
exit:
|
||||||
|
pop_current_activity();
|
||||||
if (viewer.playlist)
|
if (viewer.playlist)
|
||||||
{
|
{
|
||||||
if(dirty && yesno_pop(ID2P(LANG_SAVE_CHANGES)))
|
if(dirty && yesno_pop(ID2P(LANG_SAVE_CHANGES)))
|
||||||
|
|
|
@ -552,6 +552,8 @@ static inline int load_screen(int screen)
|
||||||
activity = ACTIVITY_PLUGINBROWSER;
|
activity = ACTIVITY_PLUGINBROWSER;
|
||||||
else if (screen == GO_TO_MAINMENU)
|
else if (screen == GO_TO_MAINMENU)
|
||||||
activity = ACTIVITY_SETTINGS;
|
activity = ACTIVITY_SETTINGS;
|
||||||
|
else if (screen == GO_TO_SYSTEM_SCREEN)
|
||||||
|
activity = ACTIVITY_SYSTEMSCREEN;
|
||||||
|
|
||||||
if (activity != ACTIVITY_UNKNOWN)
|
if (activity != ACTIVITY_UNKNOWN)
|
||||||
push_current_activity(activity);
|
push_current_activity(activity);
|
||||||
|
@ -569,6 +571,8 @@ static inline int load_screen(int screen)
|
||||||
static int load_context_screen(int selection)
|
static int load_context_screen(int selection)
|
||||||
{
|
{
|
||||||
const struct menu_item_ex *context_menu = NULL;
|
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)
|
if ((root_menu__[selection]->flags&MENU_TYPE_MASK) == MT_RETURN_VALUE)
|
||||||
{
|
{
|
||||||
int item = root_menu__[selection]->value;
|
int item = root_menu__[selection]->value;
|
||||||
|
@ -581,9 +585,9 @@ static int load_context_screen(int selection)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (context_menu)
|
if (context_menu)
|
||||||
return do_menu(context_menu, NULL, NULL, false);
|
retval = do_menu(context_menu, NULL, NULL, false);
|
||||||
else
|
pop_current_activity();
|
||||||
return GO_TO_PREVIOUS;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_PICTUREFLOW_INTEGRATION
|
#ifdef HAVE_PICTUREFLOW_INTEGRATION
|
||||||
|
|
|
@ -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,
|
Menus, WPS, Recording screen, FM Radio screen, Current Playlist screen,
|
||||||
Settings menus, File browser, Database, Plugins, Quickscreen,
|
Settings menus, File browser, Database, Plugins, Quickscreen,
|
||||||
Pitchscreen, Setting chooser, Playlist Catalog Viewer, Plugin,
|
Pitchscreen, Setting chooser, Playlist Catalog Viewer, Plugin,
|
||||||
Conext Menu\\
|
Conext Menu, System Info screen, Time and Date Screen,
|
||||||
|
Bookmarks\\
|
||||||
\end{tagmap}
|
\end{tagmap}
|
||||||
The tag can also be used as the switch in a conditional tag. For players without
|
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.
|
some capabilities (e.g. having no FM radio) some values will be never yielded.
|
||||||
|
|
Loading…
Reference in a new issue