[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:14:42 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=221d086

The following commit has been merged in the master branch:
commit 221d08672a932a2b1cbca3e8eaf46c5465f6d63f
Author: James Smith <smithjd15 at gmail.com>
Date:   Wed May 7 23:31:41 2014 +0200

    Use onRequestedPresenceChanged in the contact list
    
    Use requestedPresenceChanged in the presence chooser, as well as calling onPresenceChanged after every selectable option that can trigger config changes or presence changes in onUserActivatedComboChange. This improves the contact list interaction with #116940. The selected presence is instantly activated instead of the last selected user presence when deactivating the nowPlaying status message plugin.
    
    REVIEW: 117366
---
 global-presence-chooser.cpp | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/global-presence-chooser.cpp b/global-presence-chooser.cpp
index ac9c653..295b2b0 100644
--- a/global-presence-chooser.cpp
+++ b/global-presence-chooser.cpp
@@ -191,11 +191,11 @@ GlobalPresenceChooser::GlobalPresenceChooser(QWidget *parent) :
 
     connect(this, SIGNAL(currentIndexChanged(int)), SLOT(onAllComboChanges(int)));
     connect(this, SIGNAL(activated(int)), SLOT(onUserActivatedComboChange(int)));
-    connect(m_globalPresence, SIGNAL(currentPresenceChanged(KTp::Presence)), SLOT(onPresenceChanged(KTp::Presence)));
+    connect(m_globalPresence, SIGNAL(requestedPresenceChanged(KTp::Presence)), SLOT(onPresenceChanged(KTp::Presence)));
     connect(m_globalPresence, SIGNAL(connectionStatusChanged(Tp::ConnectionStatus)), SLOT(onConnectionStatusChanged(Tp::ConnectionStatus)));
     connect(m_changePresenceMessageButton, SIGNAL(clicked(bool)), this, SLOT(onChangePresenceMessageClicked()));
 
-    onPresenceChanged(m_globalPresence->currentPresence());
+    onPresenceChanged(m_globalPresence->requestedPresence());
     //we need to check if there is some account connecting and if so, spin the spinner
     onConnectionStatusChanged(m_globalPresence->connectionStatus());
 }
@@ -220,7 +220,7 @@ bool GlobalPresenceChooser::event(QEvent *e)
 
         Q_FOREACH(const Tp::AccountPtr &account, m_accountManager->allAccounts()) {
             if (account->isEnabled()) {
-                KTp::Presence accountPresence(account->currentPresence());
+                KTp::Presence accountPresence(account->requestedPresence());
                 QString presenceIconPath = KIconLoader::global()->iconPath(accountPresence.icon().name(), 1);
                 QString presenceIconString = QString::fromLatin1("<img src=\"%1\">").arg(presenceIconPath);
                 QString accountIconPath = KIconLoader::global()->iconPath(account->iconName(), 1);
@@ -319,7 +319,7 @@ void GlobalPresenceChooser::onUserActivatedComboChange(int index)
         QWeakPointer<CustomPresenceDialog> dialog = new CustomPresenceDialog(m_model, this);
         dialog.data()->exec();
         delete dialog.data();
-        onPresenceChanged(m_globalPresence->currentPresence());
+        onPresenceChanged(m_globalPresence->requestedPresence());
     } else if (index == count() - 2) {
         KSharedConfigPtr config = KSharedConfig::openConfig(QLatin1String("ktelepathyrc"));
         KConfigGroup kdedConfig = config->group("KDED");
@@ -339,7 +339,7 @@ void GlobalPresenceChooser::onUserActivatedComboChange(int index)
                                        QLatin1String("settingsChange"));
                 QDBusConnection::sessionBus().send(message);
             } else {
-                onPresenceChanged(m_globalPresence->currentPresence());
+                onPresenceChanged(m_globalPresence->requestedPresence());
                 return;
             }
         }
@@ -348,6 +348,7 @@ void GlobalPresenceChooser::onUserActivatedComboChange(int index)
 							  QLatin1String("org.kde.Telepathy"),
 							  QLatin1String("activateNowPlaying"));
         QDBusConnection::sessionBus().send(message);
+        onPresenceChanged(m_globalPresence->requestedPresence());
     } else if (m_modelExtended->temporaryPresence().isValid() && index == count() - 3) {
         //do nothing if the temporary presence is selected. This is only used for externally set presences.
         //at which point reselecting it does nothing.
@@ -356,6 +357,7 @@ void GlobalPresenceChooser::onUserActivatedComboChange(int index)
 							  QLatin1String("org.kde.Telepathy"),
 							  QLatin1String("deactivateNowPlaying"));
         QDBusConnection::sessionBus().send(message);
+        onPresenceChanged(m_globalPresence->requestedPresence());
         // only set global presence on user change
         KTp::Presence presence = itemData(index, KTp::PresenceModel::PresenceRole).value<KTp::Presence>();
         m_globalPresence->setPresence(presence);
@@ -440,7 +442,7 @@ void GlobalPresenceChooser::onChangePresenceMessageClicked()
     setEditable(true);
 
     //if current presence has no presence message, delete the text
-    if (m_globalPresence->currentPresence().statusMessage().isEmpty()) {
+    if (m_globalPresence->requestedPresence().statusMessage().isEmpty()) {
         lineEdit()->clear();
     }
 

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list