author | alwin <alwin> | 2003-12-25 02:18:56 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-25 02:18:56 (UTC) |
commit | dd78bcd2bf8dd6432b54af61e17a75dcc05c2406 (patch) (side-by-side diff) | |
tree | 0f90dcf1c777768f0ee8bc23380dc338ca095670 | |
parent | af6b80a3d184e8984575a2cf7741058302c1c30b (diff) | |
download | opie-dd78bcd2bf8dd6432b54af61e17a75dcc05c2406.zip opie-dd78bcd2bf8dd6432b54af61e17a75dcc05c2406.tar.gz opie-dd78bcd2bf8dd6432b54af61e17a75dcc05c2406.tar.bz2 |
activated qcop message "writeMail(name,email)"
-rw-r--r-- | noncore/net/mail/opiemail.cpp | 21 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.h | 1 |
2 files changed, 17 insertions, 5 deletions
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 0dede90..2909893 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp @@ -32,4 +32,2 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data) // copied from old mail2 - // TODO: compose mail should get parameters of a recipient for starting - // from addressbook. (qcop signal "writeMail(string,string)") if (msg == "writeMail(QString,QString)") { @@ -38,3 +36,4 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data) stream >> name >> email; - slotComposeMail(); + // removing the whitespaces at beginning and end is needed! + slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); } else if (msg == "newMail()") { @@ -44,6 +43,12 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data) -void OpieMail::slotComposeMail() +void OpieMail::slotwriteMail(const QString&name,const QString&email) { - qDebug( "Compose Mail" ); ComposeMail compose( settings, this, 0 , true ); + if (!email.isEmpty()) { + if (!name.isEmpty()) { + compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); + } else { + compose.setTo(email); + } + } compose.showMaximized(); @@ -53,2 +58,8 @@ void OpieMail::slotComposeMail() +void OpieMail::slotComposeMail() +{ + qDebug( "Compose Mail" ); + slotwriteMail(0l,0l); +} + void OpieMail::slotSendQueued() diff --git a/noncore/net/mail/opiemail.h b/noncore/net/mail/opiemail.h index 3cf5972..8cbcaa4 100644 --- a/noncore/net/mail/opiemail.h +++ b/noncore/net/mail/opiemail.h @@ -15,2 +15,3 @@ public: public slots: + void slotwriteMail(const QString&name,const QString&email); void slotComposeMail(); |