From: Marco Pesenti Gritti Date: Sat, 21 May 2005 17:41:29 +0000 (+0000) Subject: Remove the locks around get_n_results X-Git-Tag: EVINCE_0_3_1~1 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=d4959e0635eba426bbd00cbc1892c730a28e7f37;p=evince.git Remove the locks around get_n_results 2005-05-21 Marco Pesenti Gritti * shell/ev-view.c: (jump_to_find_result), (ev_view_can_find_next), (ev_view_find_next), (ev_view_find_previous): Remove the locks around get_n_results 2005-05-21 Juerg Billeter * pdf/ev-poppler.c: (pdf_document_ps_exporter_begin): Pass correct number of pages to poppler. --- diff --git a/ChangeLog b/ChangeLog index 8240a131..8c81cd14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2005-05-21 Marco Pesenti Gritti + + * shell/ev-view.c: (jump_to_find_result), (ev_view_can_find_next), + (ev_view_find_next), (ev_view_find_previous): + + Remove the locks around get_n_results + +2005-05-21 Juerg Billeter + + * pdf/ev-poppler.c: (pdf_document_ps_exporter_begin): + + Pass correct number of pages to poppler. + 2005-05-21 Nickolay V. Shmyrev * configure.ac: diff --git a/pdf/ev-poppler.cc b/pdf/ev-poppler.cc index 082c3dc9..bd3151a6 100644 --- a/pdf/ev-poppler.cc +++ b/pdf/ev-poppler.cc @@ -874,7 +874,8 @@ pdf_document_ps_exporter_begin (EvPSExporter *exporter, const char *filename, PdfDocument *pdf_document = PDF_DOCUMENT (exporter); pdf_document->ps_file = poppler_ps_file_new (pdf_document->document, filename, - first_page, last_page); + first_page, + last_page - first_page + 1); } static void diff --git a/shell/ev-view.c b/shell/ev-view.c index d166a5ea..ef0ddf48 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -2446,10 +2446,8 @@ update_find_status_message (EvView *view) } else { double percent; - ev_document_doc_mutex_lock (); percent = ev_document_find_get_progress (EV_DOCUMENT_FIND (view->document)); - ev_document_doc_mutex_unlock (); if (percent >= (1.0 - 1e-10)) { message = g_strdup (_("Not found")); } else { @@ -2490,15 +2488,11 @@ jump_to_find_result (EvView *view) int n_results; int page = view->find_page; - ev_document_doc_mutex_lock (); n_results = ev_document_find_get_n_results (find, page); - ev_document_doc_mutex_unlock (); if (n_results > view->find_result) { - ev_document_doc_mutex_lock (); ev_document_find_get_result (find, page, view->find_result, &rect); - ev_document_doc_mutex_unlock (); doc_rect_to_view_rect (view, page, &rect, &view_rect); ensure_rectangle_is_visible (view, &view_rect); @@ -2542,9 +2536,7 @@ ev_view_can_find_next (EvView *view) if (EV_IS_DOCUMENT_FIND (view->document)) { EvDocumentFind *find = EV_DOCUMENT_FIND (view->document); - ev_document_doc_mutex_lock (); n_results = ev_document_find_get_n_results (find, view->current_page); - ev_document_doc_mutex_unlock (); } return n_results > 0; @@ -2558,9 +2550,7 @@ ev_view_find_next (EvView *view) EvDocumentFind *find = EV_DOCUMENT_FIND (view->document); page_cache = ev_document_get_page_cache (view->document); - ev_document_doc_mutex_lock (); n_results = ev_document_find_get_n_results (find, view->current_page); - ev_document_doc_mutex_unlock (); n_pages = ev_page_cache_get_n_pages (page_cache); @@ -2590,9 +2580,7 @@ ev_view_find_previous (EvView *view) page_cache = ev_document_get_page_cache (view->document); - ev_document_doc_mutex_lock (); n_results = ev_document_find_get_n_results (find, view->current_page); - ev_document_doc_mutex_unlock (); n_pages = ev_page_cache_get_n_pages (page_cache);