forked from len0rd/rockbox
erosq: Have tree context fall back to list context rather than mainmenu.
Allows 'back' to cancel vs always popping into wps, for example. Change-Id: Ia9f27f884c6076906ff023d666872c566c60aa37
This commit is contained in:
parent
b44dd11b6b
commit
714f7a21da
1 changed files with 11 additions and 15 deletions
|
@ -32,7 +32,7 @@
|
||||||
* Insert LAST_ITEM_IN_LIST at the end of each mapping
|
* Insert LAST_ITEM_IN_LIST at the end of each mapping
|
||||||
*/
|
*/
|
||||||
static const struct button_mapping button_context_standard[] = {
|
static const struct button_mapping button_context_standard[] = {
|
||||||
{ ACTION_STD_PREV, BUTTON_SCROLL_BACK, BUTTON_NONE },
|
{ ACTION_STD_PREV, BUTTON_SCROLL_BACK, BUTTON_NONE },
|
||||||
{ ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE },
|
{ ACTION_STD_PREV, BUTTON_PREV, BUTTON_NONE },
|
||||||
{ ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_PREVREPEAT, BUTTON_PREV|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_STD_NEXT, BUTTON_SCROLL_FWD, BUTTON_NONE },
|
{ ACTION_STD_NEXT, BUTTON_SCROLL_FWD, BUTTON_NONE },
|
||||||
|
@ -81,7 +81,6 @@ static const struct button_mapping button_context_wps[] = {
|
||||||
* ACTION_WPS_LIST_BOOKMARKS, optional
|
* ACTION_WPS_LIST_BOOKMARKS, optional
|
||||||
* ACTION_WPS_CREATE_BOOKMARK, optional
|
* ACTION_WPS_CREATE_BOOKMARK, optional
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{ ACTION_STD_KEYLOCK, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_STD_KEYLOCK, BUTTON_POWER, BUTTON_NONE },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
|
@ -114,22 +113,16 @@ static const struct button_mapping button_context_list[] = {
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||||
}; /* button_context_list */
|
}; /* button_context_list */
|
||||||
|
|
||||||
#if 0 // XXX?
|
|
||||||
static const struct button_mapping button_context_tree[] = {
|
static const struct button_mapping button_context_tree[] = {
|
||||||
/* ACTION_TREE_ROOT_INIT,
|
/*
|
||||||
* ACTION_TREE_PGLEFT, optional
|
{ ACTION_TREE_WPS, BUTTON_OPTION|BUTTON_REL, BUTTON_OPTION },
|
||||||
* ACTION_TREE_PGRIGHT, optional
|
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||||
* ACTION_TREE_STOP,
|
{ ACTION_TREE_HOTKEY, BUTTON_HOME|BUTTON_REPEAT, BUTTON_HOME },
|
||||||
* ACTION_TREE_WPS,
|
*/
|
||||||
* ACTION_TREE_HOTKEY,
|
{ ACTION_STD_MENU, BUTTON_MENU, BUTTON_MENU },
|
||||||
*/
|
|
||||||
/* { ACTION_TREE_WPS, BUTTON_UP|BUTTON_REL, BUTTON_UP },
|
|
||||||
* { ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
|
||||||
* { ACTION_TREE_HOTKEY, BUTTON_REC|BUTTON_REL, BUTTON_REC },
|
|
||||||
*/
|
|
||||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||||
}; /* button_context_tree */
|
}; /* button_context_tree */
|
||||||
#endif
|
|
||||||
|
|
||||||
static const struct button_mapping button_context_yesno[] = {
|
static const struct button_mapping button_context_yesno[] = {
|
||||||
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
|
{ ACTION_YESNO_ACCEPT, BUTTON_PLAY, BUTTON_NONE },
|
||||||
|
@ -223,7 +216,10 @@ const struct button_mapping* get_context_mapping(int context)
|
||||||
|
|
||||||
case CONTEXT_MAINMENU:
|
case CONTEXT_MAINMENU:
|
||||||
return button_context_mainmenu;
|
return button_context_mainmenu;
|
||||||
|
|
||||||
case CONTEXT_TREE:
|
case CONTEXT_TREE:
|
||||||
|
return button_context_tree;
|
||||||
|
|
||||||
case CONTEXT_LIST:
|
case CONTEXT_LIST:
|
||||||
return button_context_list;
|
return button_context_list;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue