Diffstat (limited to 'noncore/unsupported/mailit/emailclient.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/emailclient.cpp | 10 |
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() | |||
158 | composeButton->addTo(bar); | 158 | composeButton->addTo(bar); |
159 | composeButton->addTo(mail); | 159 | composeButton->addTo(mail); |
160 | 160 | ||
161 | cancelButton = new QAction(tr("Cancel transfer"), Resource::loadPixmap("close"), QString::null, 0, this, 0); | 161 | cancelButton = new QAction(tr("Cancel transfer"), Resource::loadPixmap("close"), QString::null, 0, this, 0); |
162 | connect(cancelButton, SIGNAL(activated()), this, SLOT(cancel()) ); | 162 | connect(cancelButton, SIGNAL(activated()), this, SLOT(cancel()) ); |
163 | cancelButton->addTo(mail); | 163 | cancelButton->addTo(mail); |
164 | cancelButton->addTo(bar); | ||
164 | cancelButton->setEnabled(FALSE); | 165 | cancelButton->setEnabled(FALSE); |
165 | 166 | ||
166 | mailboxView = new OTabWidget( this, "mailboxView" ); | 167 | mailboxView = new OTabWidget( this, "mailboxView" ); |
167 | 168 | ||
168 | QWidget* widget = new QWidget( mailboxView, "widget" ); | 169 | QWidget* widget = new QWidget( mailboxView, "widget" ); |
169 | grid_2 = new QGridLayout( widget ); | 170 | grid_2 = new QGridLayout( widget ); |
@@ -211,12 +212,18 @@ AddressList* EmailClient::getAdrListRef() | |||
211 | return addressList; | 212 | return addressList; |
212 | } | 213 | } |
213 | 214 | ||
214 | //this needs to be rewritten to syncronize with outboxView | 215 | //this needs to be rewritten to syncronize with outboxView |
215 | void EmailClient::enqueMail(const Email &mail) | 216 | void EmailClient::enqueMail(const Email &mail) |
216 | { | 217 | { |
218 | if (accountList.count() == 0) { | ||
219 | QMessageBox::warning(qApp->activeWindow(), | ||
220 | tr("No account selected"), tr("You must create an account"), "OK\n"); | ||
221 | return; | ||
222 | } | ||
223 | |||
217 | if (accountList.count() > 0) { | 224 | if (accountList.count() > 0) { |
218 | currentAccount = accountList.first(); | 225 | currentAccount = accountList.first(); |
219 | qWarning("using account " + currentAccount->name); | 226 | qWarning("using account " + currentAccount->name); |
220 | } | 227 | } |
221 | 228 | ||
222 | Email addMail = mail; | 229 | Email addMail = mail; |
@@ -229,14 +236,13 @@ void EmailClient::enqueMail(const Email &mail) | |||
229 | 236 | ||
230 | void EmailClient::sendQuedMail() | 237 | void EmailClient::sendQuedMail() |
231 | { | 238 | { |
232 | int count = 0; | 239 | int count = 0; |
233 | 240 | ||
234 | if (accountList.count() == 0) { | 241 | if (accountList.count() == 0) { |
235 | QMessageBox::warning(qApp->activeWindow(), | 242 | QMessageBox::warning(qApp->activeWindow(), "No account selected", "You must create an account", "OK\n"); |
236 | "No account selected", "You must create an account", "OK\n"); | ||
237 | return; | 243 | return; |
238 | } | 244 | } |
239 | //traverse listview, find messages to send | 245 | //traverse listview, find messages to send |
240 | if (! sending) { | 246 | if (! sending) { |
241 | item = (EmailListItem *) outboxView->firstChild(); | 247 | item = (EmailListItem *) outboxView->firstChild(); |
242 | if (item != NULL) { | 248 | if (item != NULL) { |