summaryrefslogtreecommitdiff
path: root/apps/menu.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-01-26 20:14:42 +0000
committerThomas Martitz <kugel@rockbox.org>2010-01-26 20:14:42 +0000
commit5629d551d710bd57a1cef129ce5a69b76cbbdd12 (patch)
tree1196849b9a02ebf39fa5d6c33df1db9334aeead2 /apps/menu.c
parent7a73a9cd4e882ebbc37831160ec18d0f251f14bd (diff)
downloadrockbox-5629d551d710bd57a1cef129ce5a69b76cbbdd12.tar.gz
rockbox-5629d551d710bd57a1cef129ce5a69b76cbbdd12.zip
Accept the last patch FS#10797 with a few changes by me (fixing side effects and adding the new backdrop_hide() to the multi screen api). It changes the hide_bars parameter to mean hide_theme.
This makes plugins show the menu backdrop in their backdrop so that they don't look like crap if you have an sbs and look more integrated. I've test about all plugins and all work fine. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24335 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/menu.c b/apps/menu.c
index 88f0f3c529..eb29b43f3b 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -335,7 +335,7 @@ void do_setting_from_menu(const struct menu_item_ex *temp,
335 335
336/* display a menu */ 336/* display a menu */
337int do_menu(const struct menu_item_ex *start_menu, int *start_selected, 337int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
338 struct viewport parent[NB_SCREENS], bool hide_bars) 338 struct viewport parent[NB_SCREENS], bool hide_theme)
339{ 339{
340 int selected = start_selected? *start_selected : 0; 340 int selected = start_selected? *start_selected : 0;
341 int action; 341 int action;
@@ -344,7 +344,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
344 int ret = 0, i; 344 int ret = 0, i;
345 bool redraw_lists; 345 bool redraw_lists;
346 FOR_NB_SCREENS(i) 346 FOR_NB_SCREENS(i)
347 viewportmanager_theme_enable(i, !hide_bars, NULL); 347 viewportmanager_theme_enable(i, !hide_theme, NULL);
348 348
349 const struct menu_item_ex *menu_stack[MAX_MENUS]; 349 const struct menu_item_ex *menu_stack[MAX_MENUS];
350 int menu_stack_selected_item[MAX_MENUS]; 350 int menu_stack_selected_item[MAX_MENUS];
@@ -363,7 +363,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
363 menu = &main_menu_; 363 menu = &main_menu_;
364 else menu = start_menu; 364 else menu = start_menu;
365 365
366 /* if hide_bars is true, assume parent has been fixed before passed into 366 /* if hide_theme is true, assume parent has been fixed before passed into
367 * this function, e.g. with viewport_set_defaults(parent, screen) */ 367 * this function, e.g. with viewport_set_defaults(parent, screen) */
368 init_menu_lists(menu, &lists, selected, true, parent); 368 init_menu_lists(menu, &lists, selected, true, parent);
369 vps = *(lists.parent); 369 vps = *(lists.parent);
@@ -373,7 +373,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
373 373
374 374
375#ifdef HAVE_BUTTONBAR 375#ifdef HAVE_BUTTONBAR
376 if (!hide_bars) 376 if (!hide_theme)
377 { 377 {
378 gui_buttonbar_set(&buttonbar, "<<<", "", ""); 378 gui_buttonbar_set(&buttonbar, "<<<", "", "");
379 gui_buttonbar_draw(&buttonbar); 379 gui_buttonbar_draw(&buttonbar);
@@ -382,7 +382,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
382 while (!done) 382 while (!done)
383 { 383 {
384 redraw_lists = false; 384 redraw_lists = false;
385 if (!hide_bars) 385 if (!hide_theme)
386 { 386 {
387#ifdef HAVE_BUTTONBAR 387#ifdef HAVE_BUTTONBAR
388 gui_buttonbar_draw(&buttonbar); 388 gui_buttonbar_draw(&buttonbar);
@@ -551,7 +551,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
551 screens[i].scroll_stop(&vps[i]); 551 screens[i].scroll_stop(&vps[i]);
552 } 552 }
553#ifdef HAVE_BUTTONBAR 553#ifdef HAVE_BUTTONBAR
554 if (!hide_bars) 554 if (!hide_theme)
555 { 555 {
556 gui_buttonbar_unset(&buttonbar); 556 gui_buttonbar_unset(&buttonbar);
557 gui_buttonbar_draw(&buttonbar); 557 gui_buttonbar_draw(&buttonbar);
@@ -653,7 +653,7 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
653 break; 653 break;
654 } 654 }
655#ifdef HAVE_BUTTONBAR 655#ifdef HAVE_BUTTONBAR
656 if (!hide_bars) 656 if (!hide_theme)
657 { 657 {
658 gui_buttonbar_set(&buttonbar, "<<<", "", ""); 658 gui_buttonbar_set(&buttonbar, "<<<", "", "");
659 gui_buttonbar_draw(&buttonbar); 659 gui_buttonbar_draw(&buttonbar);