1 /* this file is part of evince, a gnome document viewer
3 * Copyright (C) 2004 Red Hat, Inc.
4 * Copyright (C) 2004, 2005 Anders Carlsson <andersca@gnome.org>
7 * Jonathan Blandford <jrb@alum.mit.edu>
8 * Anders Carlsson <andersca@gnome.org>
10 * Evince is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * Evince is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
31 #include <glib/gi18n.h>
34 #include "ev-document-misc.h"
35 #include "ev-document-thumbnails.h"
36 #include "ev-job-scheduler.h"
37 #include "ev-sidebar-page.h"
38 #include "ev-sidebar-thumbnails.h"
40 #include "ev-window.h"
42 #define THUMBNAIL_WIDTH 100
44 /* The IconView doesn't scale nearly as well as the TreeView, so we arbitrarily
46 #define MAX_ICON_VIEW_PAGE_COUNT 1500
49 struct _EvSidebarThumbnailsPrivate {
53 GtkAdjustment *vadjustment;
54 GtkListStore *list_store;
55 GHashTable *loading_icons;
57 EvPageCache *page_cache;
59 gint n_pages, pages_done;
64 gint start_page, end_page;
80 static void ev_sidebar_thumbnails_clear_model (EvSidebarThumbnails *sidebar);
81 static gboolean ev_sidebar_thumbnails_support_document (EvSidebarPage *sidebar_page,
82 EvDocument *document);
83 static void ev_sidebar_thumbnails_page_iface_init (EvSidebarPageIface *iface);
84 static void ev_sidebar_thumbnails_set_document (EvSidebarPage *sidebar_page,
85 EvDocument *document);
86 static const gchar* ev_sidebar_thumbnails_get_label (EvSidebarPage *sidebar_page);
87 static void thumbnail_job_completed_callback (EvJobThumbnail *job,
88 EvSidebarThumbnails *sidebar_thumbnails);
89 static void adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails);
91 G_DEFINE_TYPE_EXTENDED (EvSidebarThumbnails,
92 ev_sidebar_thumbnails,
95 G_IMPLEMENT_INTERFACE (EV_TYPE_SIDEBAR_PAGE,
96 ev_sidebar_thumbnails_page_iface_init))
98 #define EV_SIDEBAR_THUMBNAILS_GET_PRIVATE(object) \
99 (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_SIDEBAR_THUMBNAILS, EvSidebarThumbnailsPrivate));
103 ev_sidebar_thumbnails_dispose (GObject *object)
105 EvSidebarThumbnails *sidebar_thumbnails = EV_SIDEBAR_THUMBNAILS (object);
107 if (sidebar_thumbnails->priv->loading_icons) {
108 g_hash_table_destroy (sidebar_thumbnails->priv->loading_icons);
109 sidebar_thumbnails->priv->loading_icons = NULL;
112 if (sidebar_thumbnails->priv->list_store) {
113 ev_sidebar_thumbnails_clear_model (sidebar_thumbnails);
114 g_object_unref (sidebar_thumbnails->priv->list_store);
115 sidebar_thumbnails->priv->list_store = NULL;
118 G_OBJECT_CLASS (ev_sidebar_thumbnails_parent_class)->dispose (object);
122 ev_sidebar_thumbnails_get_property (GObject *object,
127 EvSidebarThumbnails *sidebar = EV_SIDEBAR_THUMBNAILS (object);
131 if (sidebar->priv->tree_view)
132 g_value_set_object (value, sidebar->priv->tree_view);
134 g_value_set_object (value, sidebar->priv->icon_view);
137 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
143 ev_sidebar_thumbnails_map (GtkWidget *widget)
145 EvSidebarThumbnails *sidebar;
147 sidebar = EV_SIDEBAR_THUMBNAILS (widget);
149 GTK_WIDGET_CLASS (ev_sidebar_thumbnails_parent_class)->map (widget);
151 adjustment_changed_cb (sidebar);
155 ev_sidebar_thumbnails_class_init (EvSidebarThumbnailsClass *ev_sidebar_thumbnails_class)
157 GObjectClass *g_object_class;
158 GtkObjectClass *gtk_object_class;
159 GtkWidgetClass *widget_class;
161 g_object_class = G_OBJECT_CLASS (ev_sidebar_thumbnails_class);
162 gtk_object_class = GTK_OBJECT_CLASS (ev_sidebar_thumbnails_class);
163 widget_class = GTK_WIDGET_CLASS (ev_sidebar_thumbnails_class);
165 g_object_class->dispose = ev_sidebar_thumbnails_dispose;
166 g_object_class->get_property = ev_sidebar_thumbnails_get_property;
167 widget_class->map = ev_sidebar_thumbnails_map;
169 g_object_class_override_property (g_object_class,
173 g_type_class_add_private (g_object_class, sizeof (EvSidebarThumbnailsPrivate));
177 ev_sidebar_thumbnails_new (void)
179 GtkWidget *ev_sidebar_thumbnails;
181 ev_sidebar_thumbnails = g_object_new (EV_TYPE_SIDEBAR_THUMBNAILS, NULL);
183 return ev_sidebar_thumbnails;
187 ev_sidebar_thumbnails_get_loading_icon (EvSidebarThumbnails *sidebar_thumbnails,
194 key = g_strdup_printf ("%dx%d", width, height);
195 icon = g_hash_table_lookup (sidebar_thumbnails->priv->loading_icons, key);
197 icon = ev_document_misc_get_thumbnail_frame (width, height, NULL);
198 g_hash_table_insert (sidebar_thumbnails->priv->loading_icons,
208 clear_range (EvSidebarThumbnails *sidebar_thumbnails,
212 EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
216 gint prev_width = -1;
217 gint prev_height = -1;
219 g_assert (start_page <= end_page);
221 path = gtk_tree_path_new_from_indices (start_page, -1);
222 for (result = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->list_store), &iter, path);
223 result && start_page <= end_page;
224 result = gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->list_store), &iter), start_page ++) {
226 GdkPixbuf *loading_icon = NULL;
229 gtk_tree_model_get (GTK_TREE_MODEL (priv->list_store),
235 g_signal_handlers_disconnect_by_func (job, thumbnail_job_completed_callback, sidebar_thumbnails);
236 ev_job_cancel (EV_JOB (job));
237 g_object_unref (job);
240 ev_page_cache_get_thumbnail_size (priv->page_cache, start_page,
243 if (!loading_icon || (width != prev_width && height != prev_height)) {
245 ev_sidebar_thumbnails_get_loading_icon (sidebar_thumbnails,
250 prev_height = height;
252 gtk_list_store_set (priv->list_store, &iter,
254 COLUMN_THUMBNAIL_SET, FALSE,
255 COLUMN_PIXBUF, loading_icon,
258 gtk_tree_path_free (path);
262 get_scale_for_page (EvSidebarThumbnails *sidebar_thumbnails,
265 EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
268 ev_document_get_page_size (priv->document, page, &width, NULL);
270 return (gdouble)THUMBNAIL_WIDTH / width;
274 add_range (EvSidebarThumbnails *sidebar_thumbnails,
278 EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
282 gint page = start_page;
284 g_assert (start_page <= end_page);
286 path = gtk_tree_path_new_from_indices (start_page, -1);
287 for (result = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->list_store), &iter, path);
288 result && page <= end_page;
289 result = gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->list_store), &iter), page ++) {
291 gboolean thumbnail_set;
293 gtk_tree_model_get (GTK_TREE_MODEL (priv->list_store), &iter,
295 COLUMN_THUMBNAIL_SET, &thumbnail_set,
298 if (job == NULL && !thumbnail_set) {
299 job = ev_job_thumbnail_new (priv->document,
300 page, priv->rotation,
301 get_scale_for_page (sidebar_thumbnails, page));
302 ev_job_scheduler_push_job (EV_JOB (job), EV_JOB_PRIORITY_HIGH);
304 g_object_set_data_full (G_OBJECT (job), "tree_iter",
305 gtk_tree_iter_copy (&iter),
306 (GDestroyNotify) gtk_tree_iter_free);
307 g_signal_connect (job, "finished",
308 G_CALLBACK (thumbnail_job_completed_callback),
310 gtk_list_store_set (priv->list_store, &iter,
314 /* The queue and the list own a ref to the job now */
315 g_object_unref (job);
317 g_object_unref (job);
320 gtk_tree_path_free (path);
323 /* This modifies start */
325 update_visible_range (EvSidebarThumbnails *sidebar_thumbnails,
329 EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
330 int old_start_page, old_end_page;
332 old_start_page = priv->start_page;
333 old_end_page = priv->end_page;
335 if (start_page == old_start_page &&
336 end_page == old_end_page)
339 /* Clear the areas we no longer display */
340 if (old_start_page >= 0 && old_start_page < start_page)
341 clear_range (sidebar_thumbnails, old_start_page, MIN (start_page - 1, old_end_page));
343 if (old_end_page > 0 && old_end_page > end_page)
344 clear_range (sidebar_thumbnails, MAX (end_page + 1, old_start_page), old_end_page);
346 add_range (sidebar_thumbnails, start_page, end_page);
348 priv->start_page = start_page;
349 priv->end_page = end_page;
353 adjustment_changed_cb (EvSidebarThumbnails *sidebar_thumbnails)
355 EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
356 GtkTreePath *path = NULL;
357 GtkTreePath *path2 = NULL;
361 /* Widget is not currently visible */
362 if (!GTK_WIDGET_MAPPED (sidebar_thumbnails))
365 if (priv->vadjustment->page_size == 0)
368 if (priv->tree_view) {
369 if (! GTK_WIDGET_REALIZED (priv->tree_view))
372 gtk_tree_view_convert_tree_to_bin_window_coords (GTK_TREE_VIEW (priv->tree_view),
373 0, (int) priv->vadjustment->value,
375 gtk_tree_view_convert_tree_to_bin_window_coords (GTK_TREE_VIEW (priv->tree_view),
376 0, (int) (priv->vadjustment->value + priv->vadjustment->page_size),
378 gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (priv->tree_view),
381 gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (priv->tree_view),
384 } else if (priv->icon_view) {
385 if (! GTK_WIDGET_REALIZED (priv->icon_view))
387 if (! gtk_icon_view_get_visible_range (GTK_ICON_VIEW (priv->icon_view), &path, &path2))
394 update_visible_range (sidebar_thumbnails,
395 gtk_tree_path_get_indices (path)[0],
396 gtk_tree_path_get_indices (path2)[0]);
399 gtk_tree_path_free (path);
400 gtk_tree_path_free (path2);
404 ev_sidebar_thumbnails_fill_model (EvSidebarThumbnails *sidebar_thumbnails)
406 EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
409 gint prev_width = -1;
410 gint prev_height = -1;
412 for (i = 0; i < sidebar_thumbnails->priv->n_pages; i++) {
415 GdkPixbuf *loading_icon = NULL;
418 page_label = ev_document_get_page_label (priv->document, i);
419 page_string = g_markup_printf_escaped ("<i>%s</i>", page_label);
420 ev_page_cache_get_thumbnail_size (sidebar_thumbnails->priv->page_cache, i,
421 sidebar_thumbnails->priv->rotation,
423 if (!loading_icon || (width != prev_width && height != prev_height)) {
425 ev_sidebar_thumbnails_get_loading_icon (sidebar_thumbnails,
430 prev_height = height;
432 gtk_list_store_append (priv->list_store, &iter);
433 gtk_list_store_set (priv->list_store, &iter,
434 COLUMN_PAGE_STRING, page_string,
435 COLUMN_PIXBUF, loading_icon,
436 COLUMN_THUMBNAIL_SET, FALSE,
439 g_free (page_string);
444 refresh (EvSidebarThumbnails *sidebar_thumbnails)
446 adjustment_changed_cb (sidebar_thumbnails);
451 ev_sidebar_thumbnails_refresh (EvSidebarThumbnails *sidebar_thumbnails,
454 sidebar_thumbnails->priv->rotation = rotation;
455 if (sidebar_thumbnails->priv->loading_icons)
456 g_hash_table_remove_all (sidebar_thumbnails->priv->loading_icons);
458 if (sidebar_thumbnails->priv->document == NULL ||
459 sidebar_thumbnails->priv->n_pages <= 0)
462 ev_sidebar_thumbnails_clear_model (sidebar_thumbnails);
463 ev_sidebar_thumbnails_fill_model (sidebar_thumbnails);
465 /* Trigger a redraw */
466 sidebar_thumbnails->priv->start_page = -1;
467 sidebar_thumbnails->priv->end_page = -1;
468 g_idle_add ((GSourceFunc)refresh, sidebar_thumbnails);
472 ev_sidebar_tree_selection_changed (GtkTreeSelection *selection,
473 EvSidebarThumbnails *ev_sidebar_thumbnails)
475 EvSidebarThumbnailsPrivate *priv = ev_sidebar_thumbnails->priv;
480 if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
483 path = gtk_tree_model_get_path (GTK_TREE_MODEL (priv->list_store),
485 page = gtk_tree_path_get_indices (path)[0];
486 gtk_tree_path_free (path);
488 ev_page_cache_set_current_page_history (priv->page_cache, page);
492 ev_sidebar_icon_selection_changed (GtkIconView *icon_view,
493 EvSidebarThumbnails *ev_sidebar_thumbnails)
495 EvSidebarThumbnailsPrivate *priv = ev_sidebar_thumbnails->priv;
500 selected = gtk_icon_view_get_selected_items (icon_view);
501 if (selected == NULL)
504 /* We don't handle or expect multiple selection. */
505 g_assert (selected->next == NULL);
507 path = selected->data;
508 page = gtk_tree_path_get_indices (path)[0];
510 gtk_tree_path_free (path);
511 g_list_free (selected);
513 ev_page_cache_set_current_page_history (priv->page_cache, page);
517 ev_sidebar_init_tree_view (EvSidebarThumbnails *ev_sidebar_thumbnails)
519 EvSidebarThumbnailsPrivate *priv;
520 GtkTreeSelection *selection;
521 GtkCellRenderer *renderer;
523 priv = ev_sidebar_thumbnails->priv;
524 priv->tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (priv->list_store));
526 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree_view));
527 g_signal_connect (selection, "changed",
528 G_CALLBACK (ev_sidebar_tree_selection_changed), ev_sidebar_thumbnails);
529 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (priv->tree_view), FALSE);
530 renderer = g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF,
534 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->tree_view), -1,
538 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->tree_view), -1,
539 NULL, gtk_cell_renderer_text_new (),
541 gtk_container_add (GTK_CONTAINER (priv->swindow), priv->tree_view);
542 gtk_widget_show (priv->tree_view);
546 ev_sidebar_init_icon_view (EvSidebarThumbnails *ev_sidebar_thumbnails)
548 EvSidebarThumbnailsPrivate *priv;
550 priv = ev_sidebar_thumbnails->priv;
552 priv->icon_view = gtk_icon_view_new_with_model (GTK_TREE_MODEL (priv->list_store));
553 gtk_icon_view_set_markup_column (GTK_ICON_VIEW (priv->icon_view), 0);
554 gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (priv->icon_view), 1);
555 g_signal_connect (priv->icon_view, "selection-changed",
556 G_CALLBACK (ev_sidebar_icon_selection_changed), ev_sidebar_thumbnails);
558 gtk_container_add (GTK_CONTAINER (priv->swindow), priv->icon_view);
559 gtk_widget_show (priv->icon_view);
563 ev_sidebar_thumbnails_use_icon_view (EvSidebarThumbnails *sidebar_thumbnails)
565 EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
567 return (ev_document_get_n_pages (priv->document) <= MAX_ICON_VIEW_PAGE_COUNT);
571 ev_sidebar_thumbnails_init (EvSidebarThumbnails *ev_sidebar_thumbnails)
573 EvSidebarThumbnailsPrivate *priv;
575 priv = ev_sidebar_thumbnails->priv = EV_SIDEBAR_THUMBNAILS_GET_PRIVATE (ev_sidebar_thumbnails);
577 priv->list_store = gtk_list_store_new (NUM_COLUMNS,
581 EV_TYPE_JOB_THUMBNAIL);
583 priv->swindow = gtk_scrolled_window_new (NULL, NULL);
585 /* We actually don't want GTK_POLICY_AUTOMATIC for horizontal scrollbar here
586 * it's just a workaround for bug #449462
588 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->swindow),
589 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
590 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (priv->swindow),
592 priv->vadjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (priv->swindow));
593 g_signal_connect_data (priv->vadjustment, "value-changed",
594 G_CALLBACK (adjustment_changed_cb),
595 ev_sidebar_thumbnails, NULL,
596 G_CONNECT_SWAPPED | G_CONNECT_AFTER);
597 g_signal_connect_swapped (priv->swindow, "size-allocate",
598 G_CALLBACK (adjustment_changed_cb),
599 ev_sidebar_thumbnails);
600 gtk_box_pack_start (GTK_BOX (ev_sidebar_thumbnails), priv->swindow, TRUE, TRUE, 0);
602 /* Put it all together */
603 gtk_widget_show_all (priv->swindow);
607 page_changed_cb (EvPageCache *page_cache,
609 EvSidebarThumbnails *sidebar)
611 GtkTreeView *tree_view;
614 path = gtk_tree_path_new_from_indices (page, -1);
616 if (sidebar->priv->tree_view) {
617 tree_view = GTK_TREE_VIEW (sidebar->priv->tree_view);
618 gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE);
619 gtk_tree_view_scroll_to_cell (tree_view, path, NULL, FALSE, 0.0, 0.0);
620 } else if (sidebar->priv->icon_view) {
622 g_signal_handlers_block_by_func
623 (sidebar->priv->icon_view,
624 G_CALLBACK (ev_sidebar_icon_selection_changed), sidebar);
626 gtk_icon_view_select_path (GTK_ICON_VIEW (sidebar->priv->icon_view), path);
628 g_signal_handlers_unblock_by_func
629 (sidebar->priv->icon_view,
630 G_CALLBACK (ev_sidebar_icon_selection_changed), sidebar);
632 gtk_icon_view_set_cursor (GTK_ICON_VIEW (sidebar->priv->icon_view), path, NULL, FALSE);
635 gtk_tree_path_free (path);
639 thumbnail_job_completed_callback (EvJobThumbnail *job,
640 EvSidebarThumbnails *sidebar_thumbnails)
642 EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
645 iter = (GtkTreeIter *) g_object_get_data (G_OBJECT (job), "tree_iter");
646 gtk_list_store_set (priv->list_store,
648 COLUMN_PIXBUF, job->thumbnail,
649 COLUMN_THUMBNAIL_SET, TRUE,
655 ev_sidebar_thumbnails_set_document (EvSidebarPage *sidebar_page,
656 EvDocument *document)
658 EvSidebarThumbnails *sidebar_thumbnails = EV_SIDEBAR_THUMBNAILS (sidebar_page);
660 EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
662 priv->page_cache = ev_page_cache_get (document);
664 if (!EV_IS_DOCUMENT_THUMBNAILS (document) ||
665 ev_document_get_n_pages (document) <= 0 ||
666 !ev_page_cache_check_dimensions (priv->page_cache)) {
670 priv->document = document;
671 priv->n_pages = ev_document_get_n_pages (document);
672 priv->loading_icons = g_hash_table_new_full (g_str_hash,
674 (GDestroyNotify)g_free,
675 (GDestroyNotify)g_object_unref);
677 ev_sidebar_thumbnails_clear_model (sidebar_thumbnails);
678 ev_sidebar_thumbnails_fill_model (sidebar_thumbnails);
680 /* Create the view widget, and remove the old one, if needed */
681 if (ev_sidebar_thumbnails_use_icon_view (sidebar_thumbnails)) {
682 if (priv->tree_view) {
683 gtk_container_remove (GTK_CONTAINER (priv->swindow), priv->tree_view);
684 priv->tree_view = NULL;
687 if (! priv->icon_view) {
688 ev_sidebar_init_icon_view (sidebar_thumbnails);
689 g_object_notify (G_OBJECT (sidebar_thumbnails), "main_widget");
691 gtk_widget_queue_resize (priv->icon_view);
694 if (priv->icon_view) {
695 gtk_container_remove (GTK_CONTAINER (priv->swindow), priv->icon_view);
696 priv->icon_view = NULL;
699 if (! priv->tree_view) {
700 ev_sidebar_init_tree_view (sidebar_thumbnails);
701 g_object_notify (G_OBJECT (sidebar_thumbnails), "main_widget");
705 /* Connect to the signal and trigger a fake callback */
706 g_signal_connect (priv->page_cache, "page-changed", G_CALLBACK (page_changed_cb), sidebar_thumbnails);
707 sidebar_thumbnails->priv->start_page = -1;
708 sidebar_thumbnails->priv->end_page = -1;
709 page_changed_cb (priv->page_cache,
710 ev_page_cache_get_current_page (priv->page_cache),
712 adjustment_changed_cb (sidebar_thumbnails);
716 ev_sidebar_thumbnails_clear_job (GtkTreeModel *model,
723 gtk_tree_model_get (model, iter, COLUMN_JOB, &job, -1);
727 g_signal_handlers_disconnect_by_func (job, thumbnail_job_completed_callback, data);
728 g_object_unref (job);
735 ev_sidebar_thumbnails_clear_model (EvSidebarThumbnails *sidebar_thumbnails)
737 EvSidebarThumbnailsPrivate *priv = sidebar_thumbnails->priv;
739 gtk_tree_model_foreach (GTK_TREE_MODEL (priv->list_store), ev_sidebar_thumbnails_clear_job, sidebar_thumbnails);
740 gtk_list_store_clear (priv->list_store);
744 ev_sidebar_thumbnails_support_document (EvSidebarPage *sidebar_page,
745 EvDocument *document)
747 return (EV_IS_DOCUMENT_THUMBNAILS (document));
751 ev_sidebar_thumbnails_get_label (EvSidebarPage *sidebar_page)
753 return _("Thumbnails");
757 ev_sidebar_thumbnails_page_iface_init (EvSidebarPageIface *iface)
759 iface->support_document = ev_sidebar_thumbnails_support_document;
760 iface->set_document = ev_sidebar_thumbnails_set_document;
761 iface->get_label = ev_sidebar_thumbnails_get_label;