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/3031c20894c52f1586e435cd561c4264d= 695a83a 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::Tube= ChannelPtr& channel, QObj = KService::List services =3D KServiceTypeTrader::self()->query(QLatin1S= tring("KTpApprover")); kDebug() << "Found" << services.count() << "KTpApprover services"; - if (services.isEmpty()) { - showNotification(i18n("Unknown Incoming Tube"), i18n("Incoming tub= e from %1 of an unknown type"), - QLatin1String("dialog-warning"), channel->initiat= orContact()); - return; - } - - Q_FOREACH(const KService::Ptr &service, services) { - if ((service->property(QLatin1String("X-KTp-ChannelType")) !=3D ch= annel->channelType()) || - (service->property(QLatin1String("X-KTp-Service")) !=3D servic= eName)) { - continue; + if (!services.isEmpty()) { + Q_FOREACH(const KService::Ptr &service, services) { + if ((service->property(QLatin1String("X-KTp-ChannelType")) != =3D channel->channelType()) || + (service->property(QLatin1String("X-KTp-Service")) !=3D se= rviceName)) { + + continue; + } + m_service =3D service; } - - m_service =3D 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->initiat= orContact()); + showNotification(i18n("Unknown Incoming Connection"), + i18n("%1 wants to start an unknown service with y= ou", channel->initiatorContact()->alias()), + QLatin1String("dialog-warning"), + channel->initiatorContact()); + return; } =20