mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Add speech feedback to imageviewer plugin
Patch by Igor Poretsky Change-Id: Ifcca7342d07f0d7fb90d282468f7e6576c13d36b
This commit is contained in:
parent
859f762814
commit
5a84239e43
2 changed files with 133 additions and 16 deletions
|
@ -15126,3 +15126,119 @@ id: VOICE_BAT_BENCH_KEYS
|
||||||
*: "Press play to run battery bench or stop to cancel"
|
*: "Press play to run battery bench or stop to cancel"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_CANNOT_RESTART_PLAYBACK
|
||||||
|
desc: cannot restart playback splash in imageviewer
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Cannot restart playback"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Cannot restart playback"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Cannot restart playback"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_ORDERED
|
||||||
|
desc: in the imageviewer settings menu
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Ordered"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Ordered"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Ordered"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_DIFFUSION
|
||||||
|
desc: in the imageviewer settings menu
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Diffusion"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Diffusion"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Diffusion"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_GRAYSCALE
|
||||||
|
desc: in the imageviewer settings menu
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Grayscale"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Grayscale"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Grayscale"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_SLIDESHOW_MODE
|
||||||
|
desc: in the imageviewer settings menu
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Toggle Slideshow Mode"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Toggle Slideshow Mode"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Toggle Slide show Mode"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_SLIDESHOW_TIME
|
||||||
|
desc: in the imageviewer settings menu
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Slideshow Time"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Slideshow Time"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: none
|
||||||
|
lcd_bitmap: "Slide show Time"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_RETURN
|
||||||
|
desc: in various plugin menus
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: "Return"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Return"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Return"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
|
|
|
@ -218,19 +218,19 @@ static bool set_option_grayscale(void)
|
||||||
static bool set_option_dithering(void)
|
static bool set_option_dithering(void)
|
||||||
{
|
{
|
||||||
static const struct opt_items dithering[DITHER_NUM_MODES] = {
|
static const struct opt_items dithering[DITHER_NUM_MODES] = {
|
||||||
[DITHER_NONE] = { "Off", -1 },
|
[DITHER_NONE] = { STR(LANG_OFF) },
|
||||||
[DITHER_ORDERED] = { "Ordered", -1 },
|
[DITHER_ORDERED] = { STR(LANG_ORDERED) },
|
||||||
[DITHER_DIFFUSION] = { "Diffusion", -1 },
|
[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);
|
dithering, DITHER_NUM_MODES, NULL);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MENUITEM_FUNCTION(grayscale_item, 0, "Greyscale (Jpeg)",
|
MENUITEM_FUNCTION(grayscale_item, 0, ID2P(LANG_GRAYSCALE),
|
||||||
set_option_grayscale, NULL, NULL, Icon_NOICON);
|
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);
|
set_option_dithering, NULL, NULL, Icon_NOICON);
|
||||||
MAKE_MENU(display_menu, "Display Options", NULL, Icon_NOICON,
|
MAKE_MENU(display_menu, "Display Options", NULL, Icon_NOICON,
|
||||||
&grayscale_item, &dithering_item);
|
&grayscale_item, &dithering_item);
|
||||||
|
@ -260,19 +260,20 @@ static int show_menu(void) /* return 1 to quit */
|
||||||
};
|
};
|
||||||
|
|
||||||
MENUITEM_STRINGLIST(menu, "Image Viewer Menu", NULL,
|
MENUITEM_STRINGLIST(menu, "Image Viewer Menu", NULL,
|
||||||
"Return", "Toggle Slideshow Mode",
|
ID2P(LANG_RETURN),
|
||||||
"Change Slideshow Time",
|
ID2P(LANG_SLIDESHOW_MODE),
|
||||||
|
ID2P(LANG_SLIDESHOW_TIME),
|
||||||
#ifdef USE_PLUG_BUF
|
#ifdef USE_PLUG_BUF
|
||||||
"Show Playback Menu",
|
ID2P(LANG_PLAYBACK_CONTROL),
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
"Display Options",
|
ID2P(LANG_MENU_DISPLAY_OPTIONS),
|
||||||
#endif
|
#endif
|
||||||
"Quit");
|
ID2P(LANG_MENU_QUIT));
|
||||||
|
|
||||||
static const struct opt_items slideshow[2] = {
|
static const struct opt_items slideshow[2] = {
|
||||||
{ "Disable", -1 },
|
{ STR(LANG_OFF) },
|
||||||
{ "Enable", -1 },
|
{ STR(LANG_ON) },
|
||||||
};
|
};
|
||||||
|
|
||||||
result=rb->do_menu(&menu, NULL, NULL, false);
|
result=rb->do_menu(&menu, NULL, NULL, false);
|
||||||
|
@ -282,11 +283,11 @@ static int show_menu(void) /* return 1 to quit */
|
||||||
case MIID_RETURN:
|
case MIID_RETURN:
|
||||||
break;
|
break;
|
||||||
case MIID_TOGGLE_SS_MODE:
|
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);
|
slideshow , 2, NULL);
|
||||||
break;
|
break;
|
||||||
case MIID_CHANGE_SS_MODE:
|
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,
|
&settings.ss_timeout, NULL, 1,
|
||||||
SS_MIN_TIMEOUT, SS_MAX_TIMEOUT, NULL);
|
SS_MIN_TIMEOUT, SS_MAX_TIMEOUT, NULL);
|
||||||
break;
|
break;
|
||||||
|
@ -299,7 +300,7 @@ static int show_menu(void) /* return 1 to quit */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rb->splash(HZ, "Cannot restart playback");
|
rb->splash(HZ, ID2P(LANG_CANNOT_RESTART_PLAYBACK));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue