summaryrefslogtreecommitdiff
path: root/apps/menus/main_menu.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2007-08-23 09:13:15 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2007-08-23 09:13:15 +0000
commit518b8cc408c09b2bc1eda2b64fe3374f83a47ace (patch)
treeb63b92cfbb49820b2eecdcc094c97c0bd0bc6f57 /apps/menus/main_menu.c
parentfbd6c7b86318fd43a104d57b704bbef70e64226f (diff)
downloadrockbox-518b8cc408c09b2bc1eda2b64fe3374f83a47ace.tar.gz
rockbox-518b8cc408c09b2bc1eda2b64fe3374f83a47ace.zip
Patch FS#7641 by Daniel Dalton, talking clock improvements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14437 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/main_menu.c')
-rw-r--r--apps/menus/main_menu.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index b6fee4416d..822301fe52 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -227,30 +227,40 @@ static bool show_info(void)
227 /* Voice the minutes */ 227 /* Voice the minutes */
228 if (tm->tm_min == 0) 228 if (tm->tm_min == 0)
229 { 229 {
230 /*say o'clock if the minute is 0. */ 230 /* Say o'clock if the minute is 0. */
231 talk_id(VOICE_OCLOCK, true); 231 talk_id(VOICE_OCLOCK, true);
232 } 232 }
233 else 233 else
234 { 234 {
235 /* Pronounce the leading 0 */
236 if(tm->tm_min < 10)
237 {
238 talk_id(VOICE_OH, true);
239 }
235 talk_number(tm->tm_min, true); 240 talk_number(tm->tm_min, true);
236 } 241 }
237
238 talk_id(am_pm_id, true); 242 talk_id(am_pm_id, true);
239 } 243 }
240 else 244 else
241 { 245 {
242 /*voice the time in 24 hour format*/ 246 /* Voice the time in 24 hour format */
243 talk_number(tm->tm_hour, true); 247 talk_number(tm->tm_hour, true);
244 if (tm->tm_min == 0) 248 if (tm->tm_min == 0)
245 { 249 {
246 /*say o'clock if the minute is 0. */ 250 talk_id(VOICE_HUNDRED, true);
247 talk_id(VOICE_OCLOCK, true); 251 talk_id(VOICE_HOUR, true);
248 } 252 }
249 else 253 else
250 { 254 {
255 /* Pronounce the leading 0 */
256 if(tm->tm_min < 10)
257 {
258 talk_id(VOICE_OH, true);
259 }
251 talk_number(tm->tm_min, true); 260 talk_number(tm->tm_min, true);
252 } 261 }
253 } 262 }
263
254 talk_id(LANG_MONTH_JANUARY + tm->tm_mon, true); 264 talk_id(LANG_MONTH_JANUARY + tm->tm_mon, true);
255 talk_number(tm->tm_mday, true); 265 talk_number(tm->tm_mday, true);
256 talk_number(1900 + tm->tm_year, true); 266 talk_number(1900 + tm->tm_year, true);