From 683022d92b63bea1544e8d19bc57d47ef84f5fff Mon Sep 17 00:00:00 2001 From: rootavish Date: Wed, 6 Aug 2014 17:22:34 +0530 Subject: 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. --- shell/ev-sidebar-thumbnails.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'shell/ev-sidebar-thumbnails.c') 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", -- cgit v1.2.1