diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2019-02-06 13:36:01 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2019-07-20 17:20:19 -0400 |
commit | 5a84239e43d6be65e6265ef06a71a7ff66f25fd8 (patch) | |
tree | d58dae0b0ff3f32b111aaf2bdf016625ea43aef1 /apps | |
parent | 859f762814a408fabd22171baeba9f1d13e76eda (diff) | |
download | rockbox-5a84239e43d6be65e6265ef06a71a7ff66f25fd8.tar.gz rockbox-5a84239e43d6be65e6265ef06a71a7ff66f25fd8.zip |
Add speech feedback to imageviewer plugin
Patch by Igor Poretsky
Change-Id: Ifcca7342d07f0d7fb90d282468f7e6576c13d36b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/lang/english.lang | 116 | ||||
-rw-r--r-- | apps/plugins/imageviewer/imageviewer.c | 33 |
2 files changed, 133 insertions, 16 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index daf67a044c..e531bafd65 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -15126,3 +15126,119 @@ id: VOICE_BAT_BENCH_KEYS | |||
15126 | *: "Press play to run battery bench or stop to cancel" | 15126 | *: "Press play to run battery bench or stop to cancel" |
15127 | </voice> | 15127 | </voice> |
15128 | </phrase> | 15128 | </phrase> |
15129 | <phrase> | ||
15130 | id: LANG_CANNOT_RESTART_PLAYBACK | ||
15131 | desc: cannot restart playback splash in imageviewer | ||
15132 | user: core | ||
15133 | <source> | ||
15134 | *: none | ||
15135 | lcd_bitmap: "Cannot restart playback" | ||
15136 | </source> | ||
15137 | <dest> | ||
15138 | *: none | ||
15139 | lcd_bitmap: "Cannot restart playback" | ||
15140 | </dest> | ||
15141 | <voice> | ||
15142 | *: none | ||
15143 | lcd_bitmap: "Cannot restart playback" | ||
15144 | </voice> | ||
15145 | </phrase> | ||
15146 | <phrase> | ||
15147 | id: LANG_ORDERED | ||
15148 | desc: in the imageviewer settings menu | ||
15149 | user: core | ||
15150 | <source> | ||
15151 | *: none | ||
15152 | lcd_bitmap: "Ordered" | ||
15153 | </source> | ||
15154 | <dest> | ||
15155 | *: none | ||
15156 | lcd_bitmap: "Ordered" | ||
15157 | </dest> | ||
15158 | <voice> | ||
15159 | *: none | ||
15160 | lcd_bitmap: "Ordered" | ||
15161 | </voice> | ||
15162 | </phrase> | ||
15163 | <phrase> | ||
15164 | id: LANG_DIFFUSION | ||
15165 | desc: in the imageviewer settings menu | ||
15166 | user: core | ||
15167 | <source> | ||
15168 | *: none | ||
15169 | lcd_bitmap: "Diffusion" | ||
15170 | </source> | ||
15171 | <dest> | ||
15172 | *: none | ||
15173 | lcd_bitmap: "Diffusion" | ||
15174 | </dest> | ||
15175 | <voice> | ||
15176 | *: none | ||
15177 | lcd_bitmap: "Diffusion" | ||
15178 | </voice> | ||
15179 | </phrase> | ||
15180 | <phrase> | ||
15181 | id: LANG_GRAYSCALE | ||
15182 | desc: in the imageviewer settings menu | ||
15183 | user: core | ||
15184 | <source> | ||
15185 | *: none | ||
15186 | lcd_bitmap: "Grayscale" | ||
15187 | </source> | ||
15188 | <dest> | ||
15189 | *: none | ||
15190 | lcd_bitmap: "Grayscale" | ||
15191 | </dest> | ||
15192 | <voice> | ||
15193 | *: none | ||
15194 | lcd_bitmap: "Grayscale" | ||
15195 | </voice> | ||
15196 | </phrase> | ||
15197 | <phrase> | ||
15198 | id: LANG_SLIDESHOW_MODE | ||
15199 | desc: in the imageviewer settings menu | ||
15200 | user: core | ||
15201 | <source> | ||
15202 | *: none | ||
15203 | lcd_bitmap: "Toggle Slideshow Mode" | ||
15204 | </source> | ||
15205 | <dest> | ||
15206 | *: none | ||
15207 | lcd_bitmap: "Toggle Slideshow Mode" | ||
15208 | </dest> | ||
15209 | <voice> | ||
15210 | *: none | ||
15211 | lcd_bitmap: "Toggle Slide show Mode" | ||
15212 | </voice> | ||
15213 | </phrase> | ||
15214 | <phrase> | ||
15215 | id: LANG_SLIDESHOW_TIME | ||
15216 | desc: in the imageviewer settings menu | ||
15217 | user: core | ||
15218 | <source> | ||
15219 | *: none | ||
15220 | lcd_bitmap: "Slideshow Time" | ||
15221 | </source> | ||
15222 | <dest> | ||
15223 | *: none | ||
15224 | lcd_bitmap: "Slideshow Time" | ||
15225 | </dest> | ||
15226 | <voice> | ||
15227 | *: none | ||
15228 | lcd_bitmap: "Slide show Time" | ||
15229 | </voice> | ||
15230 | </phrase> | ||
15231 | <phrase> | ||
15232 | id: LANG_RETURN | ||
15233 | desc: in various plugin menus | ||
15234 | user: core | ||
15235 | <source> | ||
15236 | *: "Return" | ||
15237 | </source> | ||
15238 | <dest> | ||
15239 | *: "Return" | ||
15240 | </dest> | ||
15241 | <voice> | ||
15242 | *: "Return" | ||
15243 | </voice> | ||
15244 | </phrase> | ||
diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c index 05d2770863..c6d33dad38 100644 --- a/apps/plugins/imageviewer/imageviewer.c +++ b/apps/plugins/imageviewer/imageviewer.c | |||
@@ -218,19 +218,19 @@ static bool set_option_grayscale(void) | |||
218 | static bool set_option_dithering(void) | 218 | static bool set_option_dithering(void) |
219 | { | 219 | { |
220 | static const struct opt_items dithering[DITHER_NUM_MODES] = { | 220 | static const struct opt_items dithering[DITHER_NUM_MODES] = { |
221 | [DITHER_NONE] = { "Off", -1 }, | 221 | [DITHER_NONE] = { STR(LANG_OFF) }, |
222 | [DITHER_ORDERED] = { "Ordered", -1 }, | 222 | [DITHER_ORDERED] = { STR(LANG_ORDERED) }, |
223 | [DITHER_DIFFUSION] = { "Diffusion", -1 }, | 223 | [DITHER_DIFFUSION] = { STR(LANG_DIFFUSION) }, |
224 | }; | 224 | }; |
225 | 225 | ||
226 | rb->set_option("Dithering (Jpeg)", &settings.jpeg_dither_mode, INT, | 226 | rb->set_option(rb->str(LANG_DITHERING), &settings.jpeg_dither_mode, INT, |
227 | dithering, DITHER_NUM_MODES, NULL); | 227 | dithering, DITHER_NUM_MODES, NULL); |
228 | return false; | 228 | return false; |
229 | } | 229 | } |
230 | 230 | ||
231 | MENUITEM_FUNCTION(grayscale_item, 0, "Greyscale (Jpeg)", | 231 | MENUITEM_FUNCTION(grayscale_item, 0, ID2P(LANG_GRAYSCALE), |
232 | set_option_grayscale, NULL, NULL, Icon_NOICON); | 232 | set_option_grayscale, NULL, NULL, Icon_NOICON); |
233 | MENUITEM_FUNCTION(dithering_item, 0, "Dithering (Jpeg)", | 233 | MENUITEM_FUNCTION(dithering_item, 0, ID2P(LANG_DITHERING), |
234 | set_option_dithering, NULL, NULL, Icon_NOICON); | 234 | set_option_dithering, NULL, NULL, Icon_NOICON); |
235 | MAKE_MENU(display_menu, "Display Options", NULL, Icon_NOICON, | 235 | MAKE_MENU(display_menu, "Display Options", NULL, Icon_NOICON, |
236 | &grayscale_item, &dithering_item); | 236 | &grayscale_item, &dithering_item); |
@@ -260,19 +260,20 @@ static int show_menu(void) /* return 1 to quit */ | |||
260 | }; | 260 | }; |
261 | 261 | ||
262 | MENUITEM_STRINGLIST(menu, "Image Viewer Menu", NULL, | 262 | MENUITEM_STRINGLIST(menu, "Image Viewer Menu", NULL, |
263 | "Return", "Toggle Slideshow Mode", | 263 | ID2P(LANG_RETURN), |
264 | "Change Slideshow Time", | 264 | ID2P(LANG_SLIDESHOW_MODE), |
265 | ID2P(LANG_SLIDESHOW_TIME), | ||
265 | #ifdef USE_PLUG_BUF | 266 | #ifdef USE_PLUG_BUF |
266 | "Show Playback Menu", | 267 | ID2P(LANG_PLAYBACK_CONTROL), |
267 | #endif | 268 | #endif |
268 | #ifdef HAVE_LCD_COLOR | 269 | #ifdef HAVE_LCD_COLOR |
269 | "Display Options", | 270 | ID2P(LANG_MENU_DISPLAY_OPTIONS), |
270 | #endif | 271 | #endif |
271 | "Quit"); | 272 | ID2P(LANG_MENU_QUIT)); |
272 | 273 | ||
273 | static const struct opt_items slideshow[2] = { | 274 | static const struct opt_items slideshow[2] = { |
274 | { "Disable", -1 }, | 275 | { STR(LANG_OFF) }, |
275 | { "Enable", -1 }, | 276 | { STR(LANG_ON) }, |
276 | }; | 277 | }; |
277 | 278 | ||
278 | result=rb->do_menu(&menu, NULL, NULL, false); | 279 | result=rb->do_menu(&menu, NULL, NULL, false); |
@@ -282,11 +283,11 @@ static int show_menu(void) /* return 1 to quit */ | |||
282 | case MIID_RETURN: | 283 | case MIID_RETURN: |
283 | break; | 284 | break; |
284 | case MIID_TOGGLE_SS_MODE: | 285 | case MIID_TOGGLE_SS_MODE: |
285 | rb->set_option("Toggle Slideshow", &iv_api.slideshow_enabled, BOOL, | 286 | rb->set_option(rb->str(LANG_SLIDESHOW_MODE), &iv_api.slideshow_enabled, BOOL, |
286 | slideshow , 2, NULL); | 287 | slideshow , 2, NULL); |
287 | break; | 288 | break; |
288 | case MIID_CHANGE_SS_MODE: | 289 | case MIID_CHANGE_SS_MODE: |
289 | rb->set_int("Slideshow Time", "s", UNIT_SEC, | 290 | rb->set_int(rb->str(LANG_SLIDESHOW_TIME), "s", UNIT_SEC, |
290 | &settings.ss_timeout, NULL, 1, | 291 | &settings.ss_timeout, NULL, 1, |
291 | SS_MIN_TIMEOUT, SS_MAX_TIMEOUT, NULL); | 292 | SS_MIN_TIMEOUT, SS_MAX_TIMEOUT, NULL); |
292 | break; | 293 | break; |
@@ -299,7 +300,7 @@ static int show_menu(void) /* return 1 to quit */ | |||
299 | } | 300 | } |
300 | else | 301 | else |
301 | { | 302 | { |
302 | rb->splash(HZ, "Cannot restart playback"); | 303 | rb->splash(HZ, ID2P(LANG_CANNOT_RESTART_PLAYBACK)); |
303 | } | 304 | } |
304 | break; | 305 | break; |
305 | #endif | 306 | #endif |