On Fri, 2011-05-27 at 19:15 +0200, Till Hartmann wrote: > I don't know how the thumbnail image gets generated, but I'd propose > the > following: > When using denemo's filechooser, generate a thumbnail if there isn't > one > in .thumbnails yet. If there is, but the MTimes of the chosen file and > the corresponding thumbnail do not match, regenerate the thumbnail. > If the MTimes match, do nothing. > Also regenerate the thumbnail when saving.
We have a good reason not to adopt this normal approach: we cannot generate a thumbnail without loading the file (or writing major bit of code). Fortunately, we have special considerations that make it not all that essential. Firstly, only Denemo could generate a thumbnail for a .denemo file and only Denemo can usefully modify a .denemo file, so creating the thumbnail on exit is good enough. And as it is time consuming to generate, doing it on exit means the user does not have to wait. The drawback is if people send each other .denemo files. Single files would be ok, as you will open it anyway (provided you trust the person who sent it!), and we could create a script to thumbnail a new collection of .denemo files. So I think the present code is heading in a good direction. For some reason my file browser has started showing the thumbnails too, I may have been missing a refresh or something before. So I think we are cooking with gas. AFAICS I will have to write a parser to retrieve the mtime from a png chunk :( Richard _______________________________________________ Denemo-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/denemo-devel
