summaryrefslogtreecommitdiff
path: root/shell/ev-sidebar-thumbnails.c
diff options
context:
space:
mode:
authorrootavish <[email protected]>2014-08-06 17:22:34 +0530
committerrootavish <[email protected]>2014-08-06 17:22:34 +0530
commit683022d92b63bea1544e8d19bc57d47ef84f5fff (patch)
tree3b88ec7ac949efb3faa2fd8c065dc7f6854b12b9 /shell/ev-sidebar-thumbnails.c
parent56880392a6678ccec12bbec016939597acd49b07 (diff)
downloadatril-683022d92b63bea1544e8d19bc57d47ef84f5fff.tar.bz2
atril-683022d92b63bea1544e8d19bc57d47ef84f5fff.tar.xz
Redesigned the thumbnail code for ePub
No more crashes when searching with the sidebar open, will probably add a pixbuf cache as well to speed it up even further. The process which I earlier thought was not possible without separate jobs, work just fine as a single job, if I change the run mode of the thumbnail job, and incorporate a trylock() in case of epub.
Diffstat (limited to 'shell/ev-sidebar-thumbnails.c')
-rw-r--r--shell/ev-sidebar-thumbnails.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c
index 5c4cb4be..a6102355 100644
--- a/shell/ev-sidebar-thumbnails.c
+++ b/shell/ev-sidebar-thumbnails.c
@@ -442,7 +442,6 @@ add_range (EvSidebarThumbnails *sidebar_thumbnails,
result && page <= end_page;
result = gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->list_store), &iter), page ++) {
EvJob *job;
-
gboolean thumbnail_set;
gtk_tree_model_get (GTK_TREE_MODEL (priv->list_store), &iter,
@@ -455,6 +454,10 @@ add_range (EvSidebarThumbnails *sidebar_thumbnails,
page, priv->rotation,
get_scale_for_page (sidebar_thumbnails, page));
+ if (priv->document->iswebdocument) {
+ ev_job_set_run_mode(job, EV_JOB_RUN_MAIN_LOOP);
+ }
+
ev_job_scheduler_push_job (EV_JOB (job), EV_JOB_PRIORITY_HIGH);
g_object_set_data_full (G_OBJECT (job), "tree_iter",