[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kipi-plugins] imgurexport: polish
From: Gilles Caulier <caulier.gilles () gmail ! com>
Date: 2012-02-29 21:30:30
Message-ID: 20120229213030.0092FA60BB () git ! kde ! org
[Download RAW message or body]
Git commit 58a0cc94dc12ded1a7dc87d0b8ae35008bece5e4 by Gilles Caulier.
Committed on 29/02/2012 at 22:30.
Pushed by cgilles into branch 'master'.
polish
M +3 -3 imgurexport/imgurtalker.h
M +2 -2 imgurexport/imgurwidget.cpp
M +9 -6 imgurexport/imgurwindow.cpp
M +2 -0 imgurexport/imgurwindow.h
M +1 -0 imgurexport/plugin_imgurexport.cpp
http://commits.kde.org/kipi-plugins/58a0cc94dc12ded1a7dc87d0b8ae35008bece5e4
diff --git a/imgurexport/imgurtalker.h b/imgurexport/imgurtalker.h
index 26e472c..7978929 100644
--- a/imgurexport/imgurtalker.h
+++ b/imgurexport/imgurtalker.h
@@ -77,9 +77,9 @@ struct ImgurError
struct ImgurUploadData
{
- QString title;
- QString caption;
- KUrl fileUrl;
+ QString title;
+ QString caption;
+ KUrl fileUrl;
};
struct ImgurSuccess
diff --git a/imgurexport/imgurwidget.cpp b/imgurexport/imgurwidget.cpp
index 2d26443..aef4e63 100644
--- a/imgurexport/imgurwidget.cpp
+++ b/imgurexport/imgurwidget.cpp
@@ -28,7 +28,7 @@
// KDE includes
-#include <klocalizedstring.h>
+#include <klocale.h>
using namespace KIPIPlugins;
@@ -60,7 +60,7 @@ ImgurWidget::ImgurWidget(Interface* const interface, QWidget* const parent)
m_textLbl->setFocusPolicy(Qt::NoFocus);
m_progressBar = new QProgressBar(settingsBox);
- m_progressBar->setSizePolicy(QSizePolicy::Preferred ,QSizePolicy::Fixed);
+ m_progressBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
m_progressBar->setVisible(false);
// --------------------------------------------
diff --git a/imgurexport/imgurwindow.cpp b/imgurexport/imgurwindow.cpp
index af2ff1a..cc93ad7 100644
--- a/imgurexport/imgurwindow.cpp
+++ b/imgurexport/imgurwindow.cpp
@@ -26,7 +26,7 @@
#include <kdebug.h>
#include <kmessagebox.h>
-#include <klocalizedstring.h>
+#include <klocale.h>
// Local includes
@@ -133,8 +133,10 @@ void ImgurWindow::slotButtonClicked(int button)
// close the dialog
m_widget->imagesList()->listView()->clear();
done(Close);
+ break;
default:
KDialog::slotButtonClicked(button);
+ break;
}
}
@@ -156,6 +158,7 @@ void ImgurWindow::slotAddPhotoError(ImgurError error)
kError() << error.message;
m_widget->imagesList()->processed(currentImage, false);
+
if (KMessageBox::warningContinueCancel(this,
i18n("Failed to upload photo to Imgur: %1\n"
"Do you want to continue?", error.message))
@@ -165,6 +168,7 @@ void ImgurWindow::slotAddPhotoError(ImgurError error)
m_transferQueue->clear();
return;
}
+
uploadNextItem();
}
@@ -178,19 +182,18 @@ void ImgurWindow::slotAddPhotoSuccess(ImgurSuccess success)
m_webService->imageQueue()->pop_front();
m_imagesCount++;
- const QString sUrl = success.links.imgur_page.toEncoded();
+ const QString sUrl = success.links.imgur_page.toEncoded();
const QString sDeleteUrl = success.links.delete_page.toEncoded();
- const QString path = currentImage.toLocalFile();
+ const QString path = currentImage.toLocalFile();
// we add tags to the image
KPMetadata meta(path);
meta.setXmpTagString("Xmp.kipi.ImgurURL", sUrl);
meta.setXmpTagString("Xmp.kipi.ImgurDeleteURL", sDeleteUrl);
-
bool saved = meta.applyChanges();
- kDebug() << "Metadata" << (saved ? "Saved" : "Not Saved") << "to" << path;
+ kDebug() << "Metadata" << (saved ? "Saved" : "Not Saved") << "to" << path;
kDebug () << "URL" << sUrl;
kDebug () << "Delete URL" << sDeleteUrl;
@@ -199,7 +202,7 @@ void ImgurWindow::slotAddPhotoSuccess(ImgurSuccess success)
void ImgurWindow::slotAddPhotoDone()
{
-// not used atm
+ // NOTE: not used atm
}
void ImgurWindow::slotBusy(bool val)
diff --git a/imgurexport/imgurwindow.h b/imgurexport/imgurwindow.h
index c33820e..d5ce7e7 100644
--- a/imgurexport/imgurwindow.h
+++ b/imgurexport/imgurwindow.h
@@ -96,5 +96,7 @@ private:
int m_imagesCount;
int m_imagesTotal;
};
+
} // namespace KIPIImgurExportPlugin
+
#endif /* IMGURWINDOW_H */
diff --git a/imgurexport/plugin_imgurexport.cpp b/imgurexport/plugin_imgurexport.cpp
index 192f96a..c97ffff 100644
--- a/imgurexport/plugin_imgurexport.cpp
+++ b/imgurexport/plugin_imgurexport.cpp
@@ -109,6 +109,7 @@ void Plugin_ImgurExport::slotActivate()
KWindowSystem::activateWindow(m_winExport->winId());
}
+
m_winExport->reactivate();
kDebug() << "We have activated the imgur exporter!";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic