-rw-r--r-- | kmicromail/opiemail.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 70fbcb2..d522ad0 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp | |||
@@ -1,64 +1,65 @@ | |||
1 | // CHANGED 2004-08-06 Lutz Rogowski | ||
1 | 2 | ||
2 | #include "settingsdialog.h" | 3 | #include "settingsdialog.h" |
3 | #include "opiemail.h" | 4 | #include "opiemail.h" |
4 | #include "editaccounts.h" | 5 | #include "editaccounts.h" |
5 | #include "composemail.h" | 6 | #include "composemail.h" |
6 | #include "mailistviewitem.h" | 7 | #include "mailistviewitem.h" |
7 | #include "viewmail.h" | 8 | #include "viewmail.h" |
8 | #include "selectstore.h" | 9 | #include "selectstore.h" |
9 | #include "selectsmtp.h" | 10 | #include "selectsmtp.h" |
10 | 11 | ||
11 | #include <qmessagebox.h> | 12 | #include <qmessagebox.h> |
12 | 13 | ||
13 | #include <qpe/qpeapplication.h> | 14 | #include <qpe/qpeapplication.h> |
14 | #include <libmailwrapper/smtpwrapper.h> | 15 | #include <libmailwrapper/smtpwrapper.h> |
15 | #include <libmailwrapper/mailtypes.h> | 16 | #include <libmailwrapper/mailtypes.h> |
16 | #include <libmailwrapper/abstractmail.h> | 17 | #include <libmailwrapper/abstractmail.h> |
17 | /* OPIE */ | 18 | /* OPIE */ |
18 | //#include <qpe/resource.h> | 19 | //#include <qpe/resource.h> |
19 | #include <qpe/qpeapplication.h> | 20 | #include <qpe/qpeapplication.h> |
20 | 21 | ||
21 | /* QT */ | 22 | /* QT */ |
22 | 23 | ||
23 | using namespace Opie::Core; | 24 | using namespace Opie::Core; |
24 | 25 | ||
25 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) | 26 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) |
26 | : MainWindow( parent, name) //, WStyle_ContextHelp ) | 27 | : MainWindow( parent, name) //, WStyle_ContextHelp ) |
27 | { | 28 | { |
28 | settings = new Settings(); | 29 | settings = new Settings(); |
29 | 30 | ||
30 | folderView->populate( settings->getAccounts() ); | 31 | folderView->populate( settings->getAccounts() ); |
31 | 32 | ||
32 | } | 33 | } |
33 | 34 | ||
34 | OpieMail::~OpieMail() | 35 | OpieMail::~OpieMail() |
35 | { | 36 | { |
36 | if (settings) delete settings; | 37 | if (settings) delete settings; |
37 | } | 38 | } |
38 | 39 | ||
39 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) | 40 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) |
40 | { | 41 | { |
41 | 42 | ||
42 | } | 43 | } |
43 | #include <stdlib.h> | 44 | #include <stdlib.h> |
44 | void OpieMail::message(const QCString &msg, const QByteArray &data) | 45 | void OpieMail::message(const QCString &msg, const QByteArray &data) |
45 | { | 46 | { |
46 | // copied from old mail2 | 47 | // copied from old mail2 |
47 | static int ii = 0; | 48 | static int ii = 0; |
48 | 49 | ||
49 | // block second call | 50 | // block second call |
50 | if ( ii < 2 ) { | 51 | if ( ii < 2 ) { |
51 | ++ii; | 52 | ++ii; |
52 | if ( ii > 1 ) { | 53 | if ( ii > 1 ) { |
53 | qDebug("qcop call blocked "); | 54 | qDebug("qcop call blocked "); |
54 | return; | 55 | return; |
55 | } | 56 | } |
56 | } | 57 | } |
57 | //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); | 58 | //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); |
58 | if (msg == "writeMail(QString,QString)") | 59 | if (msg == "writeMail(QString,QString)") |
59 | { | 60 | { |
60 | QDataStream stream(data,IO_ReadOnly); | 61 | QDataStream stream(data,IO_ReadOnly); |
61 | QString name, email; | 62 | QString name, email; |
62 | stream >> name >> email; | 63 | stream >> name >> email; |
63 | // removing the whitespaces at beginning and end is needed! | 64 | // removing the whitespaces at beginning and end is needed! |
64 | slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); | 65 | slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); |