diff options
author | whatdoineed2do/Ray <[email protected]> | 2023-11-27 17:51:45 +0000 |
---|---|---|
committer | Luke from DC <[email protected]> | 2023-12-24 21:55:41 +0000 |
commit | 5da04eaa2380e2817db28a2bd14b5e3beb2d77c2 (patch) | |
tree | f4064ad122524f13c001731d0ff8d3e16b9b437b /src | |
parent | c52d0c61491699379f6fa6f906e6acb28c22bb4f (diff) | |
download | eom-5da04eaa2380e2817db28a2bd14b5e3beb2d77c2.tar.bz2 eom-5da04eaa2380e2817db28a2bd14b5e3beb2d77c2.tar.xz |
eom-window: update image counter even if current thumbnail is for failured image
Diffstat (limited to 'src')
-rw-r--r-- | src/eom-window.c | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/src/eom-window.c b/src/eom-window.c index 0c27927..fb01794 100644 --- a/src/eom-window.c +++ b/src/eom-window.c @@ -496,38 +496,40 @@ update_status_bar (EomWindow *window) priv = window->priv; - if (priv->image != NULL && - eom_image_has_data (priv->image, EOM_IMAGE_DATA_DIMENSION)) { - int zoom, width, height; - goffset bytes = 0; + if (priv->image != NULL) + { + if ( eom_image_has_data (priv->image, EOM_IMAGE_DATA_DIMENSION)) + { + int zoom, width, height; + goffset bytes = 0; - zoom = floor (100 * eom_scroll_view_get_zoom (EOM_SCROLL_VIEW (priv->view)) + 0.5); + zoom = floor (100 * eom_scroll_view_get_zoom (EOM_SCROLL_VIEW (priv->view)) + 0.5); - eom_image_get_size (priv->image, &width, &height); + eom_image_get_size (priv->image, &width, &height); - bytes = eom_image_get_bytes (priv->image); + bytes = eom_image_get_bytes (priv->image); - if ((width > 0) && (height > 0)) { - char *size_string; + if ((width > 0) && (height > 0)) { + char *size_string; - size_string = g_format_size (bytes); + size_string = g_format_size (bytes); - /* Translators: This is the string displayed in the statusbar - * The tokens are from left to right: - * - image width - * - image height - * - image size in bytes - * - zoom in percent */ - str = g_strdup_printf (ngettext("%i × %i pixel %s %i%%", - "%i × %i pixels %s %i%%", height), - width, - height, - size_string, - zoom); + /* Translators: This is the string displayed in the statusbar + * The tokens are from left to right: + * - image width + * - image height + * - image size in bytes + * - zoom in percent */ + str = g_strdup_printf (ngettext("%i × %i pixel %s %i%%", + "%i × %i pixels %s %i%%", height), + width, + height, + size_string, + zoom); - g_free (size_string); + g_free (size_string); + } } - update_image_pos (window); } |