From ad59f6ed22b90a07cdd6bbb8a69591d0281033a4 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Fri, 20 Mar 2009 16:12:09 +0000 Subject: Fix up statusbar drawing in the wps a bit, fixing most, if not all, (re-)draw issues. a) remove the temporary work around in gui_wps_display b) let the wps-statusbars redraw if it's masked (i.e. WPS_REFRESH_ALL or WPS_REFRESH_STATUSBAR) c) fix a bug of mine, I attached re-fixing the bars to the wrong event d) unify the decision whether to draw bars at all e) some other style/code minor cleanups git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20400 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps-common.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'apps/gui/gwps-common.c') diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index b60377de78..005fefd0fb 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -353,16 +353,6 @@ bool gui_wps_display(void) FOR_NB_SCREENS(i) { gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_ALL); -#ifdef HAVE_LCD_BITMAP - /* temporary work around so the statusbar doesnt disappear when the WPS - * is first entered. This should be removed when the - * WPS-statusbar handling is fixed up a bit more */ - bool draw = global_settings.statusbar; - if (gui_wps[i].data->wps_sb_tag) - draw = gui_wps[i].data->show_sb_on_wps; - if (draw) - gui_statusbar_draw(&statusbars.statusbars[i], true); -#endif } return false; } @@ -2114,6 +2104,10 @@ bool gui_wps_refresh(struct gui_wps *gwps, data->peak_meter_enabled = enable_pm; #endif + if (refresh_mode & WPS_REFRESH_STATUSBAR) + { + gwps_draw_statusbars(); + } /* Restore the default viewport */ display->set_viewport(NULL); @@ -2152,7 +2146,5 @@ bool gui_wps_refresh(struct gui_wps *gwps, remote_backlight_on(); } #endif - /* force a bars update if they are being displayed */ - viewportmanager_draw_statusbars(NULL); return true; } -- cgit v1.2.3