pkgsrc/graphics/kipi-plugins-kde3/patches/patch-ab
2011-01-03 20:47:01 +00:00

43 lines
1.2 KiB
Text

$NetBSD: patch-ab,v 1.2 2011/01/03 20:47:01 markd Exp $
--- kipi-plugins/ipodexport/ipodexportdialog.cpp.orig 2008-12-13 11:20:05.000000000 +0000
+++ kipi-plugins/ipodexport/ipodexportdialog.cpp
@@ -47,6 +47,12 @@
#include <libkipi/imagedialog.h>
#endif
+extern "C" {
+#undef signals
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#define signals protected
+}
+
#define debug() kdDebug()
using namespace IpodExport;
@@ -344,9 +350,13 @@ UploadDialog::ipodItemSelected( QListVie
return;
Itdb_Artwork *artwork = item->artwork();
- Itdb_Thumb *thumb = itdb_artwork_get_thumb_by_type( artwork, ITDB_THUMB_PHOTO_SMALL );
+ GdkPixbuf *gpixbuf = NULL;
- if( !thumb )
+ // First arg in itdb_artwork_get_pixbuf(...) is pointer to Itdb_Device struct,
+ // in kipiplugin-ipodexport it is m_itdb->device. i hope it _is_ initialiezed
+ gpixbuf = (GdkPixbuf*) itdb_artwork_get_pixbuf( m_itdb->device, artwork, -1, -1 );
+
+ if( !gpixbuf )
{
debug() << "no thumb was found" << endl;
return;
@@ -361,6 +371,9 @@ UploadDialog::ipodItemSelected( QListVie
// QPixmap pix;
// pix.convertFromImage( image );
// m_ipodPreview->setPixmap( pix );
+
+ // memory release
+ gdk_pixbuf_unref ( gpixbuf );
}
void