-rw-r--r-- | kmicromail/opiemail.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 3e560c5..a1c5645 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -6,16 +6,17 @@ #include "editaccounts.h" #include "composemail.h" #include "mailistviewitem.h" #include "viewmail.h" #include "selectstore.h" #include "selectsmtp.h" #include <qmessagebox.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> @@ -42,25 +43,26 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data) { } #include <stdlib.h> void OpieMail::message(const QCString &msg, const QByteArray &data) { // copied from old mail2 static int ii = 0; - + qDebug("call ############################# %d ", ii); // block second call if ( ii < 2 ) { - ++ii; + //++ii; if ( ii > 1 ) { qDebug("qcop call blocked "); - return; + //return; } } + ++ii; //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); if (msg == "writeMail(QString,QString)") { QDataStream stream(data,IO_ReadOnly); QString name, email; stream >> name >> email; // removing the whitespaces at beginning and end is needed! slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); @@ -74,17 +76,18 @@ void OpieMail::message(const QCString &msg, const QByteArray &data) QDataStream stream(data,IO_ReadOnly); QString nameemail; stream >> nameemail; // the format is // NAME <EMAIL>:SUBJECT //qDebug("message %s ", nameemail.latin1()); slotwriteMail2( nameemail ); - } + } else + ExternalAppHandler::instance()->appMessage ( msg, data); } void OpieMail::slotwriteMail2(const QString& namemail ) { // qDebug("OpieMail::slotwriteMail2 "); qApp->processEvents(); ComposeMail compose( settings, this, 0, true ); if ( !namemail.isEmpty() ) { QString to = namemail; |