From: Stephane LOEUILLET Date: Sun, 23 Jan 2005 20:49:04 +0000 (+0000) Subject: ignore page offset here, to make search results independent of it, X-Git-Tag: EVINCE_0_1_1~2 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=cb01b3eec8e8524674335371c87b0d25f0c9c707;p=evince.git ignore page offset here, to make search results independent of it, 2005-01-23 Stephane LOEUILLET * 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 --- diff --git a/ChangeLog b/ChangeLog index c50966d8..d2a384dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2005-01-23 Stephane LOEUILLET + * 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 8449752b..22e7e413 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 6997c5d3..0a762236 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; }