File libgpod4.patch of Package kde3-kipi-plugins

--- a/kipi-plugins/ipodexport/ipodexportdialog.cpp
+++ b/kipi-plugins/ipodexport/ipodexportdialog.cpp
@@ -11,6 +11,11 @@
  *                                                                         *
  ***************************************************************************/
 
+// System Includes
+extern "C" {
+#include <gdk-pixbuf/gdk-pixbuf.h>
+}
+
 #include "ipodheader.h"
 #include "imagelist.h"
 #include "imagelistitem.h"
@@ -372,9 +377,13 @@
         return;
 
     Itdb_Artwork *artwork = item->artwork();
-    Itdb_Thumb *thumb = itdb_artwork_get_thumb_by_type( artwork, ITDB_THUMB_PHOTO_SMALL );
+    GdkPixbuf *gpixbuf = NULL;
+    
+    // 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( !thumb )
+    if( !gpixbuf )
     {
         debug() << "no thumb was found" << endl;
         return;
@@ -389,6 +398,9 @@
 //     QPixmap pix;
 //     pix.convertFromImage( image );
 //     m_ipodPreview->setPixmap( pix );
+    
+    // memory release
+    gdk_pixbuf_unref ( gpixbuf );
 }
 
 void
openSUSE Build Service is sponsored by