[SCM] ktp-contact-applet packaging branch, master, updated. debian/15.12.1-1-966-gde83ac5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:19:08 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=53efe04
The following commit has been merged in the master branch:
commit 53efe04e4185841fbeb6c66bc2c1920e6c7f1fbc
Author: Alexandr Akulich <akulichalexander at gmail.com>
Date: Fri Nov 29 17:50:28 2013 +0600
Contact: Implemented files transfer by appropriate button.
Added KIO dependency.
FEATURE: 288556
REVIEW: 114196
---
contact/CMakeLists.txt | 1 +
contact/src/contact-wrapper.cpp | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/contact/CMakeLists.txt b/contact/CMakeLists.txt
index 7a9415b..25f9207 100644
--- a/contact/CMakeLists.txt
+++ b/contact/CMakeLists.txt
@@ -18,6 +18,7 @@ kde4_add_plugin(plasma_applet_ktp_contact ${plasma_applet_ktp_contact_SRCS})
target_link_libraries(plasma_applet_ktp_contact
${KDE4_PLASMA_LIBS}
${KDE4_KDEUI_LIBS}
+ ${KDE4_KIO_LIBS}
${TELEPATHY_QT4_LIBRARIES}
${KTP_LIBRARIES}
${KTP_MODELS_LIBRARIES}
diff --git a/contact/src/contact-wrapper.cpp b/contact/src/contact-wrapper.cpp
index b516960..6ff1be4 100644
--- a/contact/src/contact-wrapper.cpp
+++ b/contact/src/contact-wrapper.cpp
@@ -19,9 +19,12 @@
#include "contact-wrapper.h"
+#include <KFileDialog>
+#include <KLocalizedString>
#include <KToolInvocation>
#include <KUrl>
#include <KDebug>
+
#include <KTp/actions.h>
#include <TelepathyQt/AvatarData>
@@ -254,7 +257,19 @@ void ContactWrapper::startVideoCall()
void ContactWrapper::startFileTransfer()
{
- kDebug();
+ if (!canSendFile()) {
+ return;
+ }
+
+ QStringList filenames = KFileDialog::getOpenFileNames(KUrl("kfiledialog:///FileTransferLastDirectory"),
+ QString(),
+ 0,
+ i18n("Choose files to send to %1", m_contact->alias()));
+
+ Q_FOREACH (const QString &filename, filenames) {
+ Tp::PendingOperation *channelRequest = KTp::Actions::startFileTransfer(m_account, m_contact, filename);
+ connect(channelRequest, SIGNAL(finished(Tp::PendingOperation*)), this, SLOT(genericOperationFinished(Tp::PendingOperation*)));
+ }
}
void ContactWrapper::setAccount(const Tp::AccountPtr& relatedAccount)
--
ktp-contact-applet packaging
More information about the pkg-kde-commits
mailing list