[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:20:43 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=4f7920d
The following commit has been merged in the master branch:
commit 4f7920dc1fcd17bb31a17bbd42ed07757887e528
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Thu Jan 26 18:54:27 2012 +0100
Use KTp::ServiceAvailabilityChecker to check if krfb is available
---
app/CMakeLists.txt | 1 +
app/chat-window.cpp | 13 +++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 88a6571..7a4eb40 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -14,6 +14,7 @@ target_link_libraries(ktp-text-ui
${KDE4_KDEUI_LIBS}
${KDE4_KIO_LIBS}
${TELEPATHY_QT4_LIBRARIES}
+ ${KTP_LIBRARIES}
${QT_QTWEBKIT_LIBRARY}
${KDE4_KNOTIFYCONFIG_LIBS}
${KDE4_KCMUTILS_LIBS}
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 59db66d..b03d4cf 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -24,6 +24,8 @@
#include "chat-tab.h"
#include "chat-widget.h"
+#include <KTp/service-availability-checker.h>
+
#include <KStandardAction>
#include <KIcon>
#include <KLocale>
@@ -56,8 +58,16 @@
#define PREFERRED_AUDIO_VIDEO_HANDLER "org.freedesktop.Telepathy.Client.KTp.CallUi"
#define PREFERRED_RFB_HANDLER "org.freedesktop.Telepathy.Client.krfb_rfb_handler"
+K_GLOBAL_STATIC_WITH_ARGS(KTp::ServiceAvailabilityChecker, s_krfbAvailableChecker,
+ (QLatin1String("org.freedesktop.Telepathy.Client.krfb_rfb_handler")));
+
ChatWindow::ChatWindow()
{
+ //This effectively constructs the s_krfbAvailableChecker object the first
+ //time that this code is executed. This is to start the d-bus query early, so
+ //that data are available when we need them later in desktopSharingCapability()
+ (void) s_krfbAvailableChecker.operator->();
+
//setup actions
KStandardAction::close(this,SLOT(closeCurrentTab()),actionCollection());
KStandardAction::quit(KApplication::instance(), SLOT(quit()), actionCollection());
@@ -282,8 +292,7 @@ void ChatWindow::onCurrentIndexChanged(int index)
setAudioCallEnabled(selfCapabilities.streamedMediaAudioCalls() && contactCapabilites.streamedMediaAudioCalls());
setFileTransferEnabled(selfCapabilities.fileTransfers() && contactCapabilites.fileTransfers());
setVideoCallEnabled(selfCapabilities.streamedMediaVideoCalls() && contactCapabilites.streamedMediaVideoCalls());
- /// TODO this shall be activated/deactivated according to capabilities. The code is already in common
- setShareDesktopEnabled(true);
+ setShareDesktopEnabled(s_krfbAvailableChecker->isAvailable() && contactCapabilites.streamTubes(QLatin1String("rfb")));
/// TODO re-activate check when invitation to chat has been sorted out
setInviteToChatEnabled(false);
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list