]> www.fi.muni.cz Git - evince.git/commitdiff
Remove the locks around get_n_results
authorMarco Pesenti Gritti <mpg@redhat.com>
Sat, 21 May 2005 17:41:29 +0000 (17:41 +0000)
committerMarco Pesenti Gritti <marco@src.gnome.org>
Sat, 21 May 2005 17:41:29 +0000 (17:41 +0000)
2005-05-21  Marco Pesenti Gritti  <mpg@redhat.com>

        * 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  <j@bitron.ch>

        * pdf/ev-poppler.c: (pdf_document_ps_exporter_begin):

        Pass correct number of pages to poppler.

ChangeLog
pdf/ev-poppler.cc
shell/ev-view.c

index 8240a131ddc0a24e603514c8902af25b27b6c15c..8c81cd14aae19973dbf599bb3ba053a02fe91a07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2005-05-21  Marco Pesenti Gritti  <mpg@redhat.com>
+
+       * 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  <j@bitron.ch>
+
+       * pdf/ev-poppler.c: (pdf_document_ps_exporter_begin):
+
+       Pass correct number of pages to poppler.
+
 2005-05-21  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * configure.ac:
index 082c3dc971058c600bc5f5b1028e1409ca5ae41e..bd3151a6bc9d5e3c8b399ff7821ce351443a73fe 100644 (file)
@@ -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
index d166a5ea0ca1900d5870eb2dd09c26c67f47b963..ef0ddf48b8f739f5ab3426f003cdb01fd4a1a88a 100644 (file)
@@ -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);