I think the good approach is NOT to try openning all the books but considering only their title+author for example. You get a fairly small amount of data. The content of the books is NOT loaded yet.
When the user ask to expand a book, then we can extract the data and load a subtree that contains these data (maybe not all of them but just the VISIBLE level, ie the folders or files in the root folder)
I think a first step is to load on expand and free on collapse but we can also think about ways to cache the data. For example, we could defined some rules saying that a book, not opened for N minutes can be freed. On the other hand, at startup, we could load the last accessed
book.....
Does it help or am I totally away from your questions ?
Diego Zuccato wrote:
"James M. Cape" wrote:
GtkTreeView is the Model-View-Controller replacement for GtkCList:
http://developer.gnome.org/doc/API/2.0/gtk/TreeWidgetObjects.html
I still can't see any way to set out-of-model, tree-view-specific row data (like the old set_row_data, IIRC). I'm dealing with quite large models, and O(n^2) algorithms (gtk_tree_row_reference_*, IIUC) aren't an option :-(
Is there any way to do it without copying model data around ?
As an example, think about a long list of books. There are two views. In the first I want the user to be able to tag some books, in the other he should rate'em (yep... this example is quite stupid... I could simply add two columns to the model... but that would waste a lot of memory).
Any hint appreciated.
Tks, Diego. _______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list