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


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

The following commit has been merged in the master branch:
commit db39676f7c23f3008fd3bed64b30eefa3b6f8f2f
Author: George Goldberg <grundleborg at googlemail.com>
Date:   Sat Jul 12 05:47:39 2008 +0000

    Draw icon in view for the status type of each account.
    
    svn path=/trunk/playground/base/plasma/applets/presence/; revision=831203
---
 presence/src/presence.cpp | 15 ++++++---------
 presence/src/presence.h   |  2 --
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/presence/src/presence.cpp b/presence/src/presence.cpp
index ea5a96b..5160075 100644
--- a/presence/src/presence.cpp
+++ b/presence/src/presence.cpp
@@ -19,6 +19,8 @@
 
 #include "presence.h"
 
+#include "presenceitemdelegate.h"
+
 #include <plasma/theme.h>
 #include <plasma/widgets/icon.h>
 
@@ -27,7 +29,6 @@
 #include <KColorScheme>
 #include <KDebug>
 #include <KIcon>
-#include <KLineEdit>
 
 #include <QtTapioca/PresenceState>
 
@@ -44,7 +45,6 @@ PresenceApplet::PresenceApplet(QObject * parent, const QVariantList & args)
   : PlasmaAppletDialog(parent, args),
     m_engine(0),
     m_colorScheme(0),
-    m_messageEdit(0),
     m_masterStatusLayout(0),
     m_masterIconLabel(0),
     m_masterStatusMessageLabel(0),
@@ -83,11 +83,11 @@ PresenceApplet::initialize()
     m_accountsModel->setColumnCount(4);
 
     m_accountsModel->setHeaderData(1, Qt::Horizontal,
-                                   QVariant("online?"), Qt::DisplayRole);
+                                   QVariant("status-type"), Qt::DisplayRole);
     m_accountsModel->setHeaderData(2, Qt::Horizontal,
-                                   QVariant("status"), Qt::DisplayRole);
+                                   QVariant("status-name"), Qt::DisplayRole);
     m_accountsModel->setHeaderData(3, Qt::Horizontal,
-                                   QVariant("message"), Qt::DisplayRole);
+                                   QVariant("status-message"), Qt::DisplayRole);
 
     Q_ASSERT(!m_engine);  // Pointer should still be assigned to 0.
     m_engine = dataEngine("presence");
@@ -112,6 +112,7 @@ PresenceApplet::widget()
         // Set up the accounts view.
         Q_ASSERT(!m_accountsView);  // Pointer should still be assigned to 0.
         m_accountsView = new QTreeView;
+        m_accountsView->setItemDelegate(new PresenceItemDelegate);
         m_accountsView->setModel(m_accountsModel);
         m_accountsView->header()->setVisible(true);
         m_accountsView->setColumnHidden(0, true);   //Hide the source id column
@@ -133,16 +134,12 @@ PresenceApplet::widget()
         masterStatusMessageChanged(m_masterStatusMessage);
 
         // Set up the rest of the view/layout etc. stuff.
-        Q_ASSERT(!m_messageEdit);  // Pointer should still be assigned to 0.
-        m_messageEdit = new KLineEdit;
-
         Q_ASSERT(!m_widget);  // Pointer should still be assigned to 0.
         Q_ASSERT(!m_layout);  // Pointer should still be assigned to 0.
         m_widget = new QWidget();
         m_layout = new QVBoxLayout(m_widget);
         m_layout->addLayout(m_masterStatusLayout);
         m_layout->addWidget(m_accountsView);
-        m_layout->addWidget(m_messageEdit);
         m_widget->setLayout(m_layout);
 
         // Apply the theme's color scheme to the widget.
diff --git a/presence/src/presence.h b/presence/src/presence.h
index b2c27cd..e302dea 100644
--- a/presence/src/presence.h
+++ b/presence/src/presence.h
@@ -27,7 +27,6 @@
 #include <QtCore/QString>
 
 class KColorScheme;
-class KLineEdit;
 
 class QHBoxLayout;
 class QLabel;
@@ -64,7 +63,6 @@ private:
     Plasma::DataEngine * m_engine;
 
     KColorScheme * m_colorScheme;
-    KLineEdit * m_messageEdit;
 
     QHBoxLayout * m_masterStatusLayout;
     QLabel * m_masterIconLabel;

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list