summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-07-28 16:45:43 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-07-28 17:01:53 -0400
commit86bff6214df36816abf760b3ec742dfdb4d62566 (patch)
tree548e47c9b577aab13c1b4bacc469bbf83162d2ed
parent78283bda64ee09502029cd2eee459fef1bd31385 (diff)
downloadrockbox-86bff6214d.tar.gz
rockbox-86bff6214d.zip
properties: Use talk_fullpath() for voicing directory names
Change-Id: Ib40c881e7b3053e7e4ef5c5adbe5c3bfec27efed
-rw-r--r--apps/plugin.c2
-rw-r--r--apps/plugin.h2
-rw-r--r--apps/plugins/properties.c22
3 files changed, 6 insertions, 20 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 20b438999b..b45b25f7ff 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -840,6 +840,8 @@ static const struct plugin_api rockbox_api = {
/* new stuff at the end, sort into place next time
the API gets incompatible */
+
+ talk_fullpath,
};
static int plugin_buffer_handle;
diff --git a/apps/plugin.h b/apps/plugin.h
index 135a068898..af8a65c5de 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -977,6 +977,8 @@ struct plugin_api {
#endif
/* new stuff at the end, sort into place next time
the API gets incompatible */
+
+ int (*talk_fullpath)(const char* path, bool enqueue);
};
/* plugin header */
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c
index 2f18d94d9f..4647216390 100644
--- a/apps/plugins/properties.c
+++ b/apps/plugins/properties.c
@@ -175,25 +175,7 @@ static int speak_property_selection(int selected_item, void *data)
switch (id)
{
case LANG_PROPERTIES_PATH:
- if (str_dirname[0] == '/')
- {
- 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);
- }
+ rb->talk_fullpath(str_dirname, true);
break;
case LANG_PROPERTIES_FILENAME:
rb->talk_file_or_spell(str_dirname, str_filename, NULL, true);
@@ -230,7 +212,7 @@ static void setup_properties_list(struct dir_stats *stats)
nb_props = NUM_PLAYLIST_PROPERTIES;
else
nb_props = NUM_DIR_PROPERTIES;
-
+
rb->gui_synclist_init(&properties_lists, &get_props, stats, false, 2, NULL);
rb->gui_synclist_set_title(&properties_lists,
rb->str(props_type == PROPS_DIR ?