Re: Searching a GtkTreeView
- From: Micheal Smith <xulfer cheapbsd net>
- To: gtk-app-devel-list gnome org
- Subject: Re: Searching a GtkTreeView
- Date: Thu, 18 Mar 2010 18:47:14 -0500
On 03/18/10 06:29 PM, Carlos Pereira wrote:
xulfer cheapbsd net wrote:
I'm looking for a way to find a certain column containing a certain
string within a GtkTreeView/model. I know I can loop through each row
and
search through the column manually, but this seems to be rather slow and
cumbersome. Is there a better way of accomplishing this?
You could create your own hash table: pass your strings through a hash
function when you create the tree, then pass the string you want to
find through the same hash function, to quickly know where the string
is. Each entry in the hash table could point, for example, to the GTK
path of the node where each string is...
Carlos
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
That could work. I've thought of similar tricks already myself. I just
figured that had to be the wrong way to go about it. Is there nothing
supplied by the API to support something like this?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]