[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    [ktp-approver/kde-telepathy-0.6] src: Loose the word "tube" in notification; simplify logic
From:       Martin Klapetek <martin.klapetek () gmail ! com>
Date:       2013-04-14 5:54:00
Message-ID: 20130414055400.E7744A605E () git ! kde ! org
[Download RAW message or body]

Git commit 3031c20894c52f1586e435cd561c4264d695a83a by Martin Klapetek.
Committed on 14/04/2013 at 07:53.
Pushed by mklapetek into branch 'kde-telepathy-0.6'.

Loose the word "tube" in notification; simplify logic

The two previously handled cases - no services found and no service
found for the particular tube are actually the same, so this unifies
them into one case with one notification.

Breaks string freeze.

REVIEW: 110004
CCMAIL: kde-i18n-doc@kde.org

M  +14   -14   src/tubechannelapprover.cpp

http://commits.kde.org/telepathy-approver/3031c20894c52f1586e435cd561c4264d695a83a

diff --git a/src/tubechannelapprover.cpp b/src/tubechannelapprover.cpp
index cc651e0..83978c3 100644
--- a/src/tubechannelapprover.cpp
+++ b/src/tubechannelapprover.cpp
@@ -55,25 +55,25 @@ TubeChannelApprover::TubeChannelApprover(const \
Tp::TubeChannelPtr& channel, QObj  
     KService::List services = \
KServiceTypeTrader::self()->query(QLatin1String("KTpApprover"));  kDebug() << "Found" \
                << services.count() << "KTpApprover services";
-    if (services.isEmpty()) {
-        showNotification(i18n("Unknown Incoming Tube"), i18n("Incoming tube from %1 \
                of an unknown type"),
-                         QLatin1String("dialog-warning"), \
                channel->initiatorContact());
-        return;
-    }
-
-    Q_FOREACH(const KService::Ptr &service, services) {
-        if ((service->property(QLatin1String("X-KTp-ChannelType")) != \
                channel->channelType()) ||
-            (service->property(QLatin1String("X-KTp-Service")) != serviceName)) {
-            continue;
+    if (!services.isEmpty()) {
+        Q_FOREACH(const KService::Ptr &service, services) {
+            if ((service->property(QLatin1String("X-KTp-ChannelType")) != \
channel->channelType()) || +                \
(service->property(QLatin1String("X-KTp-Service")) != serviceName)) { +
+                continue;
+            }
+            m_service = service;
         }
-
-        m_service = service;
     }
 
+
     if (!m_service) {
         kDebug() << "No service to match" << channel->channelType() << "," << \
                serviceName;
-        showNotification(i18n("Incoming Request"), i18n("%1 wants to start a remote \
                service with you"),
-                         QLatin1String("dialog-warning"), \
channel->initiatorContact()); +        showNotification(i18n("Unknown Incoming \
Connection"), +                         i18n("%1 wants to start an unknown service \
with you", channel->initiatorContact()->alias()), +                         \
QLatin1String("dialog-warning"), +                         \
channel->initiatorContact()); +
         return;
     }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic