summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-03-20 16:12:09 +0000
committerThomas Martitz <kugel@rockbox.org>2009-03-20 16:12:09 +0000
commitad59f6ed22b90a07cdd6bbb8a69591d0281033a4 (patch)
tree6c23c4538737c777804a5954206abd3cdb2834e1 /apps/gui/gwps-common.c
parentce6b116bc1c09b665e4a79272bc409b5e27f773e (diff)
downloadrockbox-ad59f6ed22b90a07cdd6bbb8a69591d0281033a4.tar.gz
rockbox-ad59f6ed22b90a07cdd6bbb8a69591d0281033a4.zip
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
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c16
1 files changed, 4 insertions, 12 deletions
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)
353 FOR_NB_SCREENS(i) 353 FOR_NB_SCREENS(i)
354 { 354 {
355 gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_ALL); 355 gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_ALL);
356#ifdef HAVE_LCD_BITMAP
357 /* temporary work around so the statusbar doesnt disappear when the WPS
358 * is first entered. This should be removed when the
359 * WPS-statusbar handling is fixed up a bit more */
360 bool draw = global_settings.statusbar;
361 if (gui_wps[i].data->wps_sb_tag)
362 draw = gui_wps[i].data->show_sb_on_wps;
363 if (draw)
364 gui_statusbar_draw(&statusbars.statusbars[i], true);
365#endif
366 } 356 }
367 return false; 357 return false;
368} 358}
@@ -2114,6 +2104,10 @@ bool gui_wps_refresh(struct gui_wps *gwps,
2114 data->peak_meter_enabled = enable_pm; 2104 data->peak_meter_enabled = enable_pm;
2115#endif 2105#endif
2116 2106
2107 if (refresh_mode & WPS_REFRESH_STATUSBAR)
2108 {
2109 gwps_draw_statusbars();
2110 }
2117 /* Restore the default viewport */ 2111 /* Restore the default viewport */
2118 display->set_viewport(NULL); 2112 display->set_viewport(NULL);
2119 2113
@@ -2152,7 +2146,5 @@ bool gui_wps_refresh(struct gui_wps *gwps,
2152 remote_backlight_on(); 2146 remote_backlight_on();
2153 } 2147 }
2154#endif 2148#endif
2155 /* force a bars update if they are being displayed */
2156 viewportmanager_draw_statusbars(NULL);
2157 return true; 2149 return true;
2158} 2150}