[Kde-pim] kmail + modal error dialogs

Martin Koller kollix at aon.at
Sun Sep 13 17:40:23 BST 2009


Hi,

working on improving kmail wrt error dialogs (see also 
https://bugs.kde.org/show_bug.cgi?id=115962 )
I'd like to improve the situation especially with mail checking and connection errors.
Currently when triggered manually the KIO job error is shown in a modal error dialog. But when a connection can not 
be established, there is a timeout involved, which can be rather long, which means: when the error is finally 
detected in the KIO-slave, the user triggering the mail check probably did already something else in the meantime. 
So there is no reason to show him a modal dialog.
I'd like to change that to KNotification::event.
If that is in principle ok for you, I will also adapt the IMAP account in this way.


Index: popaccount.cpp
===================================================================
--- popaccount.cpp      (revision 1022100)
+++ popaccount.cpp      (working copy)
@@ -1089,8 +1089,15 @@
       }
       // 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();
   }

-- 
Best regards/Schöne Grüße

Martin    ()  ascii ribbon campaign - against html mail 
          /\                        - against microsoft attachments

Geschenkideen, Accessoires, Seifen, Kulinarisches: www.bibibest.at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090913/eb3f3686/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list