mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
* 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
This commit is contained in:
parent
3c64ace573
commit
6c2a904f2b
3 changed files with 101 additions and 43 deletions
|
|
@ -6957,7 +6957,7 @@
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: none
|
*: none
|
||||||
e200,c200: "mSD:"
|
e200,c200: "MSD:"
|
||||||
ondio*: "MMC:"
|
ondio*: "MMC:"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
|
|
@ -11431,3 +11431,20 @@
|
||||||
*: "Empty list"
|
*: "Empty list"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</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>
|
||||||
|
|
|
||||||
|
|
@ -4043,8 +4043,8 @@
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: none
|
*: none
|
||||||
e200,c200: "mSD"
|
e200,c200: "MSD:"
|
||||||
ondio*: "MMC"
|
ondio*: "MMC:"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: none
|
*: none
|
||||||
|
|
@ -11386,3 +11386,20 @@
|
||||||
*: "Lista vuota"
|
*: "Lista vuota"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</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>
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ static bool show_credits(void)
|
||||||
#define SIZE_FMT "%s %s"
|
#define SIZE_FMT "%s %s"
|
||||||
#endif
|
#endif
|
||||||
struct info_data
|
struct info_data
|
||||||
|
|
||||||
{
|
{
|
||||||
bool new_data;
|
bool new_data;
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
|
|
@ -129,26 +130,31 @@ struct info_data
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
enum infoscreenorder
|
enum infoscreenorder
|
||||||
|
|
||||||
{
|
{
|
||||||
INFO_VERSION = 0,
|
INFO_BATTERY = 0,
|
||||||
#if CONFIG_RTC
|
|
||||||
INFO_TIME,
|
|
||||||
INFO_DATE,
|
|
||||||
#endif
|
|
||||||
INFO_BUFFER,
|
|
||||||
INFO_BATTERY,
|
|
||||||
INFO_DISK1, /* capacity or internal capacity/free on hotswap */
|
INFO_DISK1, /* capacity or internal capacity/free on hotswap */
|
||||||
INFO_DISK2, /* free space or external capacity/free on hotswap */
|
INFO_DISK2, /* free space or external capacity/free on hotswap */
|
||||||
|
INFO_BUFFER,
|
||||||
|
INFO_VERSION,
|
||||||
|
#if CONFIG_RTC
|
||||||
|
INFO_DATE,
|
||||||
|
INFO_TIME,
|
||||||
|
#endif
|
||||||
INFO_COUNT
|
INFO_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static char* info_getname(int selected_item, void *data, char *buffer)
|
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
|
#if CONFIG_RTC
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
const unsigned char *kbyte_units[] =
|
const unsigned char *kbyte_units[] =
|
||||||
|
|
||||||
{
|
{
|
||||||
ID2P(LANG_KILOBYTE),
|
ID2P(LANG_KILOBYTE),
|
||||||
ID2P(LANG_MEGABYTE),
|
ID2P(LANG_MEGABYTE),
|
||||||
|
|
@ -181,13 +187,16 @@ static char* info_getname(int selected_item, void *data, char *buffer)
|
||||||
snprintf(buffer, MAX_PATH, "%02d:%02d:%02d %s",
|
snprintf(buffer, MAX_PATH, "%02d:%02d:%02d %s",
|
||||||
global_settings.timeformat == 0 ? tm->tm_hour : tm->tm_hour-12,
|
global_settings.timeformat == 0 ? tm->tm_hour : tm->tm_hour-12,
|
||||||
tm->tm_min,
|
tm->tm_min,
|
||||||
|
|
||||||
tm->tm_sec,
|
tm->tm_sec,
|
||||||
global_settings.timeformat == 0 ? "" : tm->tm_hour>11 ? "P" : "A");
|
global_settings.timeformat == 0 ? "" : tm->tm_hour>11 ? "P" : "A");
|
||||||
break;
|
break;
|
||||||
case INFO_DATE:
|
case INFO_DATE:
|
||||||
tm = get_time();
|
tm = get_time();
|
||||||
snprintf(buffer, MAX_PATH, "%s %d %d",
|
snprintf(buffer, MAX_PATH, "%s %d %d",
|
||||||
|
|
||||||
str(LANG_MONTH_JANUARY + tm->tm_mon),
|
str(LANG_MONTH_JANUARY + tm->tm_mon),
|
||||||
|
|
||||||
tm->tm_mday,
|
tm->tm_mday,
|
||||||
tm->tm_year+1900);
|
tm->tm_year+1900);
|
||||||
break;
|
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),
|
snprintf(buffer, MAX_PATH, "%s %s/%s", str(LANG_DISK_NAME_INTERNAL),
|
||||||
s1, s2);
|
s1, s2);
|
||||||
#else
|
#else
|
||||||
output_dyn_value(s1, sizeof s1, info->size, kbyte_units, true);
|
output_dyn_value(s1, sizeof s1, info->free, kbyte_units, true);
|
||||||
snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_SIZE_INFO), s1);
|
snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_FREE_INFO), s1);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case INFO_DISK2: /* disk usage 2 */
|
case INFO_DISK2: /* disk usage 2 */
|
||||||
|
|
@ -238,10 +247,13 @@ static char* info_getname(int selected_item, void *data, char *buffer)
|
||||||
s1, s2);
|
s1, s2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return "";
|
{
|
||||||
|
snprintf(buffer, MAX_PATH, "%s %s %s", str(LANG_DISK_NAME_MMC),
|
||||||
|
s1, str(LANG_NOT_PRESENT), s2);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
output_dyn_value(s1, sizeof s1, info->free, kbyte_units, true);
|
output_dyn_value(s1, sizeof s1, info->size, kbyte_units, true);
|
||||||
snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_FREE_INFO), s1);
|
snprintf(buffer, MAX_PATH, SIZE_FMT, str(LANG_DISK_SIZE_INFO), s1);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -255,6 +267,7 @@ static int info_speak_item(int selected_item, void * data)
|
||||||
ID2P(LANG_MEGABYTE),
|
ID2P(LANG_MEGABYTE),
|
||||||
ID2P(LANG_GIGABYTE)
|
ID2P(LANG_GIGABYTE)
|
||||||
};
|
};
|
||||||
|
|
||||||
switch (selected_item)
|
switch (selected_item)
|
||||||
{
|
{
|
||||||
case INFO_VERSION: /* version */
|
case INFO_VERSION: /* version */
|
||||||
|
|
@ -263,19 +276,26 @@ static int info_speak_item(int selected_item, void * data)
|
||||||
break;
|
break;
|
||||||
#if CONFIG_RTC
|
#if CONFIG_RTC
|
||||||
case INFO_TIME:
|
case INFO_TIME:
|
||||||
talk_id(LANG_CURRENT_TIME, false);
|
|
||||||
|
talk_id(VOICE_CURRENT_TIME, false);
|
||||||
talk_time(get_time(), true);
|
talk_time(get_time(), true);
|
||||||
break;
|
break;
|
||||||
case INFO_DATE:
|
case INFO_DATE:
|
||||||
talk_date(get_time(), true);
|
talk_date(get_time(), true);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case INFO_BUFFER: /* buffer */
|
case INFO_BUFFER: /* buffer */
|
||||||
|
|
||||||
{
|
{
|
||||||
talk_id(LANG_BUFFER_STAT, false);
|
talk_id(LANG_BUFFER_STAT, false);
|
||||||
|
|
||||||
long buflen = ((audiobufend - audiobuf) * 2) / 2097; /* avoid overflow */
|
long buflen = ((audiobufend - audiobuf) * 2) / 2097; /* avoid overflow */
|
||||||
|
|
||||||
output_dyn_value(NULL, 0, buflen, kbyte_units, true);
|
output_dyn_value(NULL, 0, buflen, kbyte_units, true);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
case INFO_BATTERY: /* battery */
|
case INFO_BATTERY: /* battery */
|
||||||
if (battery_level() >= 0)
|
if (battery_level() >= 0)
|
||||||
|
|
@ -299,26 +319,28 @@ static int info_speak_item(int selected_item, void * data)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case INFO_DISK1: /* disk 1 */
|
case INFO_DISK1: /* disk 1 */
|
||||||
#ifdef HAVE_MULTIVOLUME
|
|
||||||
talk_id(LANG_DISK_FREE_INFO, false);
|
talk_id(LANG_DISK_FREE_INFO, false);
|
||||||
|
#ifdef HAVE_MULTIVOLUME
|
||||||
talk_id(LANG_DISK_NAME_INTERNAL, true);
|
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
|
#endif
|
||||||
|
output_dyn_value(NULL, 0, info->free, kbyte_units, true);
|
||||||
break;
|
break;
|
||||||
case INFO_DISK2: /* disk 2 */
|
case INFO_DISK2: /* disk 2 */
|
||||||
#ifdef HAVE_MULTIVOLUME
|
#ifdef HAVE_MULTIVOLUME
|
||||||
if (info->size2)
|
if (info->size2)
|
||||||
{
|
{
|
||||||
talk_id(LANG_DISK_FREE_INFO, false);
|
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);
|
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
|
#else
|
||||||
talk_id(LANG_DISK_FREE_INFO, false);
|
talk_id(LANG_DISK_SIZE_INFO, false);
|
||||||
output_dyn_value(NULL, 0, info->free, kbyte_units, true);
|
output_dyn_value(NULL, 0, info->size, kbyte_units, true);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -345,7 +367,9 @@ static int info_action_callback(int action, struct gui_synclist *lists)
|
||||||
if (fat_ismounted(1))
|
if (fat_ismounted(1))
|
||||||
fat_recalc_free(1);
|
fat_recalc_free(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
(void) lists;
|
(void) lists;
|
||||||
#endif
|
#endif
|
||||||
return ACTION_REDRAW;
|
return ACTION_REDRAW;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue