GNOME Bugzilla – Bug 756683
Search results not displayed with correct page number
Last modified: 2015-10-18 16:03:26 UTC
Created attachment 313424 [details] Screenshot For a pdf document with separate page ranges for front- and main matter evince can handle the display of the page number correctly in the page field, and ctrl-l will take me to the correct number. When I then search for a word a sidebar is opened with the search results, on which also the page numbers are listed. However, these page numbers are absolute numbers in the pdf, not the numbers within the respective page range. As an example a screenshot of a document with four pages, i,ii,1,2, with a hit for the search on every page, which get displayed as 1,2,3,4, only with the frontmatter hits prefixed by the roman number.
Created attachment 313425 [details] sample document with separate pageranges for frontmatter and mainmatter
Created attachment 313475 [details] [review] find-sidebar: show the page label instead of page number. This patch add an extra column into the model for the page label, and uses this one to display in the sidebar. It keeps the current page in the model every other operation.
(In reply to Germán Poo-Caamaño from comment #2) > Created attachment 313475 [details] [review] [review] > find-sidebar: show the page label instead of page number. > > This patch add an extra column into the model for the page label, and uses > this one to display in the sidebar. > > It keeps the current page in the model every other operation. I'm trying to apply your patch to the debian source package in Ubuntu 14.04, but "Hunk #2 FAILED at 175.", I guess because of the patches already applied to it. How do I best proceed now?
(In reply to Germán Poo-Caamaño from comment #2) > Created attachment 313475 [details] [review] [review] > find-sidebar: show the page label instead of page number. > > This patch add an extra column into the model for the page label, and uses > this one to display in the sidebar. > > It keeps the current page in the model every other operation. (In reply to Peter Pasedach from comment #3) > (In reply to Germán Poo-Caamaño from comment #2) > > Created attachment 313475 [details] [review] [review] [review] > > find-sidebar: show the page label instead of page number. > > > > This patch add an extra column into the model for the page label, and uses > > this one to display in the sidebar. > > > > It keeps the current page in the model every other operation. > > I'm trying to apply your patch to the debian source package in Ubuntu 14.04, > but "Hunk #2 FAILED at 175.", I guess because of the patches already applied > to it. How do I best proceed now? I now tried it with the 3.10.3 source tarball from the gnome ftp server but get the same error (on a dry run).
I applied the changes against master, which is > 3.18. Several versions ahead.
You can try to adapt the patch to earlier versions, though.
(In reply to Germán Poo-Caamaño from comment #6) > You can try to adapt the patch to earlier versions, though. Well, I tried. Removed Hunk #2 from your patch, as the 3.10.3 doesn't have a ev_find_sidebar_reset_model . After that the patch applies and it builds. I installed the generated deb files, evince opens, but when I try to do a search it crashes.
Peter, I am sorry, but we can't fix bugs on Earlier versions of Evince. Specially evince 3.10 is 4 years old... Of course you can't adapt the patch, but if you have problems with adapting the patch, the discussion does not belong to this patch.
Review of attachment 313475 [details] [review]: Pushed in master