Commit 150074ea authored by Volker Krause's avatar Volker Krause
Browse files

Show notifications when mail sending failed.

svn path=/trunk/KDE/kdepim/runtime/; revision=1200755
parent baab0967
......@@ -62,3 +62,7 @@ Name[x-test]=xxE-mail successfully sentxx
Name[zh_CN]=邮件已成功发送
Name[zh_TW]=電子郵件已成功傳送
Action=Popup
[Event/sendingfailed]
Name=E-mail sending failed
Action=Popup
......@@ -310,6 +310,13 @@ void MailDispatcherAgent::Private::sendResult( KJob *job )
// The SendJob gave the item an ErrorAttribute, so we don't have to
// do anything.
kDebug() << "Sending failed. error:" << job->errorString();
const QPixmap pixmap = KIcon( "dialog-error" ).pixmap( KIconLoader::SizeSmall, KIconLoader::SizeSmall );
KNotification *notify = new KNotification( "sendingfailed" );
notify->setComponentData( q->componentData() );
notify->setPixmap( pixmap );
notify->setText( i18nc("Notification when email sending failed", "E-mail sending failed: %1", job->errorString() ) );
notify->sendEvent();
} else {
kDebug() << "Sending succeeded.";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment