summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/writemail.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mailit/writemail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/mailit/writemail.cpp26
1 files changed, 17 insertions, 9 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
@@ -124,5 +124,5 @@ void WriteMail::init()
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");
@@ -133,5 +133,5 @@ void WriteMail::init()
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");
@@ -149,5 +149,4 @@ void WriteMail::reject()
149} 149}
150 150
151// need to insert date
152void WriteMail::accept() 151void WriteMail::accept()
153{ 152{
@@ -253,4 +252,5 @@ 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;
@@ -258,5 +258,15 @@ void WriteMail::reply(Email replyMail, bool replyAll)
258 258
259 toInput->setText(mail.fromMail); 259 toInput->setText(mail.fromMail);
260 //replyAll ? ccInput->setText(mail.c) 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 }
261 271
262 addRecipients(replyAll); 272 addRecipients(replyAll);
@@ -322,6 +332,5 @@ bool WriteMail::getRecipients(bool ccField)
322void WriteMail::addRecipients() 332void WriteMail::addRecipients()
323{ 333{
324 334 toInput->isVisible() ? addRecipients(false) : addRecipients(true);
325 addRecipients(false);
326 } 335 }
327 336
@@ -336,7 +345,7 @@ void WriteMail::addRecipients(bool ccField)
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 }
@@ -377,5 +386,4 @@ void WriteMail::newMail()
377 subjectInput->clear(); 386 subjectInput->clear();
378 emailInput->clear(); 387 emailInput->clear();
379 //to clear selected
380 setAddressList(addressList); 388 setAddressList(addressList);
381} 389}