summaryrefslogtreecommitdiffstats
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 @@
</source>
<dest>
*: none
- e200,c200: "mSD:"
+ e200,c200: "MSD:"
ondio*: "MMC:"
</dest>
<voice>
@@ -11431,3 +11431,20 @@
*: "Empty list"
</voice>
</phrase>
+<phrase>
+ id: LANG_NOT_PRESENT
+ desc: when external memory is not present
+ user:
+ <source>
+ *: none
+ multivolume: "Not present"
+ </source>
+ <dest>
+ *: none
+ multivolume: "Not present"
+ </dest>
+ <voice>
+ *: none
+ multivolume: "Not present"
+ </voice>
+</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 @@
</source>
<dest>
*: none
- e200,c200: "mSD"
- ondio*: "MMC"
+ e200,c200: "MSD:"
+ ondio*: "MMC:"
</dest>
<voice>
*: none
@@ -11386,3 +11386,20 @@
*: "Lista vuota"
</voice>
</phrase>
+<phrase>
+ id: LANG_NOT_PRESENT
+ desc: when external memory is not present
+ user:
+ <source>
+ *: none
+ multivolume: "Not present"
+ </source>
+ <dest>
+ *: none
+ multivolume: "Non presente"
+ </dest>
+ <voice>
+ *: none
+ multivolume: "Non presente"
+ </voice>
+</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)
#else
#define SIZE_FMT "%s %s"
#endif
-struct info_data
+struct info_data
+
{
bool new_data;
unsigned long size;
@@ -128,27 +129,32 @@ struct info_data
unsigned long free2;
#endif
};
-enum infoscreenorder
+enum infoscreenorder
+
{
- INFO_VERSION = 0,
+ INFO_BATTERY = 0,
+ INFO_DISK1, /* capacity or internal capacity/free on hotswap */
+ INFO_DISK2, /* free space or external capacity/free on hotswap */
+ INFO_BUFFER,
+ INFO_VERSION,
#if CONFIG_RTC
- INFO_TIME,
INFO_DATE,
+ INFO_TIME,
#endif
- INFO_BUFFER,
- INFO_BATTERY,
- INFO_DISK1, /* capacity or internal capacity/free on hotswap */
- INFO_DISK2, /* free space or external capacity/free on hotswap */
INFO_COUNT
-};
+};
+
static char* info_getname(int selected_item, void *data, char *buffer)
{
- struct info_data *info = (struct info_data*)data;
+ struct info_data *info = (struct info_data*)data;
+
#if CONFIG_RTC
- struct tm *tm;
+ struct tm *tm;
+
#endif
- const unsigned char *kbyte_units[] =
+ const unsigned char *kbyte_units[] =
+
{
ID2P(LANG_KILOBYTE),
ID2P(LANG_MEGABYTE),
@@ -180,14 +186,17 @@ static char* info_getname(int selected_item, void *data, char *buffer)
tm = get_time();
snprintf(buffer, MAX_PATH, "%02d:%02d:%02d %s",
global_settings.timeformat == 0 ? tm->tm_hour : tm->tm_hour-12,
- tm->tm_min,
+ tm->tm_min,
+
tm->tm_sec,
global_settings.timeformat == 0 ? "" : tm->tm_hour>11 ? "P" : "A");
break;
case INFO_DATE:
tm = get_time();
- snprintf(buffer, MAX_PATH, "%s %d %d",
- str(LANG_MONTH_JANUARY + tm->tm_mon),
+ snprintf(buffer, MAX_PATH, "%s %d %d",
+
+ str(LANG_MONTH_JANUARY + tm->tm_mon),
+
tm->tm_mday,
tm->tm_year+1900);
break;
@@ -224,8 +233,8 @@ static char* info_getname(int selected_item, void *data, char *buffer)
snprintf(buffer, MAX_PATH, "%s %s/%s", str(LANG_DISK_NAME_INTERNAL),
s1, s2);
#else
- output_dyn_value(s1, sizeof s1, info->size, kbyte_units, true);
- snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_SIZE_INFO), s1);
+ output_dyn_value(s1, sizeof s1, info->free, kbyte_units, true);
+ snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_FREE_INFO), s1);
#endif
break;
case INFO_DISK2: /* disk usage 2 */
@@ -238,10 +247,13 @@ static char* info_getname(int selected_item, void *data, char *buffer)
s1, s2);
}
else
- return "";
+ {
+ snprintf(buffer, MAX_PATH, "%s %s %s", str(LANG_DISK_NAME_MMC),
+ s1, str(LANG_NOT_PRESENT), s2);
+ }
#else
- output_dyn_value(s1, sizeof s1, info->free, kbyte_units, true);
- snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_FREE_INFO), s1);
+ output_dyn_value(s1, sizeof s1, info->size, kbyte_units, true);
+ snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_SIZE_INFO), s1);
#endif
break;
}
@@ -254,7 +266,8 @@ static int info_speak_item(int selected_item, void * data)
ID2P(LANG_KILOBYTE),
ID2P(LANG_MEGABYTE),
ID2P(LANG_GIGABYTE)
- };
+ };
+
switch (selected_item)
{
case INFO_VERSION: /* version */
@@ -262,20 +275,27 @@ static int info_speak_item(int selected_item, void * data)
talk_spell(appsversion, true);
break;
#if CONFIG_RTC
- case INFO_TIME:
- talk_id(LANG_CURRENT_TIME, false);
+ case INFO_TIME:
+
+ talk_id(VOICE_CURRENT_TIME, false);
talk_time(get_time(), true);
break;
case INFO_DATE:
- talk_date(get_time(), true);
+ talk_date(get_time(), true);
+
break;
#endif
- case INFO_BUFFER: /* buffer */
+ case INFO_BUFFER: /* buffer */
+
{
- talk_id(LANG_BUFFER_STAT, false);
- long buflen = ((audiobufend - audiobuf) * 2) / 2097; /* avoid overflow */
- output_dyn_value(NULL, 0, buflen, kbyte_units, true);
- break;
+ talk_id(LANG_BUFFER_STAT, false);
+
+ long buflen = ((audiobufend - audiobuf) * 2) / 2097; /* avoid overflow */
+
+ output_dyn_value(NULL, 0, buflen, kbyte_units, true);
+
+ break;
+
}
case INFO_BATTERY: /* battery */
if (battery_level() >= 0)
@@ -299,26 +319,28 @@ static int info_speak_item(int selected_item, void * data)
}
break;
case INFO_DISK1: /* disk 1 */
-#ifdef HAVE_MULTIVOLUME
talk_id(LANG_DISK_FREE_INFO, false);
+#ifdef HAVE_MULTIVOLUME
talk_id(LANG_DISK_NAME_INTERNAL, true);
- output_dyn_value(NULL, 0, info->free, kbyte_units, true);
-#else
- talk_id(LANG_DISK_SIZE_INFO, false);
- output_dyn_value(NULL, 0, info->size, kbyte_units, true);
#endif
+ output_dyn_value(NULL, 0, info->free, kbyte_units, true);
break;
case INFO_DISK2: /* disk 2 */
#ifdef HAVE_MULTIVOLUME
if (info->size2)
{
talk_id(LANG_DISK_FREE_INFO, false);
- talk_id(LANG_DISK_NAME_MMC, false);
+ talk_id(LANG_DISK_NAME_MMC, true);
output_dyn_value(NULL, 0, info->free2, kbyte_units, true);
}
+ else
+ {
+ talk_id(LANG_DISK_NAME_MMC, false);
+ talk_id(LANG_NOT_PRESENT, true);
+ }
#else
- talk_id(LANG_DISK_FREE_INFO, false);
- output_dyn_value(NULL, 0, info->free, kbyte_units, true);
+ talk_id(LANG_DISK_SIZE_INFO, false);
+ output_dyn_value(NULL, 0, info->size, kbyte_units, true);
#endif
break;
}
@@ -344,8 +366,10 @@ static int info_action_callback(int action, struct gui_synclist *lists)
#ifdef HAVE_MULTIVOLUME
if (fat_ismounted(1))
fat_recalc_free(1);
-#endif
-#else
+#endif
+
+#else
+
(void) lists;
#endif
return ACTION_REDRAW;