summaryrefslogtreecommitdiffstats
path: root/apps/filetypes.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2018-10-30 09:45:26 -0400
committerSolomon Peachy <pizza@shaftnet.org>2018-12-15 18:00:23 +0100
commit4adad0bc1f508360999de176048f89025ce84b3e (patch)
tree46fed2ec12b60df2d94ba54950c2da798aa9445a /apps/filetypes.c
parentf061330c3d7b17cc770a8eb2c699b5e44995ad1e (diff)
downloadrockbox-4adad0bc1f508360999de176048f89025ce84b3e.tar.gz
rockbox-4adad0bc1f508360999de176048f89025ce84b3e.zip
FS#6323: Speech for ID3 viewer, playlist catalog and playlist viewer
Modified from original ticket, Taken from Igor Poretsky's tree, and further modified by myself to incorporate feedback. Change-Id: Ibc2180e52af76890b1448d23f79386fd0f88f709
Diffstat (limited to 'apps/filetypes.c')
-rw-r--r--apps/filetypes.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c
index 38324d0f3a..f1a6c389ba 100644
--- a/apps/filetypes.c
+++ b/apps/filetypes.c
@@ -573,6 +573,17 @@ static const char* openwith_get_name(int selected_item, void * data,
else return filetypes[viewers[selected_item]].plugin;
}
+static int openwith_get_talk(int selected_item, void * data)
+{
+ (void)data;
+ char viewer_filename[MAX_FILENAME];
+ snprintf(viewer_filename, MAX_FILENAME, "%s.%s",
+ filetypes[viewers[selected_item]].plugin, ROCK_EXTENSION);
+ talk_file_or_spell(PLUGIN_DIR, viewer_filename,
+ NULL, false);
+ return 0;
+}
+
static int openwith_action_callback(int action, struct gui_synclist *lists)
{
struct cb_data *info = (struct cb_data *)lists->data;
@@ -596,8 +607,7 @@ int filetype_list_viewers(const char* current_file)
#ifndef HAVE_LCD_BITMAP
if (viewer_count == 0)
{
- /* FIX: translation! */
- splash(HZ*2, "No viewers found");
+ splash(HZ*2, ID2P(LANG_NO_VIEWERS));
return PLUGIN_OK;
}
#endif
@@ -605,6 +615,7 @@ int filetype_list_viewers(const char* current_file)
info.action_callback = openwith_action_callback;
info.get_name = openwith_get_name;
info.get_icon = global_settings.show_icons?openwith_get_icon:NULL;
+ info.get_talk = openwith_get_talk;
return simplelist_show_list(&info);
}