summaryrefslogtreecommitdiff
path: root/apps/filetypes.c
diff options
context:
space:
mode:
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,
573 else return filetypes[viewers[selected_item]].plugin; 573 else return filetypes[viewers[selected_item]].plugin;
574} 574}
575 575
576static 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
576static int openwith_action_callback(int action, struct gui_synclist *lists) 587static 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