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


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

The following commit has been merged in the master branch:
commit 13cb0713e37c7261243222fe159da0327cf5c3d7
Author: Dan Vrátil <dan at progdan.cz>
Date:   Sun Mar 11 21:49:41 2012 +0100

    The relevence calculation was excluding contacts with photo
---
 contactrunner.cpp | 59 +++++++++++++++++++++++++++----------------------------
 1 file changed, 29 insertions(+), 30 deletions(-)

diff --git a/contactrunner.cpp b/contactrunner.cpp
index 95d5485..b734052 100644
--- a/contactrunner.cpp
+++ b/contactrunner.cpp
@@ -205,40 +205,39 @@ void ContactRunner::match(Plasma::RunnerContext& context)
                         contactIndex.data(AccountsModel::IdRole).toString());
             match.setType(Plasma::QueryMatch::ExactMatch);
 
+            QString iconName;
+            switch (contactIndex.data(AccountsModel::PresenceTypeRole).toInt()) {
+                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;
+            }
+
             QString iconFile = contactIndex.data(AccountsModel::AvatarRole).toString();
             if (!iconFile.isEmpty() && QFile::exists(iconFile)) {
                 match.setIcon(QIcon(iconFile));
             } else {
-                QString iconName;
-
-                switch (contactIndex.data(AccountsModel::PresenceTypeRole).toInt()) {
-                    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;
-                }
-
                 match.setIcon(QIcon::fromTheme(iconName));
             }
 

-- 
ktp-contact-runner packaging



More information about the pkg-kde-commits mailing list