From 7ebc757e09f6bea16bdb0d9b28d39102eb6a3bdf Mon Sep 17 00:00:00 2001 From: Martin Koller Date: Mon, 14 Sep 2009 20:25:02 +0000 Subject: [PATCH] handle a connection error as Knotification instead of a modal dialog. svn path=/trunk/KDE/kdepim/; revision=1023489 --- popaccount.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/popaccount.cpp b/popaccount.cpp index 78291ccef..191b39db9 100644 --- a/popaccount.cpp +++ b/popaccount.cpp @@ -1089,8 +1089,15 @@ void PopAccount::slotResult( KJob* ) } // force the dialog to be shown next time the account is checked if (!mStorePasswd) mPasswd = ""; - job->ui()->setWindow( 0 ); - job->ui()->showErrorMessage(); + if ( job->error() == KIO::ERR_COULD_NOT_CONNECT ) { + KNotification::event( "mail-check-error", + i18n( "Error while checking account %1 for new mail:\n%2", + name(), job->errorString() ) ); + } + else { + job->ui()->setWindow( 0 ); + job->ui()->showErrorMessage(); + } } slotCancel(); }