Patch: Search in the cache list

1 view
Skip to first unread message

Ville Jäppinen

unread,
Jul 26, 2010, 7:16:28 AM7/26/10
to geoh...@googlegroups.com
Hi all.

I stumbled across a tutorial to implement a local search for an
activity. I gave it a shot and turns out it's not all that difficult to
define custom functionality for the search-button.

Here's my swing at the search feature. It works like this: You hit the
search button when in list view. Type in a part of a name or id of
wanted cache. Hit search and the list scrolls to first matching cache in
the list (this search is case insensitive). It's not very fast, but
kicks ass compared to manually scrolling few hundred or thousand caches
;) And it doesn't show any busy dialogs etc.

The attached patch is taken from the waypoint-branch, but it should work
with trunk also.
Try it out if you feel you'd need a search feature.

Ville

search.patch

Anders Petersson

unread,
Aug 22, 2010, 4:55:43 PM8/22/10
to geohunter
Ville,
I intended to check this out but... I haven't. The search button isn't used for anything else so if the patch works well you're free to commit it even though it only searches in the currently visible list.

/Andeers

Ville

unread,
Aug 23, 2010, 12:53:47 PM8/23/10
to geoh...@googlegroups.com
I don't know if it works well.  It's not very polished like there are no messages to the user when search takes long or if no caches were found etc. But it better than nothing most of the time =) Still, beats the available alternative (scrolling down the list).

Ville

LEGO Cacher

unread,
Aug 31, 2010, 11:21:55 PM8/31/10
to GeoHunter
Anders:
I had an idea about implementing "Search". A temporary filter could be
created (or we could allocate a dedicated one) and applied using the
entered search string.

On Aug 23, 12:53 pm, Ville <vpj...@gmail.com> wrote:
> I don't know if it works well.  It's not very polished like there are no
> messages to the user when search takes long or if no caches were found
> etc. But it better than nothing most of the time =) Still, beats the
> available alternative (scrolling down the list).
>
> Ville
>
> On 08/22/2010 11:55 PM, Anders Petersson wrote:
>
> > Ville,
> > I intended to check this out but... I haven't. The search button isn't
> > used for anything else so if the patch works well you're free to
> > commit it even though it only searches in the currently visible list.
>
> > /Andeers
>

Anders Petersson

unread,
Sep 1, 2010, 3:42:42 AM9/1/10
to geoh...@googlegroups.com
That seems reasonable.
The filter class is pretty tied up with the notion of saving/loading from preferences so that might need a slight change. We could possibly just use a special filter name to signal that the filter is a special case.
/Anders
Reply all
Reply to author
Forward
0 new messages