diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2018-10-30 09:45:26 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2018-12-15 18:00:23 +0100 |
commit | 4adad0bc1f508360999de176048f89025ce84b3e (patch) | |
tree | 46fed2ec12b60df2d94ba54950c2da798aa9445a /apps/filetypes.c | |
parent | f061330c3d7b17cc770a8eb2c699b5e44995ad1e (diff) | |
download | rockbox-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.c | 15 |
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, | |||
573 | else return filetypes[viewers[selected_item]].plugin; | 573 | else return filetypes[viewers[selected_item]].plugin; |
574 | } | 574 | } |
575 | 575 | ||
576 | static int openwith_get_talk(int selected_item, void * data) | ||
577 | { | ||
578 | (void)data; | ||
579 | char viewer_filename[MAX_FILENAME]; | ||
580 | snprintf(viewer_filename, MAX_FILENAME, "%s.%s", | ||
581 | filetypes[viewers[selected_item]].plugin, ROCK_EXTENSION); | ||
582 | talk_file_or_spell(PLUGIN_DIR, viewer_filename, | ||
583 | NULL, false); | ||
584 | return 0; | ||
585 | } | ||
586 | |||
576 | static int openwith_action_callback(int action, struct gui_synclist *lists) | 587 | static int openwith_action_callback(int action, struct gui_synclist *lists) |
577 | { | 588 | { |
578 | struct cb_data *info = (struct cb_data *)lists->data; | 589 | struct cb_data *info = (struct cb_data *)lists->data; |
@@ -596,8 +607,7 @@ int filetype_list_viewers(const char* current_file) | |||
596 | #ifndef HAVE_LCD_BITMAP | 607 | #ifndef HAVE_LCD_BITMAP |
597 | if (viewer_count == 0) | 608 | if (viewer_count == 0) |
598 | { | 609 | { |
599 | /* FIX: translation! */ | 610 | splash(HZ*2, ID2P(LANG_NO_VIEWERS)); |
600 | splash(HZ*2, "No viewers found"); | ||
601 | return PLUGIN_OK; | 611 | return PLUGIN_OK; |
602 | } | 612 | } |
603 | #endif | 613 | #endif |
@@ -605,6 +615,7 @@ int filetype_list_viewers(const char* current_file) | |||
605 | info.action_callback = openwith_action_callback; | 615 | info.action_callback = openwith_action_callback; |
606 | info.get_name = openwith_get_name; | 616 | info.get_name = openwith_get_name; |
607 | info.get_icon = global_settings.show_icons?openwith_get_icon:NULL; | 617 | info.get_icon = global_settings.show_icons?openwith_get_icon:NULL; |
618 | info.get_talk = openwith_get_talk; | ||
608 | return simplelist_show_list(&info); | 619 | return simplelist_show_list(&info); |
609 | } | 620 | } |
610 | 621 | ||