Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-sidebar-thumbnails.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@redhat.com>2005-03-31 15:34:35 (GMT)
committer Jonathan Blandford <jrb@src.gnome.org>2005-03-31 15:34:35 (GMT)
commite8096c18ba580156072e8c84103bee6f6d3f0bfc (patch)
tree4da3a4264a48a6830e7b12ec734ee4dc34de2b65 /shell/ev-sidebar-thumbnails.c
parent52ba586fff36cceccb753342a38deff970b18107 (diff)
Remove pixbuf backend for now
Thu Mar 31 01:21:58 2005 Jonathan Blandford <jrb@redhat.com> * Makefile.am: Remove pixbuf backend for now * configure.ac: Require poppler-glib instead of just poppler. * backend/ev-document-thumbnails.h: Add a comment * backend/ev-document.h: * backend/ev-document.c: (ev_document_class_init), (ev_document_load), (ev_document_get_link), (ev_document_get_links): Remove 3 methods and add get_links. Also, made 0 based. * backend/ev-jobs.c: (ev_job_render_new), (ev_job_render_run): * backend/ev-jobs.h: now EvJobRender can grab the links for a document. * backend/ev-link.c: (ev_link_set_title), (ev_link_mapping_free_foreach), (ev_link_mapping_free), (ev_link_mapping_find): * backend/ev-link.h: Allow NULL titles. Also, introduce a mapping link. * backend/ev-page-cache.c: (ev_page_cache_init), (_ev_page_cache_new), (ev_page_cache_set_current_page), (ev_page_cache_get_size), (ev_page_cache_next_page), (ev_page_cache_prev_page): Fix to be 0 based. * pdf/Makefile.am: * pdf/ev-poppler.h: * pdf/ev-poppler.cc: New backend. * ps/ps-document.c: (ps_document_init), (ps_document_set_page), (ps_document_get_page), (ps_document_document_iface_init): * shell/ev-pixbuf-cache.h: * shell/ev-pixbuf-cache.c: (ev_pixbuf_cache_init), (dispose_cache_job_info), (job_finished_cb), (move_one_job), (ev_pixbuf_cache_update_range), (copy_job_to_job_info), (add_job_if_needed), (ev_pixbuf_cache_set_page_range), (ev_pixbuf_cache_get_pixbuf), (ev_pixbuf_cache_get_link_mapping): Fix up code to grab a page cache per each doc. Also, fix to be 0 based. * shell/ev-sidebar-thumbnails.c: (ev_sidebar_tree_selection_changed), (page_changed_cb), (ev_sidebar_thumbnails_set_document): Fix to be 0 based. * shell/ev-view.c: (status_message_from_link), (find_page_at_location), (get_link_at_location), (ev_view_motion_notify_event), (ev_view_button_release_event), (ev_view_init): Use the new link code. Fix to be 0 based. * shell/ev-window.c: (update_action_sensitivity), (document_supports_sidebar): 0 based.
Diffstat (limited to 'shell/ev-sidebar-thumbnails.c')
-rw-r--r--shell/ev-sidebar-thumbnails.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index c548e29..7bbaa09 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -118,7 +118,7 @@ ev_sidebar_tree_selection_changed (GtkTreeSelection *selection,
path = gtk_tree_model_get_path (GTK_TREE_MODEL (priv->list_store),
&iter);
- page = gtk_tree_path_get_indices (path)[0] + 1;
+ page = gtk_tree_path_get_indices (path)[0];
gtk_tree_path_free (path);
page_cache = ev_document_get_page_cache (priv->document);
@@ -189,7 +189,7 @@ page_changed_cb (EvPageCache *page_cache,
GtkTreePath *path;
GtkTreeSelection *selection;
- path = gtk_tree_path_new_from_indices (page - 1, -1);
+ path = gtk_tree_path_new_from_indices (page, -1);
selection = gtk_tree_view_get_selection
(GTK_TREE_VIEW (sidebar->priv->tree_view));
@@ -247,12 +247,12 @@ ev_sidebar_thumbnails_set_document (EvSidebarThumbnails *sidebar_thumbnails,
loading_icon = ev_document_misc_get_thumbnail_frame (width, height, NULL);
gtk_list_store_clear (priv->list_store);
- for (i = 1; i <= n_pages; i++) {
+ for (i = 0; i < n_pages; i++) {
EvJob *job;
/* FIXME: Bah. This is still -1 for some reason. Need to track it down.. */
- job = ev_job_thumbnail_new (priv->document, i - 1, THUMBNAIL_WIDTH);
- page = g_strdup_printf ("<i>%d</i>", i);
+ job = ev_job_thumbnail_new (priv->document, i, THUMBNAIL_WIDTH);
+ page = g_strdup_printf ("<i>%d</i>", i + 1); /* FIXME: replace with string. */
gtk_list_store_append (priv->list_store, &iter);
gtk_list_store_set (priv->list_store, &iter,
COLUMN_PAGE_STRING, page,