[Rhythmbox-devel] searching



Hi Colin,

After looking at the screenshot at
http://yammi.sourceforge.net/screenshot1.gif I wondered how hard it would
be to implement fuzzy searching with RB-supplied data. So I went ahead and
tried to implement it.

The attached file (compile with "gcc `pkg-config --cflags --libs
libxml-2.0 gtk+-2.0` -o search search.c") does exactly this. It reads the
net-rb library (or a compatible file specified as command line argument)
and presents a little interface for searching and displaying results.

The code is commented in an ok sort of way, so you might actually even
look at the code. It still uses libparty names, as I want it to go there
eventually.
The ratings can still be improved (and the way they're calculated is still
quite random) but it's actually working well so I thought I'll send it.
It's not done as diff as I have no idea about how the RB UI works and it
would probably require some redesign (we need a percentage column?).

I don't know what you think about using this for searching instead of the
current algorithm, so let me know.

Benjamin

PS: If somebody has speed issues: It's not optimized and the treeview eats
up quite a lot of time, too - especially when you sort the rating column.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]