gtk_filesel: Showing file in file clist


We're again trying to improve the gtk_filesel widget, this time by making
the file clist automatically show the file that the program sets the
selection to (if possible).  Unfortunately, it turns out to be rather
difficult.  There is no gtk_clist_find_row_from_text, there is no
gtk_clist_get_num_rows (which would allow us to do a binary search).  The
best solution we can see is not very good:  Attaching a strdup() of the
text as data to each row and use gtK_clist_find_row_from_data to find the
row (what is the complexity on that anyway?  Linear?  Log?), being very
careful to deallocate the data.  Surely there must be a better way to find
rows in clists?  Any suggestions would be appreciated.


Lars Clausen ( | Hårdgrim of Numenor
"I do not agree with a word that you say, but I    | Retainer of Sir Kegg
will defend to the death your right to say it."    |   of Westfield
    --Evelyn Beatrice Hall paraphrasing Voltaire   | Chaos Berserker of Khorne

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