mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-05-12 11:43:16 -04:00
plugins: imageviewer: Hide info by default when loading file
Looks nicer, especially when the "View Album Art" option is used. Add delay to progress bar, so it only appears when 250ms have passed. Change-Id: I183c839f1ab206385cd01327922933b544c4b78b
This commit is contained in:
parent
fd7ae09e7a
commit
f4dc4d89dc
34 changed files with 160 additions and 114 deletions
|
|
@ -14597,11 +14597,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Скриване на информацията"
|
*: "Скриване на информацията"
|
||||||
|
|
|
||||||
|
|
@ -14601,11 +14601,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "隐藏信息"
|
*: "隐藏信息"
|
||||||
|
|
|
||||||
|
|
@ -14615,11 +14615,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Information verbergen"
|
*: "Information verbergen"
|
||||||
|
|
|
||||||
|
|
@ -14591,17 +14591,17 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
|
|
|
||||||
|
|
@ -14844,17 +14844,17 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</dest>
|
</dest>
|
||||||
<voice>
|
<voice>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
|
|
|
||||||
|
|
@ -14701,11 +14701,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Ocultar información"
|
*: "Ocultar información"
|
||||||
|
|
|
||||||
|
|
@ -12290,11 +12290,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Masquer les informations"
|
*: "Masquer les informations"
|
||||||
|
|
|
||||||
|
|
@ -14300,11 +14300,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Nascondere le informazioni"
|
*: "Nascondere le informazioni"
|
||||||
|
|
|
||||||
|
|
@ -14794,11 +14794,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "情報を隠す"
|
*: "情報を隠す"
|
||||||
|
|
|
||||||
|
|
@ -14609,11 +14609,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "정보 숨기기"
|
*: "정보 숨기기"
|
||||||
|
|
|
||||||
|
|
@ -14706,11 +14706,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Paslēpt informāciju"
|
*: "Paslēpt informāciju"
|
||||||
|
|
|
||||||
|
|
@ -14709,11 +14709,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Információ elrejtése"
|
*: "Információ elrejtése"
|
||||||
|
|
|
||||||
|
|
@ -14712,11 +14712,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Ascunde informațiile"
|
*: "Ascunde informațiile"
|
||||||
|
|
|
||||||
|
|
@ -14360,11 +14360,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Verberg informatie"
|
*: "Verberg informatie"
|
||||||
|
|
|
||||||
|
|
@ -14779,11 +14779,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Gøym informasjon"
|
*: "Gøym informasjon"
|
||||||
|
|
|
||||||
|
|
@ -14306,11 +14306,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Ukryj informacje"
|
*: "Ukryj informacje"
|
||||||
|
|
|
||||||
|
|
@ -14817,11 +14817,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Ocultar informações"
|
*: "Ocultar informações"
|
||||||
|
|
|
||||||
|
|
@ -14712,11 +14712,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Ascunde informațiile"
|
*: "Ascunde informațiile"
|
||||||
|
|
|
||||||
|
|
@ -14328,11 +14328,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Ничего не показывать"
|
*: "Ничего не показывать"
|
||||||
|
|
|
||||||
|
|
@ -14326,11 +14326,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Skryť info"
|
*: "Skryť info"
|
||||||
|
|
|
||||||
|
|
@ -14705,11 +14705,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Сакриј информације"
|
*: "Сакриј информације"
|
||||||
|
|
|
||||||
|
|
@ -14714,11 +14714,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Göm information"
|
*: "Göm information"
|
||||||
|
|
|
||||||
|
|
@ -14597,11 +14597,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Bilgileri gizle"
|
*: "Bilgileri gizle"
|
||||||
|
|
|
||||||
|
|
@ -14706,11 +14706,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Приховати інформацію"
|
*: "Приховати інформацію"
|
||||||
|
|
|
||||||
|
|
@ -14615,11 +14615,11 @@
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_HIDE_ALBUM_TITLE_NEW
|
id: LANG_HIDE_INFO
|
||||||
desc: in the pictureflow settings
|
desc: Hide Information
|
||||||
user: core
|
user: core
|
||||||
<source>
|
<source>
|
||||||
*: "Hide information"
|
*: "Hide Information"
|
||||||
</source>
|
</source>
|
||||||
<dest>
|
<dest>
|
||||||
*: "Ẩn thông tin"
|
*: "Ẩn thông tin"
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
return PLUGIN_OUTOFMEM;
|
return PLUGIN_OUTOFMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iv->running_slideshow)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
||||||
rb->lcd_putsf(0, 1, "loading %dx%d%s",
|
rb->lcd_putsf(0, 1, "loading %dx%d%s",
|
||||||
|
|
@ -206,7 +207,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
return PLUGIN_ERROR;
|
return PLUGIN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iv->running_slideshow)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
|
rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
|
||||||
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
|
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
|
||||||
|
|
@ -225,7 +227,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
buf_images = buf_root = buf + size;
|
buf_images = buf_root = buf + size;
|
||||||
buf_images_size = root_size = *buf_size - size;
|
buf_images_size = root_size = *buf_size - size;
|
||||||
|
|
||||||
if (!iv->running_slideshow)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->lcd_putsf(0, 2, "image %dx%d", bmp.width, bmp.height);
|
rb->lcd_putsf(0, 2, "image %dx%d", bmp.width, bmp.height);
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
if (!p_decoder->error)
|
if (!p_decoder->error)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!iv->running_slideshow)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->lcd_putsf(0, 2, "file: %s",
|
rb->lcd_putsf(0, 2, "file: %s",
|
||||||
filename);
|
filename);
|
||||||
|
|
@ -137,7 +138,9 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
|
|
||||||
gif_decoder_destroy_memory_pool(p_decoder);
|
gif_decoder_destroy_memory_pool(p_decoder);
|
||||||
|
|
||||||
if (!iv->running_slideshow && !p_decoder->error)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow &&
|
||||||
|
!p_decoder->error)
|
||||||
{
|
{
|
||||||
rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
|
rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
|
||||||
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
|
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
|
||||||
|
|
@ -215,7 +218,9 @@ static int get_image(struct image_info *info, int frame, int ds)
|
||||||
/* assign image buffer */
|
/* assign image buffer */
|
||||||
if (ds > 1)
|
if (ds > 1)
|
||||||
{
|
{
|
||||||
if (!iv->running_slideshow && (info->frames_count == 1))
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow &&
|
||||||
|
(info->frames_count == 1))
|
||||||
{
|
{
|
||||||
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();
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,8 @@ static struct imgview_settings settings =
|
||||||
COLOURMODE_COLOUR,
|
COLOURMODE_COLOUR,
|
||||||
DITHER_NONE,
|
DITHER_NONE,
|
||||||
#endif
|
#endif
|
||||||
SS_DEFAULT_TIMEOUT
|
SS_DEFAULT_TIMEOUT,
|
||||||
|
true
|
||||||
};
|
};
|
||||||
static struct imgview_settings old_settings;
|
static struct imgview_settings old_settings;
|
||||||
|
|
||||||
|
|
@ -78,6 +79,7 @@ static struct configdata config[] =
|
||||||
#endif
|
#endif
|
||||||
{ TYPE_INT, SS_MIN_TIMEOUT, SS_MAX_TIMEOUT,
|
{ TYPE_INT, SS_MIN_TIMEOUT, SS_MAX_TIMEOUT,
|
||||||
{ .int_p = &settings.ss_timeout }, "Slideshow Time", NULL },
|
{ .int_p = &settings.ss_timeout }, "Slideshow Time", NULL },
|
||||||
|
{ TYPE_BOOL, 0, 1, { .bool_p = &settings.hide_info }, "Hide Info", NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
static void cb_progress(int current, int total);
|
static void cb_progress(int current, int total);
|
||||||
|
|
@ -244,12 +246,22 @@ static bool set_option_dithering(void)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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),
|
MENUITEM_FUNCTION(grayscale_item, 0, ID2P(LANG_GRAYSCALE),
|
||||||
set_option_grayscale, NULL, Icon_NOICON);
|
set_option_grayscale, NULL, Icon_NOICON);
|
||||||
MENUITEM_FUNCTION(dithering_item, 0, ID2P(LANG_DITHERING),
|
MENUITEM_FUNCTION(dithering_item, 0, ID2P(LANG_DITHERING),
|
||||||
set_option_dithering, NULL, Icon_NOICON);
|
set_option_dithering, NULL, Icon_NOICON);
|
||||||
MAKE_MENU(display_menu, "Display Options", NULL, Icon_NOICON,
|
MENUITEM_FUNCTION(hide_info_item, 0, ID2P(LANG_HIDE_INFO),
|
||||||
&grayscale_item, &dithering_item);
|
set_option_hide_info, NULL, Icon_NOICON);
|
||||||
|
MAKE_MENU(display_menu, ID2P(LANG_MENU_DISPLAY_OPTIONS), NULL, Icon_NOICON,
|
||||||
|
&grayscale_item,
|
||||||
|
&dithering_item,
|
||||||
|
&hide_info_item);
|
||||||
|
|
||||||
static void display_options(void)
|
static void display_options(void)
|
||||||
{
|
{
|
||||||
|
|
@ -451,6 +463,10 @@ static void cb_progress(int current, int total)
|
||||||
{
|
{
|
||||||
/* do not yield or update the progress bar if we did so too recently */
|
/* do not yield or update the progress bar if we did so too recently */
|
||||||
long now = *rb->current_tick;
|
long now = *rb->current_tick;
|
||||||
|
|
||||||
|
if (total == 0)
|
||||||
|
next_progress_tick = now + HZ/4; /* delay by 250ms initially */
|
||||||
|
|
||||||
if(!TIME_AFTER(now, next_progress_tick))
|
if(!TIME_AFTER(now, next_progress_tick))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -965,6 +981,7 @@ reload_decoder:
|
||||||
bool initial_frame = true;
|
bool initial_frame = true;
|
||||||
do /* loop the image prepare and decoding when zoomed */
|
do /* loop the image prepare and decoding when zoomed */
|
||||||
{
|
{
|
||||||
|
cb_progress(0, 0); /* delay showing progress bar*/
|
||||||
status = imgdec->get_image(info, frame, ds); /* decode or fetch from cache */
|
status = imgdec->get_image(info, frame, ds); /* decode or fetch from cache */
|
||||||
if (status == PLUGIN_ERROR)
|
if (status == PLUGIN_ERROR)
|
||||||
{
|
{
|
||||||
|
|
@ -973,8 +990,9 @@ reload_decoder:
|
||||||
}
|
}
|
||||||
|
|
||||||
set_view(info, cx, cy);
|
set_view(info, cx, cy);
|
||||||
|
if(!settings.hide_info &&
|
||||||
if(!iv_api.running_slideshow && (info->frames_count == 1))
|
!iv_api.running_slideshow &&
|
||||||
|
(info->frames_count == 1))
|
||||||
{
|
{
|
||||||
rb->lcd_putsf(0, 3, "showing %dx%d", info->width, info->height);
|
rb->lcd_putsf(0, 3, "showing %dx%d", info->width, info->height);
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ struct imgview_settings
|
||||||
int jpeg_dither_mode;
|
int jpeg_dither_mode;
|
||||||
#endif
|
#endif
|
||||||
int ss_timeout;
|
int ss_timeout;
|
||||||
|
bool hide_info;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* structure passed to image decoder. */
|
/* structure passed to image decoder. */
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
return PLUGIN_OUTOFMEM;
|
return PLUGIN_OUTOFMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!iv->running_slideshow)
|
if(!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
||||||
rb->lcd_putsf(0, 1, "loading %d bytes", filesize);
|
rb->lcd_putsf(0, 1, "loading %d bytes", filesize);
|
||||||
|
|
@ -160,7 +161,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
rb->read(fd, buf_jpeg, filesize);
|
rb->read(fd, buf_jpeg, filesize);
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
|
|
||||||
if(!iv->running_slideshow)
|
if(!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->lcd_puts(0, 2, "decoding markers");
|
rb->lcd_puts(0, 2, "decoding markers");
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
|
|
@ -190,7 +192,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
default_huff_tbl(p_jpg); /* use default */
|
default_huff_tbl(p_jpg); /* use default */
|
||||||
build_lut(p_jpg); /* derive Huffman and other lookup-tables */
|
build_lut(p_jpg); /* derive Huffman and other lookup-tables */
|
||||||
|
|
||||||
if(!iv->running_slideshow)
|
if(!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->lcd_putsf(0, 2, "image %dx%d", p_jpg->x_size, p_jpg->y_size);
|
rb->lcd_putsf(0, 2, "image %dx%d", p_jpg->x_size, p_jpg->y_size);
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
|
|
@ -263,7 +266,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, "decoding %d*%d", info->width, info->height);
|
rb->lcd_putsf(0, 3, "decoding %d*%d", info->width, info->height);
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
|
|
@ -288,7 +292,8 @@ static int get_image(struct image_info *info, int frame, int ds)
|
||||||
}
|
}
|
||||||
time = *rb->current_tick - time;
|
time = *rb->current_tick - time;
|
||||||
|
|
||||||
if(!iv->running_slideshow)
|
if(!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
|
rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
|
||||||
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
|
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
POS(offset);
|
POS(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iv->running_slideshow)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
||||||
rb->lcd_puts(0, 2, "decoding...");
|
rb->lcd_puts(0, 2, "decoding...");
|
||||||
|
|
@ -142,7 +143,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
return PLUGIN_ERROR;
|
return PLUGIN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iv->running_slideshow)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->lcd_putsf(0, 2, "image %dx%d", p_jpg->X, p_jpg->Y);
|
rb->lcd_putsf(0, 2, "image %dx%d", p_jpg->X, p_jpg->Y);
|
||||||
int w, h; /* used to center output */
|
int w, h; /* used to center output */
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,9 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
|
|
||||||
DEBUGF("reading file '%s'\n", filename);
|
DEBUGF("reading file '%s'\n", filename);
|
||||||
|
|
||||||
if (!iv->running_slideshow) {
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
|
{
|
||||||
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
}
|
}
|
||||||
|
|
@ -136,7 +138,9 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (!iv->running_slideshow) {
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
|
{
|
||||||
rb->lcd_putsf(0, 1, "loading %zu bytes", file_size);
|
rb->lcd_putsf(0, 1, "loading %zu bytes", file_size);
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +150,9 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
rb->read(fd, image, file_size);
|
rb->read(fd, image, file_size);
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
|
|
||||||
if (!iv->running_slideshow) {
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
|
{
|
||||||
rb->lcd_puts(0, 2, "decoding image");
|
rb->lcd_puts(0, 2, "decoding image");
|
||||||
rb->lcd_update();
|
rb->lcd_update();
|
||||||
}
|
}
|
||||||
|
|
@ -171,7 +177,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
|
|
||||||
if (!p_decoder->error) {
|
if (!p_decoder->error) {
|
||||||
|
|
||||||
if (!iv->running_slideshow) {
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow) {
|
||||||
rb->lcd_putsf(0, 2, "image %dx%d",
|
rb->lcd_putsf(0, 2, "image %dx%d",
|
||||||
p_decoder->infoPng.width,
|
p_decoder->infoPng.width,
|
||||||
p_decoder->infoPng.height);
|
p_decoder->infoPng.height);
|
||||||
|
|
@ -194,7 +201,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iv->running_slideshow && !p_decoder->error)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow && !p_decoder->error)
|
||||||
{
|
{
|
||||||
rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
|
rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
|
||||||
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
|
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
|
||||||
|
|
@ -253,7 +261,8 @@ static int get_image(struct image_info *info, int frame, int ds)
|
||||||
|
|
||||||
/* assign image buffer */
|
/* assign image buffer */
|
||||||
if (ds > 1) {
|
if (ds > 1) {
|
||||||
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();
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
}
|
}
|
||||||
DEBUGF("reading file '%s'\n", filename);
|
DEBUGF("reading file '%s'\n", filename);
|
||||||
|
|
||||||
if (!iv->running_slideshow)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
rb->lcd_puts(0, 0, rb->strrchr(filename,'/')+1);
|
||||||
rb->lcd_putsf(0, 1, "loading %zu bytes", filesize);
|
rb->lcd_putsf(0, 1, "loading %zu bytes", filesize);
|
||||||
|
|
@ -140,7 +141,8 @@ static int load_image(char *filename, struct image_info *info,
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!iv->running_slideshow)
|
if (!iv->settings->hide_info &&
|
||||||
|
!iv->running_slideshow)
|
||||||
{
|
{
|
||||||
rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
|
rb->snprintf(print, sizeof(print), " %ld.%02ld sec ", time/HZ, time%HZ);
|
||||||
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
|
rb->lcd_getstringsize(print, &w, &h); /* centered in progress bar */
|
||||||
|
|
@ -177,7 +179,8 @@ static int get_image(struct image_info *info, int frame, int ds)
|
||||||
/* assign image buffer */
|
/* assign image buffer */
|
||||||
if (ds > 1)
|
if (ds > 1)
|
||||||
{
|
{
|
||||||
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();
|
||||||
|
|
|
||||||
|
|
@ -3619,7 +3619,7 @@ static int settings_menu(void)
|
||||||
ID2P(LANG_DISPLAY));
|
ID2P(LANG_DISPLAY));
|
||||||
|
|
||||||
static const struct opt_items album_name_options[] = {
|
static const struct opt_items album_name_options[] = {
|
||||||
{ STR(LANG_HIDE_ALBUM_TITLE_NEW) },
|
{ STR(LANG_HIDE_INFO) },
|
||||||
{ STR(LANG_SHOW_AT_THE_BOTTOM_NEW) },
|
{ STR(LANG_SHOW_AT_THE_BOTTOM_NEW) },
|
||||||
{ STR(LANG_SHOW_AT_THE_TOP_NEW) },
|
{ STR(LANG_SHOW_AT_THE_TOP_NEW) },
|
||||||
{ STR(LANG_SHOW_ALL_AT_THE_TOP) },
|
{ STR(LANG_SHOW_ALL_AT_THE_TOP) },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue