summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2019-02-06 13:36:01 -0500
committerSolomon Peachy <pizza@shaftnet.org>2019-07-20 17:20:19 -0400
commit5a84239e43d6be65e6265ef06a71a7ff66f25fd8 (patch)
treed58dae0b0ff3f32b111aaf2bdf016625ea43aef1 /apps/plugins
parent859f762814a408fabd22171baeba9f1d13e76eda (diff)
downloadrockbox-5a84239e43d6be65e6265ef06a71a7ff66f25fd8.zip
rockbox-5a84239e43d6be65e6265ef06a71a7ff66f25fd8.tar.gz
rockbox-5a84239e43d6be65e6265ef06a71a7ff66f25fd8.tar.bz2
rockbox-5a84239e43d6be65e6265ef06a71a7ff66f25fd8.tar.xz
Add speech feedback to imageviewer plugin
Patch by Igor Poretsky Change-Id: Ifcca7342d07f0d7fb90d282468f7e6576c13d36b
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/imageviewer/imageviewer.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c
index 05d2770..c6d33da 100644
--- a/apps/plugins/imageviewer/imageviewer.c
+++ b/apps/plugins/imageviewer/imageviewer.c
@@ -218,19 +218,19 @@ static bool set_option_grayscale(void)
static bool set_option_dithering(void)
{
static const struct opt_items dithering[DITHER_NUM_MODES] = {
- [DITHER_NONE] = { "Off", -1 },
- [DITHER_ORDERED] = { "Ordered", -1 },
- [DITHER_DIFFUSION] = { "Diffusion", -1 },
+ [DITHER_NONE] = { STR(LANG_OFF) },
+ [DITHER_ORDERED] = { STR(LANG_ORDERED) },
+ [DITHER_DIFFUSION] = { STR(LANG_DIFFUSION) },
};
- rb->set_option("Dithering (Jpeg)", &settings.jpeg_dither_mode, INT,
+ rb->set_option(rb->str(LANG_DITHERING), &settings.jpeg_dither_mode, INT,
dithering, DITHER_NUM_MODES, NULL);
return false;
}
-MENUITEM_FUNCTION(grayscale_item, 0, "Greyscale (Jpeg)",
+MENUITEM_FUNCTION(grayscale_item, 0, ID2P(LANG_GRAYSCALE),
set_option_grayscale, NULL, NULL, Icon_NOICON);
-MENUITEM_FUNCTION(dithering_item, 0, "Dithering (Jpeg)",
+MENUITEM_FUNCTION(dithering_item, 0, ID2P(LANG_DITHERING),
set_option_dithering, NULL, NULL, Icon_NOICON);
MAKE_MENU(display_menu, "Display Options", NULL, Icon_NOICON,
&grayscale_item, &dithering_item);
@@ -260,19 +260,20 @@ static int show_menu(void) /* return 1 to quit */
};
MENUITEM_STRINGLIST(menu, "Image Viewer Menu", NULL,
- "Return", "Toggle Slideshow Mode",
- "Change Slideshow Time",
+ ID2P(LANG_RETURN),
+ ID2P(LANG_SLIDESHOW_MODE),
+ ID2P(LANG_SLIDESHOW_TIME),
#ifdef USE_PLUG_BUF
- "Show Playback Menu",
+ ID2P(LANG_PLAYBACK_CONTROL),
#endif
#ifdef HAVE_LCD_COLOR
- "Display Options",
+ ID2P(LANG_MENU_DISPLAY_OPTIONS),
#endif
- "Quit");
+ ID2P(LANG_MENU_QUIT));
static const struct opt_items slideshow[2] = {
- { "Disable", -1 },
- { "Enable", -1 },
+ { STR(LANG_OFF) },
+ { STR(LANG_ON) },
};
result=rb->do_menu(&menu, NULL, NULL, false);
@@ -282,11 +283,11 @@ static int show_menu(void) /* return 1 to quit */
case MIID_RETURN:
break;
case MIID_TOGGLE_SS_MODE:
- rb->set_option("Toggle Slideshow", &iv_api.slideshow_enabled, BOOL,
+ rb->set_option(rb->str(LANG_SLIDESHOW_MODE), &iv_api.slideshow_enabled, BOOL,
slideshow , 2, NULL);
break;
case MIID_CHANGE_SS_MODE:
- rb->set_int("Slideshow Time", "s", UNIT_SEC,
+ rb->set_int(rb->str(LANG_SLIDESHOW_TIME), "s", UNIT_SEC,
&settings.ss_timeout, NULL, 1,
SS_MIN_TIMEOUT, SS_MAX_TIMEOUT, NULL);
break;
@@ -299,7 +300,7 @@ static int show_menu(void) /* return 1 to quit */
}
else
{
- rb->splash(HZ, "Cannot restart playback");
+ rb->splash(HZ, ID2P(LANG_CANNOT_RESTART_PLAYBACK));
}
break;
#endif