author | groucho <groucho> | 2003-04-29 08:04:34 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-29 08:04:34 (UTC) |
commit | f09f685be0540e98cc33bc4f664a812aed756926 (patch) (side-by-side diff) | |
tree | 10a2193eafd1dc0ae25cd458f3bfa9f0f23522e1 /noncore/unsupported/mailit/writemail.cpp | |
parent | e096c9d1f2be1ec74ede583fc4221871a56ef508 (diff) | |
download | opie-f09f685be0540e98cc33bc4f664a812aed756926.zip opie-f09f685be0540e98cc33bc4f664a812aed756926.tar.gz opie-f09f685be0540e98cc33bc4f664a812aed756926.tar.bz2 |
- added ReplyAll for CC: addressing
- added a download button in mail view
- smaller layout fixes
- now it's getting to be real useful
Diffstat (limited to 'noncore/unsupported/mailit/writemail.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/writemail.cpp | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/noncore/unsupported/mailit/writemail.cpp b/noncore/unsupported/mailit/writemail.cpp index dcf0c6e..c75494e 100644 --- a/noncore/unsupported/mailit/writemail.cpp +++ b/noncore/unsupported/mailit/writemail.cpp @@ -19,14 +19,13 @@ **********************************************************************/ #include <qmessagebox.h> #include <qwhatsthis.h> #include "writemail.h" #include <qpe/resource.h> -WriteMail::WriteMail( QWidget* parent, const char* name, WFlags fl ) - : QMainWindow( parent, name, fl ) +WriteMail::WriteMail( QWidget* parent, const char* name, WFlags fl ):QMainWindow( parent, name, fl ) { showingAddressList = FALSE; init(); addAtt = new AddAtt(0, "Add Attachments"); } @@ -265,25 +264,31 @@ void WriteMail::reply(Email replyMail, bool replyAll) ccRecipients.append(*it); ccRecipients.append(";"); } ccRecipients.truncate(ccRecipients.length()-1); //no ; at the end ccInput->setText(ccRecipients); } - - addRecipients(replyAll); + else ccInput->clear(); subjectInput->setText(tr("Re: ") + mail.subject); + QString citation=mail.fromMail; + citation.append(tr(" wrote on ")); + citation.append(mail.date); + citation.append(":\n"); + + + //mail.body.insert(0,tr("On")); pos = 0; mail.body.insert(pos, ">"); while (pos != -1) { pos = mail.body.find('\n', pos); if (pos != -1) mail.body.insert(++pos, ">>"); } - + mail.body.insert(0,citation); emailInput->setText(mail.body); } void WriteMail::forward(Email forwMail) { int pos=0; @@ -305,29 +310,36 @@ void WriteMail::forward(Email forwMail) bool WriteMail::getRecipients(bool ccField) { QString str, temp; int pos = 0; + if (ccField) + { + mail.carbonCopies.clear(); + temp = ccInput->text(); + } + else + { mail.recipients.clear(); - - ccField ? temp = ccInput->text() : temp=toInput->text() ; + temp=toInput->text() ; + } while ( (pos = temp.find(';')) != -1) { str = temp.left(pos).stripWhiteSpace(); temp = temp.right(temp.length() - (pos + 1)); if ( str.find('@') == -1) return false; ccField ? mail.carbonCopies.append(str) : mail.recipients.append(str); - addressList->addContact(str, ""); + //addressList->addContact(str, ""); } temp = temp.stripWhiteSpace(); if ( temp.find('@') == -1) return false; ccField ? mail.carbonCopies.append(temp) : mail.recipients.append(temp); - addressList->addContact(temp, ""); + //addressList->addContact(temp, ""); return TRUE; } void WriteMail::addRecipients() { @@ -380,10 +392,11 @@ void WriteMail::setRecipient(const QString &recipient) toInput->setText(recipient); } void WriteMail::newMail() { toInput->clear(); + ccInput->clear(); subjectInput->clear(); emailInput->clear(); setAddressList(addressList); } |