[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:18:57 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=9e20015
The following commit has been merged in the master branch:
commit 9e2001540da5ec4a6e6f525459dddba86f7d8c73
Author: Daniele E. Domenichelli <ddomenichelli at kde.org>
Date: Wed Mar 20 12:56:02 2013 +0100
Add "Send a File..." action to presence applet
It starts ktp-send-file with no arguments that pops up a dialog to
choose the file.
Reviewed-by: Martin Klapetek <martin.klapetek at gmail.com>
REVIEW: 109603
---
presence/src/presence-applet.cpp | 16 +++++++++++++++-
presence/src/presence-applet.h | 1 +
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/presence/src/presence-applet.cpp b/presence/src/presence-applet.cpp
index 6aff3aa..fe1452c 100644
--- a/presence/src/presence-applet.cpp
+++ b/presence/src/presence-applet.cpp
@@ -186,6 +186,10 @@ void TelepathyPresenceApplet::setupContextMenuActions()
if (!KStandardDirs::findExe(QLatin1String("ktp-dialout-ui")).isEmpty()) {
makeCallAction = new KAction(KIcon("internet-telephony"), i18n("Make a Call..."), this);
}
+ KAction *sendFileAction = 0;
+ if (!KStandardDirs::findExe(QLatin1String("ktp-send-file")).isEmpty()) {
+ sendFileAction = new KAction(KIcon("mail-attachment"), i18n("Send a File..."), this);
+ }
// connect actions
connect(goOnlineAction, SIGNAL(triggered()), this, SLOT(onPresenceActionClicked()));
@@ -202,6 +206,9 @@ void TelepathyPresenceApplet::setupContextMenuActions()
if (makeCallAction) {
connect(makeCallAction, SIGNAL(triggered()), this, SLOT(onMakeCallRequest()));
}
+ if (sendFileAction) {
+ connect(sendFileAction, SIGNAL(triggered()), this, SLOT(onSendFileRequest()));
+ }
m_contextActions.append(goOnlineAction);
m_contextActions.append(goBusyAction);
@@ -220,7 +227,9 @@ void TelepathyPresenceApplet::setupContextMenuActions()
if (makeCallAction) {
m_contextActions.append(makeCallAction);
}
-
+ if (sendFileAction) {
+ m_contextActions.append(sendFileAction);
+ }
m_contextActions.append(moreMenu->addSeparator());
}
@@ -303,6 +312,11 @@ void TelepathyPresenceApplet::onMakeCallRequest()
KToolInvocation::kdeinitExec(QLatin1String("ktp-dialout-ui"));
}
+void TelepathyPresenceApplet::onSendFileRequest()
+{
+ KToolInvocation::kdeinitExec(QLatin1String("ktp-send-file"));
+}
+
void TelepathyPresenceApplet::onPresenceChanged(KTp::Presence presence)
{
QString iconBaseName = presence.iconName(false);
diff --git a/presence/src/presence-applet.h b/presence/src/presence-applet.h
index d55d889..95b3f18 100644
--- a/presence/src/presence-applet.h
+++ b/presence/src/presence-applet.h
@@ -69,6 +69,7 @@ private Q_SLOTS:
void toggleContactList();
void onAddContactRequest();
void onMakeCallRequest();
+ void onSendFileRequest();
void contactListServiceRegistered();
void contactListServiceUnregistered();
--
ktp-contact-applet packaging
More information about the pkg-kde-commits
mailing list