[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kmail
From: Till Adam <adam () kde ! org>
Date: 2005-04-21 21:41:08
Message-ID: 20050421214108.C032662C () office ! kde ! org
[Download RAW message or body]
CVS commit by tilladam:
Add a "don't bug me again" enabled info dialog to the status bar notification about \
broken connections or timeouts.
M +20 -20 imapaccountbase.cpp 1.121
--- kdepim/kmail/imapaccountbase.cpp #1.120:1.121
@@ -590,8 +590,5 @@ namespace KMail {
// check if we still display an error
- if ( !mErrorDialogIsActive
- && errorCode != KIO::ERR_USER_CANCELED
- && errorCode != KIO::ERR_SERVER_TIMEOUT
- && errorCode != KIO::ERR_CONNECTION_BROKEN ) {
+ if ( !mErrorDialogIsActive && errorCode != KIO::ERR_USER_CANCELED ) {
mErrorDialogIsActive = true;
QString msg = context + '\n' + KIO::buildErrorString( errorCode, errorMsg );
@@ -599,4 +596,15 @@ namespace KMail {
if ( jobsKilled || errorCode == KIO::ERR_COULD_NOT_LOGIN ) {
+ if ( errorCode == KIO::ERR_SERVER_TIMEOUT || errorCode == \
KIO::ERR_CONNECTION_BROKEN ) { + msg = "<qt>The connection to the server was \
unexpectedly closed or timed out. It will be re-established automatically if \
possible."; + KMessageBox::information( kapp->activeWindow(), msg, caption, \
"kmailConnectionBrokenErrorDialog" ); + // Show it in the status bar, in \
case the user has ticked "don't show again" + if ( errorCode == \
KIO::ERR_CONNECTION_BROKEN ) + \
KPIM::BroadcastStatus::instance()->setStatusMsg( + i18n( "The \
connection to account %1 was broken." ).arg( name() ) ); + else if ( \
errorCode == KIO::ERR_SERVER_TIMEOUT ) + \
KPIM::BroadcastStatus::instance()->setStatusMsg( + i18n( "The \
connection to account %1 timed out." ).arg( name() ) ); + } else {
if ( !errors.isEmpty() )
KMessageBox::detailedError( kapp->activeWindow(), msg, \
errors.join("\n").prepend("<qt>"), caption ); @@ -604,6 +612,6 @@ namespace KMail {
KMessageBox::error( kapp->activeWindow(), msg, caption );
}
- else // i.e. we have a chance to continue, ask the user about it
- {
+ }
+ else { // i.e. we have a chance to continue, ask the user about it
if ( errors.count() >= 3 ) { // there is no detailedWarningContinueCancel... \
(#86517)
msg = QString( "<qt>") + context + errors[1] + '\n' + errors[2];
@@ -620,13 +628,5 @@ namespace KMail {
if ( mErrorDialogIsActive )
kdDebug(5006) << "suppressing error:" << errorMsg << endl;
- else if ( errorCode == KIO::ERR_CONNECTION_BROKEN )
- KPIM::BroadcastStatus::instance()->setStatusMsg(
- i18n( "The connection to account %1 was broken." ).arg( name() ) );
- else if ( errorCode == KIO::ERR_SERVER_TIMEOUT )
- KPIM::BroadcastStatus::instance()->setStatusMsg(
- i18n( "The connection to account %1 timed out." ).arg( name() ) );
-
}
-
if ( job && !jobsKilled )
removeJob( job );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic