diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2005-03-12 09:56:03 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2005-03-12 09:56:03 (GMT) |
commit | f06e050d41051f1ea95b40981aee32ef8e0b0bae (patch) | |
tree | 7333133c0f77e4ea42a98554467dd8bbdfc01f0b /shell | |
parent | 1efe0593969bf7f461cf8298a75daddfbb6da678 (diff) |
Fix the mess we did with thumbnails and 1-basedness
2005-03-12 Marco Pesenti Gritti <marco@gnome.org>
* pdf/pdf-document.cc:
* shell/ev-sidebar-thumbnails.c: (adjustment_changed_cb),
(do_one_iteration), (ev_sidebar_thumbnails_set_document):
Fix the mess we did with thumbnails and 1-basedness
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-sidebar-thumbnails.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index b602bb2..b4622f6 100644 --- a/shell/ev-sidebar-thumbnails.c +++ b/shell/ev-sidebar-thumbnails.c @@ -111,7 +111,7 @@ adjustment_changed_cb (GtkAdjustment *adjustment, if (!path) return; - page = gtk_tree_path_get_indices (path)[0]; + page = gtk_tree_path_get_indices (path)[0] + 1; if (page == priv->current_page) return; gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->list_store), @@ -119,7 +119,7 @@ adjustment_changed_cb (GtkAdjustment *adjustment, gtk_tree_model_get (GTK_TREE_MODEL (priv->list_store), &iter, COLUMN_THUMBNAIL_SET, &thumbnail_set, -1); - if (! thumbnail_set) { + if (!thumbnail_set) { priv->current_page = page; priv->current_page_iter = iter; @@ -239,8 +239,8 @@ do_one_iteration (EvSidebarThumbnails *ev_sidebar_thumbnails) priv->current_page++; - if (priv->current_page == priv->n_pages) { - priv->current_page = 0; + if (priv->current_page > priv->n_pages) { + priv->current_page = 1; gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->list_store), &(priv->current_page_iter)); } else { @@ -378,7 +378,7 @@ ev_sidebar_thumbnails_set_document (EvSidebarThumbnails *sidebar_thumbnails, g_object_unref (loading_icon); gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->list_store), &(priv->current_page_iter)); - priv->current_page = 0; + priv->current_page = 1; priv->pages_done = 0; } |