| Issue 149: | Highlight search results so they can be found on the screen | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. search for something in command output 2. 3. What is the expected output? What do you see instead? Searching does work, but without highlighting it is difficult to find the result on the screen. What version of the product are you using? On what operating system? 0.710, Ubuntu Gusty, KDE Please provide any additional information below. Perhaps this is specific to my own messed up install, but I don't see anything in the code that highlights search results in command output. The attached patch fixes it for me. I'm sure the attached patch also makes it clear that I'm not a gtk programmer. |
|
,
Feb 13, 2008
The search area works by selecting the matching text, so you should see the same effect as if you click and drag to select an area. Do you have a custom GTK+ theme that might not be working?
Status: Accepted
Owner: cgwalters Labels: -Type-Defect Type-Patch |
|
,
Feb 13, 2008
Well, I'm running KDE so I haven't customized gtk at all. But, the selected text doesn't look right at all ;) Text I select in gvim and firefox works fine. |
|
,
Feb 13, 2008
Hm, it seems possible though that your distribution has installed something like gtk-qt (http://freedesktop.org/wiki/Software/gtk-qt) which would change the GTK+ theme based on your Qt theme. Can you attach a screenshot? I'm guessing that selecting text (just click and drag) in the Hotwire text view doesn't work too? |
|
,
Feb 13, 2008
Can you try running the attached test program? If clicking and dragging doesn't seem to work, then something is wrong with the GTK+ theme or installation. |
|
,
Feb 13, 2008
I ran the gnome control center, and the themes were just plain corrupted. After some fiddling and reinstalling of packages, selecting text works properly. I do like the yellow to grab your attention, strictly speaking this is fixed here. |
|
,
Feb 13, 2008
I took a quick look at some other apps: GEdit: GTK+ theme selection color for current match, and yellow for other matches Firefox: Non-theme color (Green) for current, and has a separate "Highlight all" button. The non-theme color makes sense since web pages don't match toolkit theme Eclipse: GTK+ theme selection color for current, no highlightin of other matches I think a combination of the GEdit and Eclipse styles would make sense probably - theme selection for current, yellow for others, with a button to toggle on/off others. It'd probably be good to think about adding regexp/case options to the search too. The gedit code is in gedit/gedit/gedit-document.c, we might be able to translate that to Python. |
|
,
Feb 14, 2008
Ok, here is a respin: * current match is selected (just like before) * All matches are yellow * Button to toggle highlight all This isn't the most efficient implementation around. Highlight all duplicates the searching. The firefox highlight all button changes colors to indicate the current state. Mine isn't quite that cool. |
|
,
Feb 14, 2008
Wow, sounds great! It seems that the patch got corrupted somehow, it appears to be 0 bytes? You might name the file ending in .patch since I think that'll help the issue tracker pick up the right MIME type. |
|
,
Feb 14, 2008
Whoops, sorry about that, lets try the attachment again |
|
,
Feb 14, 2008
I've added this to SVN: Committed r1065 M hotwire_ui/inlinesearch.py r1065 = 417c7b224ee3fcbe586fb44fb61da7dc88ef8793 (git-svn) I tweaked it a bit with these changes: * Add some infrastructure for hooking up to GTK+ style changes so we can change the tag color (it looks like GEdit uses GtkSourceView's functionality for this, but currently we don't have a hard dep on GtkSourceView. Perhaps we should..) * Highlight state is slaved to gtk.CheckButton rather than a separate member variable, fixes state synchronization * Add gettext call _ around button name Thanks a lot for this patch!
Status: Fixed
|
|
|
|