[SCM] ktp-send-file packaging branch, master, updated. debian/15.12.1-2-216-g8f07cdf

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:14:04 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-send-file.git;a=commitdiff;h=b8b2004

The following commit has been merged in the master branch:
commit b8b200480c6abe11bab11723f934ccb1288458c4
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sat Sep 17 00:13:17 2011 +0100

    disable buttons after file transfer attempt started
---
 mainwindow.cpp | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/mainwindow.cpp b/mainwindow.cpp
index 9a5d3f3..155baa1 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -28,14 +28,14 @@
 #include <KCmdLineArgs>
 #include <KMimeType>
 #include <KDebug>
-
+#include <KMessageBox>
 
 #include <QAbstractItemDelegate>
 #include <QPainter>
 #include <QRect>
 #include <QStyle>
 #include <QDebug>
-
+#include <QAbstractButton>
 
 #include <TelepathyQt4/AccountManager>
 #include <TelepathyQt4/PendingChannelRequest>
@@ -197,6 +197,11 @@ void MainWindow::onDialogAccepted()
                                                                                    PREFERRED_FILETRANSFER_HANDLER);
 
     connect(channelRequest, SIGNAL(finished(Tp::PendingOperation*)), SLOT(slotFileTransferFinished(Tp::PendingOperation*)));
+
+    //disable the buttons
+    foreach(QAbstractButton* button, ui->buttonBox->buttons()) {
+        button->setEnabled(false);
+    }
 }
 
 void MainWindow::slotFileTransferFinished(Tp::PendingOperation* op)
@@ -205,6 +210,8 @@ void MainWindow::slotFileTransferFinished(Tp::PendingOperation* op)
         //FIXME map to human readable strings.
         QString errorMsg(op->errorName() + ": " + op->errorMessage());
         kDebug() << "ERROR!: " << errorMsg;
+        KMessageBox::error(this, i18n("Failed to send file"), i18n("File Transfer Failed"));
+        close();
     } else {
         kDebug() << "Transfer started";
         // now I can close the dialog

-- 
ktp-send-file packaging



More information about the pkg-kde-commits mailing list