summaryrefslogtreecommitdiff
path: root/noncore/unsupported
Side-by-side diff
Diffstat (limited to 'noncore/unsupported') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp8
-rw-r--r--noncore/unsupported/mailit/emailhandler.cpp8
-rw-r--r--noncore/unsupported/mailit/mailitwindow.cpp22
3 files changed, 21 insertions, 17 deletions
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index 2102ba7..da1226c 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -466,16 +466,16 @@ void EmailClient::mailArrived(const Email &mail, bool fromDisk)
item = (EmailListItem *) item->nextSibling();
}
}
if ((!found)||(fromDisk)) {
item = new EmailListItem(inboxView, newMail, TRUE);
}
- if (item->getMail()->files.count()>0)
- {
- item->setPixmap(0, Resource::loadPixmap("mailit/attach"));
- }
+// if (item->getMail()->files.count()>0)
+// {
+// item->setPixmap(0, Resource::loadPixmap("mailit/attach"));
+// }
/*if (!newMail.downloaded)
mailDownloadList.sizeInsert(newMail.serverId, newMail.size);*/
mailboxView->setCurrentTab(0);
}
diff --git a/noncore/unsupported/mailit/emailhandler.cpp b/noncore/unsupported/mailit/emailhandler.cpp
index 59ccd90..39f693d 100644
--- a/noncore/unsupported/mailit/emailhandler.cpp
+++ b/noncore/unsupported/mailit/emailhandler.cpp
@@ -172,14 +172,16 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai
pos = in.find(delimiter, 0, FALSE);
header = in.left(pos);
body = in.right(in.length() - pos - delimiter.length());
if ((body.at(body.length()-2) == '.') && (body.at(body.length()-3) == '\n'))
body.truncate(body.length()-2);
- TextParser p(header, lineShift);
-
+ // TextParser p(header, lineShift);
+ TextParser * lp = new TextParser(header, lineShift);
+#define p (*lp)
+
if ((pos = p.find("FROM",':', 0, TRUE)) != -1) {
pos++;
if (p.separatorAt(pos) == ' ') {
mail->from = p.getString(&pos, '<', false);
mail->from = mail->from.stripWhiteSpace();
if ( (mail->from.length() > 2) && (mail->from[0] == '"') ) {
@@ -267,12 +269,13 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai
boundary = "--" + boundary; //create boundary field
}
if (boundary == "") { //fooled by Mime-Version
mail->body = body;
mail->bodyPlain = body;
+ delete lp;
return mail;
}
while (body.length() > 0) {
pos = body.find(boundary, 0, FALSE);
pos = body.find(delimiter, pos, FALSE);
@@ -335,12 +338,13 @@ bool EmailHandler::parse(const QString &in, const QString &lineShift, Email *mai
}
}
} else {
mail->bodyPlain = body;
mail->body = body;
}
+ delete lp;
return TRUE;
}
bool EmailHandler::getEnclosure(Enclosure *ePtr)
{
QFile f(ePtr->path + ePtr->name);
diff --git a/noncore/unsupported/mailit/mailitwindow.cpp b/noncore/unsupported/mailit/mailitwindow.cpp
index a111241..f945a0f 100644
--- a/noncore/unsupported/mailit/mailitwindow.cpp
+++ b/noncore/unsupported/mailit/mailitwindow.cpp
@@ -119,31 +119,31 @@ void MailItWindow::viewMail(QListView *view, Email *mail)
emailClient->hide();
int result=0;
if ((mail->received)&&(!mail->downloaded))
{
- QMessageBox mb( tr("Mail not downloaded"),
+ QMessageBox mb( tr("Mail not downloaded"),
tr("The mail you have clicked \n"
- "has not been downloaded yet.\n "
- "Would you like to do it now ?"),
+ "has not been downloaded yet.\n "
+ "Would you like to do it now ?"),
QMessageBox::Information,
QMessageBox::Yes | QMessageBox::Default,
QMessageBox::No | QMessageBox::Escape,0 );
-
- result=mb.exec();
-
- if (result==QMessageBox::Yes)
- {
- emailClient->download(mail);
- }
+
+ result=mb.exec();
+
+ if (result==QMessageBox::Yes)
+ {
+ emailClient->download(mail);
+ }
}
readMail->update(view, mail);
views->raiseWidget(readMail);
- setCaption( tr( "Examine mail" ) );
+ setCaption( tr( "Read Mail" ) );
}
void MailItWindow::updateMailView(Email *mail)
{
if (viewingMail) {
readMail->mailUpdated(mail);