[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:06:06 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=9355b94
The following commit has been merged in the master branch:
commit 9355b948a3601d6137e8db55b2fd8eb0e10e6690
Author: Dario Freddi <dario.freddi at collabora.co.uk>
Date: Fri Apr 22 13:52:54 2011 +0200
Expand only the item belonging to the account which is being connected - and collapse it upon disconnection
---
main-widget.cpp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/main-widget.cpp b/main-widget.cpp
index 4b877ab..ff8406e 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -294,15 +294,19 @@ void MainWidget::onAccountManagerReady(Tp::PendingOperation* op)
void MainWidget::onAccountConnectionStatusChanged(Tp::ConnectionStatus status)
{
kDebug() << "Connection status is" << status;
+
+ Tp::AccountPtr account(qobject_cast< Tp::Account* >(sender()));
+ QModelIndex index = m_model->index(qobject_cast<AccountsModelItem*>(m_model->accountItemForId(account->uniqueIdentifier())));
+
switch (status) {
case Tp::ConnectionStatusConnected:
- //FIXME: Get the account (sender()) index and expand only that index
- m_contactsListView->expandAll();
- monitorPresence(Tp::AccountPtr(qobject_cast< Tp::Account* >(sender())));
+ m_contactsListView->setExpanded(index, true);
+ monitorPresence(account);
break;
case Tp::ConnectionStatusDisconnected:
//Fall through
case Tp::ConnectionStatusConnecting:
+ m_contactsListView->setExpanded(index, false);
default:
break;
}
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list