summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAlessio Lenzi <lenzone10@rockbox.org>2007-10-30 21:41:03 +0000
committerAlessio Lenzi <lenzone10@rockbox.org>2007-10-30 21:41:03 +0000
commit6c2a904f2ba3916cccb27980937add3a88b99e36 (patch)
tree70b71a400a162e68d801ea6b7f73b7e43e9d1a83 /apps
parent3c64ace5731c836a6840fdc32c3d58a1cf140d4c (diff)
downloadrockbox-6c2a904f2ba3916cccb27980937add3a88b99e36.tar.gz
rockbox-6c2a904f2ba3916cccb27980937add3a88b99e36.zip
* For a better access to the information of the Rockbox Info menu by visually
impaired users, the order of the items has been modified. * Now the software displays a message when the external memory card is not in the device slot. (only for Sansa and Ondio models) * The voice tag for the current_time message has been restored. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15381 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang19
-rw-r--r--apps/lang/italiano.lang21
-rw-r--r--apps/menus/main_menu.c102
3 files changed, 100 insertions, 42 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index a706003e3d..125bb42f3c 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -6957,7 +6957,7 @@
6957 </source> 6957 </source>
6958 <dest> 6958 <dest>
6959 *: none 6959 *: none
6960 e200,c200: "mSD:" 6960 e200,c200: "MSD:"
6961 ondio*: "MMC:" 6961 ondio*: "MMC:"
6962 </dest> 6962 </dest>
6963 <voice> 6963 <voice>
@@ -11431,3 +11431,20 @@
11431 *: "Empty list" 11431 *: "Empty list"
11432 </voice> 11432 </voice>
11433</phrase> 11433</phrase>
11434<phrase>
11435 id: LANG_NOT_PRESENT
11436 desc: when external memory is not present
11437 user:
11438 <source>
11439 *: none
11440 multivolume: "Not present"
11441 </source>
11442 <dest>
11443 *: none
11444 multivolume: "Not present"
11445 </dest>
11446 <voice>
11447 *: none
11448 multivolume: "Not present"
11449 </voice>
11450</phrase>
diff --git a/apps/lang/italiano.lang b/apps/lang/italiano.lang
index 99f882f2e3..835b223ed5 100644
--- a/apps/lang/italiano.lang
+++ b/apps/lang/italiano.lang
@@ -4043,8 +4043,8 @@
4043 </source> 4043 </source>
4044 <dest> 4044 <dest>
4045 *: none 4045 *: none
4046 e200,c200: "mSD" 4046 e200,c200: "MSD:"
4047 ondio*: "MMC" 4047 ondio*: "MMC:"
4048 </dest> 4048 </dest>
4049 <voice> 4049 <voice>
4050 *: none 4050 *: none
@@ -11386,3 +11386,20 @@
11386 *: "Lista vuota" 11386 *: "Lista vuota"
11387 </voice> 11387 </voice>
11388</phrase> 11388</phrase>
11389<phrase>
11390 id: LANG_NOT_PRESENT
11391 desc: when external memory is not present
11392 user:
11393 <source>
11394 *: none
11395 multivolume: "Not present"
11396 </source>
11397 <dest>
11398 *: none
11399 multivolume: "Non presente"
11400 </dest>
11401 <voice>
11402 *: none
11403 multivolume: "Non presente"
11404 </voice>
11405</phrase>
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index 5231181296..e7c6d6c81a 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -118,7 +118,8 @@ static bool show_credits(void)
118#else 118#else
119#define SIZE_FMT "%s %s" 119#define SIZE_FMT "%s %s"
120#endif 120#endif
121struct info_data 121struct info_data
122
122{ 123{
123 bool new_data; 124 bool new_data;
124 unsigned long size; 125 unsigned long size;
@@ -128,27 +129,32 @@ struct info_data
128 unsigned long free2; 129 unsigned long free2;
129#endif 130#endif
130}; 131};
131enum infoscreenorder 132enum infoscreenorder
133
132{ 134{
133 INFO_VERSION = 0, 135 INFO_BATTERY = 0,
136 INFO_DISK1, /* capacity or internal capacity/free on hotswap */
137 INFO_DISK2, /* free space or external capacity/free on hotswap */
138 INFO_BUFFER,
139 INFO_VERSION,
134#if CONFIG_RTC 140#if CONFIG_RTC
135 INFO_TIME,
136 INFO_DATE, 141 INFO_DATE,
142 INFO_TIME,
137#endif 143#endif
138 INFO_BUFFER,
139 INFO_BATTERY,
140 INFO_DISK1, /* capacity or internal capacity/free on hotswap */
141 INFO_DISK2, /* free space or external capacity/free on hotswap */
142 INFO_COUNT 144 INFO_COUNT
143}; 145};
146
144 147
145static char* info_getname(int selected_item, void *data, char *buffer) 148static char* info_getname(int selected_item, void *data, char *buffer)
146{ 149{
147 struct info_data *info = (struct info_data*)data; 150 struct info_data *info = (struct info_data*)data;
151
148#if CONFIG_RTC 152#if CONFIG_RTC
149 struct tm *tm; 153 struct tm *tm;
154
150#endif 155#endif
151 const unsigned char *kbyte_units[] = 156 const unsigned char *kbyte_units[] =
157
152 { 158 {
153 ID2P(LANG_KILOBYTE), 159 ID2P(LANG_KILOBYTE),
154 ID2P(LANG_MEGABYTE), 160 ID2P(LANG_MEGABYTE),
@@ -180,14 +186,17 @@ static char* info_getname(int selected_item, void *data, char *buffer)
180 tm = get_time(); 186 tm = get_time();
181 snprintf(buffer, MAX_PATH, "%02d:%02d:%02d %s", 187 snprintf(buffer, MAX_PATH, "%02d:%02d:%02d %s",
182 global_settings.timeformat == 0 ? tm->tm_hour : tm->tm_hour-12, 188 global_settings.timeformat == 0 ? tm->tm_hour : tm->tm_hour-12,
183 tm->tm_min, 189 tm->tm_min,
190
184 tm->tm_sec, 191 tm->tm_sec,
185 global_settings.timeformat == 0 ? "" : tm->tm_hour>11 ? "P" : "A"); 192 global_settings.timeformat == 0 ? "" : tm->tm_hour>11 ? "P" : "A");
186 break; 193 break;
187 case INFO_DATE: 194 case INFO_DATE:
188 tm = get_time(); 195 tm = get_time();
189 snprintf(buffer, MAX_PATH, "%s %d %d", 196 snprintf(buffer, MAX_PATH, "%s %d %d",
190 str(LANG_MONTH_JANUARY + tm->tm_mon), 197
198 str(LANG_MONTH_JANUARY + tm->tm_mon),
199
191 tm->tm_mday, 200 tm->tm_mday,
192 tm->tm_year+1900); 201 tm->tm_year+1900);
193 break; 202 break;
@@ -224,8 +233,8 @@ static char* info_getname(int selected_item, void *data, char *buffer)
224 snprintf(buffer, MAX_PATH, "%s %s/%s", str(LANG_DISK_NAME_INTERNAL), 233 snprintf(buffer, MAX_PATH, "%s %s/%s", str(LANG_DISK_NAME_INTERNAL),
225 s1, s2); 234 s1, s2);
226#else 235#else
227 output_dyn_value(s1, sizeof s1, info->size, kbyte_units, true); 236 output_dyn_value(s1, sizeof s1, info->free, kbyte_units, true);
228 snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_SIZE_INFO), s1); 237 snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_FREE_INFO), s1);
229#endif 238#endif
230 break; 239 break;
231 case INFO_DISK2: /* disk usage 2 */ 240 case INFO_DISK2: /* disk usage 2 */
@@ -238,10 +247,13 @@ static char* info_getname(int selected_item, void *data, char *buffer)
238 s1, s2); 247 s1, s2);
239 } 248 }
240 else 249 else
241 return ""; 250 {
251 snprintf(buffer, MAX_PATH, "%s %s %s", str(LANG_DISK_NAME_MMC),
252 s1, str(LANG_NOT_PRESENT), s2);
253 }
242#else 254#else
243 output_dyn_value(s1, sizeof s1, info->free, kbyte_units, true); 255 output_dyn_value(s1, sizeof s1, info->size, kbyte_units, true);
244 snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_FREE_INFO), s1); 256 snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_SIZE_INFO), s1);
245#endif 257#endif
246 break; 258 break;
247 } 259 }
@@ -254,7 +266,8 @@ static int info_speak_item(int selected_item, void * data)
254 ID2P(LANG_KILOBYTE), 266 ID2P(LANG_KILOBYTE),
255 ID2P(LANG_MEGABYTE), 267 ID2P(LANG_MEGABYTE),
256 ID2P(LANG_GIGABYTE) 268 ID2P(LANG_GIGABYTE)
257 }; 269 };
270
258 switch (selected_item) 271 switch (selected_item)
259 { 272 {
260 case INFO_VERSION: /* version */ 273 case INFO_VERSION: /* version */
@@ -262,20 +275,27 @@ static int info_speak_item(int selected_item, void * data)
262 talk_spell(appsversion, true); 275 talk_spell(appsversion, true);
263 break; 276 break;
264#if CONFIG_RTC 277#if CONFIG_RTC
265 case INFO_TIME: 278 case INFO_TIME:
266 talk_id(LANG_CURRENT_TIME, false); 279
280 talk_id(VOICE_CURRENT_TIME, false);
267 talk_time(get_time(), true); 281 talk_time(get_time(), true);
268 break; 282 break;
269 case INFO_DATE: 283 case INFO_DATE:
270 talk_date(get_time(), true); 284 talk_date(get_time(), true);
285
271 break; 286 break;
272#endif 287#endif
273 case INFO_BUFFER: /* buffer */ 288 case INFO_BUFFER: /* buffer */
289
274 { 290 {
275 talk_id(LANG_BUFFER_STAT, false); 291 talk_id(LANG_BUFFER_STAT, false);
276 long buflen = ((audiobufend - audiobuf) * 2) / 2097; /* avoid overflow */ 292
277 output_dyn_value(NULL, 0, buflen, kbyte_units, true); 293 long buflen = ((audiobufend - audiobuf) * 2) / 2097; /* avoid overflow */
278 break; 294
295 output_dyn_value(NULL, 0, buflen, kbyte_units, true);
296
297 break;
298
279 } 299 }
280 case INFO_BATTERY: /* battery */ 300 case INFO_BATTERY: /* battery */
281 if (battery_level() >= 0) 301 if (battery_level() >= 0)
@@ -299,26 +319,28 @@ static int info_speak_item(int selected_item, void * data)
299 } 319 }
300 break; 320 break;
301 case INFO_DISK1: /* disk 1 */ 321 case INFO_DISK1: /* disk 1 */
302#ifdef HAVE_MULTIVOLUME
303 talk_id(LANG_DISK_FREE_INFO, false); 322 talk_id(LANG_DISK_FREE_INFO, false);
323#ifdef HAVE_MULTIVOLUME
304 talk_id(LANG_DISK_NAME_INTERNAL, true); 324 talk_id(LANG_DISK_NAME_INTERNAL, true);
305 output_dyn_value(NULL, 0, info->free, kbyte_units, true);
306#else
307 talk_id(LANG_DISK_SIZE_INFO, false);
308 output_dyn_value(NULL, 0, info->size, kbyte_units, true);
309#endif 325#endif
326 output_dyn_value(NULL, 0, info->free, kbyte_units, true);
310 break; 327 break;
311 case INFO_DISK2: /* disk 2 */ 328 case INFO_DISK2: /* disk 2 */
312#ifdef HAVE_MULTIVOLUME 329#ifdef HAVE_MULTIVOLUME
313 if (info->size2) 330 if (info->size2)
314 { 331 {
315 talk_id(LANG_DISK_FREE_INFO, false); 332 talk_id(LANG_DISK_FREE_INFO, false);
316 talk_id(LANG_DISK_NAME_MMC, false); 333 talk_id(LANG_DISK_NAME_MMC, true);
317 output_dyn_value(NULL, 0, info->free2, kbyte_units, true); 334 output_dyn_value(NULL, 0, info->free2, kbyte_units, true);
318 } 335 }
336 else
337 {
338 talk_id(LANG_DISK_NAME_MMC, false);
339 talk_id(LANG_NOT_PRESENT, true);
340 }
319#else 341#else
320 talk_id(LANG_DISK_FREE_INFO, false); 342 talk_id(LANG_DISK_SIZE_INFO, false);
321 output_dyn_value(NULL, 0, info->free, kbyte_units, true); 343 output_dyn_value(NULL, 0, info->size, kbyte_units, true);
322#endif 344#endif
323 break; 345 break;
324 } 346 }
@@ -344,8 +366,10 @@ static int info_action_callback(int action, struct gui_synclist *lists)
344#ifdef HAVE_MULTIVOLUME 366#ifdef HAVE_MULTIVOLUME
345 if (fat_ismounted(1)) 367 if (fat_ismounted(1))
346 fat_recalc_free(1); 368 fat_recalc_free(1);
347#endif 369#endif
348#else 370
371#else
372
349 (void) lists; 373 (void) lists;
350#endif 374#endif
351 return ACTION_REDRAW; 375 return ACTION_REDRAW;