denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Thumbnails


From: Till Hartmann
Subject: Re: [Denemo-devel] Thumbnails
Date: Fri, 27 May 2011 19:15:46 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110503 Lightning/1.0b2 Thunderbird/3.1.10

Am 27.05.2011 18:01, schrieb Richard Shann:
> On Fri, 2011-05-27 at 16:52 +0200, Till Hartmann wrote:
>> Am 27.05.2011 10:09, schrieb Richard Shann:
>>> On Thu, 2011-05-26 at 23:01 +0200, Till Hartmann wrote:
>>>> I think what you have to do is to append "::Thumb::URI" to "tEXt" and
>>>> remove that piece from your current uri string:
>>>> gdk_pixbuf_save (pb, thumbpath, "png"/*type*/, &err,
>>>> "tEXt::Thumb::URI",
>>>> uri [...]) 
>>> That appears to work, thank you. I say appears as the warning message is
>>> gone, but I am not sure we have anything to retrieve the information
>>> currently...
>>> Richard
>>>
>>>
>>
>> I checked the sourcecode, here's what needs to be changed to make it work ;)
>> - you need to create an md5sum of the file's URI 
> right, I had this wrong, I was using only the bit after file://, and
> even dafter, the URI I was storing in the thumbnail was that of the
> thumbnail itself :(
>> - and that includes the
>> leading "file://" (be aware that due to the fact that unix paths start
>> with a leading slash, it will be "file:///home[...]". If you're planning
>> to use the thumbnails in the open-dialog, be sure to make that filename
>> to uri process windows safe)
>> - at least nautilus uses the normal-sized thumbnails as default, be sure
>> to store both sizes (you can never be sure which applications make use
>> of which thumbsize ;) )
> yes - only "normal" existed on my installation, created by the file
> browser. For now I have reverted to saving normal size.
> The bad news is that the file browser still pays no attention to the
> thumbnail
It does, at least for me.
 - my guess is it only looks for thumbnails on files whose type
> it understands as being ones that can have them (perhaps only on those
> that it generates thumbnails for?). The browser thinks that  Xxx.denemo
> is a file of type xml (which it is) and gives it an icon to suit. 
> My guess is we would have to do some registration unto gnome of
> the .denemo file type, and register a thumbnail generating program to
> gnome before we would get anything to happen.
If you want "automatic" thumbnail creation, you would indeed have to
write a thumbnailer and register that with e.g. gnome.
This is far too specific
> to one O/S and WM to be something we would want to do in that case.
> 
> So unless someone knows more I propose to store our thumbnails in
> ~/.denemo/thumbnails
> where our filechooser can access them when we are looking to load a
> score.
No, don't do that. Store them according to the FDO spec, I think mypaint
even does that for windows. That way both the browser and the
filechooser can check the .thumbnail directory for a thumbnail image,
and if it contains a matching one, use it.

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.

Till



reply via email to

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