[Kde-imaging] kdeextragear-libs-1/kipi-plugins/sendimages
Gilles Caulier
caulier.gilles at free.fr
Mon Sep 6 14:26:27 CEST 2004
CVS commit by cgilles:
SendImage plugin : fixed bug #87188
CCMAIL: kde-imaging at kde.org
M +25 -6 sendimages.cpp 1.9
M +5 -2 sendimages.h 1.8
--- kdeextragear-libs-1/kipi-plugins/sendimages/sendimages.cpp #1.8:1.9
@@ -105,4 +105,8 @@ void SendImages::showDialog()
void SendImages::run()
{
+ m_filesSendList.clear();
+ m_imagesResizedWithError.clear();
+ m_imagesPackage.clear();
+
KIPISendimagesPlugin::EventData *d;
KURL::List images = m_sendImagesDialog->m_images2send;
@@ -172,5 +176,7 @@ void SendImages::run()
QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d));
- m_filesSendList.append (m_tmp + imageNameFormat);
+ m_filesSendList.append(m_tmp + imageNameFormat);
+ m_imagesPackage.append(*it);
+ m_imagesPackage.append(m_tmp + imageNameFormat);
}
}
@@ -185,5 +191,7 @@ void SendImages::run()
QApplication::postEvent(m_parent, new QCustomEvent(QEvent::User, d));
- m_filesSendList.append (imageName);
+ m_filesSendList.append(imageName);
+ m_imagesPackage.append(imageName);
+ m_imagesPackage.append(imageName);
}
}
@@ -206,7 +214,13 @@ void SendImages::makeCommentsFile(void)
QString ImageCommentsText;
- for( KURL::List::Iterator it = m_filesSendList.begin() ; it != m_filesSendList.end() ; ++it )
+ KURL::List::Iterator it = m_imagesPackage.begin();
+
+ while( it != m_imagesPackage.end() )
{
- QString commentItem = m_interface->info( *it ).description();
+ KIPI::ImageInfo info = m_interface->info( *it );
+
+ QString commentItem = info.description();
+ ++it;
+ QString targetFile = (*it).filename();
if ( commentItem.isEmpty() )
@@ -215,6 +229,7 @@ void SendImages::makeCommentsFile(void)
ImageCommentsText = ImageCommentsText +
i18n("Comments for image \"%1\": %2\n")
- .arg((*it).fileName())
+ .arg(targetFile)
.arg(commentItem);
+ ++it;
}
@@ -250,5 +265,9 @@ bool SendImages::showErrors()
for ( KURL::List::Iterator it = m_imagesResizedWithError.begin();
it != m_imagesResizedWithError.end(); ++it )
+ {
m_filesSendList.append (*it);
+ m_imagesPackage.append(*it);
+ m_imagesPackage.append(*it);
+ }
break;
--- kdeextragear-libs-1/kipi-plugins/sendimages/sendimages.h #1.7:1.8
@@ -91,6 +91,9 @@ protected:
QString m_tmp;
- KURL::List m_filesSendList;
- KURL::List m_imagesResizedWithError;
+ KURL::List m_filesSendList; // KURL of resized images.
+ KURL::List m_imagesResizedWithError; // KURL of orignal images that cannot be resized.
+ KURL::List m_imagesPackage; // KURL of orignal images than have been resized
+ // and KURL of resized images (used for to create
+ // the comments file).
KIPI::ImageCollection m_collection;
More information about the Kde-imaging
mailing list