diff --git a/graphics/gwenview/Makefile b/graphics/gwenview/Makefile index dd4c2f0bbb0..28b412e7584 100644 --- a/graphics/gwenview/Makefile +++ b/graphics/gwenview/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.41 2008/02/18 18:43:56 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.42 2008/04/15 03:45:11 merdely Exp $ COMMENT= image viewer for KDE DISTNAME= gwenview-1.4.2 -PKGNAME= ${DISTNAME}p3 +PKGNAME= ${DISTNAME}p4 SHARED_LIBS += gwenviewcore 5.0 # .1.0 CATEGORIES= graphics x11 x11/kde MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gwenview/} diff --git a/graphics/gwenview/patches/patch-src_app_configdialog_cpp b/graphics/gwenview/patches/patch-src_app_configdialog_cpp new file mode 100644 index 00000000000..23a53b56e97 --- /dev/null +++ b/graphics/gwenview/patches/patch-src_app_configdialog_cpp @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_app_configdialog_cpp,v 1.1 2008/04/15 03:45:11 merdely Exp $ +--- src/app/configdialog.cpp.orig Mon Apr 14 21:23:17 2008 ++++ src/app/configdialog.cpp Mon Apr 14 21:23:52 2008 +@@ -137,7 +137,7 @@ ConfigDialog::ConfigDialog(QWidget* parent, KIPI::Plug + d->mManagers << new KConfigDialogManager(d->mFileOperationsPage, FileOperationConfig::self()); + + d->mSlideShowPage = addConfigPage( +- this, i18n("SlideShow"), i18n("SlideShow"), "slideshow"); ++ this, i18n("SlideShow"), i18n("SlideShow"), "slideshow_play"); + d->mManagers << new KConfigDialogManager(d->mSlideShowPage, SlideShowConfig::self()); + + #ifdef GV_HAVE_KIPI diff --git a/graphics/gwenview/patches/patch-src_gvcore_documentimpl_cpp b/graphics/gwenview/patches/patch-src_gvcore_documentimpl_cpp new file mode 100644 index 00000000000..cdfaa0f84f6 --- /dev/null +++ b/graphics/gwenview/patches/patch-src_gvcore_documentimpl_cpp @@ -0,0 +1,15 @@ +$OpenBSD: patch-src_gvcore_documentimpl_cpp,v 1.1 2008/04/15 03:45:11 merdely Exp $ +--- src/gvcore/documentimpl.cpp.orig Mon Apr 14 21:26:16 2008 ++++ src/gvcore/documentimpl.cpp Mon Apr 14 21:26:50 2008 +@@ -38,6 +38,11 @@ void DocumentImpl::switchToImpl(DocumentImpl* impl) { + } + + void DocumentImpl::setImage(QImage img) { ++ if (img.depth() == 1) { ++ // 1 bit depth images are difficult to scale. Let's convert to 8 bit ++ // depth. See bug #155518. ++ img = img.convertDepth(8); ++ } + mDocument->setImage(img); + } + diff --git a/graphics/gwenview/patches/patch-src_imageutils_jpegcontent_cpp b/graphics/gwenview/patches/patch-src_imageutils_jpegcontent_cpp new file mode 100644 index 00000000000..5c72c68cc72 --- /dev/null +++ b/graphics/gwenview/patches/patch-src_imageutils_jpegcontent_cpp @@ -0,0 +1,24 @@ +$OpenBSD: patch-src_imageutils_jpegcontent_cpp,v 1.1 2008/04/15 03:45:11 merdely Exp $ +--- src/imageutils/jpegcontent.cpp.orig Mon Apr 14 21:27:52 2008 ++++ src/imageutils/jpegcontent.cpp Mon Apr 14 21:30:20 2008 +@@ -329,12 +329,17 @@ int JPEGContent::dotsPerMeter(const QString& keyName) + // 2 = inches + // 3 = centimeters + // Other = reserved +- const float INCHESPERMETER = (100. / 2.54); ++ const double INCHESPERMETER = (100. / 2.54); ++ Exiv2::Rational r = it->toRational(); ++ if (r.second == 0) { ++ // a rational with 0 as second will make hang toLong() conversion ++ r.second = 1; ++ } + switch (res) { + case 3: // dots per cm +- return (it->toLong() * 100); ++ return int(double(r.first) * 100 / double(r.second)); + default: // dots per inch +- return (it->toLong() * INCHESPERMETER); ++ return int(double(r.first) * INCHESPERMETER / double(r.second)); + } + + return 0;