summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/emailclient.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/mailit/emailclient.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mailit/emailclient.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/noncore/unsupported/mailit/emailclient.cpp b/noncore/unsupported/mailit/emailclient.cpp
index fc4276b..9258aac 100644
--- a/noncore/unsupported/mailit/emailclient.cpp
+++ b/noncore/unsupported/mailit/emailclient.cpp
@@ -158,12 +158,13 @@ void EmailClient::init()
composeButton->addTo(bar);
composeButton->addTo(mail);
cancelButton = new QAction(tr("Cancel transfer"), Resource::loadPixmap("close"), QString::null, 0, this, 0);
connect(cancelButton, SIGNAL(activated()), this, SLOT(cancel()) );
cancelButton->addTo(mail);
+ cancelButton->addTo(bar);
cancelButton->setEnabled(FALSE);
mailboxView = new OTabWidget( this, "mailboxView" );
QWidget* widget = new QWidget( mailboxView, "widget" );
grid_2 = new QGridLayout( widget );
@@ -211,12 +212,18 @@ AddressList* EmailClient::getAdrListRef()
return addressList;
}
//this needs to be rewritten to syncronize with outboxView
void EmailClient::enqueMail(const Email &mail)
{
+ if (accountList.count() == 0) {
+ QMessageBox::warning(qApp->activeWindow(),
+ tr("No account selected"), tr("You must create an account"), "OK\n");
+ return;
+ }
+
if (accountList.count() > 0) {
currentAccount = accountList.first();
qWarning("using account " + currentAccount->name);
}
Email addMail = mail;
@@ -229,14 +236,13 @@ void EmailClient::enqueMail(const Email &mail)
void EmailClient::sendQuedMail()
{
int count = 0;
if (accountList.count() == 0) {
- QMessageBox::warning(qApp->activeWindow(),
- "No account selected", "You must create an account", "OK\n");
+ QMessageBox::warning(qApp->activeWindow(), "No account selected", "You must create an account", "OK\n");
return;
}
//traverse listview, find messages to send
if (! sending) {
item = (EmailListItem *) outboxView->firstChild();
if (item != NULL) {