summaryrefslogtreecommitdiffabout
path: root/kmicromail/opiemail.cpp
Unidiff
Diffstat (limited to 'kmicromail/opiemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp33
1 files changed, 32 insertions, 1 deletions
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 @@
46OpieMail::OpieMail( QWidget *parent, const char *name ) 46OpieMail::OpieMail( QWidget *parent, const char *name )
47 : MainWindow( parent, name) //, WStyle_ContextHelp ) 47 : MainWindow( parent, name) //, WStyle_ContextHelp )
48{ 48{
49 mCurrentComposer = 0;
49 settings = new Settings(); 50 settings = new Settings();
50 tb = 0; 51 tb = 0;
51 setIcon(SmallIcon( "kmicromail" ) ); 52 setIcon(SmallIcon( "kmicromail" ) );
52 folderView->populate( settings->getAccounts() ); 53 folderView->populate( settings->getAccounts() );
53 54 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
55 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
54} 56}
55 57
56OpieMail::~OpieMail() 58OpieMail::~OpieMail()
@@ -138,7 +140,9 @@ void OpieMail::slotwriteMail2(const QString& namemail )
138#ifndef DESKTOP_VERSION 140#ifndef DESKTOP_VERSION
139 compose.showMaximized(); 141 compose.showMaximized();
140#endif 142#endif
143 mCurrentComposer = &compose;
141 compose.exec(); 144 compose.exec();
145 mCurrentComposer = 0;
142 raise(); 146 raise();
143 //qDebug("retttich "); 147 //qDebug("retttich ");
144} 148}
@@ -161,7 +165,10 @@ void OpieMail::slotwriteMail(const QString&name,const QString&email)
161#ifndef DESKTOP_VERSION 165#ifndef DESKTOP_VERSION
162 compose.showMaximized(); 166 compose.showMaximized();
163#endif 167#endif
168
169 mCurrentComposer = &compose;
164 compose.exec(); 170 compose.exec();
171 mCurrentComposer = 0;
165 raise(); 172 raise();
166} 173}
167 174
@@ -300,10 +307,13 @@ void OpieMail::replyMail()
300 composer.setMessage( rtext ); 307 composer.setMessage( rtext );
301 composer.setInReplyTo( mail->Msgid()); 308 composer.setInReplyTo( mail->Msgid());
302 composer.setCharset( body->getCharset() ); 309 composer.setCharset( body->getCharset() );
310
311 mCurrentComposer = &composer;
303 if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) 312 if ( QDialog::Accepted == KApplication::execDialog( &composer ) )
304 { 313 {
305 mail->Wrapper()->answeredMail(mail); 314 mail->Wrapper()->answeredMail(mail);
306 } 315 }
316 mCurrentComposer = 0;
307 delete settings; 317 delete settings;
308 318
309} 319}
@@ -637,5 +647,26 @@ void OpieMail::reEditMail()
637#else 647#else
638 compose.resize(640,480); 648 compose.resize(640,480);
639#endif 649#endif
650 mCurrentComposer = &compose;
640 compose.exec(); 651 compose.exec();
652 mCurrentComposer = 0;
653}
654
655void OpieMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList)
656{
657
658 if ( mCurrentComposer ) {
659 mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList);
660 } else {
661 ComposeMail compose( settings, this, 0, true );
662 compose.slotAdjustColumns();
663#ifndef DESKTOP_VERSION
664 compose.showMaximized();
665#endif
666 mCurrentComposer = &compose;
667 mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList);
668 compose.exec();
669 mCurrentComposer = 0;
670 raise();
671 }
641} 672}