plugins: imageviewer: fix incomplete previous commits

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Sun, 3 May 2026 12:28:01 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 6d699f08f463cd9ab9c1e66421f8997fade05588
Author: Christian Soffke <[email protected]>
Date:   Sun May 3 18:09:44 2026 +0200

    plugins: imageviewer: fix incomplete previous commits
    
    missed in commit 2690418:
    grayscale targets need to have access
    to the Display Options menu now, since
    it contains the hide_info option
    
    missed in commit f4dc4d8:
    "resizing" message for bmp files wasn't
    hidden even with hide_info enabled
    
    Change-Id: I1a73e3816305ab6f032fc226d79f09df0d9aa96b

diff --git a/apps/plugins/imageviewer/bmp/bmp.c b/apps/plugins/imageviewer/bmp/bmp.c
index 3911917fec..8ad822892c 100644
--- a/apps/plugins/imageviewer/bmp/bmp.c
+++ b/apps/plugins/imageviewer/bmp/bmp.c
@@ -276,7 +276,8 @@ static int get_image(struct image_info *info, int frame, int ds)
         buf_images += 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_update();
diff --git a/apps/plugins/imageviewer/imageviewer.c b/apps/plugins/imageviewer/imageviewer.c
index b87a206a33..45836134fe 100644
--- a/apps/plugins/imageviewer/imageviewer.c
+++ b/apps/plugins/imageviewer/imageviewer.c
@@ -246,28 +246,32 @@ static bool set_option_dithering(void)
     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)
 {
     rb->set_bool(rb->str(LANG_HIDE_INFO), &settings.hide_info);
     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),
                   set_option_hide_info, NULL, Icon_NOICON);
 MAKE_MENU(display_menu, ID2P(LANG_MENU_DISPLAY_OPTIONS), NULL, Icon_NOICON,
+#ifdef HAVE_LCD_COLOR
           &grayscale_item,
           &dithering_item,
+#endif /* HAVE_LCD_COLOR */
           &hide_info_item);
 
 static void display_options(void)
 {
     rb->do_menu(&display_menu, NULL, NULL, false);
 }
-#endif /* HAVE_LCD_COLOR */
 
 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
         MIID_SHOW_PLAYBACK_MENU,
 #endif
-#ifdef HAVE_LCD_COLOR
         MIID_DISPLAY_OPTIONS,
-#endif
         MIID_QUIT,
     };
 
@@ -294,9 +296,7 @@ static int show_menu(void) /* return 1 to quit */
 #ifdef USE_PLUG_BUF
                         ID2P(LANG_PLAYBACK_CONTROL),
 #endif
-#ifdef HAVE_LCD_COLOR
                         ID2P(LANG_MENU_DISPLAY_OPTIONS),
-#endif
                         ID2P(LANG_MENU_QUIT));
 
     static const struct opt_items slideshow[2] = {
@@ -332,11 +332,9 @@ static int show_menu(void) /* return 1 to quit */
             }
             break;
 #endif
-#ifdef HAVE_LCD_COLOR
         case MIID_DISPLAY_OPTIONS:
             display_options();
             break;
-#endif
         case MIID_QUIT:
             return 1;
             break;
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs