summaryrefslogtreecommitdiffabout
path: root/kmicromail/opiemail.cpp
Unidiff
Diffstat (limited to 'kmicromail/opiemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 3aa7905..a32983c 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -1,85 +1,84 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3 3
4#include "settingsdialog.h" 4#include "settingsdialog.h"
5#include "opiemail.h" 5#include "opiemail.h"
6#include "editaccounts.h" 6#include "editaccounts.h"
7#include "composemail.h" 7#include "composemail.h"
8#include "mailistviewitem.h" 8#include "mailistviewitem.h"
9#include "viewmail.h" 9#include "viewmail.h"
10#include "selectstore.h" 10#include "selectstore.h"
11#include "selectsmtp.h" 11#include "selectsmtp.h"
12#include "accountitem.h" 12#include "accountitem.h"
13#include "koprefsdialog.h" 13#include "koprefsdialog.h"
14#include "klocale.h" 14#include "klocale.h"
15 15
16#include <qmessagebox.h> 16#include <qmessagebox.h>
17#include <qtimer.h> 17#include <qtimer.h>
18#include <libkdepim/externalapphandler.h> 18#include <libkdepim/externalapphandler.h>
19#include <libkdepim/kpimglobalprefs.h> 19#include <libkdepim/kpimglobalprefs.h>
20 20
21#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
22#include <libmailwrapper/smtpwrapper.h> 22#include <libmailwrapper/smtpwrapper.h>
23#include <libmailwrapper/mailtypes.h> 23#include <libmailwrapper/mailtypes.h>
24#include <libmailwrapper/abstractmail.h> 24#include <libmailwrapper/abstractmail.h>
25/* OPIE */ 25/* OPIE */
26//#include <qpe/resource.h> 26//#include <qpe/resource.h>
27//#include <qpe/qpeapplication.h> 27//#include <qpe/qpeapplication.h>
28 28
29/* QT */ 29/* QT */
30 30
31//using namespace Opie::Core; 31//using namespace Opie::Core;
32 32
33OpieMail::OpieMail( QWidget *parent, const char *name ) 33OpieMail::OpieMail( QWidget *parent, const char *name )
34 : MainWindow( parent, name) //, WStyle_ContextHelp ) 34 : MainWindow( parent, name) //, WStyle_ContextHelp )
35{ 35{
36 settings = new Settings(); 36 settings = new Settings();
37 KPimGlobalPrefs::instance()->setGlobalConfig();
38 37
39 folderView->populate( settings->getAccounts() ); 38 folderView->populate( settings->getAccounts() );
40 39
41} 40}
42 41
43OpieMail::~OpieMail() 42OpieMail::~OpieMail()
44{ 43{
45 if (settings) delete settings; 44 if (settings) delete settings;
46} 45}
47 46
48void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 47void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
49{ 48{
50 49
51} 50}
52#include <stdlib.h> 51#include <stdlib.h>
53void OpieMail::message(const QCString &msg, const QByteArray &data) 52void OpieMail::message(const QCString &msg, const QByteArray &data)
54{ 53{
55 // copied from old mail2 54 // copied from old mail2
56 static int ii = 0; 55 static int ii = 0;
57 //qDebug("QCOP CALL ############################# %d ", ii); 56 //qDebug("QCOP CALL ############################# %d ", ii);
58 //QString mess ( msg ); 57 //QString mess ( msg );
59 //qDebug("Message = %s ",mess.latin1()); 58 //qDebug("Message = %s ",mess.latin1());
60 ++ii; 59 ++ii;
61 //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); 60 //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this);
62 61
63 mPendingEmail = QString::null; 62 mPendingEmail = QString::null;
64 mPendingName = QString::null; 63 mPendingName = QString::null;
65 if (msg == "writeMail(QString,QString)") 64 if (msg == "writeMail(QString,QString)")
66 { 65 {
67 //qDebug("writeMail(QString,QString) "); 66 //qDebug("writeMail(QString,QString) ");
68 QDataStream stream(data,IO_ReadOnly); 67 QDataStream stream(data,IO_ReadOnly);
69 stream >> mPendingName >> mPendingEmail; 68 stream >> mPendingName >> mPendingEmail;
70 // removing the whitespaces at beginning and end is needed! 69 // removing the whitespaces at beginning and end is needed!
71 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); 70 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
72 } 71 }
73 else if (msg == "newMail()") 72 else if (msg == "newMail()")
74 { 73 {
75 //qDebug("slotComposeMail() "); 74 //qDebug("slotComposeMail() ");
76 // we cannot call slotComposeMail(); directly, because may be executing a QCOP call 75 // we cannot call slotComposeMail(); directly, because may be executing a QCOP call
77 // and a QCOP call does not like a processevents in his execution 76 // and a QCOP call does not like a processevents in his execution
78 // with the Qtimer we call slotComposeMail() after we reached the main event loop 77 // with the Qtimer we call slotComposeMail() after we reached the main event loop
79 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); 78 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
80 // slotComposeMail(); 79 // slotComposeMail();
81 } 80 }
82 else if (msg == "newMail(QString)") 81 else if (msg == "newMail(QString)")
83 { 82 {
84 //qDebug(" newMail(QString)"); 83 //qDebug(" newMail(QString)");
85 QDataStream stream(data,IO_ReadOnly); 84 QDataStream stream(data,IO_ReadOnly);