forked from len0rd/rockbox
get the button bar working like it used to (hopefully)
Remove tabs git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12492 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6b704b8941
commit
1ba493e4b4
1 changed files with 143 additions and 127 deletions
18
apps/menu.c
18
apps/menu.c
|
|
@ -568,6 +568,9 @@ int do_menu(const struct menu_item_ex *start_menu)
|
|||
struct gui_synclist lists;
|
||||
const struct menu_item_ex *temp, *menu;
|
||||
int ret = 0;
|
||||
#ifdef HAS_BUTTONBAR
|
||||
struct gui_buttonbar buttonbar;
|
||||
#endif
|
||||
|
||||
const struct menu_item_ex *menu_stack[MAX_MENUS];
|
||||
int menu_stack_selected_item[MAX_MENUS];
|
||||
|
|
@ -577,7 +580,12 @@ int do_menu(const struct menu_item_ex *start_menu)
|
|||
if (start_menu == NULL)
|
||||
menu = &main_menu_;
|
||||
else menu = start_menu;
|
||||
|
||||
#ifdef HAS_BUTTONBAR
|
||||
gui_buttonbar_init(&buttonbar);
|
||||
gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) );
|
||||
gui_buttonbar_set(&buttonbar, "<<<", "", "");
|
||||
gui_buttonbar_draw(&buttonbar);
|
||||
#endif
|
||||
init_menu_lists(menu,&lists,selected,true);
|
||||
in_stringlist = ((menu->flags&MENU_TYPE_MASK) == MT_RETURN_ID);
|
||||
|
||||
|
|
@ -637,6 +645,10 @@ int do_menu(const struct menu_item_ex *start_menu)
|
|||
else if (action == ACTION_STD_OK)
|
||||
{
|
||||
int type;
|
||||
#ifdef HAS_BUTTONBAR
|
||||
gui_buttonbar_unset(&buttonbar);
|
||||
gui_buttonbar_draw(&buttonbar);
|
||||
#endif
|
||||
selected = get_menu_selection(gui_synclist_get_sel_pos(&lists), menu);
|
||||
temp = menu->submenus[selected];
|
||||
if (in_stringlist)
|
||||
|
|
@ -700,6 +712,10 @@ int do_menu(const struct menu_item_ex *start_menu)
|
|||
menu_callback(ACTION_EXIT_MENUITEM,temp);
|
||||
/* callback was changed, so reload the menu's callback */
|
||||
get_menu_callback(menu, &menu_callback);
|
||||
#ifdef HAS_BUTTONBAR
|
||||
gui_buttonbar_set(&buttonbar, "<<<", "", "");
|
||||
gui_buttonbar_draw(&buttonbar);
|
||||
#endif
|
||||
}
|
||||
else if(default_event_handler(action) == SYS_USB_CONNECTED)
|
||||
ret = MENU_ATTACHED_USB;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue