[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: [PATCH] Don't block remaining messages when sending a message
From: Ingo =?iso-8859-1?q?Kl=F6cker?= <kloecker () kde ! org>
Date: 2003-04-27 15:51:18
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Sunday 27 April 2003 11:30, Till Adam wrote:
> currently failure to send one message in the outbox blocks all
> others. Unless there is some sort of policy/security reason for this
> which I don't know about, I propose the attached changes to avoid
> that.
The historical reason for this behavior was that it didn't make sense to
continue sending if sending failed due to a general problem, e. g. SMTP
server not reachable. This comes from back in the day when only one
sending transport was possible. Furthermore it's pretty much impossible
for KMail to determine whether the sending failed due to an error in
the message or due to a general problem. Your patch improves the latter
situation in that it allows the user to continue sending the other
messages. Even better would be if we would automatically continue to
send messages which are to be sent via different sending accounts. Of
course in some cases sending via all remote accounts might fail (e.g.
because of routing problems) so in this case multiple message boxes
might popup. I'm not sure whether it's necessary to try to prevent this
from happening.
So to sum up: Your patch is a first step in the right direction. Thanks!
> When sending a message fails, it pops up a dialog informing the
> user of failure if there are no further messages, or, if there are,
> pops up a YesNo dialog asking the user whether she wants to try
> sending the remaining messages. That way the user can abort the
> sending of 724 messages in the outbox all using the same (failing)
> transport, for example, when the first one fails, but can continue
> sending when she knows that there are others in there which will
> likely not fail.
A few comments:
- Even if sending of some messages failed we should still show how many
messages could be sent. So you should change
setStatusMsg(i18n("Failed to send (some) queued messages."));
to something like
if( mSentMessages == 0 )
setStatusMsg( i18n( "No message was sent successfully." ) )
else if( mSentMessages == mTotalMessages )
setStatusMsg( i18n( "%n message was sent successfully.",
"%n messages were sent successfully.",
mSentMessages ) );
else
setStatusMsg( i18n( "%n of %1 messages was sent successfully.",
"%n of %1 messages were sent successfully.",
mSentMessages ) )
.arg( mTotalMessages ) );
- The KDE style guide says that buttons with the labels "Yes" and "No"
should be avoided. Instead use "&Continue sending" and "&Abort sending"
as labels for the buttons.
- "\n\n" in messages is depreciated. Use Qt's richtext tags if you want
to separate paragraphs, i. e. enclose paragraphs in <p>...</p>.
- Text puzzles like msg = msg + i18n("\n\n...") should be avoided as
they could prevent proper translation into some strange languages. In
this particular case it might work in all languages since it just
combines two different paragraphs, but to be on the safe side please
remove the text puzzle and instead repeat the first paragraph in the
message with the additional paragraph.
- I don't understand this:
+ if (mCurrentMsg && mCurrentMsg->msgId() < mLockedMessages)
+ mLockedMessages--;
KMMessage::msgId() is a string (the Message-Id of the message) and
mLockedMessages an integer. How can you compare them and for what
purpose are you trying to compare them? And why do you decrease
mLockedMessages? It's only increased if sending of a message failed. So
in which case is decreasing this variable necessary?
BTW, I would prefer mFailedMessages instead of mLockedMessages as
variable name.
Regards,
Ingo
[Attachment #5 (application/pgp-signature)]
_______________________________________________
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