From kde-commits Thu Aug 18 15:12:26 2005 From: =?utf-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Thu, 18 Aug 2005 15:12:26 +0000 To: kde-commits Subject: extragear/graphics/gwenview Message-Id: <1124377946.979191.21865.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=112437796704061 SVN commit 450582 by gateau: Return JPEG comments as KIPI image description M +1 -0 NEWS M +8 -1 gvcore/kipiinterface.cpp --- trunk/extragear/graphics/gwenview/NEWS #450581:450582 @@ -13,6 +13,7 @@ - Images are now prefetched in advance also when browsing in the thumbnail view using the cursor keys or keys for next/previous. - In full screen mode, pressing Enter will toggle the full screen bar. + - KIPI plugins can now access JPEG comments. - Fixes: - In the thumbnail view, make sure we always show folder and archive filenames, even if the filename is not shown for images. --- trunk/extragear/graphics/gwenview/gvcore/kipiinterface.cpp #450581:450582 @@ -37,6 +37,7 @@ // Local #include "fileviewbase.h" #include "fileviewstack.h" +#include "imageutils/jpegcontent.h" #include "kipiinterface.moc" namespace Gwenview { @@ -79,7 +80,13 @@ } QString description() { - return QString::null; + if (!_url.isLocalFile()) return QString::null; + + ImageUtils::JPEGContent content; + bool ok=content.load(_url.path()); + if (!ok) return QString::null; + + return content.comment(); } void setDescription(const QString&) {}