[eog] Update progress status bar for all images, valid and invalid.
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Update progress status bar for all images, valid and invalid.
- Date: Wed, 29 Apr 2015 19:34:49 +0000 (UTC)
commit 21f7d6b6145c7eecabe6c95c1f0343dbdb62e80e
Author: Kent Vander Velden <kent vandervelden gmail com>
Date: Wed Apr 29 10:31:33 2015 -0500
Update progress status bar for all images, valid and invalid.
The progress status bar (cur / tot) in the lower right was only being updated
when an image was valid, with data. When browsing a directory or otherwise
multiple filenames given to eog, the status bar would only update when visting
valid images. Simply moved update_image_pos(...) outside of the
eog_image_has_data(...) test.
https://bugzilla.gnome.org/show_bug.cgi?id=748653
src/eog-window.c | 47 ++++++++++++++++++++++++-----------------------
1 files changed, 24 insertions(+), 23 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 58b9de0..738213f 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -533,36 +533,37 @@ update_status_bar (EogWindow *window)
priv = window->priv;
- if (priv->image != NULL &&
- eog_image_has_data (priv->image, EOG_IMAGE_DATA_DIMENSION)) {
- int zoom, width, height;
- goffset bytes = 0;
+ if (priv->image != NULL) {
+ if (eog_image_has_data (priv->image, EOG_IMAGE_DATA_DIMENSION)) {
+ int zoom, width, height;
+ goffset bytes = 0;
- zoom = floor (100 * eog_scroll_view_get_zoom (EOG_SCROLL_VIEW (priv->view)) + 0.5);
+ zoom = floor (100 * eog_scroll_view_get_zoom (EOG_SCROLL_VIEW (priv->view)) + 0.5);
- eog_image_get_size (priv->image, &width, &height);
+ eog_image_get_size (priv->image, &width, &height);
- bytes = eog_image_get_bytes (priv->image);
+ bytes = eog_image_get_bytes (priv->image);
- if ((width > 0) && (height > 0)) {
- gchar *size_string;
+ if ((width > 0) && (height > 0)) {
+ gchar *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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]