tree view, more tweaking

Janek Kozicki janek_listy at wp.pl
Fri May 14 16:55:57 UTC 2010


Janek Kozicki said:     (by the date of Fri, 14 May 2010 18:05:41 +0200)

> http://janek.kozicki.pl/nn/mc-tree-view.mpg
> 
> It is now quite intuitive.

I wanted to add also a flag (yes,no,unknown) tree_entry->has_subdirs,
to avoid constant rescanning with a call to function:

  does_it_have_subdirectories (tree_entry *current)

after scanning it was storing the result (yes,no) in tree_entry->has_subdirs

It worked except for one thing: I could not find the place where this
variable should be initialized to "unknown". And so it was initialized
randomly ;) And I don't know the places, where something happens to
the tree (creating / deleteing directory, moving them, etc).

So currently does_it_have_subdirectories is slightly slower if you
have a directory with lots of files, but without a subdirectory.

best regards
-- 
Janek Kozicki                               http://janek.kozicki.pl/  |



More information about the mc-devel mailing list