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 596888 - Provide some indication that search is not available
Provide some indication that search is not available
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 166285 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-09-30 15:36 UTC by William Jon McCann
Modified: 2018-05-22 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch adding warning for search in a non-searchable document (3.39 KB, patch)
2009-10-22 11:52 UTC, Marek Kašík
none Details | Review

Description William Jon McCann 2009-09-30 15:36:13 UTC
I just opened a .ps file and tried to search within it.  I typed Cntl+F, "/", Alt+F, clicked the content pane to make sure it had focus and then repeated.  Then started looking through the menus.  Wasn't sure what was going on.  Finally realized that search may be disabled for this type of document.  We should probably show a simple indication that search is not available in these cases.
Comment 1 Carlos Garcia Campos 2009-10-07 11:02:48 UTC
I agree, but I don't how to expose that in the UI. Do you mean showing an info dialog (well in the message are actually) when trying to search? or any other idea?
Comment 2 Matthias Clasen 2009-10-07 13:03:03 UTC
you could use the infobar we have in gtk now
Comment 3 Carlos Garcia Campos 2009-10-07 13:40:37 UTC
(In reply to comment #2)
> you could use the infobar we have in gtk now

We already use it indeed, that's what I meant with "message area" (hmm, there was a typo there :-P)
Comment 4 Reuben Thomas 2009-10-18 20:48:52 UTC
Seconded: I just had similar confusion with a DVI document. In particular, I pressed "/" and nothing happened; there should be some feedback to tell me that I can't search.
Comment 5 William Jon McCann 2009-10-20 20:52:19 UTC
A quick "Search not available for this document" infobar along with a beep might be a simple solution.
Comment 6 Marek Kašík 2009-10-22 11:52:38 UTC
Created attachment 146033 [details] [review]
a patch adding warning for search in a non-searchable document

Hi,

this patch shows warning for a situation when a non-searchable document is opened and user presses "Ctrl-F" or "/". The text is "The document doesn't support search". It doesn't show it when there is no document.
It is implemented through a new action since insensitive actions are not activated (Edit->Find...). Its name is "CtrlF" and is sensitive in the case of non-searchable document (except the situation with no document opened).

Regards

Marek
Comment 7 Emmanuel Fleury 2009-11-14 10:26:30 UTC
*** Bug 166285 has been marked as a duplicate of this bug. ***
Comment 8 romanb 2010-06-09 16:24:16 UTC
Hi, 
I ran into this problem not knowing a pdf could consist only of an image. Simple-scan for example saves it's multipage scans as pdfs. I feel I've been mislead when the app say's it didn't find a word, where in reality no searchable text was in the document. This is not always transparent for the user.
The above described patch is fine for me. But let me word the requirement more broadly:

Any filetype that can be shown with evince that does not have any (via ctrl-f or edit,find) searchable content, shouldn't
 - display the search-bar / offer find in the edit menu
 - allow inputting a search term
 - and return "0 found on this page"
as though a search had taken place.

Ideally: 
 - edit, find is greyed
 - ctrl-f gives an acoustic warning / message as in the patch

But this covers probably just a small number of use cases - pdfs completely without text.

For most cases there will be mixed (image/s and text) pdfs. But these can be misleading. For example 75 pages scanned texts (image) and one line of searchable text. A possible solution could be a visual cue - images and text with different, very light colored backgrounds (or frames). And so as not to interfere with a true representation of the document, the coloration would only take effect when activating search (ctrl-f / edit, find). 
okay. file it under nice to have but not feasible. (But it would be the right thing)
Comment 9 José Aliste 2013-05-13 16:49:30 UTC
Review of attachment 146033 [details] [review]:

I like this, although it does not solve the complete problem, we don't have a way of knowing whether a PDF has text embedded and hence poppler will search something or not. Still, don't know if the message is the correct one, as it's evince which does not support search for backends different from pdf one.
Comment 10 GNOME Infrastructure Team 2018-05-22 13:38:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/105.