Diffstat (limited to 'noncore/net/mail/opiemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/opiemail.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index e35f5b6..54453b7 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp | |||
@@ -4,48 +4,51 @@ | |||
4 | #include "editaccounts.h" | 4 | #include "editaccounts.h" |
5 | #include "composemail.h" | 5 | #include "composemail.h" |
6 | #include "smtpwrapper.h" | 6 | #include "smtpwrapper.h" |
7 | #include <qpe/qcopenvelope_qws.h> | 7 | #include <qpe/qcopenvelope_qws.h> |
8 | #include <qaction.h> | 8 | #include <qaction.h> |
9 | #include <qapplication.h> | 9 | #include <qapplication.h> |
10 | 10 | ||
11 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) | 11 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) |
12 | : MainWindow( parent, name, flags ) | 12 | : MainWindow( parent, name, flags ) |
13 | { | 13 | { |
14 | settings = new Settings(); | 14 | settings = new Settings(); |
15 | 15 | ||
16 | folderView->populate( settings->getAccounts() ); | 16 | folderView->populate( settings->getAccounts() ); |
17 | 17 | ||
18 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); | 18 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); |
19 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); | 19 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); |
20 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); | 20 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); |
21 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); | 21 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); |
22 | // Added by Stefan Eilers to allow starting by addressbook.. | 22 | // Added by Stefan Eilers to allow starting by addressbook.. |
23 | // copied from old mail2 | 23 | // copied from old mail2 |
24 | #if !defined(QT_NO_COP) | 24 | #if !defined(QT_NO_COP) |
25 | connect( qApp, SIGNAL( appMessage( const QCString&, const QByteArray& ) ), | 25 | connect( qApp, SIGNAL( appMessage( const QCString&, const QByteArray& ) ), |
26 | this, SLOT( appMessage( const QCString&, const QByteArray& ) ) ); | 26 | this, SLOT( appMessage( const QCString&, const QByteArray& ) ) ); |
27 | #endif | 27 | #endif |
28 | |||
29 | |||
30 | |||
28 | } | 31 | } |
29 | 32 | ||
30 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) | 33 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) |
31 | { | 34 | { |
32 | // copied from old mail2 | 35 | // copied from old mail2 |
33 | if (msg == "writeMail(QString,QString)") { | 36 | if (msg == "writeMail(QString,QString)") { |
34 | QDataStream stream(data,IO_ReadOnly); | 37 | QDataStream stream(data,IO_ReadOnly); |
35 | QString name, email; | 38 | QString name, email; |
36 | stream >> name >> email; | 39 | stream >> name >> email; |
37 | // removing the whitespaces at beginning and end is needed! | 40 | // removing the whitespaces at beginning and end is needed! |
38 | slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); | 41 | slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); |
39 | } else if (msg == "newMail()") { | 42 | } else if (msg == "newMail()") { |
40 | slotComposeMail(); | 43 | slotComposeMail(); |
41 | } | 44 | } |
42 | } | 45 | } |
43 | 46 | ||
44 | void OpieMail::slotwriteMail(const QString&name,const QString&email) | 47 | void OpieMail::slotwriteMail(const QString&name,const QString&email) |
45 | { | 48 | { |
46 | ComposeMail compose( settings, this, 0 , true ); | 49 | ComposeMail compose( settings, this, 0 , true ); |
47 | if (!email.isEmpty()) { | 50 | if (!email.isEmpty()) { |
48 | if (!name.isEmpty()) { | 51 | if (!name.isEmpty()) { |
49 | compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); | 52 | compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); |
50 | } else { | 53 | } else { |
51 | compose.setTo(email); | 54 | compose.setTo(email); |