Diffstat (limited to 'noncore/unsupported/mailit/writemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/writemail.cpp | 35 |
1 files changed, 24 insertions, 11 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 | |||
@@ -23,6 +23,5 @@ | |||
23 | #include <qpe/resource.h> | 23 | #include <qpe/resource.h> |
24 | 24 | ||
25 | WriteMail::WriteMail( QWidget* parent, const char* name, WFlags fl ) | 25 | WriteMail::WriteMail( QWidget* parent, const char* name, WFlags fl ):QMainWindow( parent, name, fl ) |
26 | : QMainWindow( parent, name, fl ) | ||
27 | { | 26 | { |
28 | showingAddressList = FALSE; | 27 | showingAddressList = FALSE; |
@@ -260,5 +259,5 @@ void WriteMail::reply(Email replyMail, bool replyAll) | |||
260 | 259 | ||
261 | if (replyAll) | 260 | if (replyAll) |
262 | { | 261 | { |
263 | for (QStringList::Iterator it = mail.carbonCopies.begin();it != mail.carbonCopies.end(); ++it) | 262 | for (QStringList::Iterator it = mail.carbonCopies.begin();it != mail.carbonCopies.end(); ++it) |
264 | { | 263 | { |
@@ -269,9 +268,15 @@ void WriteMail::reply(Email replyMail, bool replyAll) | |||
269 | ccInput->setText(ccRecipients); | 268 | ccInput->setText(ccRecipients); |
270 | } | 269 | } |
271 | 270 | else ccInput->clear(); | |
272 | addRecipients(replyAll); | ||
273 | 271 | ||
274 | subjectInput->setText(tr("Re: ") + mail.subject); | 272 | subjectInput->setText(tr("Re: ") + mail.subject); |
275 | 273 | ||
274 | QString citation=mail.fromMail; | ||
275 | citation.append(tr(" wrote on ")); | ||
276 | citation.append(mail.date); | ||
277 | citation.append(":\n"); | ||
278 | |||
279 | |||
280 | //mail.body.insert(0,tr("On")); | ||
276 | pos = 0; | 281 | pos = 0; |
277 | mail.body.insert(pos, ">"); | 282 | mail.body.insert(pos, ">"); |
@@ -281,5 +286,5 @@ void WriteMail::reply(Email replyMail, bool replyAll) | |||
281 | mail.body.insert(++pos, ">>"); | 286 | mail.body.insert(++pos, ">>"); |
282 | } | 287 | } |
283 | 288 | mail.body.insert(0,citation); | |
284 | emailInput->setText(mail.body); | 289 | emailInput->setText(mail.body); |
285 | } | 290 | } |
@@ -309,7 +314,14 @@ bool WriteMail::getRecipients(bool ccField) | |||
309 | int pos = 0; | 314 | int pos = 0; |
310 | 315 | ||
311 | mail.recipients.clear(); | 316 | if (ccField) |
312 | 317 | { | |
313 | ccField ? temp = ccInput->text() : temp=toInput->text() ; | 318 | mail.carbonCopies.clear(); |
319 | temp = ccInput->text(); | ||
320 | } | ||
321 | else | ||
322 | { | ||
323 | mail.recipients.clear(); | ||
324 | temp=toInput->text() ; | ||
325 | } | ||
314 | 326 | ||
315 | while ( (pos = temp.find(';')) != -1) { | 327 | while ( (pos = temp.find(';')) != -1) { |
@@ -319,5 +331,5 @@ bool WriteMail::getRecipients(bool ccField) | |||
319 | return false; | 331 | return false; |
320 | ccField ? mail.carbonCopies.append(str) : mail.recipients.append(str); | 332 | ccField ? mail.carbonCopies.append(str) : mail.recipients.append(str); |
321 | addressList->addContact(str, ""); | 333 | //addressList->addContact(str, ""); |
322 | } | 334 | } |
323 | temp = temp.stripWhiteSpace(); | 335 | temp = temp.stripWhiteSpace(); |
@@ -325,5 +337,5 @@ bool WriteMail::getRecipients(bool ccField) | |||
325 | return false; | 337 | return false; |
326 | ccField ? mail.carbonCopies.append(temp) : mail.recipients.append(temp); | 338 | ccField ? mail.carbonCopies.append(temp) : mail.recipients.append(temp); |
327 | addressList->addContact(temp, ""); | 339 | //addressList->addContact(temp, ""); |
328 | 340 | ||
329 | return TRUE; | 341 | return TRUE; |
@@ -384,4 +396,5 @@ void WriteMail::newMail() | |||
384 | { | 396 | { |
385 | toInput->clear(); | 397 | toInput->clear(); |
398 | ccInput->clear(); | ||
386 | subjectInput->clear(); | 399 | subjectInput->clear(); |
387 | emailInput->clear(); | 400 | emailInput->clear(); |