[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:11:54 UTC 2016


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

The following commit has been merged in the master branch:
commit 791d578b8565a07bead7a94b98dde06aed1bb6d2
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Fri Jan 4 15:17:05 2013 +0100

    Don't show incorrect presence while everything is loading
    
    Now it shows an empty combobox with the spinner spinning on it
    before GlobalPresence is ready (then it changes the combo to
    proper index).
    
    Reviewed-by: David Edmundson
    BUG: 310529
    FIXED-IN: 0.5.3
---
 global-presence-chooser.cpp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/global-presence-chooser.cpp b/global-presence-chooser.cpp
index 720f9c5..d3e4908 100644
--- a/global-presence-chooser.cpp
+++ b/global-presence-chooser.cpp
@@ -179,6 +179,10 @@ GlobalPresenceChooser::GlobalPresenceChooser(QWidget *parent) :
     m_modelExtended(new PresenceModelExtended(m_model, this))
 {
     this->setModel(m_modelExtended);
+    //set an invalid index, which makes the combobox empty and not showing incorrect presence
+    //for short time, this will be changed as soon as GlobalPresence has been init'd
+    //see bug #310529
+    setCurrentIndex(-1);
 
     setEditable(false);
     //needed for mousemove events
@@ -187,6 +191,8 @@ GlobalPresenceChooser::GlobalPresenceChooser(QWidget *parent) :
     m_busyOverlay = new KPixmapSequenceOverlayPainter(this);
     m_busyOverlay->setSequence(KPixmapSequence("process-working"));
     m_busyOverlay->setWidget(this);
+    //start the spinner before the combobox shows correct presence
+    m_busyOverlay->start();
 
     m_changePresenceMessageButton = new QPushButton(this);
     m_changePresenceMessageButton->setIcon(KIcon("document-edit"));
@@ -198,7 +204,6 @@ GlobalPresenceChooser::GlobalPresenceChooser(QWidget *parent) :
     connect(m_globalPresence, SIGNAL(connectionStatusChanged(Tp::ConnectionStatus)), SLOT(onConnectionStatusChanged(Tp::ConnectionStatus)));
     connect(m_changePresenceMessageButton, SIGNAL(clicked(bool)), this, SLOT(onChangePresenceMessageClicked()));
 
-    onPresenceChanged(m_globalPresence->currentPresence());
 }
 
 void GlobalPresenceChooser::setAccountManager(const Tp::AccountManagerPtr &accountManager)
@@ -299,6 +304,9 @@ bool GlobalPresenceChooser::event(QEvent *e)
 
 void GlobalPresenceChooser::onCurrentIndexChanged(int index)
 {
+    if (index == -1) {
+        return;
+    }
     //if they select the "configure item"
     if (index == count()-1) {
         QWeakPointer<CustomPresenceDialog> dialog = new CustomPresenceDialog(m_model, this);
@@ -364,12 +372,14 @@ void GlobalPresenceChooser::onPresenceChanged(const KTp::Presence &presence)
             if (itemPresence != m_modelExtended->temporaryPresence()) {
                 m_modelExtended->removeTemporaryPresence();
             }
+            m_busyOverlay->stop();
             return;
         }
     }
 
     QModelIndex index = m_modelExtended->addTemporaryPresence(presence);
     setCurrentIndex(index.row());
+    m_busyOverlay->stop();
 }
 
 void GlobalPresenceChooser::onConnectionStatusChanged(Tp::ConnectionStatus connectionStatus)

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list