After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 323817 - 'Find next' should also work when find bar isn't displayed
'Find next' should also work when find bar isn't displayed
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
0.4.x
Other Linux
: Normal minor
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-11 19:46 UTC by Reinout van Schouwen
Modified: 2007-08-27 22:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
search-allow-find-again-while-findbar-is-hidden.patch (6.68 KB, patch)
2007-08-14 23:46 UTC, Justin Blanchard
committed Details | Review

Description Reinout van Schouwen 2005-12-11 19:46:27 UTC
1. Open a document
2. Search for some word using Edit > Find
3. Click outside the find bar to unfocus it
4. Press Ctrl+G or choose Edit > Next

Expected results: 
Find bar reappears and searches for next match

Actual results:
Nothing happens

If the current behaviour is intended, then 'Edit > Next' should still be disabled.
Comment 1 Nickolay V. Shmyrev 2005-12-29 16:44:03 UTC
Agree.
Comment 2 Antoine Dopffer 2006-02-19 14:06:21 UTC
Hello,

The beahaviour is not the same with the cvs head version.
With the cvs head version (0.5.0), the 'Edit > Next' is disabled when the find bar has lost the focus (but the find bar doesn't reappear when pressing Ctrl+G). 
Is this the desired beahaviour ?
Should this bug be closed ?
Comment 3 Nickolay V. Shmyrev 2006-02-19 18:06:23 UTC
Yeah, it was quick and dirty fix for that problem. But I still prefer the behaviour described in comment #1
Comment 4 Wouter Bolsterlee (uws) 2006-04-30 21:59:15 UTC
See #333020 for a related Epiphany bug.
Comment 5 Philip Ganchev 2007-02-22 01:21:35 UTC
If the search bar does not reappear, this saves viewing space.  What are the advantages of making the bar reappear?
Comment 6 Fabricio Silva 2007-04-12 21:19:42 UTC
making the findbar reappear allows user to get messages like "Not found" or "x results on this page". Findbar is a more appropriate place than the statusbar, isn't it?
Comment 7 Philip Ganchev 2007-04-13 06:57:53 UTC
Yes; actually Evince does not have a status bar.

In any case, executing "find again" should show the next match, regardless of whether the search bar is showing.  Whether it should also bring up the search bar is a side issue I raised because of the wording of the original post.

I think that when doing "find again", the user knows what he is searching for and can see the highlighted results; so the screen space is better used to show the document than the search bar and messages.  If the user wants to see messages, he can bring up the search bar manually by executing "Find" first.  In Firefox, "find again" brings up the search bar only if the search fails.
Comment 8 Reinout van Schouwen 2007-08-13 12:40:20 UTC
I disagree with Philip here, we should strive to make things as obvious as possible to the user so the find bar should appear when doing a Find Next (cf. Epiphany).
Comment 9 Wouter Bolsterlee (uws) 2007-08-13 12:53:35 UTC
I agree with Reinout.
Comment 10 Justin Blanchard 2007-08-14 23:46:55 UTC
Created attachment 93697 [details] [review]
search-allow-find-again-while-findbar-is-hidden.patch

I agree with Reinout and Wouter. This also makes it obvious when search results should be highlighted: when the search bar is showing. This patch is an attempt to make evince behave this way, fully fixing this bug. Tests on a big djvu file are looking good. Perhaps the logic behind ev_view_can_find_{next,previous} can be improved as well, however. And...

Possible regression: Under some conditions, we'll highlight a search result and then hide it behind the findbar. :) I suspect this is new and happens because a find-again will toggle the chrome flag, do the search, and then show the bar when it's time to redraw. If the patch looks OK otherwise could somebody show me a clean work-around? (I don't know GTK well.)

Side effect: We'll continue searching when the bar is hidden and remember results when it's shown again. I see this as positive, but it is more expensive...

Random: Fixed a search-related leak in the djvu backend along the way...

Criticism or questions would be appreciated.
Comment 11 Nickolay V. Shmyrev 2007-08-27 21:39:02 UTC
Very nice patch, thanks a lot. Sorry for so long review time.
Comment 12 Justin Blanchard 2007-08-27 22:32:19 UTC
Thank you! I knew you were paying attention when I saw the mem-leak part get committed =)  Am I correct though in assuming the "find bar can cover up search results" regression is still an issue?
Comment 13 Nickolay V. Shmyrev 2007-08-27 22:39:20 UTC
It's not so critical I suppose