diff options
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); } |