From b2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 9 Dec 2009 07:25:46 +0000 Subject: FS#10824 - viewport/statusbar API rework. Hopefully the only user visible changes are: - fm and recording screens go by the statusbar setting (sbs or inbuilt) - plugins go back to using the theme as they should for menus and lists - splash screens might get cut a bit... entirely theme and splash dependant.. if there is a problematic one we can look at it later. - hopefully nothing more than very minor screen flickerings... let me know exactly where they are so they can be fixed New GUI screen rules: * Screens assume that the theme (sbs+ui viewport+ maybe background image) are always enabled. They may be disabled on a per display basis, but MUST be re-enabled on exit * Screens must not be coded in a way that requires a statusbar of any type.. the inbuilt bar will be removed shortly. ALWAYS RESPECT THE USERS SETTINGS unless the screen requires the full display to fit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23904 a1c6a512-1295-4272-9138-f99709370657 --- apps/menus/eq_menu.c | 8 +++++--- apps/menus/theme_menu.c | 6 ------ 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'apps/menus') diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c index 0e04dddc18..1fc176213f 100644 --- a/apps/menus/eq_menu.c +++ b/apps/menus/eq_menu.c @@ -391,7 +391,8 @@ bool eq_menu_graphical(void) enum eq_type current_type; char buf[24]; int i, w, h, height, start_item, nb_eq_sliders[NB_SCREENS]; - int barsenabled = viewportmanager_set_statusbar(VP_SB_HIDE_ALL); + FOR_NB_SCREENS(i) + viewportmanager_theme_enable(i, false, NULL); FOR_NB_SCREENS(i) { @@ -570,12 +571,13 @@ bool eq_menu_graphical(void) } /* Reset screen settings */ - FOR_NB_SCREENS(i) { + FOR_NB_SCREENS(i) + { screens[i].setfont(FONT_UI); screens[i].clear_display(); screens[i].set_viewport(NULL); + viewportmanager_theme_undo(i); } - viewportmanager_set_statusbar(barsenabled); return result; } diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c index 21ad2b0713..de0429f483 100644 --- a/apps/menus/theme_menu.c +++ b/apps/menus/theme_menu.c @@ -49,7 +49,6 @@ static int clear_main_backdrop(void) global_settings.backdrop_file[0]=0; backdrop_unload(BACKDROP_MAIN); backdrop_show(BACKDROP_MAIN); - send_event(GUI_EVENT_REFRESH, NULL); settings_save(); return 0; } @@ -164,11 +163,6 @@ static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item case ACTION_EXIT_MENUITEM: send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL); send_event(GUI_EVENT_ACTIONUPDATE, (void*)true); - if ((old_bar[screen] == STATUSBAR_CUSTOM) - || (statusbar_position(screen) == STATUSBAR_CUSTOM)) - send_event(GUI_EVENT_REFRESH, NULL); - else - gui_statusbar_changed(screen, old_bar[screen]); break; } return ACTION_REDRAW; -- cgit v1.2.3