summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mailit/emailclient.cpp140
-rw-r--r--noncore/net/mailit/emailclient.h11
-rw-r--r--noncore/net/mailit/emailhandler.cpp4
-rw-r--r--noncore/net/mailit/emailhandler.h1
-rw-r--r--noncore/net/mailit/mailitwindow.cpp3
-rw-r--r--noncore/net/mailit/popclient.cpp14
-rw-r--r--noncore/net/mailit/readmail.cpp64
-rw-r--r--noncore/net/mailit/readmail.h8
-rw-r--r--noncore/net/mailit/writemail.cpp35
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp140
-rw-r--r--noncore/unsupported/mailit/emailclient.h11
-rw-r--r--noncore/unsupported/mailit/emailhandler.cpp4
-rw-r--r--noncore/unsupported/mailit/emailhandler.h1
-rw-r--r--noncore/unsupported/mailit/mailitwindow.cpp3
-rw-r--r--noncore/unsupported/mailit/popclient.cpp14
-rw-r--r--noncore/unsupported/mailit/readmail.cpp64
-rw-r--r--noncore/unsupported/mailit/readmail.h8
-rw-r--r--noncore/unsupported/mailit/writemail.cpp35
18 files changed, 412 insertions, 148 deletions
diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp
index dff1888..2cedc51 100644
--- a/noncore/net/mailit/emailclient.cpp
+++ b/noncore/net/mailit/emailclient.cpp
@@ -21,2 +21,3 @@
21#include <qmessagebox.h> 21#include <qmessagebox.h>
22#include <qvbox.h>
22#include <qfile.h> 23#include <qfile.h>
@@ -28,2 +29,3 @@
28#include "emailclient.h" 29#include "emailclient.h"
30#include "writemail.h"
29 31
@@ -42,3 +44,3 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl )
42 : QMainWindow( parent, name, fl ) 44 : QMainWindow( parent, name, fl )
43{ 45{
44 emailHandler = new EmailHandler(); 46 emailHandler = new EmailHandler();
@@ -55,2 +57,4 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl )
55 57
58
59
56 connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) ); 60 connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) );
@@ -67,4 +71,3 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl )
67 connect(inboxView, SIGNAL(clicked(QListViewItem *)), this, SLOT(inboxItemReleased()) ); 71 connect(inboxView, SIGNAL(clicked(QListViewItem *)), this, SLOT(inboxItemReleased()) );
68 72
69
70 connect(emailHandler, SIGNAL(mailArrived(const Email &, bool)), this, 73 connect(emailHandler, SIGNAL(mailArrived(const Email &, bool)), this,
@@ -86,2 +89,7 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl )
86 mailboxView->setCurrentTab(0); //ensure that inbox has focus 89 mailboxView->setCurrentTab(0); //ensure that inbox has focus
90
91 /*channel = new QCopChannel( "QPE/Application/mailit", this );
92 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
93 this, SLOT(receive(const QCString&, const QByteArray&)) );*/
94
87} 95}
@@ -106,25 +114,4 @@ void EmailClient::init()
106{ 114{
107 statusBar = new QStatusBar(this); 115 initStatusBar(this);
108 statusBar->setSizeGripEnabled(FALSE); 116
109
110 status1Label = new QLabel( tr("Idle"), statusBar);
111 status2Label = new QLabel("", statusBar);
112 connect(emailHandler, SIGNAL(updatePopStatus(const QString &)),
113 status2Label, SLOT(setText(const QString &)) );
114 connect(emailHandler, SIGNAL(updateSmtpStatus(const QString &)),
115 status2Label, SLOT(setText(const QString &)) );
116
117 progressBar = new QProgressBar(statusBar);
118
119 connect(emailHandler, SIGNAL(mailboxSize(int)),
120 this, SLOT(setTotalSize(int)) );
121 connect(emailHandler, SIGNAL(currentMailSize(int)),
122 this, SLOT(setMailSize(int)) );
123 connect(emailHandler, SIGNAL(downloadedSize(int)),
124 this, SLOT(setDownloadedSize(int)) );
125
126 statusBar->addWidget(status1Label);
127 statusBar->addWidget(progressBar);
128 statusBar->addWidget(status2Label);
129
130 setToolBarsMovable(FALSE); 117 setToolBarsMovable(FALSE);
@@ -196,4 +183,7 @@ void EmailClient::init()
196 inboxView->setAllColumnsShowFocus(TRUE); 183 inboxView->setAllColumnsShowFocus(TRUE);
197 QWhatsThis::add(inboxView,QWidget::tr("This is the inbox view.\n It keeps the fetched mail which can be viewed by double clicking the entry.\n" 184 QWhatsThis::add(inboxView,QWidget::tr("This is the inbox view.\n"
198 " A blue attachment icon shows whether this mail has attachments.")); 185 "It keeps the fetched mail which can be \n"
186 "viewed by double clicking the entry.\n"
187 "blue attachment icon shows whether this \n"
188 "mailhas attachments.\n"));
199 189
@@ -212,3 +202,5 @@ void EmailClient::init()
212 202
213 QWhatsThis::add(outboxView,QWidget::tr("This is the oubox view.\n It keeps the queued mails to send which can be reviewed by double clicking the entry.")); 203 QWhatsThis::add(outboxView,QWidget::tr("This is the outbox view.\n"
204 "It keeps the queued mails to send which can be \n"
205 "reviewed by double clicking the entry."));
214 grid_3->addWidget( outboxView, 0, 0 ); 206 grid_3->addWidget( outboxView, 0, 0 );
@@ -220,2 +212,29 @@ void EmailClient::init()
220 212
213void EmailClient::initStatusBar(QWidget* parent)
214{
215 statusBar = new QStatusBar(parent);
216 statusBar->setSizeGripEnabled(FALSE);
217
218 status1Label = new QLabel( tr("Idle"), statusBar);
219 status2Label = new QLabel("", statusBar);
220 connect(emailHandler, SIGNAL(updatePopStatus(const QString &)),
221 status2Label, SLOT(setText(const QString &)) );
222 connect(emailHandler, SIGNAL(updateSmtpStatus(const QString &)),
223 status2Label, SLOT(setText(const QString &)) );
224
225 progressBar = new QProgressBar(statusBar);
226
227 connect(emailHandler, SIGNAL(mailboxSize(int)),
228 this, SLOT(setTotalSize(int)) );
229 connect(emailHandler, SIGNAL(currentMailSize(int)),
230 this, SLOT(setMailSize(int)) );
231 connect(emailHandler, SIGNAL(downloadedSize(int)),
232 this, SLOT(setDownloadedSize(int)) );
233
234 statusBar->addWidget(status1Label);
235 statusBar->addWidget(progressBar);
236 statusBar->addWidget(status2Label);
237
238}
239
221void EmailClient::compose() 240void EmailClient::compose()
@@ -321,3 +340,3 @@ void EmailClient::getNewMail() {
321 //get any previous mails not downloaded and add to queue 340 //get any previous mails not downloaded and add to queue
322 mailDownloadList.clear(); 341 /*mailDownloadList.clear();
323 Email *mailPtr; 342 Email *mailPtr;
@@ -330,3 +349,3 @@ void EmailClient::getNewMail() {
330 item = (EmailListItem *) item->nextSibling(); 349 item = (EmailListItem *) item->nextSibling();
331 } 350 }*/
332 351
@@ -340,3 +359,3 @@ void EmailClient::getAllNewMail()
340 currentAccount = accountList.first(); 359 currentAccount = accountList.first();
341 getNewMail(); 360 getNewMail();
342} 361}
@@ -350,5 +369,6 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk)
350 mailconf->setGroup(newMail.id); 369 mailconf->setGroup(newMail.id);
351 370
352 if (fromDisk) 371 if (fromDisk)
353 { 372 {
373
354 newMail.downloaded = mailconf->readBoolEntry("downloaded"); 374 newMail.downloaded = mailconf->readBoolEntry("downloaded");
@@ -360,2 +380,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk)
360 { //mail arrived from server 380 { //mail arrived from server
381
361 newMail.serverId = mail.serverId; 382 newMail.serverId = mail.serverId;
@@ -920,3 +941,3 @@ void EmailClient::inboxItemReleased()
920 941
921void EmailClient::timerEvent(QTimerEvent *e) 942/*void EmailClient::timerEvent(QTimerEvent *e)
922{ 943{
@@ -937,4 +958,4 @@ void EmailClient::timerEvent(QTimerEvent *e)
937 if (action) delete action; 958 if (action) delete action;
938 */ 959
939} 960}*/
940 961
@@ -955,4 +976,2 @@ void EmailClient::download(Email* mail)
955 tempMailDownloadList.sizeInsert(mail->serverId, mail->size); 976 tempMailDownloadList.sizeInsert(mail->serverId, mail->size);
956 if (accountList.count()>0)
957 qDebug("Accounts present");
958 977
@@ -968 +987,46 @@ void EmailClient::download(Email* mail)
968} 987}
988
989void EmailClient::receive(const QCString& msg, const QByteArray& data)
990{
991 /*if (msg=="getMail()")
992 {
993 /*QDialog qd(qApp->activeWindow(),"Getting mail",true);
994 QVBoxLayout *vbProg = new QVBoxLayout( &qd );
995
996 initStatusBar(&qd);
997
998 if (statusBar==0)
999 {
1000 qDebug("No Bar ...");
1001 //statusBar=new ProgressBar(&qd);
1002 }
1003 statusBar->show();
1004 vbProg->addWidget(statusBar);
1005 qd.showMaximized();
1006 qd.show();
1007 emit getAllNewMail();
1008 //qd.exec();
1009 }
1010 else if (msg=="compose()")
1011 {
1012 QDialog qd(qApp->activeWindow(),"Getting mail",true);
1013
1014 WriteMail wm(&qd,"write new mail");
1015 QVBoxLayout vbProg( &qd );
1016
1017 wm.showMaximized();
1018 vbProg.addWidget(&wm);
1019
1020 qd.showMaximized();
1021
1022 emit composeRequested();
1023 qd.exec();
1024
1025 QMessageBox::warning(qApp->activeWindow(),tr("Info"), tr("Info"), "OK\n");
1026 }
1027
1028 else if (msg=="dialog()")
1029 {
1030 QMessageBox::warning(qApp->activeWindow(),tr("Info"), tr("Info"), "OK\n");
1031 }*/
1032}
diff --git a/noncore/net/mailit/emailclient.h b/noncore/net/mailit/emailclient.h
index 549683b..994fec5 100644
--- a/noncore/net/mailit/emailclient.h
+++ b/noncore/net/mailit/emailclient.h
@@ -43,2 +43,3 @@
43#include <opie/otabwidget.h> 43#include <opie/otabwidget.h>
44#include <qpe/qcopenvelope_qws.h>
44#include <qtimer.h> 45#include <qtimer.h>
@@ -72,6 +73,5 @@ public:
72 AddressList* getAdrListRef(); 73 AddressList* getAdrListRef();
73 void download(Email*);
74 74
75protected: 75protected:
76 void timerEvent(QTimerEvent*); 76 //void timerEvent(QTimerEvent*);
77 77
@@ -118,2 +118,3 @@ public slots:
118 void moveMailFront(Email *mailPtr); 118 void moveMailFront(Email *mailPtr);
119 void download(Email*);
119/* void reply(); 120/* void reply();
@@ -123,4 +124,8 @@ public slots:
123 124
125private slots:
126 void receive(const QCString&, const QByteArray&);
127
124private: 128private:
125 void init(); 129 void init();
130 void initStatusBar(QWidget*);
126 void readMail(); 131 void readMail();
@@ -148,2 +153,4 @@ private:
148 153
154 QCopChannel* channel;
155
149 QToolBar *bar; 156 QToolBar *bar;
diff --git a/noncore/net/mailit/emailhandler.cpp b/noncore/net/mailit/emailhandler.cpp
index fbbada7..c7b27a0 100644
--- a/noncore/net/mailit/emailhandler.cpp
+++ b/noncore/net/mailit/emailhandler.cpp
@@ -41,2 +41,4 @@ EmailHandler::EmailHandler()
41{ 41{
42 qDebug("EMailHandler::EmailHandler");
43
42 smtpClient = new SmtpClient(); 44 smtpClient = new SmtpClient();
@@ -117,2 +119,3 @@ void EmailHandler::getMailHeaders()
117 popClient->headersOnly(headers, mailAccount.syncLimit); //less than requested syncLimit, download all 119 popClient->headersOnly(headers, mailAccount.syncLimit); //less than requested syncLimit, download all
120 qDebug("Initiating connection");
118 popClient->newConnection(mailAccount.popServer, 110); 121 popClient->newConnection(mailAccount.popServer, 110);
@@ -628 +631,2 @@ void EmailHandler::cancel()
628} 631}
632
diff --git a/noncore/net/mailit/emailhandler.h b/noncore/net/mailit/emailhandler.h
index b645868..5b59f65 100644
--- a/noncore/net/mailit/emailhandler.h
+++ b/noncore/net/mailit/emailhandler.h
@@ -30,2 +30,3 @@
30#include <qcollection.h> 30#include <qcollection.h>
31#include <qpe/qcopenvelope_qws.h>
31 32
diff --git a/noncore/net/mailit/mailitwindow.cpp b/noncore/net/mailit/mailitwindow.cpp
index ffee67e..a111241 100644
--- a/noncore/net/mailit/mailitwindow.cpp
+++ b/noncore/net/mailit/mailitwindow.cpp
@@ -63,2 +63,5 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
63 this, SLOT(updateCaption(const QString &)) ); 63 this, SLOT(updateCaption(const QString &)) );
64
65 connect(readMail, SIGNAL(download(Email *)), emailClient, SLOT(download(Email*)) );
66
64 viewingMail = FALSE; 67 viewingMail = FALSE;
diff --git a/noncore/net/mailit/popclient.cpp b/noncore/net/mailit/popclient.cpp
index 6105d09..fedc4e2 100644
--- a/noncore/net/mailit/popclient.cpp
+++ b/noncore/net/mailit/popclient.cpp
@@ -31,2 +31,3 @@ PopClient::PopClient()
31{ 31{
32
32 socket = new QSocket(this, "popClient"); 33 socket = new QSocket(this, "popClient");
@@ -119,2 +120,3 @@ void PopClient::incomingData()
119// return; 120// return;
121
120 122
@@ -153,3 +155,3 @@ void PopClient::incomingData()
153 155
154 break; 156 break;
155 } 157 }
@@ -158,3 +160,4 @@ void PopClient::incomingData()
158 *stream << "PASS " << popPassword << "\r\n"; 160 *stream << "PASS " << popPassword << "\r\n";
159 status = Stat; 161 status = Stat;
162
160 break; 163 break;
@@ -165,3 +168,3 @@ void PopClient::incomingData()
165 *stream << "STAT" << "\r\n"; 168 *stream << "STAT" << "\r\n";
166 status = Mcnt; 169 status = Mcnt;
167 } else errorHandling(ErrLoginFailed); 170 } else errorHandling(ErrLoginFailed);
@@ -181,4 +184,4 @@ void PopClient::incomingData()
181 //messages deleted from server, reload all 184 //messages deleted from server, reload all
182 if (newMessages < lastSync) 185 if (newMessages < lastSync)
183 lastSync = 0; 186 lastSync = 0;
184 messageCount = 1; 187 messageCount = 1;
@@ -275,3 +278,2 @@ void PopClient::incomingData()
275 } else { //message reach entire size 278 } else { //message reach entire size
276
277 if ( (selected)||(mailSize <= headerLimit)) //mail size limit is not used if late download is active 279 if ( (selected)||(mailSize <= headerLimit)) //mail size limit is not used if late download is active
diff --git a/noncore/net/mailit/readmail.cpp b/noncore/net/mailit/readmail.cpp
index 4eae7f6..1682675 100644
--- a/noncore/net/mailit/readmail.cpp
+++ b/noncore/net/mailit/readmail.cpp
@@ -21,4 +21,6 @@
21#include <qimage.h> 21#include <qimage.h>
22#include <qwhatsthis.h>
22#include <qmime.h> 23#include <qmime.h>
23#include <qaction.h> 24#include <qaction.h>
25#include <qpopupmenu.h>
24#include <qpe/resource.h> 26#include <qpe/resource.h>
@@ -44,2 +46,4 @@ void ReadMail::init()
44 46
47 QPopupMenu* mailaction=new QPopupMenu(this);
48
45 bar = new QToolBar(this); 49 bar = new QToolBar(this);
@@ -57,13 +61,7 @@ void ReadMail::init()
57 61
58 //reply dependant on viewing inbox 62 downloadButton = new QAction( tr( "Download" ), Resource::loadPixmap( "mailit/download" ),QString::null, 0, this, 0 );
59 replyButton = new QAction( tr( "Reply" ), Resource::loadPixmap( "mailit/reply" ), 63 connect(downloadButton, SIGNAL(activated()), this, SLOT(download()) );
60 QString::null, 0, this, 0 ); 64 downloadButton->setWhatsThis(tr("Click here to download the selected mail"));
61 connect(replyButton, SIGNAL(activated()), this, SLOT(reply()) );
62 replyButton->setWhatsThis(tr("Click here to reply to the selected mail"));
63
64 forwardButton = new QAction( tr( "Forward" ), Resource::loadPixmap( "mailit/forward" ),
65 QString::null, 0, this, 0 );
66 connect(forwardButton, SIGNAL(activated()), this, SLOT(forward()) );
67 forwardButton->setWhatsThis(tr("Click here to forward the selected mail"));
68 65
66
69 previousButton = new QAction( tr( "Previous" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); 67 previousButton = new QAction( tr( "Previous" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
@@ -96,2 +94,19 @@ void ReadMail::init()
96 94
95 //reply dependant on viewing inbox
96 replyButton = new QToolButton(Resource::loadPixmap("mailit/reply"),tr("reply"),tr("reply to mail"), this,SLOT(reply()),bar);
97 QWhatsThis::add(replyButton,tr("Click here to reply to the selected mail\nPress and hold for more options."));
98 replyButton->setPopup(mailaction);
99
100 replyAllButton = new QAction( tr( "Reply all" ), Resource::loadPixmap( "mailit/reply" ),QString::null, 0, this, 0 );
101 connect(replyAllButton, SIGNAL(activated()), this, SLOT(replyAll()));
102 replyAllButton->setWhatsThis(tr("Click here to reply to the selected mail to CC: addresses also"));
103 replyAllButton->addTo(mailaction);
104
105 forwardButton = new QAction( tr( "Forward" ), Resource::loadPixmap( "mailit/forward" ),
106 QString::null, 0, this, 0 );
107 connect(forwardButton, SIGNAL(activated()), this, SLOT(forward()));
108 forwardButton->setWhatsThis(tr("Click here to forward the selected mail"));
109 forwardButton->addTo(mailaction);
110
111
97 deleteButton = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 0, this, 0 ); 112 deleteButton = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 0, this, 0 );
@@ -121,12 +136,16 @@ void ReadMail::updateView()
121 136
122 replyButton->removeFrom(mailMenu); 137 replyButton->setEnabled(false);
123 replyButton->removeFrom(bar); 138 /*replyButton->removeFrom(bar);
124 forwardButton->removeFrom(mailMenu); 139 forwardButton->removeFrom(mailMenu);
125 forwardButton->removeFrom(bar); 140 forwardButton->removeFrom(bar);*/
141 downloadButton->removeFrom(bar);
142
143 //downloadButton->setEnabled(!mail->downloaded);
126 144
145
127 if (inbox == TRUE) { 146 if (inbox == TRUE) {
128 replyButton->addTo(bar); 147 replyButton->setEnabled(true);
129 replyButton->addTo(mailMenu); 148 /*replyButton->addTo(mailMenu);
130 forwardButton->addTo(bar); 149 forwardButton->addTo(bar);
131 forwardButton->addTo(mailMenu); 150 forwardButton->addTo(mailMenu);*/
132 151
@@ -134,2 +153,5 @@ void ReadMail::updateView()
134 if (!mail->downloaded) { 153 if (!mail->downloaded) {
154
155 downloadButton->addTo(bar);
156
135 //report currently viewed mail so that it will be 157 //report currently viewed mail so that it will be
@@ -359,2 +381,7 @@ void ReadMail::reply()
359{ 381{
382 emit replyRequested(*mail, (bool&)FALSE);
383}
384
385void ReadMail::replyAll()
386{
360 emit replyRequested(*mail, (bool&)TRUE); 387 emit replyRequested(*mail, (bool&)TRUE);
@@ -367 +394,6 @@ void ReadMail::forward()
367 394
395void ReadMail::download()
396{
397 emit download(mail);
398}
399
diff --git a/noncore/net/mailit/readmail.h b/noncore/net/mailit/readmail.h
index df32c34..6700595 100644
--- a/noncore/net/mailit/readmail.h
+++ b/noncore/net/mailit/readmail.h
@@ -30,2 +30,3 @@
30#include <qtextview.h> 30#include <qtextview.h>
31#include <qtoolbutton.h>
31 32
@@ -52,2 +53,3 @@ signals:
52 void viewingMail(Email *); 53 void viewingMail(Email *);
54 void download (Email*);
53 55
@@ -61,3 +63,5 @@ public slots:
61 void reply(); 63 void reply();
64 void replyAll();
62 void forward(); 65 void forward();
66 void download();
63 67
@@ -84,4 +88,6 @@ private:
84 QAction *previousButton; 88 QAction *previousButton;
85 QAction *replyButton; 89 QToolButton *replyButton;
86 QAction *forwardButton; 90 QAction *forwardButton;
91 QAction *replyAllButton;
92 QAction *downloadButton;
87}; 93};
diff --git a/noncore/net/mailit/writemail.cpp b/noncore/net/mailit/writemail.cpp
index dcf0c6e..c75494e 100644
--- a/noncore/net/mailit/writemail.cpp
+++ b/noncore/net/mailit/writemail.cpp
@@ -24,4 +24,3 @@
24 24
25WriteMail::WriteMail( QWidget* parent, const char* name, WFlags fl ) 25WriteMail::WriteMail( QWidget* parent, const char* name, WFlags fl ):QMainWindow( parent, name, fl )
26 : QMainWindow( parent, name, fl )
27{ 26{
@@ -261,3 +260,3 @@ void WriteMail::reply(Email replyMail, bool replyAll)
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)
@@ -270,4 +269,3 @@ void WriteMail::reply(Email replyMail, bool replyAll)
270 } 269 }
271 270 else ccInput->clear();
272 addRecipients(replyAll);
273 271
@@ -275,2 +273,9 @@ void WriteMail::reply(Email replyMail, bool replyAll)
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;
@@ -282,3 +287,3 @@ void WriteMail::reply(Email replyMail, bool replyAll)
282 } 287 }
283 288 mail.body.insert(0,citation);
284 emailInput->setText(mail.body); 289 emailInput->setText(mail.body);
@@ -310,5 +315,12 @@ bool WriteMail::getRecipients(bool ccField)
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
@@ -320,3 +332,3 @@ bool WriteMail::getRecipients(bool ccField)
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 }
@@ -326,3 +338,3 @@ bool WriteMail::getRecipients(bool ccField)
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
@@ -385,2 +397,3 @@ void WriteMail::newMail()
385 toInput->clear(); 397 toInput->clear();
398 ccInput->clear();
386 subjectInput->clear(); 399 subjectInput->clear();
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index dff1888..2cedc51 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -21,2 +21,3 @@
21#include <qmessagebox.h> 21#include <qmessagebox.h>
22#include <qvbox.h>
22#include <qfile.h> 23#include <qfile.h>
@@ -28,2 +29,3 @@
28#include "emailclient.h" 29#include "emailclient.h"
30#include "writemail.h"
29 31
@@ -42,3 +44,3 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl )
42 : QMainWindow( parent, name, fl ) 44 : QMainWindow( parent, name, fl )
43{ 45{
44 emailHandler = new EmailHandler(); 46 emailHandler = new EmailHandler();
@@ -55,2 +57,4 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl )
55 57
58
59
56 connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) ); 60 connect(emailHandler, SIGNAL(mailSent()), this, SLOT(mailSent()) );
@@ -67,4 +71,3 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl )
67 connect(inboxView, SIGNAL(clicked(QListViewItem *)), this, SLOT(inboxItemReleased()) ); 71 connect(inboxView, SIGNAL(clicked(QListViewItem *)), this, SLOT(inboxItemReleased()) );
68 72
69
70 connect(emailHandler, SIGNAL(mailArrived(const Email &, bool)), this, 73 connect(emailHandler, SIGNAL(mailArrived(const Email &, bool)), this,
@@ -86,2 +89,7 @@ EmailClient::EmailClient( QWidget* parent, const char* name, WFlags fl )
86 mailboxView->setCurrentTab(0); //ensure that inbox has focus 89 mailboxView->setCurrentTab(0); //ensure that inbox has focus
90
91 /*channel = new QCopChannel( "QPE/Application/mailit", this );
92 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
93 this, SLOT(receive(const QCString&, const QByteArray&)) );*/
94
87} 95}
@@ -106,25 +114,4 @@ void EmailClient::init()
106{ 114{
107 statusBar = new QStatusBar(this); 115 initStatusBar(this);
108 statusBar->setSizeGripEnabled(FALSE); 116
109
110 status1Label = new QLabel( tr("Idle"), statusBar);
111 status2Label = new QLabel("", statusBar);
112 connect(emailHandler, SIGNAL(updatePopStatus(const QString &)),
113 status2Label, SLOT(setText(const QString &)) );
114 connect(emailHandler, SIGNAL(updateSmtpStatus(const QString &)),
115 status2Label, SLOT(setText(const QString &)) );
116
117 progressBar = new QProgressBar(statusBar);
118
119 connect(emailHandler, SIGNAL(mailboxSize(int)),
120 this, SLOT(setTotalSize(int)) );
121 connect(emailHandler, SIGNAL(currentMailSize(int)),
122 this, SLOT(setMailSize(int)) );
123 connect(emailHandler, SIGNAL(downloadedSize(int)),
124 this, SLOT(setDownloadedSize(int)) );
125
126 statusBar->addWidget(status1Label);
127 statusBar->addWidget(progressBar);
128 statusBar->addWidget(status2Label);
129
130 setToolBarsMovable(FALSE); 117 setToolBarsMovable(FALSE);
@@ -196,4 +183,7 @@ void EmailClient::init()
196 inboxView->setAllColumnsShowFocus(TRUE); 183 inboxView->setAllColumnsShowFocus(TRUE);
197 QWhatsThis::add(inboxView,QWidget::tr("This is the inbox view.\n It keeps the fetched mail which can be viewed by double clicking the entry.\n" 184 QWhatsThis::add(inboxView,QWidget::tr("This is the inbox view.\n"
198 " A blue attachment icon shows whether this mail has attachments.")); 185 "It keeps the fetched mail which can be \n"
186 "viewed by double clicking the entry.\n"
187 "blue attachment icon shows whether this \n"
188 "mailhas attachments.\n"));
199 189
@@ -212,3 +202,5 @@ void EmailClient::init()
212 202
213 QWhatsThis::add(outboxView,QWidget::tr("This is the oubox view.\n It keeps the queued mails to send which can be reviewed by double clicking the entry.")); 203 QWhatsThis::add(outboxView,QWidget::tr("This is the outbox view.\n"
204 "It keeps the queued mails to send which can be \n"
205 "reviewed by double clicking the entry."));
214 grid_3->addWidget( outboxView, 0, 0 ); 206 grid_3->addWidget( outboxView, 0, 0 );
@@ -220,2 +212,29 @@ void EmailClient::init()
220 212
213void EmailClient::initStatusBar(QWidget* parent)
214{
215 statusBar = new QStatusBar(parent);
216 statusBar->setSizeGripEnabled(FALSE);
217
218 status1Label = new QLabel( tr("Idle"), statusBar);
219 status2Label = new QLabel("", statusBar);
220 connect(emailHandler, SIGNAL(updatePopStatus(const QString &)),
221 status2Label, SLOT(setText(const QString &)) );
222 connect(emailHandler, SIGNAL(updateSmtpStatus(const QString &)),
223 status2Label, SLOT(setText(const QString &)) );
224
225 progressBar = new QProgressBar(statusBar);
226
227 connect(emailHandler, SIGNAL(mailboxSize(int)),
228 this, SLOT(setTotalSize(int)) );
229 connect(emailHandler, SIGNAL(currentMailSize(int)),
230 this, SLOT(setMailSize(int)) );
231 connect(emailHandler, SIGNAL(downloadedSize(int)),
232 this, SLOT(setDownloadedSize(int)) );
233
234 statusBar->addWidget(status1Label);
235 statusBar->addWidget(progressBar);
236 statusBar->addWidget(status2Label);
237
238}
239
221void EmailClient::compose() 240void EmailClient::compose()
@@ -321,3 +340,3 @@ void EmailClient::getNewMail() {
321 //get any previous mails not downloaded and add to queue 340 //get any previous mails not downloaded and add to queue
322 mailDownloadList.clear(); 341 /*mailDownloadList.clear();
323 Email *mailPtr; 342 Email *mailPtr;
@@ -330,3 +349,3 @@ void EmailClient::getNewMail() {
330 item = (EmailListItem *) item->nextSibling(); 349 item = (EmailListItem *) item->nextSibling();
331 } 350 }*/
332 351
@@ -340,3 +359,3 @@ void EmailClient::getAllNewMail()
340 currentAccount = accountList.first(); 359 currentAccount = accountList.first();
341 getNewMail(); 360 getNewMail();
342} 361}
@@ -350,5 +369,6 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk)
350 mailconf->setGroup(newMail.id); 369 mailconf->setGroup(newMail.id);
351 370
352 if (fromDisk) 371 if (fromDisk)
353 { 372 {
373
354 newMail.downloaded = mailconf->readBoolEntry("downloaded"); 374 newMail.downloaded = mailconf->readBoolEntry("downloaded");
@@ -360,2 +380,3 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk)
360 { //mail arrived from server 380 { //mail arrived from server
381
361 newMail.serverId = mail.serverId; 382 newMail.serverId = mail.serverId;
@@ -920,3 +941,3 @@ void EmailClient::inboxItemReleased()
920 941
921void EmailClient::timerEvent(QTimerEvent *e) 942/*void EmailClient::timerEvent(QTimerEvent *e)
922{ 943{
@@ -937,4 +958,4 @@ void EmailClient::timerEvent(QTimerEvent *e)
937 if (action) delete action; 958 if (action) delete action;
938 */ 959
939} 960}*/
940 961
@@ -955,4 +976,2 @@ void EmailClient::download(Email* mail)
955 tempMailDownloadList.sizeInsert(mail->serverId, mail->size); 976 tempMailDownloadList.sizeInsert(mail->serverId, mail->size);
956 if (accountList.count()>0)
957 qDebug("Accounts present");
958 977
@@ -968 +987,46 @@ void EmailClient::download(Email* mail)
968} 987}
988
989void EmailClient::receive(const QCString& msg, const QByteArray& data)
990{
991 /*if (msg=="getMail()")
992 {
993 /*QDialog qd(qApp->activeWindow(),"Getting mail",true);
994 QVBoxLayout *vbProg = new QVBoxLayout( &qd );
995
996 initStatusBar(&qd);
997
998 if (statusBar==0)
999 {
1000 qDebug("No Bar ...");
1001 //statusBar=new ProgressBar(&qd);
1002 }
1003 statusBar->show();
1004 vbProg->addWidget(statusBar);
1005 qd.showMaximized();
1006 qd.show();
1007 emit getAllNewMail();
1008 //qd.exec();
1009 }
1010 else if (msg=="compose()")
1011 {
1012 QDialog qd(qApp->activeWindow(),"Getting mail",true);
1013
1014 WriteMail wm(&qd,"write new mail");
1015 QVBoxLayout vbProg( &qd );
1016
1017 wm.showMaximized();
1018 vbProg.addWidget(&wm);
1019
1020 qd.showMaximized();
1021
1022 emit composeRequested();
1023 qd.exec();
1024
1025 QMessageBox::warning(qApp->activeWindow(),tr("Info"), tr("Info"), "OK\n");
1026 }
1027
1028 else if (msg=="dialog()")
1029 {
1030 QMessageBox::warning(qApp->activeWindow(),tr("Info"), tr("Info"), "OK\n");
1031 }*/
1032}
diff --git a/noncore/unsupported/mailit/emailclient.h b/noncore/unsupported/mailit/emailclient.h
index 549683b..994fec5 100644
--- a/noncore/unsupported/mailit/emailclient.h
+++ b/noncore/unsupported/mailit/emailclient.h
@@ -43,2 +43,3 @@
43#include <opie/otabwidget.h> 43#include <opie/otabwidget.h>
44#include <qpe/qcopenvelope_qws.h>
44#include <qtimer.h> 45#include <qtimer.h>
@@ -72,6 +73,5 @@ public:
72 AddressList* getAdrListRef(); 73 AddressList* getAdrListRef();
73 void download(Email*);
74 74
75protected: 75protected:
76 void timerEvent(QTimerEvent*); 76 //void timerEvent(QTimerEvent*);
77 77
@@ -118,2 +118,3 @@ public slots:
118 void moveMailFront(Email *mailPtr); 118 void moveMailFront(Email *mailPtr);
119 void download(Email*);
119/* void reply(); 120/* void reply();
@@ -123,4 +124,8 @@ public slots:
123 124
125private slots:
126 void receive(const QCString&, const QByteArray&);
127
124private: 128private:
125 void init(); 129 void init();
130 void initStatusBar(QWidget*);
126 void readMail(); 131 void readMail();
@@ -148,2 +153,4 @@ private:
148 153
154 QCopChannel* channel;
155
149 QToolBar *bar; 156 QToolBar *bar;
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp
index fbbada7..c7b27a0 100644
--- a/noncore/unsupported/mailit/emailhandler.cpp
+++ b/noncore/unsupported/mailit/emailhandler.cpp
@@ -41,2 +41,4 @@ EmailHandler::EmailHandler()
41{ 41{
42 qDebug("EMailHandler::EmailHandler");
43
42 smtpClient = new SmtpClient(); 44 smtpClient = new SmtpClient();
@@ -117,2 +119,3 @@ void EmailHandler::getMailHeaders()
117 popClient->headersOnly(headers, mailAccount.syncLimit); //less than requested syncLimit, download all 119 popClient->headersOnly(headers, mailAccount.syncLimit); //less than requested syncLimit, download all
120 qDebug("Initiating connection");
118 popClient->newConnection(mailAccount.popServer, 110); 121 popClient->newConnection(mailAccount.popServer, 110);
@@ -628 +631,2 @@ void EmailHandler::cancel()
628} 631}
632
diff --git a/noncore/unsupported/mailit/emailhandler.h b/noncore/unsupported/mailit/emailhandler.h
index b645868..5b59f65 100644
--- a/noncore/unsupported/mailit/emailhandler.h
+++ b/noncore/unsupported/mailit/emailhandler.h
@@ -30,2 +30,3 @@
30#include <qcollection.h> 30#include <qcollection.h>
31#include <qpe/qcopenvelope_qws.h>
31 32
diff --git a/noncore/unsupported/mailit/mailitwindow.cpp b/noncore/unsupported/mailit/mailitwindow.cpp
index ffee67e..a111241 100644
--- a/noncore/unsupported/mailit/mailitwindow.cpp
+++ b/noncore/unsupported/mailit/mailitwindow.cpp
@@ -63,2 +63,5 @@ MailItWindow::MailItWindow(QWidget *parent, const char *name, WFlags fl)
63 this, SLOT(updateCaption(const QString &)) ); 63 this, SLOT(updateCaption(const QString &)) );
64
65 connect(readMail, SIGNAL(download(Email *)), emailClient, SLOT(download(Email*)) );
66
64 viewingMail = FALSE; 67 viewingMail = FALSE;
diff --git a/noncore/unsupported/mailit/popclient.cpp b/noncore/unsupported/mailit/popclient.cpp
index 6105d09..fedc4e2 100644
--- a/noncore/unsupported/mailit/popclient.cpp
+++ b/noncore/unsupported/mailit/popclient.cpp
@@ -31,2 +31,3 @@ PopClient::PopClient()
31{ 31{
32
32 socket = new QSocket(this, "popClient"); 33 socket = new QSocket(this, "popClient");
@@ -119,2 +120,3 @@ void PopClient::incomingData()
119// return; 120// return;
121
120 122
@@ -153,3 +155,3 @@ void PopClient::incomingData()
153 155
154 break; 156 break;
155 } 157 }
@@ -158,3 +160,4 @@ void PopClient::incomingData()
158 *stream << "PASS " << popPassword << "\r\n"; 160 *stream << "PASS " << popPassword << "\r\n";
159 status = Stat; 161 status = Stat;
162
160 break; 163 break;
@@ -165,3 +168,3 @@ void PopClient::incomingData()
165 *stream << "STAT" << "\r\n"; 168 *stream << "STAT" << "\r\n";
166 status = Mcnt; 169 status = Mcnt;
167 } else errorHandling(ErrLoginFailed); 170 } else errorHandling(ErrLoginFailed);
@@ -181,4 +184,4 @@ void PopClient::incomingData()
181 //messages deleted from server, reload all 184 //messages deleted from server, reload all
182 if (newMessages < lastSync) 185 if (newMessages < lastSync)
183 lastSync = 0; 186 lastSync = 0;
184 messageCount = 1; 187 messageCount = 1;
@@ -275,3 +278,2 @@ void PopClient::incomingData()
275 } else { //message reach entire size 278 } else { //message reach entire size
276
277 if ( (selected)||(mailSize <= headerLimit)) //mail size limit is not used if late download is active 279 if ( (selected)||(mailSize <= headerLimit)) //mail size limit is not used if late download is active
diff --git a/noncore/unsupported/mailit/readmail.cpp b/noncore/unsupported/mailit/readmail.cpp
index 4eae7f6..1682675 100644
--- a/noncore/unsupported/mailit/readmail.cpp
+++ b/noncore/unsupported/mailit/readmail.cpp
@@ -21,4 +21,6 @@
21#include <qimage.h> 21#include <qimage.h>
22#include <qwhatsthis.h>
22#include <qmime.h> 23#include <qmime.h>
23#include <qaction.h> 24#include <qaction.h>
25#include <qpopupmenu.h>
24#include <qpe/resource.h> 26#include <qpe/resource.h>
@@ -44,2 +46,4 @@ void ReadMail::init()
44 46
47 QPopupMenu* mailaction=new QPopupMenu(this);
48
45 bar = new QToolBar(this); 49 bar = new QToolBar(this);
@@ -57,13 +61,7 @@ void ReadMail::init()
57 61
58 //reply dependant on viewing inbox 62 downloadButton = new QAction( tr( "Download" ), Resource::loadPixmap( "mailit/download" ),QString::null, 0, this, 0 );
59 replyButton = new QAction( tr( "Reply" ), Resource::loadPixmap( "mailit/reply" ), 63 connect(downloadButton, SIGNAL(activated()), this, SLOT(download()) );
60 QString::null, 0, this, 0 ); 64 downloadButton->setWhatsThis(tr("Click here to download the selected mail"));
61 connect(replyButton, SIGNAL(activated()), this, SLOT(reply()) );
62 replyButton->setWhatsThis(tr("Click here to reply to the selected mail"));
63
64 forwardButton = new QAction( tr( "Forward" ), Resource::loadPixmap( "mailit/forward" ),
65 QString::null, 0, this, 0 );
66 connect(forwardButton, SIGNAL(activated()), this, SLOT(forward()) );
67 forwardButton->setWhatsThis(tr("Click here to forward the selected mail"));
68 65
66
69 previousButton = new QAction( tr( "Previous" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); 67 previousButton = new QAction( tr( "Previous" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
@@ -96,2 +94,19 @@ void ReadMail::init()
96 94
95 //reply dependant on viewing inbox
96 replyButton = new QToolButton(Resource::loadPixmap("mailit/reply"),tr("reply"),tr("reply to mail"), this,SLOT(reply()),bar);
97 QWhatsThis::add(replyButton,tr("Click here to reply to the selected mail\nPress and hold for more options."));
98 replyButton->setPopup(mailaction);
99
100 replyAllButton = new QAction( tr( "Reply all" ), Resource::loadPixmap( "mailit/reply" ),QString::null, 0, this, 0 );
101 connect(replyAllButton, SIGNAL(activated()), this, SLOT(replyAll()));
102 replyAllButton->setWhatsThis(tr("Click here to reply to the selected mail to CC: addresses also"));
103 replyAllButton->addTo(mailaction);
104
105 forwardButton = new QAction( tr( "Forward" ), Resource::loadPixmap( "mailit/forward" ),
106 QString::null, 0, this, 0 );
107 connect(forwardButton, SIGNAL(activated()), this, SLOT(forward()));
108 forwardButton->setWhatsThis(tr("Click here to forward the selected mail"));
109 forwardButton->addTo(mailaction);
110
111
97 deleteButton = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 0, this, 0 ); 112 deleteButton = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 0, this, 0 );
@@ -121,12 +136,16 @@ void ReadMail::updateView()
121 136
122 replyButton->removeFrom(mailMenu); 137 replyButton->setEnabled(false);
123 replyButton->removeFrom(bar); 138 /*replyButton->removeFrom(bar);
124 forwardButton->removeFrom(mailMenu); 139 forwardButton->removeFrom(mailMenu);
125 forwardButton->removeFrom(bar); 140 forwardButton->removeFrom(bar);*/
141 downloadButton->removeFrom(bar);
142
143 //downloadButton->setEnabled(!mail->downloaded);
126 144
145
127 if (inbox == TRUE) { 146 if (inbox == TRUE) {
128 replyButton->addTo(bar); 147 replyButton->setEnabled(true);
129 replyButton->addTo(mailMenu); 148 /*replyButton->addTo(mailMenu);
130 forwardButton->addTo(bar); 149 forwardButton->addTo(bar);
131 forwardButton->addTo(mailMenu); 150 forwardButton->addTo(mailMenu);*/
132 151
@@ -134,2 +153,5 @@ void ReadMail::updateView()
134 if (!mail->downloaded) { 153 if (!mail->downloaded) {
154
155 downloadButton->addTo(bar);
156
135 //report currently viewed mail so that it will be 157 //report currently viewed mail so that it will be
@@ -359,2 +381,7 @@ void ReadMail::reply()
359{ 381{
382 emit replyRequested(*mail, (bool&)FALSE);
383}
384
385void ReadMail::replyAll()
386{
360 emit replyRequested(*mail, (bool&)TRUE); 387 emit replyRequested(*mail, (bool&)TRUE);
@@ -367 +394,6 @@ void ReadMail::forward()
367 394
395void ReadMail::download()
396{
397 emit download(mail);
398}
399
diff --git a/noncore/unsupported/mailit/readmail.h b/noncore/unsupported/mailit/readmail.h
index df32c34..6700595 100644
--- a/noncore/unsupported/mailit/readmail.h
+++ b/noncore/unsupported/mailit/readmail.h
@@ -30,2 +30,3 @@
30#include <qtextview.h> 30#include <qtextview.h>
31#include <qtoolbutton.h>
31 32
@@ -52,2 +53,3 @@ signals:
52 void viewingMail(Email *); 53 void viewingMail(Email *);
54 void download (Email*);
53 55
@@ -61,3 +63,5 @@ public slots:
61 void reply(); 63 void reply();
64 void replyAll();
62 void forward(); 65 void forward();
66 void download();
63 67
@@ -84,4 +88,6 @@ private:
84 QAction *previousButton; 88 QAction *previousButton;
85 QAction *replyButton; 89 QToolButton *replyButton;
86 QAction *forwardButton; 90 QAction *forwardButton;
91 QAction *replyAllButton;
92 QAction *downloadButton;
87}; 93};
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
@@ -24,4 +24,3 @@
24 24
25WriteMail::WriteMail( QWidget* parent, const char* name, WFlags fl ) 25WriteMail::WriteMail( QWidget* parent, const char* name, WFlags fl ):QMainWindow( parent, name, fl )
26 : QMainWindow( parent, name, fl )
27{ 26{
@@ -261,3 +260,3 @@ void WriteMail::reply(Email replyMail, bool replyAll)
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)
@@ -270,4 +269,3 @@ void WriteMail::reply(Email replyMail, bool replyAll)
270 } 269 }
271 270 else ccInput->clear();
272 addRecipients(replyAll);
273 271
@@ -275,2 +273,9 @@ void WriteMail::reply(Email replyMail, bool replyAll)
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;
@@ -282,3 +287,3 @@ void WriteMail::reply(Email replyMail, bool replyAll)
282 } 287 }
283 288 mail.body.insert(0,citation);
284 emailInput->setText(mail.body); 289 emailInput->setText(mail.body);
@@ -310,5 +315,12 @@ bool WriteMail::getRecipients(bool ccField)
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
@@ -320,3 +332,3 @@ bool WriteMail::getRecipients(bool ccField)
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 }
@@ -326,3 +338,3 @@ bool WriteMail::getRecipients(bool ccField)
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
@@ -385,2 +397,3 @@ void WriteMail::newMail()
385 toInput->clear(); 397 toInput->clear();
398 ccInput->clear();
386 subjectInput->clear(); 399 subjectInput->clear();