After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 452472 - [patch] have hipo use TreeModelFilter instead of plain search
[patch] have hipo use TreeModelFilter instead of plain search
Status: RESOLVED FIXED
Product: hipo
Classification: Deprecated
Component: general
Trunk
Other Linux
: Normal enhancement
: 0.6
Assigned To: Pedro Villavicencio
Pedro Villavicencio
Depends on:
Blocks:
 
 
Reported: 2007-06-30 06:39 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2007-10-12 02:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Uses TreeModelFilter in hipo (2.19 KB, patch)
2007-06-30 06:40 UTC, Diego Escalante Urrelo (not reading bugmail)
needs-work Details | Review
Second version (2.91 KB, patch)
2007-10-08 18:18 UTC, Benoit Garret
needs-work Details | Review
third patch (almost identical to second) (2.98 KB, patch)
2007-10-09 16:56 UTC, Basilio Kublik
committed Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2007-06-30 06:39:26 UTC
Attached patch does what subject says.
However it's kind of ugly hacked, just wanted to give myself the feeling of it-was-worth-learning-to-use-gtk-tree-model, so it's attached.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2007-06-30 06:40:43 UTC
Created attachment 90917 [details] [review]
Uses TreeModelFilter in hipo

As a base or reference for other patches, clever minds will spot the monodoc stolen code.
Comment 2 Pedro Villavicencio 2007-07-02 21:54:08 UTC
I like it, just a couple of things, for example if you search for "Monodoc" and your file is tagged as "monodoc" no results are found, this is really easy to fix, just add a ToLower or ToUpper (as you wish) in the SearchFilterFunc. 

The other issue is if you change to a playlist and do the search in there, you get the results based in the other model (tracks one) instead of the playlist one. I think that is a good option to disable the search while you're editing a playlist, it doesnt make too much sense to me having a search in there, you know is more important a search in the tracks view where you have like thousand of songs and not in a playlist where you usually have like 10 or 20 songs.

I'm subscribing Felipe in case he want to say something about it, cause he's working in a hot search UI.
Comment 3 Benoit Garret 2007-10-08 18:18:38 UTC
Created attachment 96892 [details] [review]
Second version

Took the case in consideration when searching.
Made searching work in playlists.

I agree about the hack nature of this patch, but the code in hipo isn't really a model of cleanliness to begin with. This patch didn't crash for me but I feel it should be tested again, it has the potential to break everything seriously.
Comment 4 Basilio Kublik 2007-10-09 16:56:39 UTC
Created attachment 96947 [details] [review]
third patch (almost identical to second)

It works for me, but with some issues, for instance, if I search with a term using upper-case, only shows matches within "title" tag.
Comment 5 Pedro Villavicencio 2007-10-12 02:07:22 UTC
committed to trunk, thanks.