Commit 37b6621f authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

update to new ImageList API

parent a7b4df9a
......@@ -7,7 +7,7 @@
* Description : a kipi plugin to export images to Picasa web service
*
* Copyright (C) 2007-2008 by Vardhman Jain <vardhman at gmail dot com>
* Copyright (C) 2008-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2008-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2009 by Luka Renko <lure at kubuntu dot org>
* Copyright (C) 2010 by Jens Mueller <tschenser at gmx dot de>
*
......@@ -138,7 +138,7 @@ PicasawebWindow::PicasawebWindow(KIPI::Interface* interface, const QString& tmpF
ki18n("A Kipi plugin to export image collections to "
"PicasaWeb web service."),
ki18n( "(c) 2007-2009, Vardhman Jain\n"
"(c) 2008-2010, Gilles Caulier\n"
"(c) 2008-2012, Gilles Caulier\n"
"(c) 2009, Luka Renko\n"
"(c) 2010, Jens Mueller" ));
......@@ -240,7 +240,7 @@ void PicasawebWindow::cancelProcessing()
{
m_talker->cancel();
m_transferQueue.clear();
m_widget->m_imgList->processed(false);
m_widget->m_imgList->cancelProcess();
m_widget->progressBar()->hide();
}
......@@ -763,7 +763,7 @@ void PicasawebWindow::slotAddPhotoDone(int errCode, const QString& errMsg, const
}
KExiv2Iface::KExiv2 exiv2Iface;
bool bRet = false;
bool bRet = false;
QString fileName = m_transferQueue.first().first.path();
if (!photoId.isEmpty() &&
exiv2Iface.supportXmp() && exiv2Iface.canWriteXmp(fileName) && exiv2Iface.load(fileName))
......@@ -772,7 +772,7 @@ void PicasawebWindow::slotAddPhotoDone(int errCode, const QString& errMsg, const
bRet = exiv2Iface.save(fileName);
}
m_widget->m_imgList->processed(errCode == 0);
m_widget->m_imgList->processed(m_transferQueue.first().first, (errCode == 0));
if (errCode == 0)
{
......@@ -834,7 +834,9 @@ void PicasawebWindow::slotGetPhotoDone(int errCode, const QString& errMsg,
errText = imgFile.errorString();
}
else
{
imgFile.close();
}
if (errText.isEmpty())
{
......
......@@ -7,7 +7,7 @@
* Description : a kipi plugin to export images to Picasa web service
*
* Copyright (C) 2007-2008 by Vardhman Jain <vardhman at gmail dot com>
* Copyright (C) 2008-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2008-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2010 by Jens Mueller <tschenser at gmx dot de>
*
* This program is free software; you can redistribute it
......
......@@ -64,8 +64,8 @@ namespace KIPIRajceExportPlugin
RajceWidget::RajceWidget(KIPI::Interface* interface, const QString& tmpFolder, QWidget* parent)
: QWidget(parent)
{
m_lastLoggedInState = false;
m_session = new RajceSession(this, tmpFolder);
m_lastLoggedInState = false;
m_session = new RajceSession(this, tmpFolder);
QHBoxLayout* mainLayout = new QHBoxLayout(this);
// -------------------------------------------------------------------
......@@ -75,8 +75,7 @@ RajceWidget::RajceWidget(KIPI::Interface* interface, const QString& tmpFolder, Q
m_imgList->setControlButtonsPlacement(KIPIPlugins::ImagesList::ControlButtonsBelow);
m_imgList->setAllowRAW(true);
m_imgList->loadImagesFromCurrentSelection();
m_imgList->listView()->setWhatsThis(
i18n("This is the list of images to upload to your Rajce.net account."));
m_imgList->listView()->setWhatsThis(i18n("This is the list of images to upload to your Rajce.net account."));
QWidget* settingsBox = new QWidget(this);
QVBoxLayout* settingsBoxLayout = new QVBoxLayout(settingsBox);
......@@ -160,9 +159,9 @@ RajceWidget::RajceWidget(KIPI::Interface* interface, const QString& tmpFolder, Q
QLabel* imageQualityLbl = new QLabel(i18n("JPEG quality:"), optionsBox);
optionsBoxLayout->addWidget(imageQualityLbl, 0, 1, 1, 1);
optionsBoxLayout->addWidget(m_imageQualitySpB, 0, 2, 1, 1);
optionsBoxLayout->addWidget(m_imageQualitySpB, 0, 2, 1, 1);
optionsBoxLayout->addWidget(dimensionLbl, 1, 1, 1, 1);
optionsBoxLayout->addWidget(m_dimensionSpB, 1, 2, 1, 1);
optionsBoxLayout->addWidget(m_dimensionSpB, 1, 2, 1, 1);
optionsBoxLayout->setRowStretch(8, 10);
optionsBoxLayout->setSpacing(KDialog::spacingHint());
optionsBoxLayout->setMargin(KDialog::spacingHint());
......@@ -275,7 +274,7 @@ void RajceWidget::update()
}
connect(m_albumsCoB, SIGNAL(currentIndexChanged(QString)),
this, SLOT(selectedAlbumChanged(QString)));
this, SLOT(selectedAlbumChanged(QString)));
unsigned max = m_session->state().maxHeight();
max = max > m_session->state().maxWidth() ? max : m_session->state().maxWidth();
......@@ -305,22 +304,22 @@ void RajceWidget::update()
case InvalidCommand: m_progressBar->setFormat(i18n("Invalid command")); break;
case InvalidCredentials: m_progressBar->setFormat(i18n("Invalid login name or password")); break;
case InvalidSessionToken: m_progressBar->setFormat(i18n("Session expired")); break;
case InvalidOrRepeatedColumnName: break;
case InvalidOrRepeatedColumnName: break;
case InvalidAlbumId: m_progressBar->setFormat(i18n("Unknown album")); break;
case AlbumDoesntExistOrNoPrivileges: m_progressBar->setFormat(i18n("Unknown album")); break;
case InvalidAlbumToken: m_progressBar->setFormat(i18n("Failed to open album")); break;
case AlbumNameEmpty: m_progressBar->setFormat(i18n("The album name cannot be empty")); break;
case FailedToCreateAlbum: m_progressBar->setFormat(i18n("Failed to create album")); break;
case AlbumDoesntExist: m_progressBar->setFormat(i18n("Album does not exist")); break;
case UnknownApplication: break;
case InvalidApplicationKey: break;
case UnknownApplication: break;
case InvalidApplicationKey: break;
case FileNotAttached: m_progressBar->setFormat(i18n("File upload failed")); break;
case NewerVersionExists: break;
case NewerVersionExists: break;
case SavingFileFailed: m_progressBar->setFormat(i18n("File upload failed")); break;
case UnsupportedFileExtension: m_progressBar->setFormat(i18n("Unsupported file extension")); break;
case UnknownClientVersion: break;
case NonexistentTarget: break;
default: break;
case UnknownClientVersion: break;
case NonexistentTarget: break;
default: break;
}
}
......@@ -507,7 +506,7 @@ void RajceWidget::uploadNext()
{
if (m_currentUploadImage != m_uploadQueue.begin())
{
m_imgList->processed(m_session->state().lastErrorCode() == 0);
m_imgList->processed(KUrl::fromLocalFile(*m_currentUploadImage), (m_session->state().lastErrorCode() == 0));
}
if (m_currentUploadImage == m_uploadQueue.end())
......@@ -531,7 +530,7 @@ void RajceWidget::cancelUpload()
{
if (m_currentUploadImage != m_uploadQueue.begin() && m_currentUploadImage != m_uploadQueue.end())
{
m_imgList->processed(false);
m_imgList->processed(KUrl::fromLocalFile(*m_currentUploadImage), false);
}
disconnect(m_session, SIGNAL(busyFinished(uint)),
......
......@@ -8,7 +8,7 @@
* SmugMug web service
*
* Copyright (C) 2005-2008 by Vardhman Jain <vardhman at gmail dot com>
* Copyright (C) 2008-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2008-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2008-2009 by Luka Renko <lure at kubuntu dot org>
*
* This program is free software; you can redistribute it
......@@ -133,7 +133,7 @@ SmugWindow::SmugWindow(KIPI::Interface* interface, const QString& tmpFolder,
ki18n("A Kipi plugin to import/export image collections "
"from/to the SmugMug web service."),
ki18n("(c) 2005-2008, Vardhman Jain\n"
"(c) 2008-2009, Gilles Caulier\n"
"(c) 2008-2012, Gilles Caulier\n"
"(c) 2008-2009, Luka Renko"));
m_about->addAuthor(ki18n("Luka Renko"), ki18n("Author and maintainer"),
......@@ -270,7 +270,7 @@ void SmugWindow::slotButtonClicked(int button)
{
m_talker->cancel();
m_transferQueue.clear();
m_widget->m_imgList->processed(false);
m_widget->m_imgList->cancelProcess();
m_widget->progressBar()->hide();
}
break;
......@@ -783,7 +783,7 @@ void SmugWindow::slotAddPhotoDone(int errCode, const QString& errMsg)
m_tmpPath.clear();
}
m_widget->m_imgList->processed(errCode == 0);
m_widget->m_imgList->processed(m_transferQueue.first(), (errCode == 0));
if (errCode == 0)
{
......
......@@ -8,7 +8,7 @@
* SmugMug web service
*
* Copyright (C) 2005-2008 by Vardhman Jain <vardhman at gmail dot com>
* Copyright (C) 2008-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2008-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2008-2009 by Luka Renko <lure at kubuntu dot org>
*
* This program is free software; you can redistribute it
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment