summaryrefslogtreecommitdiff
path: root/src/eom-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eom-window.c')
-rw-r--r--src/eom-window.c60
1 files changed, 32 insertions, 28 deletions
diff --git a/src/eom-window.c b/src/eom-window.c
index 6c4b5d2..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);
}
@@ -574,7 +576,6 @@ update_action_groups_state (EomWindow *window)
GtkAction *action_sshow;
GtkAction *action_print;
gboolean print_disabled = FALSE;
- gboolean show_image_collection = FALSE;
gint n_images = 0;
g_return_if_fail (EOM_IS_WINDOW (window));
@@ -633,6 +634,8 @@ update_action_groups_state (EomWindow *window)
priv->status = EOM_WINDOW_STATUS_NORMAL;
}
} else {
+ gboolean show_image_collection;
+
if (priv->flags & EOM_STARTUP_DISABLE_COLLECTION) {
g_settings_set_boolean (priv->ui_settings, EOM_CONF_UI_IMAGE_COLLECTION, FALSE);
@@ -4342,7 +4345,7 @@ eom_window_open_editor (GtkAction *action,
file = eom_image_get_file (window->priv->image);
files = g_list_append (files, file);
- g_app_info_launch (app_info, &files,
+ g_app_info_launch (app_info, files,
G_APP_LAUNCH_CONTEXT (context), NULL);
g_list_free (files);
@@ -4685,7 +4688,9 @@ static void
eom_window_init (EomWindow *window)
{
GdkGeometry hints;
+#if defined(HAVE_LCMS) && defined(GDK_WINDOWING_X11)
GdkScreen *screen;
+#endif
EomWindowPrivate *priv;
eom_debug (DEBUG_WINDOW);
@@ -4698,8 +4703,6 @@ eom_window_init (EomWindow *window)
hints.min_width = EOM_WINDOW_MIN_WIDTH;
hints.min_height = EOM_WINDOW_MIN_HEIGHT;
- screen = gtk_widget_get_screen (GTK_WIDGET (window));
-
priv = window->priv = eom_window_get_instance_private (window);
priv->view_settings = g_settings_new (EOM_CONF_VIEW);
@@ -4737,6 +4740,7 @@ eom_window_init (EomWindow *window)
window->priv->status = EOM_WINDOW_STATUS_UNKNOWN;
#if defined(HAVE_LCMS) && defined(GDK_WINDOWING_X11)
+ screen = gtk_widget_get_screen (GTK_WIDGET (window));
window->priv->display_profile =
eom_window_get_display_profile (screen);
#endif