summaryrefslogtreecommitdiff
authoralwin <alwin>2003-12-25 02:18:56 (UTC)
committer alwin <alwin>2003-12-25 02:18:56 (UTC)
commitdd78bcd2bf8dd6432b54af61e17a75dcc05c2406 (patch) (unidiff)
tree0f90dcf1c777768f0ee8bc23380dc338ca095670
parentaf6b80a3d184e8984575a2cf7741058302c1c30b (diff)
downloadopie-dd78bcd2bf8dd6432b54af61e17a75dcc05c2406.zip
opie-dd78bcd2bf8dd6432b54af61e17a75dcc05c2406.tar.gz
opie-dd78bcd2bf8dd6432b54af61e17a75dcc05c2406.tar.bz2
activated qcop message "writeMail(name,email)"
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/opiemail.cpp21
-rw-r--r--noncore/net/mail/opiemail.h1
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)
32 // copied from old mail2 32 // copied from old mail2
33 // TODO: compose mail should get parameters of a recipient for starting
34 // from addressbook. (qcop signal "writeMail(string,string)")
35 if (msg == "writeMail(QString,QString)") { 33 if (msg == "writeMail(QString,QString)") {
@@ -38,3 +36,4 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
38 stream >> name >> email; 36 stream >> name >> email;
39 slotComposeMail(); 37 // removing the whitespaces at beginning and end is needed!
38 slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace());
40 } else if (msg == "newMail()") { 39 } else if (msg == "newMail()") {
@@ -44,6 +43,12 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
44 43
45void OpieMail::slotComposeMail() 44void OpieMail::slotwriteMail(const QString&name,const QString&email)
46{ 45{
47 qDebug( "Compose Mail" );
48 ComposeMail compose( settings, this, 0 , true ); 46 ComposeMail compose( settings, this, 0 , true );
47 if (!email.isEmpty()) {
48 if (!name.isEmpty()) {
49 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">");
50 } else {
51 compose.setTo(email);
52 }
53 }
49 compose.showMaximized(); 54 compose.showMaximized();
@@ -53,2 +58,8 @@ void OpieMail::slotComposeMail()
53 58
59void OpieMail::slotComposeMail()
60{
61 qDebug( "Compose Mail" );
62 slotwriteMail(0l,0l);
63}
64
54void OpieMail::slotSendQueued() 65void 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:
15public slots: 15public slots:
16 void slotwriteMail(const QString&name,const QString&email);
16 void slotComposeMail(); 17 void slotComposeMail();