gtktalog-cvs
[Top][All Lists]
Advanced

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

[Gtktalog-cvs] tree hints


From: Yves Mettier
Subject: [Gtktalog-cvs] tree hints
Date: Wed, 12 Feb 2003 10:28:15 +0100 (CET)

Hi

Just some hints about how the tree widget should be implemented.
- No data from the catalog inside the widget please. There are some in the 
gtkctree: it
is a mistake. The goal is to have the data and the GUI separated.

- Make some few functions to access the data, like 
catalog_get_dir_contents(path), or
even catalog_dir_get_first_file(path) and catalog_dir_get_next_file(path). dbm 
and gdbm
work like this. Programming this way should not be too bad for gtktalog 
velocity. And
such functions will be helpful for building the tree widgets.

- When building the tree widget, do not build the complete tree. Just build 
what the
user wants to see. Then, when the user clicks on some directory to collapse it, 
just
build the subtree. The gtkctree was built in one time at the beginning. Again, 
for too
big catalogs, this is a mistake. And I'm not convinced that doing it this way 
is slower
because this way, gtktalog deals with less data.

With such constraints, programming gtktalog-2.0 with the new file format will 
be easier.
For example, it will be possible tu put any code behind the functions like
catalog_dir_get_first_file(), like accessing the memory (like now), or accessing
directly to the catalog file without loading it all into memory, or accessing 
to a
database...
Anyway, the code behind such an API is for the future, for gtktalog-2.0, for 
after
gtktalog-1.2 :)

If I'm not clear enough, please tell me!

Yves


-- 
- Homepage    - http://ymettier.free.fr - http://www.logicacmg.com -
- GPG key     - http://ymettier.free.fr/gpg.txt                    -
- Maitretarot - http://www.nongnu.org/maitretarot/                 -
- GTKtalog    - http://www.nongnu.org/gtktalog/                    -








reply via email to

[Prev in Thread] Current Thread [Next in Thread]