diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/gwps-common.c | 81 | ||||
-rw-r--r-- | apps/gui/gwps-common.h | 3 | ||||
-rw-r--r-- | apps/gui/gwps.c | 80 | ||||
-rw-r--r-- | apps/gui/gwps.h | 6 | ||||
-rw-r--r-- | apps/gui/statusbar.c | 9 |
5 files changed, 128 insertions, 51 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 92d7ded740..c2a4dff3b6 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "gwps-common.h" | 19 | #include "gwps-common.h" |
20 | #include "gwps.h" | ||
21 | #include "font.h" | 20 | #include "font.h" |
22 | #include <stdio.h> | 21 | #include <stdio.h> |
23 | #include <string.h> | 22 | #include <string.h> |
@@ -37,7 +36,6 @@ | |||
37 | #include "lang.h" | 36 | #include "lang.h" |
38 | #include "misc.h" | 37 | #include "misc.h" |
39 | 38 | ||
40 | #include "statusbar.h" | ||
41 | #include "splash.h" | 39 | #include "splash.h" |
42 | #include "scrollbar.h" | 40 | #include "scrollbar.h" |
43 | #ifdef HAVE_LCD_BITMAP | 41 | #ifdef HAVE_LCD_BITMAP |
@@ -57,6 +55,24 @@ static void draw_player_fullbar(struct gui_wps *gwps, | |||
57 | /* 3% of 30min file == 54s step size */ | 55 | /* 3% of 30min file == 54s step size */ |
58 | #define MIN_FF_REWIND_STEP 500 | 56 | #define MIN_FF_REWIND_STEP 500 |
59 | 57 | ||
58 | /* draws the statusbar on the given wps-screen */ | ||
59 | #ifdef HAVE_LCD_BITMAP | ||
60 | static void gui_wps_statusbar_draw(struct gui_wps *wps, bool force) | ||
61 | { | ||
62 | bool draw = global_settings.statusbar; | ||
63 | if(wps->data->wps_sb_tag | ||
64 | && gui_wps->data->show_sb_on_wps) | ||
65 | draw = true; | ||
66 | else if(wps->data->wps_sb_tag) | ||
67 | draw = false; | ||
68 | if(draw) | ||
69 | gui_statusbar_draw(wps->statusbar, force); | ||
70 | } | ||
71 | #else | ||
72 | #define gui_wps_statusbar_draw(wps, force) \ | ||
73 | gui_statusbar_draw((wps)->statusbar, (force)) | ||
74 | #endif | ||
75 | |||
60 | /* Format time into buf. | 76 | /* Format time into buf. |
61 | * | 77 | * |
62 | * buf - buffer to format to. | 78 | * buf - buffer to format to. |
@@ -944,6 +960,11 @@ void gui_wps_format(struct wps_data *data, const char *bmpdir, | |||
944 | subline = 0; | 960 | subline = 0; |
945 | data->format_lines[line][subline] = buf; | 961 | data->format_lines[line][subline] = buf; |
946 | 962 | ||
963 | #ifdef HAVE_LCD_BITMAP | ||
964 | bool wps_tag_found = false; | ||
965 | data->wps_sb_tag = false; | ||
966 | data->show_sb_on_wps = false; | ||
967 | #endif | ||
947 | while ((*buf) && (line < WPS_MAX_LINES)) | 968 | while ((*buf) && (line < WPS_MAX_LINES)) |
948 | { | 969 | { |
949 | c = *buf; | 970 | c = *buf; |
@@ -955,10 +976,19 @@ void gui_wps_format(struct wps_data *data, const char *bmpdir, | |||
955 | * don't skip %x lines (pre-load bitmaps) | 976 | * don't skip %x lines (pre-load bitmaps) |
956 | */ | 977 | */ |
957 | case '%': | 978 | case '%': |
979 | #ifdef HAVE_LCD_BITMAP | ||
980 | if(*(buf+1) == 'w' && (*(buf+2) == 'd' || *(buf+2) == 'e') | ||
981 | && !wps_tag_found) | ||
982 | { | ||
983 | data->wps_sb_tag = true; | ||
984 | if( *(buf+1) == 'w' && *(buf+2) == 'e' ) | ||
985 | data->show_sb_on_wps = true; | ||
986 | wps_tag_found = true; | ||
987 | } | ||
958 | if (*(buf+1) != 'x') | 988 | if (*(buf+1) != 'x') |
959 | buf++; | 989 | buf++; |
960 | break; | 990 | break; |
961 | 991 | #endif | |
962 | case '\r': /* CR */ | 992 | case '\r': /* CR */ |
963 | *buf = 0; | 993 | *buf = 0; |
964 | break; | 994 | break; |
@@ -1177,7 +1207,13 @@ bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | |||
1177 | } | 1207 | } |
1178 | #ifdef HAVE_LCD_BITMAP | 1208 | #ifdef HAVE_LCD_BITMAP |
1179 | int h = font_get(FONT_UI)->height; | 1209 | int h = font_get(FONT_UI)->height; |
1180 | int offset = global_settings.statusbar ? STATUSBAR_HEIGHT : 0; | 1210 | int offset = 0; |
1211 | gui_wps_statusbar_draw(gwps, true); | ||
1212 | if(data->wps_sb_tag && data->show_sb_on_wps) | ||
1213 | offset = STATUSBAR_HEIGHT; | ||
1214 | else if ( global_settings.statusbar && !data->wps_sb_tag) | ||
1215 | offset = STATUSBAR_HEIGHT; | ||
1216 | |||
1181 | /* to find out wether the peak meter is enabled we | 1217 | /* to find out wether the peak meter is enabled we |
1182 | assume it wasn't until we find a line that contains | 1218 | assume it wasn't until we find a line that contains |
1183 | the peak meter. We can't use peak_meter_enabled itself | 1219 | the peak meter. We can't use peak_meter_enabled itself |
@@ -1774,24 +1810,26 @@ static void draw_player_fullbar(struct gui_wps *gwps, char* buf, int buf_size) | |||
1774 | } | 1810 | } |
1775 | #endif | 1811 | #endif |
1776 | 1812 | ||
1777 | /* set volume | 1813 | /* set volume */ |
1778 | return true if screen restore is needed | 1814 | void setvol(void) |
1779 | return false otherwise | ||
1780 | */ | ||
1781 | bool setvol(void) | ||
1782 | { | 1815 | { |
1783 | if (global_settings.volume < sound_min(SOUND_VOLUME)) | 1816 | if (global_settings.volume < sound_min(SOUND_VOLUME)) |
1784 | global_settings.volume = sound_min(SOUND_VOLUME); | 1817 | global_settings.volume = sound_min(SOUND_VOLUME); |
1785 | if (global_settings.volume > sound_max(SOUND_VOLUME)) | 1818 | if (global_settings.volume > sound_max(SOUND_VOLUME)) |
1786 | global_settings.volume = sound_max(SOUND_VOLUME); | 1819 | global_settings.volume = sound_max(SOUND_VOLUME); |
1787 | sound_set_volume(global_settings.volume); | 1820 | sound_set_volume(global_settings.volume); |
1788 | gui_syncstatusbar_draw(&statusbars, false); | ||
1789 | int i; | ||
1790 | FOR_NB_SCREENS(i) | ||
1791 | gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC); | ||
1792 | settings_save(); | 1821 | settings_save(); |
1822 | } | ||
1823 | /* return true if screen restore is needed | ||
1824 | return false otherwise | ||
1825 | */ | ||
1826 | bool update_onvol_change(struct gui_wps * gwps) | ||
1827 | { | ||
1828 | gui_wps_statusbar_draw(gwps, false); | ||
1829 | gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); | ||
1830 | |||
1793 | #ifdef HAVE_LCD_CHARCELLS | 1831 | #ifdef HAVE_LCD_CHARCELLS |
1794 | gui_syncsplash(0, false, "Vol: %d %% ", | 1832 | gui_splash(gwps->display,0, false, "Vol: %d %% ", |
1795 | sound_val2phys(SOUND_VOLUME, global_settings.volume)); | 1833 | sound_val2phys(SOUND_VOLUME, global_settings.volume)); |
1796 | return true; | 1834 | return true; |
1797 | #endif | 1835 | #endif |
@@ -1837,13 +1875,13 @@ bool ffwd_rew(int button) | |||
1837 | max_step = (wps_state.id3->length - | 1875 | max_step = (wps_state.id3->length - |
1838 | (wps_state.id3->elapsed + | 1876 | (wps_state.id3->elapsed + |
1839 | ff_rewind_count)) * | 1877 | ff_rewind_count)) * |
1840 | FF_REWIND_MAX_PERCENT / 100; | 1878 | FF_REWIND_MAX_PERCENT / 100; |
1841 | } | 1879 | } |
1842 | else | 1880 | else |
1843 | { | 1881 | { |
1844 | /* rewinding, calc max step relative to start */ | 1882 | /* rewinding, calc max step relative to start */ |
1845 | max_step = (wps_state.id3->elapsed + ff_rewind_count) * | 1883 | max_step = (wps_state.id3->elapsed + ff_rewind_count) * |
1846 | FF_REWIND_MAX_PERCENT / 100; | 1884 | FF_REWIND_MAX_PERCENT / 100; |
1847 | } | 1885 | } |
1848 | 1886 | ||
1849 | max_step = MAX(max_step, MIN_FF_REWIND_STEP); | 1887 | max_step = MAX(max_step, MIN_FF_REWIND_STEP); |
@@ -2003,10 +2041,9 @@ bool gui_wps_display(void) | |||
2003 | } | 2041 | } |
2004 | yield(); | 2042 | yield(); |
2005 | FOR_NB_SCREENS(i) | 2043 | FOR_NB_SCREENS(i) |
2006 | gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_ALL); | ||
2007 | gui_syncstatusbar_draw(&statusbars, true); | ||
2008 | FOR_NB_SCREENS(i) | ||
2009 | { | 2044 | { |
2045 | gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_ALL); | ||
2046 | |||
2010 | #ifdef HAVE_LCD_BITMAP | 2047 | #ifdef HAVE_LCD_BITMAP |
2011 | wps_display_images(&gui_wps[i]); | 2048 | wps_display_images(&gui_wps[i]); |
2012 | gui_wps[i].display->update(); | 2049 | gui_wps[i].display->update(); |
@@ -2039,9 +2076,9 @@ bool update(struct gui_wps *gwps) | |||
2039 | if (gwps->state->id3) | 2076 | if (gwps->state->id3) |
2040 | gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); | 2077 | gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC); |
2041 | 2078 | ||
2042 | gui_syncstatusbar_draw(&statusbars, false); | 2079 | gui_wps_statusbar_draw(gwps, false); |
2043 | 2080 | ||
2044 | return retcode; | 2081 | return retcode; |
2045 | } | 2082 | } |
2046 | 2083 | ||
2047 | #ifdef WPS_KEYLOCK | 2084 | #ifdef WPS_KEYLOCK |
diff --git a/apps/gui/gwps-common.h b/apps/gui/gwps-common.h index fe7f2f66da..e9c1a42299 100644 --- a/apps/gui/gwps-common.h +++ b/apps/gui/gwps-common.h | |||
@@ -30,7 +30,8 @@ void gui_wps_format(struct wps_data *data, const char *bmpdir, | |||
30 | bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, | 30 | bool gui_wps_refresh(struct gui_wps *gwps, int ffwd_offset, |
31 | unsigned char refresh_mode); | 31 | unsigned char refresh_mode); |
32 | bool gui_wps_display(void); | 32 | bool gui_wps_display(void); |
33 | bool setvol(void); | 33 | void setvol(void); |
34 | bool update_onvol_change(struct gui_wps * gwps); | ||
34 | bool update(struct gui_wps *gwps); | 35 | bool update(struct gui_wps *gwps); |
35 | bool ffwd_rew(int button); | 36 | bool ffwd_rew(int button); |
36 | #ifdef WPS_KEYLOCK | 37 | #ifdef WPS_KEYLOCK |
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index 5877cf7c4b..a93750770f 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c | |||
@@ -53,7 +53,6 @@ | |||
53 | #include "abrepeat.h" | 53 | #include "abrepeat.h" |
54 | #include "playback.h" | 54 | #include "playback.h" |
55 | 55 | ||
56 | #include "statusbar.h" | ||
57 | #include "splash.h" | 56 | #include "splash.h" |
58 | 57 | ||
59 | #define WPS_DEFAULTCFG WPS_DIR "/rockbox_default.wps" | 58 | #define WPS_DEFAULTCFG WPS_DIR "/rockbox_default.wps" |
@@ -68,6 +67,19 @@ bool keys_locked = false; | |||
68 | /* change the path to the current played track */ | 67 | /* change the path to the current played track */ |
69 | static void wps_state_update_ctp(const char *path); | 68 | static void wps_state_update_ctp(const char *path); |
70 | 69 | ||
70 | #ifdef HAVE_LCD_BITMAP | ||
71 | static void gui_wps_set_margine(struct gui_wps *gwps) | ||
72 | { | ||
73 | int offset = 0; | ||
74 | struct wps_data *data = gwps->data; | ||
75 | if(data->wps_sb_tag && data->show_sb_on_wps) | ||
76 | offset = STATUSBAR_HEIGHT; | ||
77 | else if ( global_settings.statusbar && !data->wps_sb_tag) | ||
78 | offset = STATUSBAR_HEIGHT; | ||
79 | gwps->display->setmargins(0, offset); | ||
80 | } | ||
81 | #endif | ||
82 | |||
71 | long gui_wps_show(void) | 83 | long gui_wps_show(void) |
72 | { | 84 | { |
73 | long button = 0, lastbutton = 0; | 85 | long button = 0, lastbutton = 0; |
@@ -88,8 +100,7 @@ long gui_wps_show(void) | |||
88 | #else | 100 | #else |
89 | FOR_NB_SCREENS(i) | 101 | FOR_NB_SCREENS(i) |
90 | { | 102 | { |
91 | gui_wps[i].display->setmargins(0, global_settings.statusbar? | 103 | gui_wps_set_margine(&gui_wps[i]); |
92 | STATUSBAR_HEIGHT:0); | ||
93 | } | 104 | } |
94 | #endif | 105 | #endif |
95 | 106 | ||
@@ -156,12 +167,12 @@ long gui_wps_show(void) | |||
156 | 167 | ||
157 | if (TIME_AFTER(current_tick, next_refresh)) { | 168 | if (TIME_AFTER(current_tick, next_refresh)) { |
158 | FOR_NB_SCREENS(i) | 169 | FOR_NB_SCREENS(i) |
159 | { | 170 | { |
160 | if(gui_wps[i].data->peak_meter_enabled) | 171 | if(gui_wps[i].data->peak_meter_enabled) |
161 | gui_wps_refresh(&gui_wps[i], 0, | 172 | gui_wps_refresh(&gui_wps[i], 0, |
162 | WPS_REFRESH_PEAK_METER); | 173 | WPS_REFRESH_PEAK_METER); |
163 | next_refresh += HZ / PEAK_METER_FPS; | 174 | next_refresh += HZ / PEAK_METER_FPS; |
164 | } | 175 | } |
165 | } | 176 | } |
166 | } | 177 | } |
167 | 178 | ||
@@ -215,6 +226,12 @@ long gui_wps_show(void) | |||
215 | case WPS_RC_CONTEXT: | 226 | case WPS_RC_CONTEXT: |
216 | #endif | 227 | #endif |
217 | onplay(wps_state.id3->path, TREE_ATTR_MPA, CONTEXT_WPS); | 228 | onplay(wps_state.id3->path, TREE_ATTR_MPA, CONTEXT_WPS); |
229 | #ifdef HAVE_LCD_BITMAP | ||
230 | FOR_NB_SCREENS(i) | ||
231 | { | ||
232 | gui_wps_set_margine(&gui_wps[i]); | ||
233 | } | ||
234 | #endif | ||
218 | restore = true; | 235 | restore = true; |
219 | break; | 236 | break; |
220 | #endif | 237 | #endif |
@@ -289,11 +306,20 @@ long gui_wps_show(void) | |||
289 | case WPS_RC_INCVOL: | 306 | case WPS_RC_INCVOL: |
290 | case WPS_RC_INCVOL | BUTTON_REPEAT: | 307 | case WPS_RC_INCVOL | BUTTON_REPEAT: |
291 | #endif | 308 | #endif |
309 | { | ||
292 | global_settings.volume++; | 310 | global_settings.volume++; |
293 | if (setvol()) { | 311 | bool res = false; |
312 | setvol(); | ||
313 | FOR_NB_SCREENS(i) | ||
314 | { | ||
315 | if(update_onvol_change(&gui_wps[i])) | ||
316 | res = true; | ||
317 | } | ||
318 | if (res) { | ||
294 | restore = true; | 319 | restore = true; |
295 | restoretimer = current_tick + HZ; | 320 | restoretimer = current_tick + HZ; |
296 | } | 321 | } |
322 | } | ||
297 | break; | 323 | break; |
298 | 324 | ||
299 | /* volume down */ | 325 | /* volume down */ |
@@ -303,11 +329,20 @@ long gui_wps_show(void) | |||
303 | case WPS_RC_DECVOL: | 329 | case WPS_RC_DECVOL: |
304 | case WPS_RC_DECVOL | BUTTON_REPEAT: | 330 | case WPS_RC_DECVOL | BUTTON_REPEAT: |
305 | #endif | 331 | #endif |
332 | { | ||
306 | global_settings.volume--; | 333 | global_settings.volume--; |
307 | if (setvol()) { | 334 | setvol(); |
335 | bool res = false; | ||
336 | FOR_NB_SCREENS(i) | ||
337 | { | ||
338 | if(update_onvol_change(&gui_wps[i])) | ||
339 | res = true; | ||
340 | } | ||
341 | if (res) { | ||
308 | restore = true; | 342 | restore = true; |
309 | restoretimer = current_tick + HZ; | 343 | restoretimer = current_tick + HZ; |
310 | } | 344 | } |
345 | } | ||
311 | break; | 346 | break; |
312 | 347 | ||
313 | /* fast forward / rewind */ | 348 | /* fast forward / rewind */ |
@@ -450,9 +485,7 @@ long gui_wps_show(void) | |||
450 | #ifdef HAVE_LCD_BITMAP | 485 | #ifdef HAVE_LCD_BITMAP |
451 | FOR_NB_SCREENS(i) | 486 | FOR_NB_SCREENS(i) |
452 | { | 487 | { |
453 | gui_wps[i].display->setmargins(0, | 488 | gui_wps_set_margine(&gui_wps[i]); |
454 | global_settings.statusbar? | ||
455 | STATUSBAR_HEIGHT:0); | ||
456 | } | 489 | } |
457 | #endif | 490 | #endif |
458 | restore = true; | 491 | restore = true; |
@@ -581,13 +614,13 @@ long gui_wps_show(void) | |||
581 | 614 | ||
582 | if (update_track) | 615 | if (update_track) |
583 | { | 616 | { |
584 | bool upt = false; | 617 | bool update_failed = false; |
585 | FOR_NB_SCREENS(i) | 618 | FOR_NB_SCREENS(i) |
586 | { | 619 | { |
587 | if(update(&gui_wps[i])) | 620 | if(update(&gui_wps[i])) |
588 | upt = true; | 621 | update_failed = true; |
589 | } | 622 | } |
590 | if (upt) | 623 | if (update_failed) |
591 | { | 624 | { |
592 | /* set dir browser to current playing song */ | 625 | /* set dir browser to current playing song */ |
593 | if (global_settings.browse_current && | 626 | if (global_settings.browse_current && |
@@ -670,6 +703,8 @@ void wps_data_init(struct wps_data *wps_data) | |||
670 | wps_data->img[i].display = false; | 703 | wps_data->img[i].display = false; |
671 | wps_data->img[i].always_display = false; | 704 | wps_data->img[i].always_display = false; |
672 | } | 705 | } |
706 | wps_data->wps_sb_tag = false; | ||
707 | wps_data->show_sb_on_wps = false; | ||
673 | #else /* HAVE_LCD_CHARCELLS */ | 708 | #else /* HAVE_LCD_CHARCELLS */ |
674 | for(i = 0; i < 8; i++) | 709 | for(i = 0; i < 8; i++) |
675 | wps_data->wps_progress_pat[i] = 0; | 710 | wps_data->wps_progress_pat[i] = 0; |
@@ -861,6 +896,7 @@ void gui_wps_init(struct gui_wps *gui_wps) | |||
861 | { | 896 | { |
862 | gui_wps->data = NULL; | 897 | gui_wps->data = NULL; |
863 | gui_wps->display = NULL; | 898 | gui_wps->display = NULL; |
899 | gui_wps->statusbar = NULL; | ||
864 | /* Currently no seperate wps_state needed/possible | 900 | /* Currently no seperate wps_state needed/possible |
865 | so use the only aviable ( "global" ) one */ | 901 | so use the only aviable ( "global" ) one */ |
866 | gui_wps->state = &wps_state; | 902 | gui_wps->state = &wps_state; |
@@ -877,14 +913,12 @@ void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display) | |||
877 | { | 913 | { |
878 | gui_wps->display = display; | 914 | gui_wps->display = display; |
879 | } | 915 | } |
880 | /* gui_wps end */ | ||
881 | 916 | ||
882 | void gui_sync_data_wps_init(void) | 917 | void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar) |
883 | { | 918 | { |
884 | int i; | 919 | gui_wps->statusbar = statusbar; |
885 | FOR_NB_SCREENS(i) | ||
886 | wps_data_init(&wps_datas[i]); | ||
887 | } | 920 | } |
921 | /* gui_wps end */ | ||
888 | 922 | ||
889 | void gui_sync_wps_screen_init(void) | 923 | void gui_sync_wps_screen_init(void) |
890 | { | 924 | { |
@@ -898,7 +932,9 @@ void gui_sync_wps_init(void) | |||
898 | int i; | 932 | int i; |
899 | FOR_NB_SCREENS(i) | 933 | FOR_NB_SCREENS(i) |
900 | { | 934 | { |
935 | wps_data_init(&wps_datas[i]); | ||
901 | gui_wps_init(&gui_wps[i]); | 936 | gui_wps_init(&gui_wps[i]); |
902 | gui_wps_set_data(&gui_wps[i], &wps_datas[i]); | 937 | gui_wps_set_data(&gui_wps[i], &wps_datas[i]); |
938 | gui_wps_set_statusbar(&gui_wps[i], &statusbars.statusbars[i]); | ||
903 | } | 939 | } |
904 | } | 940 | } |
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index 5c2bd925ab..40b9a7424d 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #define _WPS_H | 20 | #define _WPS_H |
21 | 21 | ||
22 | #include "screen_access.h" | 22 | #include "screen_access.h" |
23 | #include "statusbar.h" | ||
23 | #include "id3.h" | 24 | #include "id3.h" |
24 | #include "playlist.h" | 25 | #include "playlist.h" |
25 | 26 | ||
@@ -319,6 +320,7 @@ struct gui_wps | |||
319 | struct screen * display; | 320 | struct screen * display; |
320 | struct wps_data *data; | 321 | struct wps_data *data; |
321 | struct wps_state *state; | 322 | struct wps_state *state; |
323 | struct gui_statusbar *statusbar; | ||
322 | }; | 324 | }; |
323 | 325 | ||
324 | /* initial setup of a wps */ | 326 | /* initial setup of a wps */ |
@@ -329,6 +331,9 @@ void gui_wps_set_data(struct gui_wps *gui_wps, struct wps_data *data); | |||
329 | 331 | ||
330 | /* connects a wps with a screen */ | 332 | /* connects a wps with a screen */ |
331 | void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display); | 333 | void gui_wps_set_disp(struct gui_wps *gui_wps, struct screen *display); |
334 | |||
335 | /* connects a wps with a statusbar*/ | ||
336 | void gui_wps_set_statusbar(struct gui_wps *gui_wps, struct gui_statusbar *statusbar); | ||
332 | /* gui_wps end */ | 337 | /* gui_wps end */ |
333 | 338 | ||
334 | long gui_wps_show(void); | 339 | long gui_wps_show(void); |
@@ -338,7 +343,6 @@ extern struct wps_state wps_state; | |||
338 | extern struct gui_wps gui_wps[NB_SCREENS]; | 343 | extern struct gui_wps gui_wps[NB_SCREENS]; |
339 | 344 | ||
340 | void gui_sync_wps_init(void); | 345 | void gui_sync_wps_init(void); |
341 | void gui_sync_data_wps_init(void); | ||
342 | void gui_sync_wps_screen_init(void); | 346 | void gui_sync_wps_screen_init(void); |
343 | 347 | ||
344 | #endif | 348 | #endif |
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index 02c69815a1..70fe77facd 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c | |||
@@ -104,11 +104,6 @@ void gui_statusbar_set_screen(struct gui_statusbar * bar, | |||
104 | 104 | ||
105 | void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | 105 | void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) |
106 | { | 106 | { |
107 | #ifdef HAVE_LCD_BITMAP | ||
108 | if(!global_settings.statusbar) | ||
109 | return; | ||
110 | #endif /* HAVE_LCD_BITMAP */ | ||
111 | |||
112 | struct screen * display = bar->display; | 107 | struct screen * display = bar->display; |
113 | 108 | ||
114 | #ifdef HAVE_RTC | 109 | #ifdef HAVE_RTC |
@@ -505,6 +500,10 @@ void gui_syncstatusbar_init(struct gui_syncstatusbar * bars) | |||
505 | void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars, | 500 | void gui_syncstatusbar_draw(struct gui_syncstatusbar * bars, |
506 | bool force_redraw) | 501 | bool force_redraw) |
507 | { | 502 | { |
503 | #ifdef HAVE_LCD_BITMAP | ||
504 | if(!global_settings.statusbar) | ||
505 | return; | ||
506 | #endif /* HAVE_LCD_BITMAP */ | ||
508 | int i; | 507 | int i; |
509 | FOR_NB_SCREENS(i) { | 508 | FOR_NB_SCREENS(i) { |
510 | gui_statusbar_draw( &(bars->statusbars[i]), force_redraw ); | 509 | gui_statusbar_draw( &(bars->statusbars[i]), force_redraw ); |