From 560a7e43fe1f899e72130cb4ab1175d325f8e43c Mon Sep 17 00:00:00 2001 From: "Nickolay V. Shmyrev" Date: Thu, 26 May 2005 14:14:43 +0000 Subject: [PATCH] Pop messages from context message queue --- ChangeLog | 6 ++++++ djvu/djvu-document.c | 26 +++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75a90c4c..d16b617d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-05-26 Nickolay V. Shmyrev + + * djvu/djvu-document.c: + + Pop messages from djvu context message queue. + 2005-05-24 Nickolay V. Shmyrev * configure.ac, Makefile.am, shell/Makefile.am: diff --git a/djvu/djvu-document.c b/djvu/djvu-document.c index 72be474b..aa853a71 100644 --- a/djvu/djvu-document.c +++ b/djvu/djvu-document.c @@ -81,9 +81,11 @@ djvu_document_load (EvDocument *document, djvu_document->d_document = doc; - while (!ddjvu_document_decoding_done (djvu_document->d_document)) - ddjvu_message_wait (djvu_document->d_context); - + while (!ddjvu_document_decoding_done (djvu_document->d_document)) { + ddjvu_message_wait (djvu_document->d_context); + ddjvu_message_pop (djvu_document->d_context); + } + return TRUE; } @@ -121,8 +123,10 @@ djvu_document_get_page_size (EvDocument *document, d_page = ddjvu_page_create_by_pageno (djvu_document->d_document, page); - while (!ddjvu_page_decoding_done (d_page)) - ddjvu_message_wait (djvu_document->d_context); + while (!ddjvu_page_decoding_done (d_page)) { + ddjvu_message_wait (djvu_document->d_context); + ddjvu_message_pop (djvu_document->d_context); + } if (width) *width = ddjvu_page_get_width (d_page) * SCALE_FACTOR; @@ -147,8 +151,10 @@ djvu_document_render_pixbuf (EvDocument *document, d_page = ddjvu_page_create_by_pageno (djvu_document->d_document, page); - while (!ddjvu_page_decoding_done (d_page)) - ddjvu_message_wait (djvu_document->d_context); + while (!ddjvu_page_decoding_done (d_page)) { + ddjvu_message_wait (djvu_document->d_context); + ddjvu_message_pop (djvu_document->d_context); + } page_width = ddjvu_page_get_width (d_page) * scale * SCALE_FACTOR; page_height = ddjvu_page_get_height (d_page) * scale * SCALE_FACTOR; @@ -266,8 +272,10 @@ djvu_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document, pixels = gdk_pixbuf_get_pixels (pixbuf); } - while (ddjvu_thumbnail_status (djvu_document->d_document, page, 1) < DDJVU_JOB_OK) - ddjvu_message_wait (djvu_document->d_context); + while (ddjvu_thumbnail_status (djvu_document->d_document, page, 1) < DDJVU_JOB_OK) { + ddjvu_message_wait (djvu_document->d_context); + ddjvu_message_pop (djvu_document->d_context); + } ddjvu_thumbnail_render (djvu_document->d_document, page, &thumb_width, &thumb_height, -- 2.43.5