[SCM] ktp-contact-runner packaging branch, master, updated. debian/15.12.1-2-244-g38a1f58

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 17:50:25 UTC 2016


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

The following commit has been merged in the master branch:
commit 3778318c9273580b017cf5b63119c5035636378d
Author: Dan Vrátil <dan at progdan.cz>
Date:   Mon Mar 12 20:02:16 2012 +0100

    Revert "Use KTp::Presence to get valid presence icon"
    
    This reverts commit 271a2c0bfb976bbff78407b84d26a42763adb8cf.
    
    Conflicts:
    
    	contactrunner.cpp
---
 contactrunner.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/contactrunner.cpp b/contactrunner.cpp
index d325df5..e16e134 100644
--- a/contactrunner.cpp
+++ b/contactrunner.cpp
@@ -222,25 +222,32 @@ void ContactRunner::match(Plasma::RunnerContext &context)
                         contactIndex.data(AccountsModel::IdRole).toString());
             match.setType(Plasma::QueryMatch::ExactMatch);
 
+            QString iconName;
             KTp::Presence presence = contactIndex.data(AccountsModel::PresenceRole).value< KTp::Presence >();
             switch (presence.type()) {
             case Tp::ConnectionPresenceTypeAvailable:
+                iconName = "im-user";
                 relevance *= 10;
                 break;
             case Tp::ConnectionPresenceTypeBusy:
+                iconName = "im-user-busy";
                 relevance *= 8;
                 break;
             case Tp::ConnectionPresenceTypeAway:
             case Tp::ConnectionPresenceTypeExtendedAway:
+                iconName = "im-user-away";
                 relevance *= 6;
                 break;
             case Tp::ConnectionPresenceTypeHidden:
+                iconName = "im-invisible-user";
                 relevance *= 4;
                 break;
             case Tp::ConnectionPresenceTypeOffline:
+                iconName = "im-user-offline";
                 relevance *= 1;
                 break;
             default:
+                iconName = "im-user-offline";
                 relevance *= 1;
                 break;
             }
@@ -249,7 +256,7 @@ void ContactRunner::match(Plasma::RunnerContext &context)
             if (!iconFile.isEmpty() && QFile::exists(iconFile)) {
                 match.setIcon(QIcon(iconFile));
             } else {
-                match.setIcon(presence.icon());
+                match.setIcon(QIcon::fromTheme(iconName));
             }
 
             if (!presence.statusMessage().isEmpty()) {

-- 
ktp-contact-runner packaging



More information about the pkg-kde-commits mailing list