summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-02-04 10:23:55 (UTC)
committer zautrix <zautrix>2005-02-04 10:23:55 (UTC)
commit83256090c493dab56f1afba4829e864598bf70d2 (patch) (side-by-side diff)
tree8d5b7ee0c6fe42f0f14c53b80c924ccddd5a1599 /kmicromail
parenta96872e5ecff3a8fb1785aff71f5f7f150ef8604 (diff)
downloadkdepimpi-83256090c493dab56f1afba4829e864598bf70d2.zip
kdepimpi-83256090c493dab56f1afba4829e864598bf70d2.tar.gz
kdepimpi-83256090c493dab56f1afba4829e864598bf70d2.tar.bz2
mail send
Diffstat (limited to 'kmicromail') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/composemail.cpp14
-rw-r--r--kmicromail/opiemail.cpp33
-rw-r--r--kmicromail/opiemail.h5
3 files changed, 48 insertions, 4 deletions
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index ed8a2ee..3231b45 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -55,8 +55,9 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo
mPickLineEdit = 0;
mEncoding = KOPrefs::instance()->mCurrentCodeName;
- connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
- this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
+ //managed from opiemail now
+ //connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
+ // this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
settings = sett;
m_replyid = "";
if ( KOPrefs::instance()->mUseKapi) {
@@ -260,6 +261,13 @@ void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameLis
//qDebug("ComposeMail::insertAttendees ");
raise();
+ QString UID = uid;
+ if ( uid.left( 18 ) == (this->name() +QString("pick2")) ) {
+ mPickLineEdit = toLine;
+ UID = this->name();
+ subjectLine->setText( uid.mid( 18 ) );
+ }
+ //qDebug("ccc %s %s ", uid.latin1(), this->name());
if ( mPickLineEdit == 0 ) { //whoami received
QString defmail = uidList[0];
if ( emailList.count() == 0 )
@@ -281,7 +289,7 @@ void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameLis
}
QString names ;
QLineEdit *line = mPickLineEdit;
- if (uid == this->name())
+ if (UID == this->name())
{
for ( int i = 0; i < nameList.count(); i++)
{
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index f56711d..e159b73 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -46,11 +46,13 @@
OpieMail::OpieMail( QWidget *parent, const char *name )
: MainWindow( parent, name) //, WStyle_ContextHelp )
{
+ mCurrentComposer = 0;
settings = new Settings();
tb = 0;
setIcon(SmallIcon( "kmicromail" ) );
folderView->populate( settings->getAccounts() );
-
+ connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
+ this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
}
OpieMail::~OpieMail()
@@ -138,7 +140,9 @@ void OpieMail::slotwriteMail2(const QString& namemail )
#ifndef DESKTOP_VERSION
compose.showMaximized();
#endif
+ mCurrentComposer = &compose;
compose.exec();
+ mCurrentComposer = 0;
raise();
//qDebug("retttich ");
}
@@ -161,7 +165,10 @@ void OpieMail::slotwriteMail(const QString&name,const QString&email)
#ifndef DESKTOP_VERSION
compose.showMaximized();
#endif
+
+ mCurrentComposer = &compose;
compose.exec();
+ mCurrentComposer = 0;
raise();
}
@@ -300,10 +307,13 @@ void OpieMail::replyMail()
composer.setMessage( rtext );
composer.setInReplyTo( mail->Msgid());
composer.setCharset( body->getCharset() );
+
+ mCurrentComposer = &composer;
if ( QDialog::Accepted == KApplication::execDialog( &composer ) )
{
mail->Wrapper()->answeredMail(mail);
}
+ mCurrentComposer = 0;
delete settings;
}
@@ -637,5 +647,26 @@ void OpieMail::reEditMail()
#else
compose.resize(640,480);
#endif
+ mCurrentComposer = &compose;
+ compose.exec();
+ mCurrentComposer = 0;
+}
+
+void OpieMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList)
+{
+
+ if ( mCurrentComposer ) {
+ mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList);
+ } else {
+ ComposeMail compose( settings, this, 0, true );
+ compose.slotAdjustColumns();
+#ifndef DESKTOP_VERSION
+ compose.showMaximized();
+#endif
+ mCurrentComposer = &compose;
+ mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList);
compose.exec();
+ mCurrentComposer = 0;
+ raise();
+ }
}
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index b8a527f..4f75b3f 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -8,6 +8,9 @@
#include <opie2/osmartpointer.h>
#include <libmailwrapper/mailtypes.h>
#include <viewmail.h>
+#include <qstringlist.h>
+
+class ComposeMail;
class OpieMail : public MainWindow
{
@@ -25,6 +28,7 @@ public slots:
virtual void slotExtAppHandler();
virtual void appMessage(const QCString &msg, const QByteArray &data);
virtual void message(const QCString &msg, const QByteArray &data);
+ void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist);
protected slots:
virtual void deleteAndDisplayNextMail(ViewMail * vm);
virtual void displayNextMail(ViewMail * vm);
@@ -48,6 +52,7 @@ protected slots:
void clearSelection();
void slotDownloadMail();
private:
+ ComposeMail* mCurrentComposer;
void closeViewMail(ViewMail * vm);
QString mPendingEmail;
QString mPendingName;