mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-05-12 11:43:16 -04:00
plugins: imageviewer: fix incomplete previous commits
missed in commit2690418: grayscale targets need to have access to the Display Options menu now, since it contains the hide_info option missed in commitf4dc4d8: "resizing" message for bmp files wasn't hidden even with hide_info enabled Change-Id: I1a73e3816305ab6f032fc226d79f09df0d9aa96b
This commit is contained in:
parent
ae8013405a
commit
6d699f08f4
2 changed files with 11 additions and 12 deletions
|
|
@ -276,7 +276,8 @@ static int get_image(struct image_info *info, int frame, int ds)
|
||||||
buf_images += size;
|
buf_images += size;
|
||||||
buf_images_size -= size;
|
buf_images_size -= size;
|
||||||
|
|
||||||
if (!iv->running_slideshow)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->lcd_putsf(0, 3, "resizing %d*%d", info->width, info->height);
|
rb->lcd_putsf(0, 3, "resizing %d*%d", info->width, info->height);
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
|
|
|
||||||
|
|
@ -246,28 +246,32 @@ static bool set_option_dithering(void)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MENUITEM_FUNCTION(grayscale_item, 0, ID2P(LANG_GRAYSCALE),
|
||||||
|
set_option_grayscale, NULL, Icon_NOICON);
|
||||||
|
MENUITEM_FUNCTION(dithering_item, 0, ID2P(LANG_DITHERING),
|
||||||
|
set_option_dithering, NULL, Icon_NOICON);
|
||||||
|
|
||||||
|
#endif /* HAVE_LCD_COLOR */
|
||||||
|
|
||||||
static bool set_option_hide_info(void)
|
static bool set_option_hide_info(void)
|
||||||
{
|
{
|
||||||
rb->set_bool(rb->str(LANG_HIDE_INFO), &settings.hide_info);
|
rb->set_bool(rb->str(LANG_HIDE_INFO), &settings.hide_info);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MENUITEM_FUNCTION(grayscale_item, 0, ID2P(LANG_GRAYSCALE),
|
|
||||||
set_option_grayscale, NULL, Icon_NOICON);
|
|
||||||
MENUITEM_FUNCTION(dithering_item, 0, ID2P(LANG_DITHERING),
|
|
||||||
set_option_dithering, NULL, Icon_NOICON);
|
|
||||||
MENUITEM_FUNCTION(hide_info_item, 0, ID2P(LANG_HIDE_INFO),
|
MENUITEM_FUNCTION(hide_info_item, 0, ID2P(LANG_HIDE_INFO),
|
||||||
set_option_hide_info, NULL, Icon_NOICON);
|
set_option_hide_info, NULL, Icon_NOICON);
|
||||||
MAKE_MENU(display_menu, ID2P(LANG_MENU_DISPLAY_OPTIONS), NULL, Icon_NOICON,
|
MAKE_MENU(display_menu, ID2P(LANG_MENU_DISPLAY_OPTIONS), NULL, Icon_NOICON,
|
||||||
|
#ifdef HAVE_LCD_COLOR
|
||||||
&grayscale_item,
|
&grayscale_item,
|
||||||
&dithering_item,
|
&dithering_item,
|
||||||
|
#endif /* HAVE_LCD_COLOR */
|
||||||
&hide_info_item);
|
&hide_info_item);
|
||||||
|
|
||||||
static void display_options(void)
|
static void display_options(void)
|
||||||
{
|
{
|
||||||
rb->do_menu(&display_menu, NULL, NULL, false);
|
rb->do_menu(&display_menu, NULL, NULL, false);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LCD_COLOR */
|
|
||||||
|
|
||||||
static int show_menu(void) /* return 1 to quit */
|
static int show_menu(void) /* return 1 to quit */
|
||||||
{
|
{
|
||||||
|
|
@ -281,9 +285,7 @@ static int show_menu(void) /* return 1 to quit */
|
||||||
#ifdef USE_PLUG_BUF
|
#ifdef USE_PLUG_BUF
|
||||||
MIID_SHOW_PLAYBACK_MENU,
|
MIID_SHOW_PLAYBACK_MENU,
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
MIID_DISPLAY_OPTIONS,
|
MIID_DISPLAY_OPTIONS,
|
||||||
#endif
|
|
||||||
MIID_QUIT,
|
MIID_QUIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -294,9 +296,7 @@ static int show_menu(void) /* return 1 to quit */
|
||||||
#ifdef USE_PLUG_BUF
|
#ifdef USE_PLUG_BUF
|
||||||
ID2P(LANG_PLAYBACK_CONTROL),
|
ID2P(LANG_PLAYBACK_CONTROL),
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
ID2P(LANG_MENU_DISPLAY_OPTIONS),
|
ID2P(LANG_MENU_DISPLAY_OPTIONS),
|
||||||
#endif
|
|
||||||
ID2P(LANG_MENU_QUIT));
|
ID2P(LANG_MENU_QUIT));
|
||||||
|
|
||||||
static const struct opt_items slideshow[2] = {
|
static const struct opt_items slideshow[2] = {
|
||||||
|
|
@ -332,11 +332,9 @@ static int show_menu(void) /* return 1 to quit */
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
case MIID_DISPLAY_OPTIONS:
|
case MIID_DISPLAY_OPTIONS:
|
||||||
display_options();
|
display_options();
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case MIID_QUIT:
|
case MIID_QUIT:
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue