Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-pixbuf-cache.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-01-07 13:18:28 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2006-01-07 13:18:28 (GMT)
commiteb3d8c8e3df570e32e2591eeb650de55dba2f613 (patch)
treec5bc36c96ca488c1d8e3831b9f6148993e3a21ce /shell/ev-pixbuf-cache.c
parentc18ba99a47d356a013ac74febcfca6f8f0e18dd5 (diff)
Dual mode places even pages to the left. Fix for the bug #309393.
* shell/ev-page-cache.c: (build_height_to_page), (ev_page_cache_get_height_to_page): * shell/ev-page-cache.h: * shell/ev-view.c: (view_update_range_and_current_page), (get_page_y_offset), (get_page_extents), (ev_view_next_page), (ev_view_previous_page): Dual mode places even pages to the left. Fix for the bug #309393. * shell/ev-view.h: * shell/ev-window.c: (update_action_sensitivity), (setup_view_from_metadata), (view_menu_popup_cb): Don't restore presentation in empty windows, more intelligent next page behaviour in dual mode. * shell/ev-pixbuf-cache.c: (check_job_size_and_unref), (ev_pixbuf_cache_clear_job_sizes): Cleanup job callback on removal. Fix for the bug #325886.
Diffstat (limited to 'shell/ev-pixbuf-cache.c')
-rw-r--r--shell/ev-pixbuf-cache.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/shell/ev-pixbuf-cache.c b/shell/ev-pixbuf-cache.c
index f363e70..fff1249 100644
--- a/shell/ev-pixbuf-cache.c
+++ b/shell/ev-pixbuf-cache.c
@@ -230,7 +230,8 @@ job_finished_cb (EvJob *job,
* given a scale. If it won't, it removes the job and clears it to NULL.
*/
static void
-check_job_size_and_unref (CacheJobInfo *job_info,
+check_job_size_and_unref (EvPixbufCache *pixbuf_cache,
+ CacheJobInfo *job_info,
EvPageCache *page_cache,
gfloat scale)
{
@@ -252,12 +253,11 @@ check_job_size_and_unref (CacheJobInfo *job_info,
height == EV_JOB_RENDER (job_info->job)->target_height)
return;
- /* Try to remove the job. If we can't, then the thread has already
- * picked it up and we are going get a signal when it's done. If we
- * can, then the job is fully dead and will never rnu.. */
- if (ev_job_queue_remove_job (job_info->job))
- g_object_unref (job_info->job);
-
+ g_signal_handlers_disconnect_by_func (job_info->job,
+ G_CALLBACK (job_finished_cb),
+ pixbuf_cache);
+ ev_job_queue_remove_job (job_info->job);
+ g_object_unref (job_info->job);
job_info->job = NULL;
}
@@ -464,12 +464,12 @@ ev_pixbuf_cache_clear_job_sizes (EvPixbufCache *pixbuf_cache,
page_cache = ev_page_cache_get (pixbuf_cache->document);
for (i = 0; i < PAGE_CACHE_LEN (pixbuf_cache); i++) {
- check_job_size_and_unref (pixbuf_cache->job_list + i, page_cache, scale);
+ check_job_size_and_unref (pixbuf_cache, pixbuf_cache->job_list + i, page_cache, scale);
}
for (i = 0; i < pixbuf_cache->preload_cache_size; i++) {
- check_job_size_and_unref (pixbuf_cache->prev_job + i, page_cache, scale);
- check_job_size_and_unref (pixbuf_cache->next_job + i, page_cache, scale);
+ check_job_size_and_unref (pixbuf_cache, pixbuf_cache->prev_job + i, page_cache, scale);
+ check_job_size_and_unref (pixbuf_cache, pixbuf_cache->next_job + i, page_cache, scale);
}
}