[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:15:50 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=9b7719c
The following commit has been merged in the master branch:
commit 9b7719c53f92f5341ea7f7b4e8cc423f32445f96
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Sun Dec 9 13:58:07 2012 -0800
Show status as "busy" only when connecting and not when changing presence
This makes it consistent with the contact list and AccountsKCM
BUG: 307758
REVIEW: 107653
---
presence/src/presence-applet.cpp | 18 +++++++++++++++---
presence/src/presence-applet.h | 1 +
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/presence/src/presence-applet.cpp b/presence/src/presence-applet.cpp
index 17fb3b3..f941c67 100644
--- a/presence/src/presence-applet.cpp
+++ b/presence/src/presence-applet.cpp
@@ -56,7 +56,6 @@ TelepathyPresenceApplet::TelepathyPresenceApplet(QObject *parent, const QVariant
m_icon = new Plasma::IconWidget(this);
connect(m_icon, SIGNAL(clicked()), this, SLOT(startContactList()));
- onPresenceChanged(m_globalPresence->currentPresence());
QGraphicsLinearLayout *layout = new QGraphicsLinearLayout();
layout->setContentsMargins(2, 2, 2, 2);
@@ -69,8 +68,12 @@ TelepathyPresenceApplet::TelepathyPresenceApplet(QObject *parent, const QVariant
int iconSize = IconSize(KIconLoader::Small);
setMinimumSize(QSize(iconSize, iconSize));
- connect(m_globalPresence, SIGNAL(currentPresenceChanged(KTp::Presence)), this, SLOT(onPresenceChanged(KTp::Presence)));
- connect(m_globalPresence, SIGNAL(changingPresence(bool)), this, SLOT(setBusy(bool)));
+ connect(m_globalPresence, SIGNAL(currentPresenceChanged(KTp::Presence)), SLOT(onPresenceChanged(KTp::Presence)));
+ onPresenceChanged(m_globalPresence->currentPresence());
+
+ connect(m_globalPresence, SIGNAL(connectionStatusChanged(Tp::ConnectionStatus)), SLOT(onConnectionStatusChanged(Tp::ConnectionStatus)));
+ onConnectionStatusChanged(m_globalPresence->connectionStatus());
+
setStatus(Plasma::PassiveStatus);
@@ -246,6 +249,15 @@ void TelepathyPresenceApplet::onPresenceChanged(KTp::Presence presence)
}
}
+void TelepathyPresenceApplet::onConnectionStatusChanged(Tp::ConnectionStatus connectionStatus)
+{
+ if (connectionStatus == Tp::ConnectionStatusConnecting) {
+ setBusy(true);
+ } else {
+ setBusy(false);
+ }
+}
+
void TelepathyPresenceApplet::onPresenceActionClicked()
{
KTp::Presence p = qobject_cast<KAction*>(sender())->data().value<KTp::Presence>();
diff --git a/presence/src/presence-applet.h b/presence/src/presence-applet.h
index 0e25d8f..a20b7c8 100644
--- a/presence/src/presence-applet.h
+++ b/presence/src/presence-applet.h
@@ -59,6 +59,7 @@ private Q_SLOTS:
void onAccountsChanged();
void onPresenceChanged(KTp::Presence presence);
+ void onConnectionStatusChanged(Tp::ConnectionStatus connectionStatus);
void onPresenceActionClicked();
void toolTipAboutToShow();
void toolTipHidden();
--
ktp-contact-applet packaging
More information about the pkg-kde-commits
mailing list