[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:05:27 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=148ccfe
The following commit has been merged in the master branch:
commit 148ccfe9f4a41c3af419c97287348a4627cbdf87
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date: Thu Mar 10 22:15:15 2011 +0100
Change the selected presence type in the popup menu when it is changed outside of CL (from Empathy, KCall etc)
---
accountbutton.cpp | 14 ++++++++++++++
accountbutton.h | 1 +
2 files changed, 15 insertions(+)
diff --git a/accountbutton.cpp b/accountbutton.cpp
index ba76e0e..cdb3ca5 100644
--- a/accountbutton.cpp
+++ b/accountbutton.cpp
@@ -122,6 +122,9 @@ AccountButton::AccountButton(const Tp::AccountPtr &account, QWidget* parent): QT
connect(m_account.data(),SIGNAL(connectionStatusChanged(Tp::ConnectionStatus)),
this, SLOT(connectionChanged(Tp::ConnectionStatus)));
+ connect(m_account.data(), SIGNAL(currentPresenceChanged(Tp::Presence)),
+ this, SLOT(preseneceChanged(Tp::Presence)));
+
if(m_statusIndex == -1) {
m_statusIndex = 7;
}
@@ -189,4 +192,15 @@ void AccountButton::showBusyIndicator()
void AccountButton::hideBusyIndicator()
{
m_busyOverlay->stop();
+}
+
+void AccountButton::preseneceChanged(Tp::Presence presence)
+{
+ foreach(QAction *a, actions())
+ {
+ if(presence.status() == QLatin1String(accountPresenceStatuses[a->data().toInt()])) {
+ a->setChecked(true);
+ m_statusIndex = a->data().toInt();
+ }
+ }
}
\ No newline at end of file
diff --git a/accountbutton.h b/accountbutton.h
index 2f58b79..29cc153 100644
--- a/accountbutton.h
+++ b/accountbutton.h
@@ -44,6 +44,7 @@ public Q_SLOTS:
void connectionChanged(Tp::ConnectionStatus status);
void showBusyIndicator();
void hideBusyIndicator();
+ void preseneceChanged(Tp::Presence presence);
private:
Tp::AccountPtr m_account;
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list