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


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

The following commit has been merged in the master branch:
commit 873d45727d02ba82a54eb466de8e81392f289f08
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Tue Jun 19 00:57:45 2012 +0100

    Suppress any notifications relating to network issues if solid says the network is down.
    
    Mission Control uses network manager to drop the connections, however it reports taking them down as "network failures" which we then present to the user.
    REVIEW: 105270
---
 CMakeLists.txt    | 1 +
 error-handler.cpp | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b0fe150..96cedcf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,7 @@ target_link_libraries (kded_ktp_integration_module
                        ${KTP_LIBRARIES}
                        ${KDE4_KDEUI_LIBS}
                        ${KDE4_KIDLETIME_LIBRARY}
+                       ${KDE4_SOLID_LIBS}
 )
 
 install (TARGETS kded_ktp_integration_module
diff --git a/error-handler.cpp b/error-handler.cpp
index 9d16aa1..5bfe7ae 100644
--- a/error-handler.cpp
+++ b/error-handler.cpp
@@ -25,6 +25,8 @@
 
 #include <KTp/error-dictionary.h>
 
+#include <Solid/Networking>
+
 ErrorHandler::ErrorHandler(const Tp::AccountManagerPtr& am, QObject* parent)
     : QObject(parent)
 {
@@ -62,7 +64,10 @@ void ErrorHandler::handleErrors(const Tp::ConnectionStatus status)
                 showMessageToUser(i18nc("%1 ist the account name", "Could not connect %1. Authentication failed (is your password correct?)", account->displayName()), ErrorHandler::SystemMessageError);
                 break;
             case Tp::ConnectionStatusReasonNetworkError:
-                showMessageToUser(i18nc("%1 ist the account name", "Could not connect %1. There was a network error, check your connection", account->displayName()), ErrorHandler::SystemMessageError);
+                //if connected to the network, and there was a network error - display it. Otherwise do nothing.
+                if (Solid::Networking::status() == Solid::Networking::Connected) {
+                    showMessageToUser(i18nc("%1 ist the account name", "Could not connect %1. There was a network error, check your connection", account->displayName()), ErrorHandler::SystemMessageError);
+                }
                 break;
             default:
                 showMessageToUser(i18nc("%1 ist the account name, %2 the error message", "There was a problem while trying to connect %1 - %2", account->displayName(), KTp::ErrorDictionary::displayVerboseErrorMessage(connectionError)), ErrorHandler::SystemMessageError);

-- 
ktp-kded-integration-module packaging



More information about the pkg-kde-commits mailing list