summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/composer.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/mail2/composer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/composer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/unsupported/mail2/composer.cpp b/noncore/unsupported/mail2/composer.cpp
index 52ebbdd..cb80299 100644
--- a/noncore/unsupported/mail2/composer.cpp
+++ b/noncore/unsupported/mail2/composer.cpp
@@ -9,14 +9,14 @@
#include <qapplication.h>
#include <qpe/resource.h>
#include <qpe/config.h>
#include <opie/ofiledialog.h>
-//#include "attachdiag.h"
+#include "mailstatusbar.h"
#include "addresspicker.h"
#include "listviewplus.h"
#include "smtphandler.h"
#include "composer.h"
#include "rename.h"
@@ -29,13 +29,13 @@ AttachViewItem::AttachViewItem(QListView *parent, Attachment &attachment)
}
Composer::Composer(QWidget *parent, const char *name, WFlags fl, bool sendQueue)
: ComposerBase(parent, name, fl), _inLoop(false)
{
_sendQueued = sendQueue;
- abort->setEnabled(false);
+ status->setStopEnabled(false);
to->setFocus();
connect(sendmail, SIGNAL(activated()), SLOT(slotSendMail()));
connect(queuemail, SIGNAL(activated()), SLOT(slotQueueMail()));
connect(addressbook, SIGNAL(activated()), SLOT(slotOpenAddressPicker()));
connect(addattach, SIGNAL(activated()), SLOT(slotAddAttach()));
@@ -151,18 +151,18 @@ void Composer::slotSendMail()
smail.setAttachments(attachments);
QString header, message;
MailFactory::genMail(header, message, smail, this);
if (header.isNull() || message.isNull()) return; // Aborted.
- abort->setEnabled(true);
+ status->setStopEnabled(true);
SmtpHandler *handler = new SmtpHandler(header, message, accountsLoaded[from->currentItem()], to->text());
connect(handler, SIGNAL(finished()), SLOT(slotSendFinished()));
connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendError(const QString &)));
- connect(handler, SIGNAL(status(const QString &)), status, SLOT(setText(const QString &)));
+ connect(handler, SIGNAL(status(const QString &)), status, SLOT(setStatusText(const QString &)));
}
void Composer::slotSendQueued()
{
int effSendCount = 0;
qDebug("Sending queued messages");
@@ -245,13 +245,13 @@ void Composer::slotSendQueued()
qDebug("Sending to %s",toAdr.latin1());
SmtpHandler *handler = new SmtpHandler(header, message, accnt ,toAdr);
effSendCount++;
connect(handler, SIGNAL(finished()), SLOT(slotSendQueuedFinished()));
connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendQueuedError(const QString &)));
- connect(handler, SIGNAL(status(const QString &)), status, SLOT(setText(const QString &)));
+ connect(handler, SIGNAL(status(const QString &)), status, SLOT(setStatusText(const QString &)));
}
if (effSendCount < _toSend)
{
_toSend = effSendCount;
QMessageBox::information(this, tr("Error"), tr("<p>There was a problem sending some of the queued mails.</p>"), tr("Ok"));
@@ -302,30 +302,30 @@ void Composer::slotQueueMail()
QMessageBox::information(this, tr("Success"), tr("<p>The mail was queued successfully.</p><p>The queue contains ")+QString::number(count)+tr(" mails.</p>"), tr("Ok"));
}
void Composer::slotSendError(const QString &error)
{
- status->setText(tr("<font color=#ff0000>Error occoured during sending.</font>"));
+ status->setStatusText(tr("<font color=#ff0000>Error occoured during sending.</font>"));
QMessageBox::warning(this, tr("Error"), tr("<p>%1</p").arg(error), tr("Ok"));
}
void Composer::slotSendQueuedError(const QString &error)
{
_sendError++;
qDebug("error send mail %i",_sendCount);
- status->setText(tr("<font color=#ff0000>Error occoured during sending.</font>"));
+ status->setStatusText(tr("<font color=#ff0000>Error occoured during sending.</font>"));
QMessageBox::warning(this, tr("Error"), tr("<p>%1</p").arg(error), tr("Ok"));
}
void Composer::slotSendFinished()
{
QMessageBox::information(this, tr("Success"), tr("<p>The mail was sent successfully.</p>"), tr("Ok"));
- status->setText(QString(0));
- abort->setEnabled(false);
+ status->setStatusText(QString(0));
+ status->setStopEnabled(false);
}
void Composer::slotSendQueuedFinished()
{
_sendCount++;