Fwd: [Bug 290875] [thumbnailer] Images files thumbnails generated by calligra have an obstrusive overlay icons

Friedrich W. H. Kossebau kossebau at kde.org
Mon Jul 2 16:34:07 BST 2012


Am Montag, 2. Juli 2012, 16:58:10 schrieb David Revoy:
> Hi Friedrich,
> 
> (bug :https://bugs.kde.org/show_bug.cgi?id=290875   )
> On the screenshot
> (http://img861.imageshack.us/img861/7954/20120107screenshot01.jpg  ) the
> one without the blendicon are *.ora files saved by Mypaint. Mypaint have
> it's own *.ora writer, and generate the thumbnail inside the *.ora. Open
> raster are open document with a subfolder for the thumbnails, so the system
> only copy the thumbnail in the cache if one is found, I think . ( certainly
> to be faster ) , when no thumbnails are found, It rellies on Calligra ( On
> Dolphin, I have to setup the 'calligra files' for the thumbnail preview ).

The icon blending is done by the thumbnail kio-slave (which is used by Dolphin 
and all other filesystem widgets and also the KIO::PreviewJob like used in 
KoRecentDocumentsPane), so outside of Calligra code.
Whether the icon is blended or not is based on the flag returned by the 
thumbnail plugin. And the calligra thumbnail plugin is like this:

ThumbCreator::Flags CalligraCreator::flags() const
{
    if (m_doc && (m_doc->mimeType() == "image/openraster" || m_doc->mimeType() 
== "application/x-krita")) {
        return (Flags)(DrawFrame);
    }
    else {
        return (Flags)(DrawFrame | BlendIcon);
    }
}

So all fine here.

The calligra thumbnail plugin also first looks for the embedded thumbnail, 
only renders a new thumbnail if none is contained. That or the contained is 
then delivered to the thumbnail kio-slave, which forwards it then to whoever 
asked for.

The caching of the thumbnails is decided about by a per-plugin base, by the 
entry in the plugin desktop file. Which is
CacheThumbnail=true
for the calligra thumbnail plugin (yes, perfect would be to have that in the 
flags per returned icon :/ ). So even for embedded thumbnails the thumbnail 
kio-slave will cache the thumbnails itself.
So upgrading your calligra thumbnail plugin will not have any effect on these 
cached thumbnails. Only cleaning up the thumbnail cache helps here.

> Thanks for taking care of it :)

It's part of the brushwood I have to axe on my way to implement proper generic 
template handling, like also offering templates from LO folders :)
For that I need working and good thumbnailing.

Cheers
Friedrich



More information about the calligra-devel mailing list