Review Request: Add thumbnail support for .lnk files

Pali Rohár pali.rohar at gmail.com
Thu Aug 26 12:43:15 BST 2010



> On 2010-08-05 07:40:05, Pali Rohár wrote:
> > /trunk/KDE/kdebase/runtime/kioslave/thumbnail/windowslnkcreator.cpp, line 89
> > <http://reviewboard.kde.org/r/4817/diff/2/?file=32106#file32106line89>
> >
> >     after IcoUtils::convertExeToIco() call IcoUtils::convertIcoToPng()
> >     
> >     IcoUtils::convertIcoToPng() has better conversation from Windows ICO file to PNG. QImage only load first icon from ICO file, but ICO file can has more then one icon (with higher resolution). And then do not use QImage::scaled(). You can specify size of icon in IcoUtils::convertIcoToPng().
> >     
> >     See windowsexecreator.cpp
> 
> Nicholas van Oudtshoorn wrote:
>     Thanks for that Pali. Updated it to follow your suggestion.
>     Is this a bug in the QImage code?
> 
> Pali Rohár wrote:
>     QImage support only one image. This is limitation.
>     
>     Finaly I found docs for qico image plugin: http://doc.qt.nokia.com/solutions/4/qticoimageformat/
>     Now it is part of Qt4 package in src/plugins/imageformats/ico/ and is enbaled by default in compilation.
>     
>     So for reading all icons from ICO file is possible to use class QtIcoHandler and method jumpToNextImage()
>     
>     I write new patch which will replace using external program icotool in icoutils.cpp

New patch for Windows thumbnails is on http://reviewboard.kde.org/r/5156/


- Pali


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4817/#review6809
-----------------------------------------------------------


On 2010-08-05 09:14:45, Nicholas van Oudtshoorn wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4817/
> -----------------------------------------------------------
> 
> (Updated 2010-08-05 09:14:45)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> This patch implements thumbnailing support for Microsoft Windows link files (.lnk) via the thumbnail kioslave
> 
> It uses the external application "winepath" - part of the wine package (www.winehq.org) to translate windows paths to their unix equivalents. If said path (or indeed the winepath application) doesn't exist, no thumbnail is drawn.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdebase/runtime/kioslave/thumbnail/windowslnkthumbnail.desktop PRE-CREATION 
>   /trunk/KDE/kdebase/runtime/kioslave/thumbnail/icoutils.h 1158174 
>   /trunk/KDE/kdebase/runtime/kioslave/thumbnail/icoutils.cpp 1158174 
>   /trunk/KDE/kdebase/runtime/kioslave/thumbnail/windowslnkcreator.h PRE-CREATION 
>   /trunk/KDE/kdebase/runtime/kioslave/thumbnail/windowslnkcreator.cpp PRE-CREATION 
>   /trunk/KDE/kdebase/runtime/kioslave/thumbnail/CMakeLists.txt 1158174 
> 
> Diff: http://reviewboard.kde.org/r/4817/diff
> 
> 
> Testing
> -------
> 
> Works for me!
> 
> 
> Thanks,
> 
> Nicholas
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100826/1af5361e/attachment.htm>


More information about the kde-core-devel mailing list