[SCM] ktp-contact-runner packaging branch, master, updated. debian/15.12.1-2-244-g38a1f58

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 17:50:35 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-runner.git;a=commitdiff;h=87fdbd7

The following commit has been merged in the master branch:
commit 87fdbd70c44c6514998c8e26eb740ea495497e8e
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Wed Nov 21 16:58:43 2012 +0100

    Port to KTp::Actions
    
    REVIEW: 107403
---
 src/contactrunner.cpp | 50 ++++++++------------------------------------------
 1 file changed, 8 insertions(+), 42 deletions(-)

diff --git a/src/contactrunner.cpp b/src/contactrunner.cpp
index c19bab7..6fbae06 100644
--- a/src/contactrunner.cpp
+++ b/src/contactrunner.cpp
@@ -43,6 +43,7 @@
 #include <KTp/Models/contact-model-item.h>
 #include <KTp/presence.h>
 #include <KTp/global-presence.h>
+#include <KTp/actions.h>
 
 struct MatchInfo {
     Tp::AccountPtr account;
@@ -226,35 +227,15 @@ void ContactRunner::run(const Plasma::RunnerContext &context, const Plasma::Quer
     Tp::AccountPtr account = data.account;
     Tp::ContactPtr contact = data.contact;
 
-    Tp::ChannelRequestHints hints;
-    hints.setHint(QLatin1String("org.freedesktop.Telepathy.ChannelRequest"),
-                  QLatin1String("DelegateToPreferredHandler"),
-                  QVariant(true));
-
     if (match.selectedAction() == action(QLatin1String("start-text-chat"))) {
-
-        account->ensureTextChat(contact,
-                                QDateTime::currentDateTime(),
-                                QLatin1String("org.freedesktop.Telepathy.Client.KTp.TextUi"),
-                                hints);
-
+	KTp::Actions::startChat(account, contact);
     } else if (match.selectedAction() == action(QLatin1String("start-audio-call"))) {
-
-        account->ensureAudioCall(contact,
-                QLatin1String("audio"),
-                QDateTime::currentDateTime(),
-                QLatin1String("org.freedesktop.Telepathy.Client.KTp.CallUi"));
-
+	KTp::Actions::startAudioCall(account, contact);
     } else if (match.selectedAction() == action("start-video-call")) {
-
-        account->ensureAudioVideoCall(contact,
-                QLatin1String("audio"), QLatin1String("video"),
-                QDateTime::currentDateTime(),
-                QLatin1String("org.freedesktop.Telepathy.Client.KTp.CallUi"));
-
+	KTp::Actions::startAudioVideoCall(account, contact);
     } else if (match.selectedAction() == action("start-file-transfer")) {
 
-        QStringList filenames = KFileDialog::getOpenFileNames(
+      QStringList filenames = KFileDialog::getOpenFileNames(
                                     KUrl("kfiledialog:///FileTransferLastDirectory"),
                                     QString(),
                                     0,
@@ -265,28 +246,13 @@ void ContactRunner::run(const Plasma::RunnerContext &context, const Plasma::Quer
         }
 
         Q_FOREACH (const QString &filename, filenames) {
-            Tp::FileTransferChannelCreationProperties properties(
-                filename, KMimeType::findByFileContent(filename)->name());
-
-            account->createFileTransfer(contact,
-                                        properties,
-                                        QDateTime::currentDateTime(),
-                                        QLatin1String("org.freedesktop.Telepathy.Client.KTp.FileTransfer"));
+	    KTp::Actions::startFileTransfer(account, contact, filename);
         }
 
     } else if (match.selectedAction() == action("start-desktop-sharing")) {
-
-        account->createStreamTube(contact,
-                                  QLatin1String("rfb"),
-                                  QDateTime::currentDateTime(),
-                                  QLatin1String("org.freedesktop.Telepathy.Client.krfb_rfb_handler"));
-
+	KTp::Actions::startDesktopSharing(account, contact);
     } else if (match.selectedAction() == action(QLatin1String("show-log-viewer"))) {
-
-	/* Use "--" so that KCmdLineArgs does not try to parse UIDs starting with "-" as arguments */
-        KToolInvocation::kdeinitExec(QLatin1String("ktp-log-viewer"),
-                                     QStringList() << QLatin1String("--") << account->uniqueIdentifier() << contact->id());
-
+	KTp::Actions::openLogViewer(account, contact);
     }
 }
 

-- 
ktp-contact-runner packaging



More information about the pkg-kde-commits mailing list