author | zautrix <zautrix> | 2004-09-08 02:02:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-08 02:02:15 (UTC) |
commit | e5f6ea343bc2b129f81fde3734b100cfa2ed6c83 (patch) (side-by-side diff) | |
tree | 8d33b16e52b1d886cf524052418e8dd445689a66 /kmicromail/opiemail.cpp | |
parent | 199025628054eef739a261437a51a98f5218ab0f (diff) | |
download | kdepimpi-e5f6ea343bc2b129f81fde3734b100cfa2ed6c83.zip kdepimpi-e5f6ea343bc2b129f81fde3734b100cfa2ed6c83.tar.gz kdepimpi-e5f6ea343bc2b129f81fde3734b100cfa2ed6c83.tar.bz2 |
Some fixes
-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 @@ -1,29 +1,30 @@ // 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 <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> /* QT */ using namespace Opie::Core; OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) : MainWindow( parent, name) //, WStyle_ContextHelp ) { @@ -34,65 +35,67 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) } OpieMail::~OpieMail() { if (settings) delete settings; } 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()); } else if (msg == "newMail()") { slotComposeMail(); } else if (msg == "newMail(QString)") { 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; if ( namemail.find( " <") > 1 ) { to = "\"" +to.replace( QRegExp( " <"), "\" <") ; } else if ( namemail.find( "<") > 1 ) { to = "\"" +to.replace( QRegExp( "<"), "\" <") ; } int sub = to.find( ">:"); if ( sub > 0 ) { |