Re: Search in toolbar
occ <[email protected]> Wed, 01 Mar 2006 22:16:29 +0000
| Newsgroups | gmane.comp.gnome.apps.pybliographer |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2006-03-01 at 22:12 +0100, Frederic Gobry wrote: > > Search as you type is a good feature too. I tried this with the toolbar > > search but with 1000+ bib entries the search time for each keystroke > > gets a bit long on my old computer (although i don't suppose this is a > > real problem). > > Yup, it is certainly not optimized :-( There is a nice behaviour that I've seen (in for instance google suggest) can be used to limit the number of searches for searching as you type. You do something like: On each keystroke you: - set a short timer (0.2-0.5 seconds i guess) with the search method in the callback - cancel the existing timer if there is one active This should be fairly trivial with whatever the equivalent of gtk_timeout_add/remove is in the python bindings and is probably quicker than making the search faster. > > I don't think that one approach is necessarily better than the other, it > > just struck me that the search-in-toolbar as seen in > > firefox/rhythmbox/itunes (and the forthcoming versions of nautilus and > > yelp) seemed like a good idea for an app where searching is one of the > > things i am typically doing most. > > Right. I'm buying your patch :-) Unfortunately, in recent versions the > way the toolbar is handled is a bit different, so I need to almost > rewrite it :-( I encourage you to! Also it would be nice if the search button (if there still is one) was less ugly (i.e. stretching to fill the vertical toolbar) than in my version. > > I think one of the things which i found slightly counter-intuitive with > > the existing search dialog was the fact that by default, clicking find > > and then entering a search refines the existing filter, rather than > > creating a new one. I like the hierarchical tree search, but most of > > the time i actually want to create a new search, and for some reason my > > brain is not expecting the refinement behaviour (resulting in having to > > repeat the search...). > > Interesting. For that problem, having the toolbar search seems to be > enough, as it provides this "start a new search" behavior naturally. Yep. owen ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642