diff options
author | Kevin Ferrare <kevin@rockbox.org> | 2005-11-20 01:02:14 +0000 |
---|---|---|
committer | Kevin Ferrare <kevin@rockbox.org> | 2005-11-20 01:02:14 +0000 |
commit | 1a1abf25f43e33dfa7d421d6c43f283763226dbd (patch) | |
tree | 71e57b7c1f5d3c2521fbf2215e938b55fe77bb99 /apps/alarm_menu.c | |
parent | e3367212bd8a25cfe6468aa20adaacf4c5b0b2d4 (diff) | |
download | rockbox-1a1abf25f43e33dfa7d421d6c43f283763226dbd.tar.gz rockbox-1a1abf25f43e33dfa7d421d6c43f283763226dbd.zip |
removed old statusbar and buttonbar code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8004 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/alarm_menu.c')
-rw-r--r-- | apps/alarm_menu.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/apps/alarm_menu.c b/apps/alarm_menu.c index 9df664f8a8..ae5d5bb752 100644 --- a/apps/alarm_menu.c +++ b/apps/alarm_menu.c | |||
@@ -25,14 +25,12 @@ | |||
25 | #include "options.h" | 25 | #include "options.h" |
26 | 26 | ||
27 | #include "lcd.h" | 27 | #include "lcd.h" |
28 | #include "font.h" | ||
29 | #include "button.h" | 28 | #include "button.h" |
30 | #include "kernel.h" | 29 | #include "kernel.h" |
31 | #include "sprintf.h" | 30 | #include "sprintf.h" |
32 | #include <string.h> | 31 | #include <string.h> |
33 | #include "settings.h" | 32 | #include "settings.h" |
34 | #include "power.h" | 33 | #include "power.h" |
35 | #include "status.h" | ||
36 | #include "icons.h" | 34 | #include "icons.h" |
37 | #include "rtc.h" | 35 | #include "rtc.h" |
38 | #include "misc.h" | 36 | #include "misc.h" |
@@ -44,6 +42,8 @@ | |||
44 | #include "backlight.h" | 42 | #include "backlight.h" |
45 | 43 | ||
46 | #include "splash.h" | 44 | #include "splash.h" |
45 | #include "statusbar.h" | ||
46 | #include "textarea.h" | ||
47 | #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) | 47 | #define MARGIN_Y (global_settings.statusbar ? STATUSBAR_HEIGHT : 0) |
48 | 48 | ||
49 | bool alarm_screen(void) | 49 | bool alarm_screen(void) |
@@ -54,6 +54,7 @@ bool alarm_screen(void) | |||
54 | struct tm *tm; | 54 | struct tm *tm; |
55 | int togo; | 55 | int togo; |
56 | int button; | 56 | int button; |
57 | int i; | ||
57 | bool update = true; | 58 | bool update = true; |
58 | 59 | ||
59 | rtc_get_alarm(&h, &m); | 60 | rtc_get_alarm(&h, &m); |
@@ -69,20 +70,22 @@ bool alarm_screen(void) | |||
69 | while(!done) { | 70 | while(!done) { |
70 | if(update) | 71 | if(update) |
71 | { | 72 | { |
72 | lcd_clear_display(); | 73 | FOR_NB_SCREENS(i) |
73 | status_draw(true); | 74 | { |
74 | lcd_setfont(FONT_SYSFIXED); | 75 | gui_textarea_clear(&screens[i]); |
75 | lcd_setmargins(0, MARGIN_Y); | 76 | screens[i].puts(0, 3, str(LANG_ALARM_MOD_KEYS)); |
76 | lcd_puts(0, 3, str(LANG_ALARM_MOD_KEYS)); | 77 | } |
77 | update = false; | 78 | update = false; |
78 | } | 79 | } |
79 | |||
80 | snprintf(buf, 32, str(LANG_ALARM_MOD_TIME), h, m); | ||
81 | lcd_puts(0, 1, buf); | ||
82 | lcd_update(); | ||
83 | 80 | ||
81 | snprintf(buf, 32, str(LANG_ALARM_MOD_TIME), h, m); | ||
82 | FOR_NB_SCREENS(i) | ||
83 | { | ||
84 | screens[i].puts(0, 1, buf); | ||
85 | gui_textarea_update(&screens[i]); | ||
86 | } | ||
84 | button = button_get_w_tmo(HZ); | 87 | button = button_get_w_tmo(HZ); |
85 | 88 | ||
86 | switch(button) { | 89 | switch(button) { |
87 | case BUTTON_PLAY: | 90 | case BUTTON_PLAY: |
88 | /* prevent that an alarm occurs in the shutdown procedure */ | 91 | /* prevent that an alarm occurs in the shutdown procedure */ |
@@ -95,7 +98,7 @@ bool alarm_screen(void) | |||
95 | rtc_enable_alarm(true); | 98 | rtc_enable_alarm(true); |
96 | gui_syncsplash(HZ*2, true, str(LANG_ALARM_MOD_TIME_TO_GO), | 99 | gui_syncsplash(HZ*2, true, str(LANG_ALARM_MOD_TIME_TO_GO), |
97 | togo / 60, togo % 60); | 100 | togo / 60, togo % 60); |
98 | done = true; | 101 | done = true; |
99 | } else { | 102 | } else { |
100 | gui_syncsplash(HZ, true, str(LANG_ALARM_MOD_ERROR)); | 103 | gui_syncsplash(HZ, true, str(LANG_ALARM_MOD_ERROR)); |
101 | update = true; | 104 | update = true; |
@@ -125,9 +128,9 @@ bool alarm_screen(void) | |||
125 | if (h == -1) | 128 | if (h == -1) |
126 | h = 23; | 129 | h = 23; |
127 | break; | 130 | break; |
128 | 131 | ||
129 | #if CONFIG_KEYPAD == RECORDER_PAD | 132 | #if CONFIG_KEYPAD == RECORDER_PAD |
130 | /* inc(h) */ | 133 | /* inc(h) */ |
131 | case BUTTON_UP: | 134 | case BUTTON_UP: |
132 | case BUTTON_UP | BUTTON_REPEAT: | 135 | case BUTTON_UP | BUTTON_REPEAT: |
133 | h = (h+1) % 24; | 136 | h = (h+1) % 24; |
@@ -152,7 +155,7 @@ bool alarm_screen(void) | |||
152 | break; | 155 | break; |
153 | 156 | ||
154 | case BUTTON_NONE: | 157 | case BUTTON_NONE: |
155 | status_draw(false); | 158 | gui_syncstatusbar_draw(&statusbars, false); |
156 | break; | 159 | break; |
157 | 160 | ||
158 | default: | 161 | default: |