Bug 290875 - [thumbnailer] Images files thumbnails generated by calligra have an obstrusive overlay icons
Summary: [thumbnailer] Images files thumbnails generated by calligra have an obstrusiv...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-07 13:50 UTC by David REVOY
Modified: 2012-07-07 15:25 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.6


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2012-01-07 13:50:40 UTC
Version:           svn trunk (using KDE 4.7.4) 
OS:                Linux

Images files thumbnails generated by calligra have an obstrusive overlay icons.
Exemple : for *.kra and *.ora files created with Calligra, the thumbnailer display on the bottom right corner an obstrusive icon over the preview ; just to say it's a 'image file' ( witch is totally obvious , because of the preview ). 
ex :
http://img861.imageshack.us/img861/7954/20120107screenshot01.jpg
Mypaint is not affected, thats why I thought it would depend of Calligra thumbnailer. 

By the way, I'm sure this icon is totally necessary over the preview of a doc file, odt, spreadsheets and other office file format. But for image, it would be nice to haven't them. 


Reproducible: Always


Actual Results:  
 

Expected Results:
Comment 1 Sven Langkamp 2012-01-07 22:07:06 UTC
This icon isn't added by Krita or the Calligra thumbnail tool, so it looks like it's done by the filemanager. Maybe it mixed some thumbnails from Dolphin and Nautilus.
Comment 2 David REVOY 2012-01-08 09:57:11 UTC
Thank you Sven for the answer.
So I think it's Dolphin. Do you think it's possible to move this thread to the Dolphin project ? If not, please close the bug report ; I 'll open a new one with their correct header.
Comment 3 Christoph Feck 2012-01-09 00:00:53 UTC
Looking at the calligra thumbnailer, it explicitely requests those icons.

https://projects.kde.org/projects/calligra/repository/revisions/master/entry/tools/thumbnail/calligracreator.cpp#L119

    return (Flags)(DrawFrame | BlendIcon);
Comment 4 Sven Langkamp 2012-01-09 13:53:47 UTC
I see. So it's a Calligra problem after all. Probably needs separate thumbnailers.
Comment 5 Halla Rempt 2012-01-21 11:00:50 UTC
Okay, we can confirm then. It shouldn't be too hard to fix, right?
Comment 6 Halla Rempt 2012-03-05 18:16:10 UTC
Git commit 8b5d90f3db360a8f15e748c2c8cc982fdbc0cdb1 by Boudewijn Rempt.
Committed on 05/03/2012 at 19:15.
Pushed by rempt into branch 'master'.

Don't use the blendicon for krita or openraster files

M  +6    -1    tools/thumbnail/calligracreator.cpp

http://commits.kde.org/calligra/8b5d90f3db360a8f15e748c2c8cc982fdbc0cdb1
Comment 7 David REVOY 2012-07-02 03:31:22 UTC
I was browsing my old bug reports and I saw this one was in RESO.
Here I always had the 'Blendicon' on the thumbnail in file explorer of image file created by Krita.

ex :
http://img861.imageshack.us/img861/7954/20120107screenshot01.jpg

so I reopen this one.
Comment 8 Friedrich W. H. Kossebau 2012-07-02 16:50:29 UTC
Can confirm that the bug is still present. 
The fix http://quickgit.kde.org/?p=calligra.git&a=commit&h=8b5d90f3db360a8f15e748c2c8cc982fdbc0cdb1 sadly does not work, as the flags() property of the thumbnail plugin is not queried based on a file path, instead assumed to be constant.

So with the fix above the flag now depends on the last file for which a preview was made.

As Sven already guessed the solution will be two separate thumbnailers.

Shall I work on that? Could integrate with the oter fixes on the thumbnailer I am doing.
Comment 9 Halla Rempt 2012-07-02 19:10:05 UTC
That would be absolutely wonderful!
Comment 10 Friedrich W. H. Kossebau 2012-07-04 23:37:54 UTC
Review request which contains the fix can be found at https://git.reviewboard.kde.org/r/105373/ and waits for review :)

It creates two different thumbnail plugins, one with BlendIcon flag and one without.
It also installs different thumbnail descriptions (desktop files), so that for .kra and .ora files the non-BlendIcon thumbnailer is used.
I also changed the files for all the vector image formats (ODG, xfig) to use the non-BlendIcon thumbnailer, for consistency. After all the SVG thumbnailer (outside of Calligra) also does not set BlendIcon.
Comment 11 Friedrich W. H. Kossebau 2012-07-07 15:25:56 UTC
Git commit ca51fcfc7b51480da36c0a7562a28da1163fb7e7 by Friedrich W. H. Kossebau.
Committed on 07/07/2012 at 17:20.
Pushed by kossebau into branch 'master'.

pimp the thumbnailer

* duplicate into two plugins:
  calligraimagethumbnail for preview without blending the icon (for all image formats),
  calligrathumbnail for preview with blending the icon (for all other)
* wait for result of thumbnail rendering if needed
* install separate thumbnail descriptions per import filter and only if
  the import filter is installed
* put a white background behind extracted mimetypes

REVIEW: 105373
FIXED-IN: 2.6

M  +1    -0    filters/flow/visio/import/CMakeLists.txt
A  +9    -0    filters/flow/visio/import/flow_vsdx_thumbnail.desktop
M  +2    -0    filters/karbon/karbon1.x/CMakeLists.txt
A  +9    -0    filters/karbon/karbon1.x/karbon_karbon1x_thumbnail.desktop
M  +1    -1    filters/karbon/wmf/CMakeLists.txt
A  +9    -0    filters/karbon/wmf/karbon_wmf_thumbnail.desktop
M  +1    -0    filters/karbon/wpg/CMakeLists.txt
A  +9    -0    filters/karbon/wpg/karbon_wpg_thumbnail.desktop
M  +1    -1    filters/karbon/xfig/CMakeLists.txt
A  +9    -0    filters/karbon/xfig/karbon_xfig_thumbnail.desktop
M  +2    -0    filters/sheets/excel/import/CMakeLists.txt
A  +9    -0    filters/sheets/excel/import/sheets_excel_thumbnail.desktop
M  +2    -0    filters/sheets/xlsx/CMakeLists.txt
A  +9    -0    filters/sheets/xlsx/sheets_xlsx_thumbnail.desktop
M  +1    -0    filters/stage/kpr2odf/CMakeLists.txt
A  +9    -0    filters/stage/kpr2odf/stage_kpr_thumbnail.desktop
M  +1    -0    filters/stage/powerpoint/CMakeLists.txt
A  +9    -0    filters/stage/powerpoint/stage_powerpoint_thumbnail.desktop
M  +2    -1    filters/stage/pptx/CMakeLists.txt
A  +9    -0    filters/stage/pptx/stage_pptx_thumbnail.desktop
M  +2    -1    filters/words/docx/CMakeLists.txt
A  +9    -0    filters/words/docx/words_docx_thumbnail.desktop
M  +1    -1    filters/words/msword-odf/CMakeLists.txt
A  +9    -0    filters/words/msword-odf/words_msword_thumbnail.desktop
M  +1    -0    filters/words/rtf/import/CMakeLists.txt
A  +9    -0    filters/words/rtf/import/words_rtf_thumbnail.desktop
M  +1    -0    filters/words/wordperfect/import/CMakeLists.txt
A  +9    -0    filters/words/wordperfect/import/words_wpd_thumbnail.desktop
M  +1    -0    filters/words/works/import/CMakeLists.txt
A  +9    -0    filters/words/works/import/words_wps_thumbnail.desktop
M  +1    -1    krita/kritapart.desktop
M  +1    -1    krita/plugins/formats/ora/CMakeLists.txt
A  +9    -0    krita/plugins/formats/ora/krita_ora_thumbnail.desktop
M  +36   -6    tools/thumbnail/CMakeLists.txt
A  +9    -0    tools/thumbnail/calligra_odg_thumbnail.desktop
M  +68   -63   tools/thumbnail/calligracreator.cpp
M  +11   -10   tools/thumbnail/calligracreator.h
D  +0    -33   tools/thumbnail/calligrathumbnail.desktop
A  +9    -0    tools/thumbnail/krita_kra_thumbnail.desktop
D  +0    -65   tools/thumbnail/otherofficethumbnail.desktop
A  +9    -0    tools/thumbnail/sheets_ods_thumbnail.desktop
A  +9    -0    tools/thumbnail/stage_odp_thumbnail.desktop
A  +9    -0    tools/thumbnail/words_odt_thumbnail.desktop

http://commits.kde.org/calligra/ca51fcfc7b51480da36c0a7562a28da1163fb7e7