[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:14:42 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=fa41d4f

The following commit has been merged in the master branch:
commit fa41d4f20fc84039fbaab75bdab5386c7523a11c
Author: George Kiagiadakis <george.kiagiadakis at collabora.com>
Date:   Tue Jul 31 18:34:31 2012 +0300

    Add "Make a Call" action.
    
    Reviewed-by: David Edmundson
---
 presence/src/presence-applet.cpp | 16 ++++++++++++++++
 presence/src/presence-applet.h   |  1 +
 2 files changed, 17 insertions(+)

diff --git a/presence/src/presence-applet.cpp b/presence/src/presence-applet.cpp
index 4f0fd8c..736d953 100644
--- a/presence/src/presence-applet.cpp
+++ b/presence/src/presence-applet.cpp
@@ -29,6 +29,7 @@
 #include <KToolInvocation>
 #include <KUser>
 #include <KMessageBox>
+#include <KStandardDirs>
 
 #include <KTp/global-presence.h>
 #include <KTp/Models/accounts-model.h>
@@ -136,6 +137,10 @@ void TelepathyPresenceApplet::setupContextMenuActions()
     KAction *showAccountManagerAction = new KAction(KIcon("telepathy-kde"), i18n("Account Manager"), this);
     KAction *showContactListAction = new KAction(KIcon("meeting-attending"), i18n("Contact List"), this);
     KAction *addContactAction = new KAction(KIcon("list-add-user"), i18n("Add New Contacts"), this);
+    KAction *makeCallAction = 0;
+    if (!KStandardDirs::findExe(QLatin1String("ktp-dialout-ui")).isEmpty()) {
+        makeCallAction = new KAction(KIcon("internet-telephony"), i18n("Make a Call"), this);
+    }
 
     // connect actions
     connect(goOnlineAction, SIGNAL(triggered()), this, SLOT(onPresenceActionClicked()));
@@ -148,6 +153,9 @@ void TelepathyPresenceApplet::setupContextMenuActions()
     connect(showAccountManagerAction, SIGNAL(triggered()), this, SLOT(startAccountManager()));
     connect(showContactListAction, SIGNAL(triggered()), this, SLOT(startContactList()));
     connect(addContactAction, SIGNAL(triggered()),this, SLOT(onAddContactRequest()));
+    if (makeCallAction) {
+        connect(makeCallAction, SIGNAL(triggered()), this, SLOT(onMakeCallRequest()));
+    }
 
     m_contextActions.append(goOnlineAction);
     m_contextActions.append(goBusyAction);
@@ -162,6 +170,9 @@ void TelepathyPresenceApplet::setupContextMenuActions()
 
     m_contextActions.append(moreMenu->addSeparator());
     m_contextActions.append(addContactAction);
+    if (makeCallAction) {
+        m_contextActions.append(makeCallAction);
+    }
 
     m_contextActions.append(moreMenu->addSeparator());
 }
@@ -198,6 +209,11 @@ void TelepathyPresenceApplet::onAddContactRequest()
     dialog->show();
 }
 
+void TelepathyPresenceApplet::onMakeCallRequest()
+{
+    KToolInvocation::kdeinitExec(QLatin1String("ktp-dialout-ui"));
+}
+
 void TelepathyPresenceApplet::onPresenceChanged(KTp::Presence presence)
 {
     m_icon->setIcon(presence.icon());
diff --git a/presence/src/presence-applet.h b/presence/src/presence-applet.h
index 60a3566..4359fd3 100644
--- a/presence/src/presence-applet.h
+++ b/presence/src/presence-applet.h
@@ -65,6 +65,7 @@ private Q_SLOTS:
     void startAccountManager();
     void startContactList();
     void onAddContactRequest();
+    void onMakeCallRequest();
 
 private:
     /** used only upon creation to setup a list of actions for the context menu */

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list