[SCM] ktp-kded-integration-module packaging branch, master, updated. debian/15.12.1-2-382-gbd961c2

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:15:33 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-kded-module.git;a=commitdiff;h=c3b2ab8

The following commit has been merged in the master branch:
commit c3b2ab81a3026f353a516de1b86e15eceb435cc9
Author: Alexandr Akulich <akulichalexander at gmail.com>
Date:   Fri Nov 29 17:46:29 2013 +0600

    ContactNotify: Notify with contacts avatar instead of presence icon.
    
    FEATURE: 327208
    REVIEW: 114113
---
 contactnotify.cpp | 8 ++++----
 contactnotify.h   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/contactnotify.cpp b/contactnotify.cpp
index 7b83cfd..314d48a 100644
--- a/contactnotify.cpp
+++ b/contactnotify.cpp
@@ -62,7 +62,7 @@ ContactNotify::ContactNotify(const Tp::AccountManagerPtr &accountMgr, QObject *p
 void ContactNotify::contactPresenceChanged(const Tp::Presence &presence)
 {
     KTp::Presence ktpPresence(presence);
-    Tp::ContactPtr contact(qobject_cast<Tp::Contact*>(QObject::sender()));
+    KTp::ContactPtr contact(qobject_cast<KTp::Contact*>(QObject::sender()));
     int priority = m_presenceHash[contact->id()];
 
     // Don't show presence messages when moving from a higher priority to a lower
@@ -74,14 +74,14 @@ void ContactNotify::contactPresenceChanged(const Tp::Presence &presence)
                                "%1 is now %2",
                                contact->alias(),
                                ktpPresence.displayString()),
-                         ktpPresence.icon(),
+                         contact->avatarPixmap(),
                          contact);
     }
 
     m_presenceHash.insert(contact->id(), Presence::sortPriority(presence.type()));
 }
 
-void ContactNotify::sendNotification(const QString &text, const KIcon &icon, const Tp::ContactPtr &contact)
+void ContactNotify::sendNotification(const QString &text, const QPixmap &pixmap, const Tp::ContactPtr &contact)
 {
     //The pointer is automatically deleted when the event is closed
     KNotification *notification;
@@ -90,7 +90,7 @@ void ContactNotify::sendNotification(const QString &text, const KIcon &icon, con
     KAboutData aboutData("ktelepathy", 0, KLocalizedString(), 0);
     notification->setComponentData(KComponentData(aboutData));
 
-    notification->setPixmap(icon.pixmap(48));
+    notification->setPixmap(pixmap);
     notification->setText(text);
     notification->addContext(QLatin1String("contact"), contact.data()->id());
     notification->sendEvent();
diff --git a/contactnotify.h b/contactnotify.h
index ee79f89..4dc71e4 100644
--- a/contactnotify.h
+++ b/contactnotify.h
@@ -23,7 +23,7 @@
 
 #include <KTp/global-contact-manager.h>
 
-class KIcon;
+class QPixmap;
 
 using namespace KTp;
 
@@ -40,7 +40,7 @@ private Q_SLOTS:
     void saveAvatarTokens();
 
 private:
-    void sendNotification(const QString &text, const KIcon &icon, const Tp::ContactPtr &contact);
+    void sendNotification(const QString &text, const QPixmap &pixmap, const Tp::ContactPtr &contact);
 
     Tp::AccountManagerPtr m_accountManager;
     QHash<QString, int> m_presenceHash;

-- 
ktp-kded-integration-module packaging



More information about the pkg-kde-commits mailing list