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


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=eb7922e

The following commit has been merged in the master branch:
commit eb7922e96b6fabab9196e79cfde475b36ede32bf
Author: Siraj Razick <siraj at kdemail.net>
Date:   Thu Feb 26 18:19:03 2009 +0000

    use a shorter switch statement for master presence update, by making initial states false
    
    svn path=/trunk/playground/base/plasma/applets/presence/; revision=932476
---
 presence/src/presence.cpp | 47 +++++++++++++++++++----------------------------
 presence/src/presence.h   |  1 +
 2 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/presence/src/presence.cpp b/presence/src/presence.cpp
index a71fe41..04c624c 100644
--- a/presence/src/presence.cpp
+++ b/presence/src/presence.cpp
@@ -110,7 +110,6 @@ void PresenceApplet::init()
     connect(m_engine, SIGNAL(sourceRemoved(QString)),
             this, SLOT(sourceRemoved(QString)));
 }
-
 QWidget *PresenceApplet::widget()
 {
 	if(!m_widget)
@@ -119,6 +118,8 @@ QWidget *PresenceApplet::widget()
         Q_ASSERT(!m_accountsView);  // Pointer should still be assigned to 0.
         m_accountsView = new QTreeView;
         m_accountsView->setItemDelegate(new PresenceItemDelegate);
+        connect(m_accountsView->itemDelegate(), SIGNAL(commitData(QWidget*)),
+                    this, SLOT(commitData(QWidget*)));
         m_accountsView->setModel(m_accountsModel);
         m_accountsView->header()->setVisible(true);
         m_accountsView->setColumnHidden(0, true);   //Hide the source id column
@@ -159,7 +160,7 @@ QWidget *PresenceApplet::widget()
     }
 
     Q_ASSERT(m_widget);  // We must have a valid m_widget by now.
-    
+
     return m_widget;
 }
 
@@ -177,6 +178,11 @@ void PresenceApplet::sourceRemoved(const QString & source)
     m_engine->disconnectSource(source, this);
 }
 
+void PresenceApplet::commitData(QWidget * editor)
+{
+    kDebug();
+}
+
 void PresenceApplet::dataUpdated(const QString & source,
                             const Plasma::DataEngine::Data & data)
 {
@@ -310,17 +316,17 @@ void PresenceApplet::updateMasterPresence()
     int accountsHidden = 0;
     int accountsBusy = 0;
 
-    bool okOffline = true;
-    bool okAway = true;
-    bool okExtendedAway = true;
-    bool okHidden = true;
-    bool okBusy = true;
+    bool okOffline = false;
+    bool okAway = false;
+    bool okExtendedAway = false;
+    bool okHidden = false;
+    bool okBusy = false;
 
     // Iterate over all the accounts in the model, and total up how many are
     // in each type of presence state.
     for(int i=0; i<rowCount; i++)
     {
-        Telepathy::ConnectionPresenceType status_type = 
+        Telepathy::ConnectionPresenceType status_type =
             static_cast<Telepathy::ConnectionPresenceType>(m_accountsModel->data(m_accountsModel->index(i, 1)).toUInt());
 
         switch(status_type)
@@ -328,41 +334,26 @@ void PresenceApplet::updateMasterPresence()
         case Telepathy::ConnectionPresenceTypeOffline:
         case Telepathy::ConnectionPresenceTypeUnknown:
             accountsOffline++;
+            okOffline = true;
             break;
         case Telepathy::ConnectionPresenceTypeAvailable:
             accountsAvailable++;
-            okOffline = false;
-            okHidden = false;
-            okExtendedAway = false;
-            okAway = false;
-            okBusy = false;
             break;
         case Telepathy::ConnectionPresenceTypeAway:
             accountsAway++;
-            okOffline = false;
-            okHidden = false;
-            okExtendedAway = false;
-            okBusy = false;
+            okAway = true;
             break;
         case Telepathy::ConnectionPresenceTypeExtendedAway:
             accountsExtendedAway++;
-            okOffline = false;
-            okHidden = false;
-            okBusy = false;
+            okExtendedAway = true;
             break;
         case Telepathy::ConnectionPresenceTypeHidden:
             accountsHidden++;
-            okOffline = false;
-            okExtendedAway = false;
-            okAway = false;
-            okBusy = false;
+            okHidden = true;
             break;
         case Telepathy::ConnectionPresenceTypeBusy:
             accountsBusy++;
-            okOffline = false;
-            okHidden = false;
-            okExtendedAway = false;
-            okAway = false;
+            okBusy = true;
             break;
         case Telepathy::ConnectionPresenceTypeUnset:
         case Telepathy::ConnectionPresenceTypeError:
diff --git a/presence/src/presence.h b/presence/src/presence.h
index fea725b..1e2a4d6 100644
--- a/presence/src/presence.h
+++ b/presence/src/presence.h
@@ -57,6 +57,7 @@ private Q_SLOTS:
                      const Plasma::DataEngine::Data & data);
     void sourceAdded(const QString & source);
     void sourceRemoved(const QString & source);
+    void commitData(QWidget*editor);
 
 private:
     void iconChanged();

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list