Search in help does not issue "not found" notification

Bug #1280686 reported by Benjamin Eltzner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Fix Released
Wishlist
Benjamin Eltzner

Bug Description

It may be confusing to users that the search in the help file does not issue a pop-up message if the search term was not found. The fact that the help files tend to be partly translated for most supported languages add to this problem. As I have contributed to the code for the help search, I would be willing to add a suitable pop-up myself. (This bug report is also a reminder for myself.)

Revision history for this message
Benjamin Eltzner (b-eltzner) wrote :

So I finally found the time to do it. Please find a patch appended. It may be unecessarily clumsy, as I am not sure, whether
if(m_searchLineEdit->palette() != *(new QPalette()))
{
    m_searchLineEdit->setPalette(*(new QPalette()));
}
is better than just
m_searchLineEdit->setPalette(*(new QPalette()));
performance-wise or whether that is relevant. It also features an explanatory source code comment that may be removed and a for-loop that might want to be replaced by a for-each-loop. :-)

Otherwise I am pretty sure it works as expected and provides an enhancement.

Revision history for this message
Adam Reichold (adamreichold) wrote :

Hello Benjamin,

thank you for your contribution! I committed it with some slight modifications (c.f. trunk revision 1461):
  * I added a type-conversion check for disabling the default button properties.
  * I replaced the QPalette-based approach using a per-widget style sheet which IMHO is much simpler.
  * I added showing a green background when the term is found.

I'd also like to give me feedback whether you want to fine tune the colors used in the style sheets some more and whether the additional green background better or worse than without it. Thanks.

Best regards, Adam.

Revision history for this message
Benjamin Eltzner (b-eltzner) wrote :

Hi, thanks for merging this to trunk. I would however prefer milder colors by default, something like #ff8080 and #80ff80, in the interest of accessibility (and not hurting my eyes). :-) Otherwise, I am glad you fixed my flawed code; I am obviously too used to garbage collection...

Changed in qpdfview:
milestone: none → 0.4.9
status: In Progress → Fix Committed
Changed in qpdfview:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.