[Geany-devel] interactive typeahead seach for the sidebar

Thomas Martitz thomas.martitz at xxxxx
Sat Aug 15 19:19:53 UTC 2009


So, I'm always having multiple dozens of files open, some of which 
define even more symbols.

At that point I began to really miss the search you can do in the file 
open/save dialog (while typing search, the gtk docs say interactive or 
typeahead search).

I looked at it and got it sort of working (see 
http://www.alice-dsl.net/simonemartitz/geany.png), however I ran into 
some problems.

a) switching focus to the editor widget. When using the keyboard to do 
the search, the first match will be selected. As of now, selecting 
something in the list automagically switches the focus to the editor. 
That is of course unwanted while you're searching as it will stop and 
break the search basically upon entering the first character. In a work 
around, I disabled this switching if the selection happened by using the 
keyboard. This works well for the symbol list, but not at all for the 
open file list (which still changes the focus).

b) opening files doesn't bring it in front anymore. I removed the 
"changed" signal for the open file list as it's incompatible with 
searching. but that broke opening files as the mechanism to bring the 
open file up relies on the sidebar here. For this, I thought the 
"bringing the new doc up" code could be moved to the opening document 
code (document.c), and the sidebar handler just does a call 
document_open_file(). Would that work?


So, I basically want to discuss about a) if this feature is wanted and 
b) about the two problems that showed up.

I really love this feature already.

Attached is my diff.

Best regards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dyn-seach-sidebar.diff
Type: text/x-patch
Size: 11321 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20090815/1fd81d9c/attachment.bin>


More information about the Devel mailing list