From d37f3eac6b876285eb7a03ab01194ea261458ea5 Mon Sep 17 00:00:00 2001 From: groucho Date: Fri, 11 Apr 2003 14:48:19 +0000 Subject: Lots of improvements regarding usability and stability: - Now uses ofileselector for sending attachments (reading follows, does not crash any more) - Uses DocLnks for attachments (when composing a message) - Beautified the attachments dialog with doc icons - removed a crash when sending attachments and no account was set - smaller fixes ToDo: - Attachment viewer should use doclnk too - get rid of teh save button in ofileselector - fix the bug with GMX mail provider sending mail (user encoding wrong) - replace the Attach and Remove buttons with a nice toolbar - Maybe integrate attview into the mail sending window on demand - get rid of crashes --- (limited to 'noncore/net/mailit/emailclient.cpp') diff --git a/noncore/net/mailit/emailclient.cpp b/noncore/net/mailit/emailclient.cpp index fc4276b..9258aac 100644 --- a/noncore/net/mailit/emailclient.cpp +++ b/noncore/net/mailit/emailclient.cpp @@ -161,6 +161,7 @@ void EmailClient::init() 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" ); @@ -214,6 +215,12 @@ AddressList* EmailClient::getAdrListRef() //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); @@ -232,8 +239,7 @@ 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 -- cgit v0.9.0.2