kolab/issue 1658 - Adding a warning for empty To : field. Now if the To : field is empty it gives you

KMessageBox::QuestionYesNo warning. If user presses Yes, the mail is sent anyway. But if the user selects No the
focus is set on To: field. Earlier cases work like they used to before the change.

Allen, would you like this feature in branch/pim? I have tested it, its not so intrusive as well. I can port it if 
you think it would be a nice thing to add. I checked with my 3.5/kubuntu vanilla and enterprise kmail. It does send 
emails without any warning even if there is a empty To: field.

CCMAIL:winterz@kde.org

svn path=/branches/kdepim/proko2/kdepim/; revision=644062
wilder-work
Pradeepto Bhattacharya 19 years ago
parent 7af0c14539
commit b7ef88d6de
  1. 21
      kmcomposewin.cpp

@ -3344,13 +3344,26 @@ void KMComposeWin::doSend(int aSendNow, bool saveInDrafts)
"not have to enter it for each message.") );
return;
}
if (to().isEmpty() && cc().isEmpty() && bcc().isEmpty())
if ( to().isEmpty() )
{
mEdtTo->setFocus();
KMessageBox::information( this,
if ( cc().isEmpty() && bcc().isEmpty()) {
mEdtTo->setFocus();
KMessageBox::information( this,
i18n("You must specify at least one receiver,"
"either in the To: field or as CC or as BCC.") );
return;
return;
}
else {
mEdtTo->setFocus();
int rc =
KMessageBox::questionYesNo( this,
i18n("To field is missing."
"Send message anyway?"),
i18n("No To: specified") );
if ( rc == KMessageBox::No ){
return;
}
}
}
if (subject().isEmpty())

Loading…
Cancel
Save