[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: [PATCH] fix bug 43417
From:       Carsten Burghardt <cb () magic-shop ! de>
Date:       2002-08-27 5:47:30
[Download RAW message or body]

On Monday 26 August 2002 23:56, Ingo Klöcker wrote:
> On Monday 26 August 2002 23:24, Carsten Burghardt wrote:
> > ----- Original Message -----
> > From: "Ingo Klöcker" <kloecker@kde.org>
> > To: <kmail@kde.org>
> > Sent: Monday, August 26, 2002 10:57 PM
> > Subject: Re: [PATCH] fix bug 43417
> >
> > > On Monday 26 August 2002 22:37, Carsten Burghardt wrote:
> > > > this patch reloads the folderlisting when kmail gets an error
> > > > that the folder doesn't exist anymore.
> > > >
> > > > +     i18n("The folder %1 was obviously deleted on the server, do
> > > > you want to remove it?")
> > >
> > > That's a pretty confusing message. How could you remove an already
> > > deleted folder?
> >
> > Remove it from your folderlist?
>
> I understood more or less what this message is about. But the average
> user (and the translators) won't understand it. What about this
> "The folder %1 was deleted on the server. Do you want to remove it
> locally?"
> or
> "The folder %1 was deleted on the server. Do you want to remove it from
> the list of folders?"

Yes, this is better. I changed it. And know anybody should test it ;-)

> > > What happens when the user doesn't remove the folder? Will it still
> > > be present in the folder list? Does it make sense not to remove the
> > > folder? Maybe it will make sense when all messages are cached
> > > locally, i.e. in KDE 3.2, but currently I don't see a reason for
> > > keeping a non-existant folder.
> >
> > This message has two reasons:
> > - to inform the user what happened / will happen
>
> This is o.k.. But in this case a simple KMessageBox::information() would
> suffice.
>
> > - to make sure we don´t delete a folder that is still needed
>
> And this is what I don't understand. What should a folder which doesn't
> exist anymore on the server be still needed for? And even if it's still
> needed ... it's gone. The only reason would be to keep the properties
> of this folder if it has only been deleted/moved temporarily.

I don't know what this folder can be used for but I think it's better to give 
the user a chance to decide this.

> Please don't misunderstand me. I'm not against showing this question and
> giving the user the opportunity to decide himself what should happen. I
> only think that the current message isn't very clear and should be
> reworded.
>
> Regards,
> Ingo
>
>
> _______________________________________________
> KMail Developers mailing list
> kmail@mail.kde.org
> http://mail.kde.org/mailman/listinfo/kmail

-- 
Regards,

Carsten Burghardt
["deletefolder.diff" (text/x-diff)]

Index: kmacctimap.cpp
===================================================================
RCS file: /home/kde/kdenetwork/kmail/kmacctimap.cpp,v
retrieving revision 1.102
diff -u -3 -p -r1.102 kmacctimap.cpp
--- kmacctimap.cpp	2002/08/20 10:42:06	1.102
+++ kmacctimap.cpp	2002/08/27 05:45:34
@@ -366,6 +366,32 @@ void KMAcctImap::slotSlaveError(KIO::Sla
   if (aSlave != mSlave) return;
   if (errorCode == KIO::ERR_SLAVE_DIED) slaveDied();
   if (errorCode == KIO::ERR_COULD_NOT_LOGIN && !mStorePasswd) mAskAgain = TRUE;
+  if (errorCode == KIO::ERR_DOES_NOT_EXIST ||
+      errorCode == KIO::ERR_COULD_NOT_READ)
+  {
+    // a folder is gone
+    // get the folderpath from the message
+    KURL url(errorMsg);
+    QString folderpath = url.path();
+    int uid = folderpath.findRev(";");
+    if (uid != -1)
+      folderpath.truncate(uid);
+    errorDialogIsActive = true;
+    if ( KMessageBox::questionYesNo(0,
+          i18n("The folder %1 was deleted on the server, \
+            do you want to remove it from the list of folders?")
+          .arg(folderpath),
+          i18n("Error")) == KMessageBox::Yes )
+    {
+      errorDialogIsActive = false;
+      // reload folders
+      if (mFolder) mFolder->listDirectory();
+    } else {
+      errorDialogIsActive = false;
+    }
+    return;
+  }
+  killAllJobs();
   // check if we still display an error
   if ( !errorDialogIsActive )
   {
@@ -378,7 +404,6 @@ void KMAcctImap::slotSlaveError(KIO::Sla
     }
   } else
     kdDebug() << "suppressing error:" << errorMsg << endl;
-  killAllJobs();
 }
 
 
@@ -504,7 +529,7 @@ void KMAcctImap::slotSimpleResult(KIO::J
   if (job->error())
   {
     if (!quiet) slotSlaveError(mSlave, job->error(),
-        job->errorString() );
+        job->errorText() );
     if (job->error() == KIO::ERR_SLAVE_DIED) slaveDied();
   }
   displayProgress();

_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic