forked from len0rd/rockbox
properties: Use talk_fullpath() for voicing directory names
Change-Id: Ib40c881e7b3053e7e4ef5c5adbe5c3bfec27efed
This commit is contained in:
parent
78283bda64
commit
86bff6214d
3 changed files with 6 additions and 20 deletions
|
|
@ -840,6 +840,8 @@ static const struct plugin_api rockbox_api = {
|
||||||
|
|
||||||
/* new stuff at the end, sort into place next time
|
/* new stuff at the end, sort into place next time
|
||||||
the API gets incompatible */
|
the API gets incompatible */
|
||||||
|
|
||||||
|
talk_fullpath,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int plugin_buffer_handle;
|
static int plugin_buffer_handle;
|
||||||
|
|
|
||||||
|
|
@ -977,6 +977,8 @@ struct plugin_api {
|
||||||
#endif
|
#endif
|
||||||
/* new stuff at the end, sort into place next time
|
/* new stuff at the end, sort into place next time
|
||||||
the API gets incompatible */
|
the API gets incompatible */
|
||||||
|
|
||||||
|
int (*talk_fullpath)(const char* path, bool enqueue);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* plugin header */
|
/* plugin header */
|
||||||
|
|
|
||||||
|
|
@ -175,25 +175,7 @@ static int speak_property_selection(int selected_item, void *data)
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case LANG_PROPERTIES_PATH:
|
case LANG_PROPERTIES_PATH:
|
||||||
if (str_dirname[0] == '/')
|
rb->talk_fullpath(str_dirname, true);
|
||||||
{
|
|
||||||
char *start = str_dirname;
|
|
||||||
char *ptr;
|
|
||||||
while (0 != (ptr = rb->strchr(start, '/')))
|
|
||||||
{
|
|
||||||
*ptr = '\0';
|
|
||||||
rb->talk_dir_or_spell(str_dirname, NULL, true);
|
|
||||||
*ptr = '/';
|
|
||||||
rb->talk_id(VOICE_CHAR_SLASH, true);
|
|
||||||
start = ptr + 1;
|
|
||||||
}
|
|
||||||
if (*start)
|
|
||||||
rb->talk_dir_or_spell(str_dirname, NULL, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rb->talk_spell(str_dirname, true);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case LANG_PROPERTIES_FILENAME:
|
case LANG_PROPERTIES_FILENAME:
|
||||||
rb->talk_file_or_spell(str_dirname, str_filename, NULL, true);
|
rb->talk_file_or_spell(str_dirname, str_filename, NULL, true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue