diff options
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r-- | apps/gui/gwps-common.c | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index e07436e565..2d65629f97 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #endif | 62 | #endif |
63 | #include "backdrop.h" | 63 | #include "backdrop.h" |
64 | #include "viewport.h" | 64 | #include "viewport.h" |
65 | #include "pcmbuf.h" | ||
65 | 66 | ||
66 | #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ | 67 | #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ |
67 | /* 3% of 30min file == 54s step size */ | 68 | /* 3% of 30min file == 54s step size */ |
@@ -75,36 +76,6 @@ | |||
75 | #define DEFAULT_SUBLINE_TIME_MULTIPLIER 20 /* In TIMEOUT_UNIT's */ | 76 | #define DEFAULT_SUBLINE_TIME_MULTIPLIER 20 /* In TIMEOUT_UNIT's */ |
76 | 77 | ||
77 | 78 | ||
78 | /* draws the statusbar on the given wps-screen */ | ||
79 | #ifdef HAVE_LCD_BITMAP | ||
80 | static void gui_wps_statusbar_draw(struct gui_wps *wps, bool force) | ||
81 | { | ||
82 | (void)force; | ||
83 | bool draw = global_settings.statusbar; | ||
84 | |||
85 | if (wps->data->wps_sb_tag) | ||
86 | draw = wps->data->show_sb_on_wps; | ||
87 | |||
88 | #if NB_SCREENS > 1 | ||
89 | /* multi screen targets could show the bars on one screen but not both | ||
90 | * so the viewportmanager can't be used in its current form... | ||
91 | * Also, the WPS is a special screen so doing this is reasonable. | ||
92 | */ | ||
93 | if (draw) | ||
94 | { | ||
95 | struct gui_statusbar *bar; | ||
96 | bar = &statusbars.statusbars[wps->data->remote_wps?SCREEN_REMOTE:SCREEN_MAIN]; | ||
97 | gui_statusbar_draw(bar, force); | ||
98 | } | ||
99 | #else | ||
100 | viewportmanager_set_statusbar(draw); | ||
101 | #endif | ||
102 | } | ||
103 | #else | ||
104 | #define gui_wps_statusbar_draw(wps, force) viewportmanager_set_statusbar(true) | ||
105 | #endif | ||
106 | #include "pcmbuf.h" | ||
107 | |||
108 | /* fades the volume */ | 79 | /* fades the volume */ |
109 | bool wps_fading_out = false; | 80 | bool wps_fading_out = false; |
110 | void fade(bool fade_in, bool updatewps) | 81 | void fade(bool fade_in, bool updatewps) |
@@ -170,7 +141,6 @@ void fade(bool fade_in, bool updatewps) | |||
170 | */ | 141 | */ |
171 | bool update_onvol_change(struct gui_wps * gwps) | 142 | bool update_onvol_change(struct gui_wps * gwps) |
172 | { | 143 | { |
173 | gui_wps_statusbar_draw(gwps, false); | ||
174 | gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); | 144 | gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); |
175 | 145 | ||
176 | #ifdef HAVE_LCD_CHARCELLS | 146 | #ifdef HAVE_LCD_CHARCELLS |
@@ -366,7 +336,6 @@ bool gui_wps_display(void) | |||
366 | } | 336 | } |
367 | #endif | 337 | #endif |
368 | #endif | 338 | #endif |
369 | |||
370 | gui_wps[i].display->clear_display(); | 339 | gui_wps[i].display->clear_display(); |
371 | if (!gui_wps[i].data->wps_loaded) { | 340 | if (!gui_wps[i].data->wps_loaded) { |
372 | if ( !gui_wps[i].data->num_tokens ) { | 341 | if ( !gui_wps[i].data->num_tokens ) { |
@@ -481,8 +450,6 @@ bool update(struct gui_wps *gwps) | |||
481 | gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); | 450 | gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); |
482 | } | 451 | } |
483 | 452 | ||
484 | gui_wps_statusbar_draw(gwps, false); | ||
485 | |||
486 | return retcode; | 453 | return retcode; |
487 | } | 454 | } |
488 | 455 | ||
@@ -1978,7 +1945,6 @@ bool gui_wps_refresh(struct gui_wps *gwps, | |||
1978 | bool update_line, new_subline_refresh; | 1945 | bool update_line, new_subline_refresh; |
1979 | 1946 | ||
1980 | #ifdef HAVE_LCD_BITMAP | 1947 | #ifdef HAVE_LCD_BITMAP |
1981 | gui_wps_statusbar_draw(gwps, true); | ||
1982 | 1948 | ||
1983 | /* to find out wether the peak meter is enabled we | 1949 | /* to find out wether the peak meter is enabled we |
1984 | assume it wasn't until we find a line that contains | 1950 | assume it wasn't until we find a line that contains |
@@ -2195,7 +2161,8 @@ bool gui_wps_refresh(struct gui_wps *gwps, | |||
2195 | remote_backlight_on(); | 2161 | remote_backlight_on(); |
2196 | } | 2162 | } |
2197 | #endif | 2163 | #endif |
2198 | 2164 | /* force a bars update if they are being displayed */ | |
2165 | viewportmanager_draw_statusbars(NULL); | ||
2199 | return true; | 2166 | return true; |
2200 | } | 2167 | } |
2201 | 2168 | ||