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.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/eom-window.c b/src/eom-window.c
index 34b28b1..b2925df 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -680,7 +680,7 @@ static void
update_image_pos (EomWindow *window)
{
EomWindowPrivate *priv;
- gint pos, n_images;
+ gint pos = -1, n_images = 0;
priv = window->priv;
@@ -689,12 +689,12 @@ update_image_pos (EomWindow *window)
if (n_images > 0) {
pos = eom_list_store_get_pos_by_image (EOM_LIST_STORE (priv->store),
priv->image);
-
- /* Images: (image pos) / (n_total_images) */
- eom_statusbar_set_image_number (EOM_STATUSBAR (priv->statusbar),
- pos + 1,
- n_images);
}
+ /* Images: (image pos) / (n_total_images) */
+ eom_statusbar_set_image_number (EOM_STATUSBAR (priv->statusbar),
+ pos + 1,
+ n_images);
+
}
static void
@@ -1643,6 +1643,15 @@ handle_image_selection_changed_cb (EomThumbView *thumbview, EomWindow *window)
priv = window->priv;
+ if (eom_list_store_length (EOM_LIST_STORE (priv->store)) == 0) {
+ gtk_window_set_title (GTK_WINDOW (window),
+ g_get_application_name());
+ gtk_statusbar_remove_all (GTK_STATUSBAR (priv->statusbar),
+ priv->image_info_message_cid);
+ eom_scroll_view_set_image (EOM_SCROLL_VIEW (priv->view),
+ NULL);
+}
+
if (eom_thumb_view_get_n_selected (EOM_THUMB_VIEW (priv->thumbview)) == 0)
return;