]> www.fi.muni.cz Git - evince.git/commitdiff
ignore page offset here, to make search results independent of it,
authorStephane LOEUILLET <stephane.loeuillet@tiscali.fr>
Sun, 23 Jan 2005 20:49:04 +0000 (20:49 +0000)
committerMartin Kretzschmar <martink@src.gnome.org>
Sun, 23 Jan 2005 20:49:04 +0000 (20:49 +0000)
2005-01-23  Stephane LOEUILLET  <stephane.loeuillet@tiscali.fr>

* pdf/xpdf/pdf-document.cc (pdf_document_search_page_changed):
ignore page offset here, to make search results independent of it,

* shell/ev-view.c (expose_bin_window): but take offsets into
account here. Bug #164932

ChangeLog
pdf/xpdf/pdf-document.cc
shell/ev-view.c

index c50966d8f52eecd70fc47eecf24b9a06f8603682..d2a384ddb4e3f191b3ae01cb55d4e3a938136f86 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2005-01-23  Stephane LOEUILLET  <stephane.loeuillet@tiscali.fr>
 
+       * pdf/xpdf/pdf-document.cc (pdf_document_search_page_changed):
+       ignore page offset here, to make search results independent of it,
+
+       * shell/ev-view.c (expose_bin_window): but take offsets into
+       account here. Bug #164932
+
        * pdf/xpdf/pdf-document.cc (pdf_document_get_link): divide by
        scale at the right time. Bug #164996
 
index 8449752bd80287ac9a06c7e4af77a80368357b1e..22e7e4138ad3f5e543d3fce0ecfddcfc62b6180d 100644 (file)
@@ -484,8 +484,8 @@ pdf_document_search_page_changed (PdfDocumentSearch   *search)
                                          &xMin, &yMin, &xMax, &yMax)) {
                 result.page_num = pdf_document->page;
 
-                result.highlight_area.x = xMin + pdf_document->page_x_offset;
-                result.highlight_area.y = yMin + pdf_document->page_y_offset;
+                result.highlight_area.x = xMin;
+                result.highlight_area.y = yMin;
                 result.highlight_area.width = xMax - xMin;
                 result.highlight_area.height = yMax - yMin;
 
@@ -499,8 +499,8 @@ pdf_document_search_page_changed (PdfDocumentSearch   *search)
 
                         result.page_num = pdf_document->page;
 
-                        result.highlight_area.x = xMin + pdf_document->page_x_offset;
-                        result.highlight_area.y = yMin + pdf_document->page_y_offset;
+                        result.highlight_area.x = xMin;
+                        result.highlight_area.y = yMin;
                         result.highlight_area.width = xMax - xMin;
                         result.highlight_area.height = yMax - yMin;
 
index 6997c5d36e5a5e2f7ff760315d08ef5ae3fe83ee..0a7622368601ff4442320a2e8de341e2856a7485 100644 (file)
@@ -414,9 +414,16 @@ expose_bin_window (GtkWidget      *widget,
                             results[i].highlight_area.width,
                             results[i].highlight_area.height);
 #endif
-               if (results[i].page_num == current_page)
+               if (results[i].page_num == current_page) {
+                       GdkRectangle highlight_area_fixed;
+                       highlight_area_fixed.x = results[i].highlight_area.x + x_offset + 1;
+                       highlight_area_fixed.y = results[i].highlight_area.y + y_offset + 1;
+                       highlight_area_fixed.width = results[i].highlight_area.width;
+                       highlight_area_fixed.height = results[i].highlight_area.height;
+
                        draw_rubberband (widget, view->bin_window,
-                                        &results[i].highlight_area);
+                                        &highlight_area_fixed);
+               }
                 ++i;
         }