Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephane LOEUILLET <stephane.loeuillet@tiscali.fr>2005-01-23 20:49:04 (GMT)
committer Martin Kretzschmar <martink@src.gnome.org>2005-01-23 20:49:04 (GMT)
commitcb01b3eec8e8524674335371c87b0d25f0c9c707 (patch)
tree7316fb31bf557fcd7828b60fd88b5548a1824ca1
parente88fdc41fa5cec99684fdef7d7063c67a8eb917f (diff)
ignore page offset here, to make search results independent of it,
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
-rw-r--r--ChangeLog6
-rw-r--r--pdf/xpdf/pdf-document.cc8
-rw-r--r--shell/ev-view.c11
3 files changed, 19 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index c50966d..d2a384d 100644
--- 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
diff --git a/pdf/xpdf/pdf-document.cc b/pdf/xpdf/pdf-document.cc
index 8449752..22e7e41 100644
--- a/pdf/xpdf/pdf-document.cc
+++ b/pdf/xpdf/pdf-document.cc
@@ -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;
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 6997c5d..0a76223 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -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;
}