GNOME Bugzilla – Bug 323817
'Find next' should also work when find bar isn't displayed
Last modified: 2007-08-27 22:39:20 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.
Agree.
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 ?
Yeah, it was quick and dirty fix for that problem. But I still prefer the behaviour described in comment #1
See #333020 for a related Epiphany bug.
If the search bar does not reappear, this saves viewing space. What are the advantages of making the bar reappear?
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?
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.
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).
I agree with Reinout.
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.
Very nice patch, thanks a lot. Sorry for so long review time.
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?
It's not so critical I suppose