summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/mail2/composer.cpp55
-rw-r--r--noncore/unsupported/mail2/composer.h3
-rw-r--r--noncore/unsupported/mail2/composerbase.cpp9
-rw-r--r--noncore/unsupported/mail2/composerbase.h4
-rw-r--r--noncore/unsupported/mail2/libmail/libmail.pro3
-rw-r--r--noncore/unsupported/mail2/mail.pro3
-rw-r--r--noncore/unsupported/mail2/mainwindowbase.cpp12
-rw-r--r--noncore/unsupported/mail2/mainwindowbase.h4
8 files changed, 74 insertions, 19 deletions
diff --git a/noncore/unsupported/mail2/composer.cpp b/noncore/unsupported/mail2/composer.cpp
index 1d793ee..72a7242 100644
--- a/noncore/unsupported/mail2/composer.cpp
+++ b/noncore/unsupported/mail2/composer.cpp
@@ -61,17 +61,16 @@ void Composer::hide()
61 _inLoop = false; 61 _inLoop = false;
62 qApp->exit_loop(); 62 qApp->exit_loop();
63 } 63 }
64} 64}
65 65
66void Composer::exec() 66void Composer::exec()
67{ 67{
68 show(); 68 show();
69
70 if (!_inLoop) { 69 if (!_inLoop) {
71 _inLoop = true; 70 _inLoop = true;
72 qApp->enter_loop(); 71 qApp->enter_loop();
73 } 72 }
74} 73}
75 74
76void Composer::setSendMail(SendMail &sendMail) 75void Composer::setSendMail(SendMail &sendMail)
77{ 76{
@@ -89,21 +88,17 @@ void Composer::setSendMail(SendMail &sendMail)
89 if (attachView->isHidden()) attachView->show(); 88 if (attachView->isHidden()) attachView->show();
90 } 89 }
91} 90}
92 91
93void Composer::slotResizing() 92void Composer::slotResizing()
94{ 93{
95 from->setMaximumWidth(width() - fromBox->width()); 94 from->setMaximumWidth(width() - fromBox->width());
96 from->resize(width() - fromBox->width(), y()); 95 from->resize(width() - fromBox->width(), y());
97 if (_sendQueued) 96 if (_sendQueued) slotSendQueued();
98 {
99 slotSendQueued();
100 close();
101 }
102} 97}
103 98
104void Composer::slotPopupHandler(int itemid) 99void Composer::slotPopupHandler(int itemid)
105{ 100{
106 if (attachView->currentItem() == NULL) { 101 if (attachView->currentItem() == NULL) {
107 QMessageBox::information(this, tr("Error"), tr("Please select an entry first."), tr("Ok")); 102 QMessageBox::information(this, tr("Error"), tr("Please select an entry first."), tr("Ok"));
108 return; 103 return;
109 } 104 }
@@ -166,25 +161,25 @@ void Composer::slotSendMail()
166} 161}
167 162
168void Composer::slotSendQueued() 163void Composer::slotSendQueued()
169{ 164{
170 165
171 qDebug("Sending queued messages"); 166 qDebug("Sending queued messages");
172 Config cfg( "mailqueue", Config::User ); 167 Config cfg( "mailqueue", Config::User );
173 cfg.setGroup( "Settings" ); 168 cfg.setGroup( "Settings" );
174 int count = cfg.readNumEntry( "count", 0 ); 169 _sendCount = 0;
175 // tille: should not be here 170 _sendError = 0;
176 // but no error checking for the moment 171 _toSend = cfg.readNumEntry( "count", 0 );
177 cfg.writeEntry( "count", 0 );
178 172
173 if (_toSend == 0) close();
179 174
180 qDebug("%i messages to send", count); 175 qDebug("%i messages to send", _toSend);
181 QString str; 176 QString str;
182 for (int i=1;i<=count;i++) 177 for (int i=1;i<=_toSend;i++)
183 { 178 {
184 qDebug("sending message %i",i); 179 qDebug("sending message %i",i);
185 cfg.setGroup( "Mail_" + QString::number(i) ); 180 cfg.setGroup( "Mail_" + QString::number(i) );
186 SendMail smail; 181 SendMail smail;
187 str = cfg.readEntry("from"); 182 str = cfg.readEntry("from");
188 qDebug("setFrom %s",str.latin1()); 183 qDebug("setFrom %s",str.latin1());
189 smail.setFrom( str ); 184 smail.setFrom( str );
190 str = cfg.readEntry("reply"); 185 str = cfg.readEntry("reply");
@@ -244,23 +239,20 @@ void Composer::slotSendQueued()
244 MailFactory::genMail(header, message, smail, this); 239 MailFactory::genMail(header, message, smail, this);
245 if (header.isNull() || message.isNull()) continue;//return;// Aborted. 240 if (header.isNull() || message.isNull()) continue;//return;// Aborted.
246 241
247 // abort->setEnabled(true); 242 // abort->setEnabled(true);
248 243
249 qDebug("Sending to %s",toAdr.latin1()); 244 qDebug("Sending to %s",toAdr.latin1());
250 SmtpHandler *handler = new SmtpHandler(header, message, accnt ,toAdr); 245 SmtpHandler *handler = new SmtpHandler(header, message, accnt ,toAdr);
251 246
252 connect(handler, SIGNAL(finished()), SLOT(slotSendFinished())); 247 connect(handler, SIGNAL(finished()), SLOT(slotSendQueuedFinished()));
253 connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendError(const QString &))); 248 connect(handler, SIGNAL(error(const QString &)), SLOT(slotSendQueuedError(const QString &)));
254 connect(handler, SIGNAL(status(const QString &)), status, SLOT(setText(const QString &))); 249 connect(handler, SIGNAL(status(const QString &)), status, SLOT(setText(const QString &)));
255 250
256 qDebug("remove mail %i", i);
257 cfg.clearGroup();
258 cfg.removeEntry( "Mail_" + QString::number(i) );
259 } 251 }
260} 252}
261 253
262void Composer::slotQueueMail() 254void Composer::slotQueueMail()
263{ 255{
264 if (to->text().find(QRegExp(".*\\@.*\\..*")) == -1) { 256 if (to->text().find(QRegExp(".*\\@.*\\..*")) == -1) {
265 QMessageBox::information(this, tr("Error"), tr("<p>You have to specify a recipient.<br>(eg: foo@bar.org)</p>"), tr("Ok")); 257 QMessageBox::information(this, tr("Error"), tr("<p>You have to specify a recipient.<br>(eg: foo@bar.org)</p>"), tr("Ok"));
266 return; 258 return;
@@ -305,24 +297,53 @@ void Composer::slotQueueMail()
305} 297}
306 298
307void Composer::slotSendError(const QString &error) 299void Composer::slotSendError(const QString &error)
308{ 300{
309 status->setText(tr("<font color=#ff0000>Error occoured during sending.</font>")); 301 status->setText(tr("<font color=#ff0000>Error occoured during sending.</font>"));
310 QMessageBox::warning(this, tr("Error"), tr("<p>%1</p").arg(error), tr("Ok")); 302 QMessageBox::warning(this, tr("Error"), tr("<p>%1</p").arg(error), tr("Ok"));
311} 303}
312 304
305void Composer::slotSendQueuedError(const QString &error)
306{
307 _sendError++;
308 qDebug("error send mail %i",_sendCount);
309 status->setText(tr("<font color=#ff0000>Error occoured during sending.</font>"));
310 QMessageBox::warning(this, tr("Error"), tr("<p>%1</p").arg(error), tr("Ok"));
311}
312
313void Composer::slotSendFinished() 313void Composer::slotSendFinished()
314{ 314{
315 QMessageBox::information(this, tr("Success"), tr("<p>The mail was sent successfully.</p>"), tr("Ok")); 315 QMessageBox::information(this, tr("Success"), tr("<p>The mail was sent successfully.</p>"), tr("Ok"));
316 316
317 status->setText(QString(0)); 317 status->setText(QString(0));
318 abort->setEnabled(false); 318 abort->setEnabled(false);
319} 319}
320 320
321void Composer::slotSendQueuedFinished()
322{
323
324 _sendCount++;
325 qDebug("finished send mail %i of %i (error %i)",_sendCount,_toSend,_sendError);
326 if (_sendCount < _toSend) return;
327 if (_sendError == _toSend) close();
328 QMessageBox::information(this, tr("Success"), tr("<p>The queued mails ")+QString::number(_toSend-_sendError)+tr(" of ")+QString::number(_toSend)+(" were sent successfully.</p>"), tr("Ok"));
329 Config cfg( "mailqueue", Config::User );
330 cfg.setGroup( "Settings" );
331 cfg.writeEntry( "count", 0 );
332 for (int i=1;i<=_sendCount;i++)
333 {
334 cfg.setGroup( "Mail_" + QString::number(i) );
335 qDebug("remove mail %i", i);
336 cfg.clearGroup();
337 cfg.removeEntry( "Mail_" + QString::number(i) );
338 }
339 close();
340}
341
321void Composer::slotFillStuff() 342void Composer::slotFillStuff()
322{ 343{
323 QValueList<Account> accounts = ConfigFile::getAccounts(); 344 QValueList<Account> accounts = ConfigFile::getAccounts();
324 int i = 0; 345 int i = 0;
325 346
326 QValueList<Account>::Iterator it; 347 QValueList<Account>::Iterator it;
327 for (it = accounts.begin(); it != accounts.end(); it++) { 348 for (it = accounts.begin(); it != accounts.end(); it++) {
328 if (!(*it).email().isEmpty() && !(*it).smtpServer().isEmpty() && !(*it).smtpPort().isEmpty()) { 349 if (!(*it).email().isEmpty() && !(*it).smtpServer().isEmpty() && !(*it).smtpPort().isEmpty()) {
diff --git a/noncore/unsupported/mail2/composer.h b/noncore/unsupported/mail2/composer.h
index 00235bf..0b2a54c 100644
--- a/noncore/unsupported/mail2/composer.h
+++ b/noncore/unsupported/mail2/composer.h
@@ -37,26 +37,29 @@ public slots:
37 void slotSendQueued(); 37 void slotSendQueued();
38 38
39protected slots: 39protected slots:
40 void slotPopupHandler(int itemid); 40 void slotPopupHandler(int itemid);
41 void slotSendMail(); 41 void slotSendMail();
42 void slotQueueMail(); 42 void slotQueueMail();
43 void slotSendError(const QString &); 43 void slotSendError(const QString &);
44 void slotSendFinished(); 44 void slotSendFinished();
45 void slotSendQueuedError(const QString &);
46 void slotSendQueuedFinished();
45 void slotResizing(); 47 void slotResizing();
46 void slotFillStuff(); 48 void slotFillStuff();
47 void slotFromChanged(int id); 49 void slotFromChanged(int id);
48 void slotOpenAddressPicker(); 50 void slotOpenAddressPicker();
49 void slotAddAttach(); 51 void slotAddAttach();
50 void slotDelAttach(); 52 void slotDelAttach();
51 53
52protected: 54protected:
53 QValueList<Account> accountsLoaded; 55 QValueList<Account> accountsLoaded;
54 56
55private: 57private:
56 bool _sendQueued; 58 bool _sendQueued;
59 int _toSend, _sendCount, _sendError;
57 bool _inLoop; 60 bool _inLoop;
58 QString _inReplyTo; 61 QString _inReplyTo;
59 62
60}; 63};
61 64
62#endif 65#endif
diff --git a/noncore/unsupported/mail2/composerbase.cpp b/noncore/unsupported/mail2/composerbase.cpp
index 6627701..ff00a73 100644
--- a/noncore/unsupported/mail2/composerbase.cpp
+++ b/noncore/unsupported/mail2/composerbase.cpp
@@ -3,50 +3,59 @@
3#include <qcombobox.h> 3#include <qcombobox.h>
4#include <qlineedit.h> 4#include <qlineedit.h>
5#include <qlayout.h> 5#include <qlayout.h>
6#include <qaction.h> 6#include <qaction.h>
7#include <qlabel.h> 7#include <qlabel.h>
8#include <qvbox.h> 8#include <qvbox.h>
9 9
10#include <qpe/qpetoolbar.h> 10#include <qpe/qpetoolbar.h>
11#include <qpe/qpemenubar.h>
11#include <qpe/resource.h> 12#include <qpe/resource.h>
12 13
13#include "listviewplus.h" 14#include "listviewplus.h"
14#include "composerbase.h" 15#include "composerbase.h"
15 16
16ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl) 17ComposerBase::ComposerBase(QWidget *parent, const char *name, WFlags fl)
17 : QMainWindow(parent, name, fl) 18 : QMainWindow(parent, name, fl)
18{ 19{
19 setCaption(tr("Compose Message")); 20 setCaption(tr("Compose Message"));
20 setToolBarsMovable(false); 21 setToolBarsMovable(false);
21 22
22 toolbar = new QPEToolBar(this); 23 toolbar = new QPEToolBar(this);
24 menubar = new QPEMenuBar( toolbar );
25 mailmenu = new QPopupMenu( menubar );
26 menubar->insertItem( tr( "Mail" ), mailmenu );
23 addToolBar(toolbar); 27 addToolBar(toolbar);
24 toolbar->setHorizontalStretchable(true); 28 toolbar->setHorizontalStretchable(true);
25 29
26 sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this); 30 sendmail = new QAction(tr("Send the mail"), QIconSet(Resource::loadPixmap("mail/sendmail")), 0, 0, this);
27 sendmail->addTo(toolbar); 31 sendmail->addTo(toolbar);
32 sendmail->addTo(mailmenu);
28 33
29 queuemail = new QAction(tr("Queue the mail"), QIconSet(Resource::loadPixmap("mail/sendall")), 0, 0, this); 34 queuemail = new QAction(tr("Queue the mail"), QIconSet(Resource::loadPixmap("mail/sendall")), 0, 0, this);
30 queuemail->addTo(toolbar); 35 queuemail->addTo(toolbar);
36 queuemail->addTo(mailmenu);
31 37
32 attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true); 38 attachfile = new QAction(tr("Attach a file"), QIconSet(Resource::loadPixmap("mail/attach")), 0, 0, this, 0, true);
33 attachfile->addTo(toolbar); 39 attachfile->addTo(toolbar);
40 attachfile->addTo(mailmenu);
34 connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool))); 41 connect(attachfile, SIGNAL(toggled(bool)), SLOT(slotAttachfileChanged(bool)));
35 42
36 addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this); 43 addressbook = new QAction(tr("Addressbook"), QIconSet(Resource::loadPixmap("mail/addbook")), 0, 0, this);
37 addressbook->addTo(toolbar); 44 addressbook->addTo(toolbar);
45 addressbook->addTo(mailmenu);
38 46
39 QLabel *spacer = new QLabel(toolbar); 47 QLabel *spacer = new QLabel(toolbar);
40 spacer->setBackgroundMode(QWidget::PaletteButton); 48 spacer->setBackgroundMode(QWidget::PaletteButton);
41 toolbar->setStretchableWidget(spacer); 49 toolbar->setStretchableWidget(spacer);
42 50
43 abort = new QAction(tr("Abort sending"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this); 51 abort = new QAction(tr("Abort sending"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this);
44 abort->addTo(toolbar); 52 abort->addTo(toolbar);
53 abort->addTo(mailmenu);
45 54
46 QWidget *main = new QWidget(this); 55 QWidget *main = new QWidget(this);
47 setCentralWidget(main); 56 setCentralWidget(main);
48 57
49 QGridLayout *layout = new QGridLayout(main); 58 QGridLayout *layout = new QGridLayout(main);
50 59
51 fromBox = new QComboBox(main); 60 fromBox = new QComboBox(main);
52 fromBox->insertItem(tr("From"), POPUP_FROM_FROM); 61 fromBox->insertItem(tr("From"), POPUP_FROM_FROM);
diff --git a/noncore/unsupported/mail2/composerbase.h b/noncore/unsupported/mail2/composerbase.h
index 9d3e4fc..d832623 100644
--- a/noncore/unsupported/mail2/composerbase.h
+++ b/noncore/unsupported/mail2/composerbase.h
@@ -2,16 +2,18 @@
2#define COMPOSERBASE_H 2#define COMPOSERBASE_H
3 3
4#include <qmainwindow.h> 4#include <qmainwindow.h>
5 5
6class QMultiLineEdit; 6class QMultiLineEdit;
7class ListViewPlus; 7class ListViewPlus;
8class QPopupMenu; 8class QPopupMenu;
9class QPEToolBar; 9class QPEToolBar;
10class QPEMenuBar;
11class QPopupMenu;
10class QComboBox; 12class QComboBox;
11class QLineEdit; 13class QLineEdit;
12class QAction; 14class QAction;
13class QLabel; 15class QLabel;
14 16
15class ComposerBase : public QMainWindow 17class ComposerBase : public QMainWindow
16{ 18{
17 Q_OBJECT 19 Q_OBJECT
@@ -34,16 +36,18 @@ protected:
34 static const int POPUP_ATTACH_DESC = 1; 36 static const int POPUP_ATTACH_DESC = 1;
35 static const int POPUP_ATTACH_REMOVE = 2; 37 static const int POPUP_ATTACH_REMOVE = 2;
36 38
37 QMultiLineEdit *message; 39 QMultiLineEdit *message;
38 ListViewPlus *attachView; 40 ListViewPlus *attachView;
39 QMainWindow *attachWindow; 41 QMainWindow *attachWindow;
40 QPopupMenu *attachPopup; 42 QPopupMenu *attachPopup;
41 QPEToolBar *toolbar, *attachToolbar; 43 QPEToolBar *toolbar, *attachToolbar;
44 QPEMenuBar *menubar;
45 QPopupMenu *mailmenu;
42 QComboBox *fromBox, *from, *receiversBox, *subjectBox, *priority; 46 QComboBox *fromBox, *from, *receiversBox, *subjectBox, *priority;
43 QLineEdit *replyto, *to, *cc, *bcc, *subject; 47 QLineEdit *replyto, *to, *cc, *bcc, *subject;
44 QAction *sendmail, *queuemail, *attachfile, *addressbook, *abort, *addattach, *delattach; 48 QAction *sendmail, *queuemail, *attachfile, *addressbook, *abort, *addattach, *delattach;
45 QLabel *fromLabel, *status; 49 QLabel *fromLabel, *status;
46 50
47protected slots: 51protected slots:
48 void slotAttachfileChanged(bool toggled); 52 void slotAttachfileChanged(bool toggled);
49 void slotFromMenuChanged(int id); 53 void slotFromMenuChanged(int id);
diff --git a/noncore/unsupported/mail2/libmail/libmail.pro b/noncore/unsupported/mail2/libmail/libmail.pro
index 662af90..ddabd07 100644
--- a/noncore/unsupported/mail2/libmail/libmail.pro
+++ b/noncore/unsupported/mail2/libmail/libmail.pro
@@ -1,10 +1,11 @@
1 TEMPLATE =lib 1 TEMPLATE =lib
2 CONFIG =qt warn_on release 2 CONFIG =qt warn_on debug
3 #CONFIG =qt warn_on release
3 HEADERS =configfile.h \ 4 HEADERS =configfile.h \
4 defines.h \ 5 defines.h \
5 imapbase.h \ 6 imapbase.h \
6 imaphandler.h \ 7 imaphandler.h \
7 imapresponse.h \ 8 imapresponse.h \
8 mailfactory.h \ 9 mailfactory.h \
9 md5.cpp \ 10 md5.cpp \
10 miscfunctions.h \ 11 miscfunctions.h \
diff --git a/noncore/unsupported/mail2/mail.pro b/noncore/unsupported/mail2/mail.pro
index 50d7c68..76b7996 100644
--- a/noncore/unsupported/mail2/mail.pro
+++ b/noncore/unsupported/mail2/mail.pro
@@ -1,10 +1,11 @@
1 TEMPLATE = app 1 TEMPLATE = app
2 CONFIG = qt warn_on release 2 CONFIG = qt warn_on debug
3 #CONFIG = qt warn_on release
3 HEADERS = accounteditor.h \ 4 HEADERS = accounteditor.h \
4 addresspicker.h \ 5 addresspicker.h \
5 attachdiag.h \ 6 attachdiag.h \
6 composer.h \ 7 composer.h \
7 composerbase.h \ 8 composerbase.h \
8 configdiag.h \ 9 configdiag.h \
9 folderwidget.h \ 10 folderwidget.h \
10 listviewplus.h \ 11 listviewplus.h \
diff --git a/noncore/unsupported/mail2/mainwindowbase.cpp b/noncore/unsupported/mail2/mainwindowbase.cpp
index 24f030f..9ffe6f0 100644
--- a/noncore/unsupported/mail2/mainwindowbase.cpp
+++ b/noncore/unsupported/mail2/mainwindowbase.cpp
@@ -2,47 +2,59 @@
2#include <qtoolbutton.h> 2#include <qtoolbutton.h>
3#include <qpopupmenu.h> 3#include <qpopupmenu.h>
4#include <qaction.h> 4#include <qaction.h>
5#include <qheader.h> 5#include <qheader.h>
6#include <qlabel.h> 6#include <qlabel.h>
7#include <qvbox.h> 7#include <qvbox.h>
8 8
9#include <qpe/qpetoolbar.h> 9#include <qpe/qpetoolbar.h>
10#include <qpe/qpemenubar.h>
10#include <qpe/resource.h> 11#include <qpe/resource.h>
11 12
12#include "mainwindowbase.h" 13#include "mainwindowbase.h"
13#include "folderwidget.h" 14#include "folderwidget.h"
14#include "mailtable.h" 15#include "mailtable.h"
15 16
16MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl) 17MainWindowBase::MainWindowBase(QWidget *parent, const char *name, WFlags fl)
17 : QMainWindow(parent, name, fl) 18 : QMainWindow(parent, name, fl)
18{ 19{
19 setCaption(tr("E-Mail")); 20 setCaption(tr("E-Mail"));
20 setToolBarsMovable(false); 21 setToolBarsMovable(false);
21 22
22 toolbar = new QPEToolBar(this); 23 toolbar = new QPEToolBar(this);
24 menubar = new QPEMenuBar( toolbar );
25 mailmenu = new QPopupMenu( menubar );
26 servermenu = new QPopupMenu( menubar );
27 menubar->insertItem( tr( "Mail" ), mailmenu );
28 menubar->insertItem( tr( "Servers" ), servermenu );
29
23 addToolBar(toolbar); 30 addToolBar(toolbar);
24 toolbar->setHorizontalStretchable(true); 31 toolbar->setHorizontalStretchable(true);
25 32
26 compose = new QAction(tr("Compose new mail"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this); 33 compose = new QAction(tr("Compose new mail"), QIconSet(Resource::loadPixmap("mail/newmail")), 0, 0, this);
27 compose->addTo(toolbar); 34 compose->addTo(toolbar);
35 compose->addTo(mailmenu);
28 36
29 sendQueue = new QAction(tr("Send queued mails"), QIconSet(Resource::loadPixmap("mail/sendqueue")), 0, 0, this); 37 sendQueue = new QAction(tr("Send queued mails"), QIconSet(Resource::loadPixmap("mail/sendqueue")), 0, 0, this);
30 sendQueue->addTo(toolbar); 38 sendQueue->addTo(toolbar);
39 sendQueue->addTo(mailmenu);
31 40
32 folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true); 41 folders = new QAction(tr("Show/hide folders"), QIconSet(Resource::loadPixmap("mail/folder")), 0, 0, this, 0, true);
33 folders->addTo(toolbar); 42 folders->addTo(toolbar);
43 folders->addTo(servermenu);
34 connect(folders, SIGNAL(toggled(bool)), SLOT(slotFoldersToggled(bool))); 44 connect(folders, SIGNAL(toggled(bool)), SLOT(slotFoldersToggled(bool)));
35 45
36 findmails = new QAction(tr("Search mails"), QIconSet(Resource::loadPixmap("mail/find")), 0, 0, this); 46 findmails = new QAction(tr("Search mails"), QIconSet(Resource::loadPixmap("mail/find")), 0, 0, this);
37 findmails->addTo(toolbar); 47 findmails->addTo(toolbar);
48 findmails->addTo(mailmenu);
38 49
39 configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this); 50 configure = new QAction(tr("Configuration"), QIconSet(Resource::loadPixmap("mail/configure")), 0, 0, this);
40 configure->addTo(toolbar); 51 configure->addTo(toolbar);
52 configure->addTo(servermenu);
41 53
42 QLabel *spacer = new QLabel(toolbar); 54 QLabel *spacer = new QLabel(toolbar);
43 spacer->setBackgroundMode(QWidget::PaletteButton); 55 spacer->setBackgroundMode(QWidget::PaletteButton);
44 toolbar->setStretchableWidget(spacer); 56 toolbar->setStretchableWidget(spacer);
45 57
46 stop = new QAction(tr("Abort"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this); 58 stop = new QAction(tr("Abort"), QIconSet(Resource::loadPixmap("mail/abort")), 0, 0, this);
47 stop->addTo(toolbar); 59 stop->addTo(toolbar);
48 60
diff --git a/noncore/unsupported/mail2/mainwindowbase.h b/noncore/unsupported/mail2/mainwindowbase.h
index 232d656..d8faeba 100644
--- a/noncore/unsupported/mail2/mainwindowbase.h
+++ b/noncore/unsupported/mail2/mainwindowbase.h
@@ -2,16 +2,18 @@
2#define MAINWINDOWBASE_H 2#define MAINWINDOWBASE_H
3 3
4#include <qmainwindow.h> 4#include <qmainwindow.h>
5 5
6class ServerConnection; 6class ServerConnection;
7class QProgressBar; 7class QProgressBar;
8class FolderWidget; 8class FolderWidget;
9class QPEToolBar; 9class QPEToolBar;
10class QPEMenuBar;
11class QPopupMenu;
10class MailTable; 12class MailTable;
11class QAction; 13class QAction;
12class QLabel; 14class QLabel;
13 15
14class MainWindowBase : public QMainWindow 16class MainWindowBase : public QMainWindow
15{ 17{
16 Q_OBJECT 18 Q_OBJECT
17 19
@@ -21,15 +23,17 @@ public:
21protected slots: 23protected slots:
22 void slotFoldersToggled(bool toggled); 24 void slotFoldersToggled(bool toggled);
23 25
24protected: 26protected:
25 ServerConnection *serverConnection; 27 ServerConnection *serverConnection;
26 QProgressBar *statusProgress; 28 QProgressBar *statusProgress;
27 FolderWidget *folderView; 29 FolderWidget *folderView;
28 QPEToolBar *toolbar; 30 QPEToolBar *toolbar;
31 QPEMenuBar *menubar;
32 QPopupMenu *mailmenu, *servermenu;
29 MailTable *mailView; 33 MailTable *mailView;
30 QAction *compose, *sendQueue, *folders, *findmails, *configure, *stop; 34 QAction *compose, *sendQueue, *folders, *findmails, *configure, *stop;
31 QLabel *statusLabel; 35 QLabel *statusLabel;
32 36
33}; 37};
34 38
35#endif 39#endif