summaryrefslogtreecommitdiffabout
path: root/kmicromail/opiemail.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/opiemail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 19ffdb3..4e7c6be 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -1,24 +1,25 @@
// CHANGED 2004-09-31 Lutz Rogowski
// CHANGED 2004-08-06 Lutz Rogowski
#include "settingsdialog.h"
#include "opiemail.h"
#include "editaccounts.h"
#include "composemail.h"
#include "mailistviewitem.h"
#include "viewmail.h"
#include "selectstore.h"
#include "selectsmtp.h"
#include "accountitem.h"
+#include "koprefsdialog.h"
#include <qmessagebox.h>
#include <qtimer.h>
#include <libkdepim/externalapphandler.h>
#include <qpe/qpeapplication.h>
#include <libmailwrapper/smtpwrapper.h>
#include <libmailwrapper/mailtypes.h>
#include <libmailwrapper/abstractmail.h>
/* OPIE */
//#include <qpe/resource.h>
//#include <qpe/qpeapplication.h>
@@ -75,33 +76,35 @@ void OpieMail::message(const QCString &msg, const QByteArray &data)
QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
// slotComposeMail();
}
else if (msg == "newMail(QString)")
{
//qDebug(" newMail(QString)");
QDataStream stream(data,IO_ReadOnly);
stream >> mPendingName;
// the format is
// NAME <EMAIL>:SUBJECT
QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
} else {
- if ( ii == 1 ) {
- qDebug("Kopiemail::Error:: Initial QCOP call for ExternalAppHandler not supported ");
- return;
- }
- ExternalAppHandler::instance()->appMessage ( msg, data);
+ mPendingData = data;
+ mPendingMessage = msg;
+ QTimer::singleShot ( 50, this, SLOT(slotExtAppHandler() ) );
}
//qDebug("END OpieMail::message ");
}
+void OpieMail::slotExtAppHandler()
+{
+ ExternalAppHandler::instance()->appMessage ( mPendingMessage, mPendingData );
+}
void OpieMail::slotwriteMail2(const QString& namemail )
{
//qDebug("OpieMail::slotwriteMail2 ");
//qApp->processEvents();
ComposeMail compose( settings, this, 0, true );
if ( !namemail.isEmpty() ) {
QString to = namemail;
if ( namemail.find( " <") > 1 ) {
to = "\"" +to.replace( QRegExp( " <"), "\" <") ;
} else
if ( namemail.find( "<") > 1 ) {
to = "\"" +to.replace( QRegExp( "<"), "\" <") ;
@@ -198,48 +201,53 @@ void OpieMail::slotSendQueued()
}
delete wrap;
}
}
void OpieMail::slotSearchMails()
{
qDebug("OpieMail::slotSearchMails():not implemented ");
}
void OpieMail::slotEditSettings()
{
+#if 0
SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp );
settingsDialog.showMaximized();
settingsDialog.exec();
+#endif
+ KOPrefsDialog settingsDialog( this, "koprefs", true );
+ settingsDialog.showMaximized();
+ settingsDialog.exec();
}
void OpieMail::slotEditAccounts()
{
- EditAccounts eaDialog( settings, this, 0, true, WStyle_ContextHelp );
+ EditAccounts eaDialog( settings, this, 0, true );
eaDialog.slotAdjustColumns();
eaDialog.showMaximized();
eaDialog.exec();
if ( settings ) delete settings;
settings = new Settings();
folderView->populate( settings->getAccounts() );
}
void OpieMail::displayMail()
{
QListViewItem*item = mailView->currentItem();
if (!item) return;
RecMailP mail = ((MailListViewItem*)item)->data();
RecBodyP body = folderView->fetchBody(mail);
- ViewMail readMail( this,"", Qt::WType_Modal | WStyle_ContextHelp );
+ ViewMail readMail( this,"", Qt::WType_Modal );
readMail.setBody( body );
readMail.setMail( mail );
readMail.showMaximized();
readMail.exec();
if ( readMail.deleted )
{
folderView->refreshCurrent();
}
else
{
( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );