[KPhotoAlbum] Faking kim files to import photos
Jesper K. Pedersen
blackie at blackie.dk
Fri Mar 10 04:50:48 GMT 2006
Thanks for the patch, it has now been applied.
Cheers
Jesper.
On Thursday 23 February 2006 08:19, Martin Hoeller wrote:
| On 23 Feb 2006, Dotan Cohen wrote:
| > When I try to import a kim file that was I left "generate thumbnails"
| > checked it works. So even KimDaBa's own .kim file is broken. Can
| > somebody confirm this? I am on KimDaBa 2.1 (Using KDE 3.5.1).
|
| Right. KPhotoAlbum is able to produce .kim files without thumbnails.
| Import of such files results in error messages. Nevertheless it is still
| possible to import the images and keywords from such a .kim file.
|
| The following patch fixes this behaviour. Note, that the latest SVN
| version doesn't compile so I patched against revision 508059.
|
| Index: import.cpp
| ===================================================================
| --- import.cpp (revision 508059)
| +++ import.cpp (working copy)
| @@ -262,10 +262,17 @@
| ImageRow* ir = new ImageRow( info, this, container );
| lay3->addWidget( ir->_checkbox, row, 0 );
|
| - QPushButton* but = new QPushButton( container, "image" );
| - but->setPixmap( loadThumbnail( info->fileName( true ) ) );
| - lay3->addWidget( but, row, 1 );
| - connect( but, SIGNAL( clicked() ), ir, SLOT( showImage() ) );
| + const KArchiveEntry* thumbnails = _dir->entry(
| QString::fromLatin1( "Thumbnails" ) ); + if ( thumbnails ) {
| + QPushButton* but = new QPushButton( container, "image" );
| + but->setPixmap( loadThumbnail( info->fileName( true ) ) );
| + lay3->addWidget( but, row, 1 );
| + connect( but, SIGNAL( clicked() ), ir, SLOT( showImage() ) );
| + }
| + else {
| + QLabel* label = new QLabel( info->label(), container,
| "filename" ); + lay3->addWidget( label, row, 1 );
| + }
|
| QLabel* label = new QLabel(
| QString::fromLatin1("<qt>%1</qt>").arg(info->description()), container,
| "description" ); lay3->addWidget( label, row, 2 );
|
|
| hth,
| - martin
--
Jesper K. Pedersen | Klarälvdalens Datakonsult
Senior Software Engineer | www.klaralvdalens-datakonsult.se
Prinsensgade 4a st. |
9800 Hjørring | Platform-independent
Denmark | software solutions
More information about the Kphotoalbum
mailing list