Diffstat (limited to 'noncore/unsupported/mailit/writemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/writemail.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/noncore/unsupported/mailit/writemail.cpp b/noncore/unsupported/mailit/writemail.cpp index 0336c83..dcf0c6e 100644 --- a/noncore/unsupported/mailit/writemail.cpp +++ b/noncore/unsupported/mailit/writemail.cpp | |||
@@ -123,7 +123,7 @@ void WriteMail::init() | |||
123 | 123 | ||
124 | emailInput = new QMultiLineEdit( widget, "emailInput" ); | 124 | emailInput = new QMultiLineEdit( widget, "emailInput" ); |
125 | grid->addMultiCellWidget( emailInput, 2, 2, 0, 2); | 125 | grid->addMultiCellWidget( emailInput, 2, 2, 0, 2); |
126 | QWhatsThis::add(recipientsBox,QWidget::tr("Enter your mail text here")); | 126 | QWhatsThis::add(emailInput,QWidget::tr("Enter your mail text here")); |
127 | 127 | ||
128 | addressView = new QListView( widget, "addressView"); | 128 | addressView = new QListView( widget, "addressView"); |
129 | addressView->addColumn("Name"); | 129 | addressView->addColumn("Name"); |
@@ -132,7 +132,7 @@ void WriteMail::init() | |||
132 | addressView->setMultiSelection(TRUE); | 132 | addressView->setMultiSelection(TRUE); |
133 | addressView->hide(); | 133 | addressView->hide(); |
134 | grid->addMultiCellWidget( addressView, 3, 3, 0, 2); | 134 | grid->addMultiCellWidget( addressView, 3, 3, 0, 2); |
135 | QWhatsThis::add(recipientsBox,QWidget::tr("Chose the recipients from this list")); | 135 | QWhatsThis::add(recipientsBox,QWidget::tr("Choose the recipients from this list")); |
136 | 136 | ||
137 | okButton = new QToolButton(bar, "ok"); | 137 | okButton = new QToolButton(bar, "ok"); |
138 | okButton->setPixmap( Resource::loadPixmap("enter") ); | 138 | okButton->setPixmap( Resource::loadPixmap("enter") ); |
@@ -148,7 +148,6 @@ void WriteMail::reject() | |||
148 | emit cancelMail(); | 148 | emit cancelMail(); |
149 | } | 149 | } |
150 | 150 | ||
151 | // need to insert date | ||
152 | void WriteMail::accept() | 151 | void WriteMail::accept() |
153 | { | 152 | { |
154 | QStringList attachedFiles, attachmentsType; | 153 | QStringList attachedFiles, attachmentsType; |
@@ -252,13 +251,24 @@ void WriteMail::attachFile() | |||
252 | void WriteMail::reply(Email replyMail, bool replyAll) | 251 | void WriteMail::reply(Email replyMail, bool replyAll) |
253 | { | 252 | { |
254 | int pos; | 253 | int pos; |
254 | QString ccRecipients; | ||
255 | 255 | ||
256 | mail = replyMail; | 256 | mail = replyMail; |
257 | mail.files.clear(); | 257 | mail.files.clear(); |
258 | 258 | ||
259 | toInput->setText(mail.fromMail); | 259 | toInput->setText(mail.fromMail); |
260 | //replyAll ? ccInput->setText(mail.c) | ||
261 | 260 | ||
261 | if (replyAll) | ||
262 | { | ||
263 | for (QStringList::Iterator it = mail.carbonCopies.begin();it != mail.carbonCopies.end(); ++it) | ||
264 | { | ||
265 | ccRecipients.append(*it); | ||
266 | ccRecipients.append(";"); | ||
267 | } | ||
268 | ccRecipients.truncate(ccRecipients.length()-1); //no ; at the end | ||
269 | ccInput->setText(ccRecipients); | ||
270 | } | ||
271 | |||
262 | addRecipients(replyAll); | 272 | addRecipients(replyAll); |
263 | 273 | ||
264 | subjectInput->setText(tr("Re: ") + mail.subject); | 274 | subjectInput->setText(tr("Re: ") + mail.subject); |
@@ -321,10 +331,9 @@ bool WriteMail::getRecipients(bool ccField) | |||
321 | 331 | ||
322 | void WriteMail::addRecipients() | 332 | void WriteMail::addRecipients() |
323 | { | 333 | { |
324 | 334 | toInput->isVisible() ? addRecipients(false) : addRecipients(true); | |
325 | addRecipients(false); | ||
326 | } | 335 | } |
327 | 336 | ||
328 | void WriteMail::addRecipients(bool ccField) | 337 | void WriteMail::addRecipients(bool ccField) |
329 | { | 338 | { |
330 | QString recipients = ""; | 339 | QString recipients = ""; |
@@ -335,9 +344,9 @@ void WriteMail::addRecipients(bool ccField) | |||
335 | while (item != NULL) { | 344 | while (item != NULL) { |
336 | if ( item->isSelected() ) { | 345 | if ( item->isSelected() ) { |
337 | if (recipients == "") { | 346 | if (recipients == "") { |
338 | recipients = item->text(0); | 347 | recipients = item->text(1); |
339 | } else { | 348 | } else { |
340 | recipients += "; " + item->text(0); | 349 | recipients += "; " + item->text(1); |
341 | } | 350 | } |
342 | } | 351 | } |
343 | item = item->nextSibling(); | 352 | item = item->nextSibling(); |
@@ -376,6 +385,5 @@ void WriteMail::newMail() | |||
376 | toInput->clear(); | 385 | toInput->clear(); |
377 | subjectInput->clear(); | 386 | subjectInput->clear(); |
378 | emailInput->clear(); | 387 | emailInput->clear(); |
379 | //to clear selected | ||
380 | setAddressList(addressList); | 388 | setAddressList(addressList); |
381 | } | 389 | } |