summaryrefslogtreecommitdiffabout
path: root/kmicromail/opiemail.cpp
authorzautrix <zautrix>2005-02-28 15:30:47 (UTC)
committer zautrix <zautrix>2005-02-28 15:30:47 (UTC)
commit16575cca67c9047de72530080dfeb5793a66c935 (patch) (side-by-side diff)
treefec5ada5eee13fad9c73ec04cd066ccaf2619d4a /kmicromail/opiemail.cpp
parentb1f912cbb6a9daf050e94d337de0e0e73417284a (diff)
downloadkdepimpi-16575cca67c9047de72530080dfeb5793a66c935.zip
kdepimpi-16575cca67c9047de72530080dfeb5793a66c935.tar.gz
kdepimpi-16575cca67c9047de72530080dfeb5793a66c935.tar.bz2
mail fix
Diffstat (limited to 'kmicromail/opiemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index f68467c..197f7ec 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -122,74 +122,76 @@ void OpieMail::slotwriteMail2(const QString& namemail )
//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 ) {
compose.setTo( to.left(sub+1) );
compose.setSubject( to.mid(sub+2) );
} else
compose.setTo( to );
}
compose.slotAdjustColumns();
#ifndef DESKTOP_VERSION
compose.showMaximized();
#endif
mCurrentComposer = &compose;
compose.exec();
mCurrentComposer = 0;
+ folderView->refreshOutgoing();
raise();
//qDebug("retttich ");
}
void OpieMail::slotwriteMail(const QString&name,const QString&email)
{
// qDebug("OpieMail::slotwriteMail ");
ComposeMail compose( settings, this, 0, true );
if (!email.isEmpty())
{
if (!name.isEmpty())
{
compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">");
}
else
{
compose.setTo(email);
}
}
compose.slotAdjustColumns();
#ifndef DESKTOP_VERSION
compose.showMaximized();
#endif
mCurrentComposer = &compose;
compose.exec();
mCurrentComposer = 0;
+ folderView->refreshOutgoing();
raise();
}
void OpieMail::slotComposeMail()
{
if ( mPendingEmail == QString::null && mPendingName == QString::null)
slotwriteMail2( QString () );
else {
if ( mPendingEmail == QString::null )
slotwriteMail2( mPendingName );
else
slotwriteMail( mPendingName, mPendingEmail );
}
//slotwriteMail(0l,0l);
}
void OpieMail::slotSendQueued()
{
SMTPaccount *smtp = 0;
QList<Account> list = settings->getAccounts();
QList<SMTPaccount> smtpList;
smtpList.setAutoDelete(false);
Account *it;
@@ -293,48 +295,49 @@ void OpieMail::replyMail()
rtext += "\n";
QString prefix;
if ( mail->getSubject().find(QRegExp("^Re: .*$")) != -1) prefix = "";
else prefix = "Re: "; // no i18n on purpose
Settings *settings = new Settings();
ComposeMail composer( settings ,this, 0, true);
if (mail->Replyto().isEmpty()) {
composer.setTo( mail->getFrom());
} else {
composer.setTo( mail->Replyto());
}
composer.setSubject( prefix + mail->getSubject());
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;
+ folderView->refreshOutgoing();
delete settings;
}
void OpieMail::closeViewMail(ViewMail * vm)
{
vm->hide();
}
void OpieMail::slotDownloadMail( )
{
QListViewItem*item = mailView->currentItem();
if (!item ) {
Global::statusMessage("Error: No item slected!");
return;
}
RecMailP mail = ((MailListViewItem*)item)->data();
Account * acc = mail->Wrapper()->getAccount();
if ( !acc ) {
Global::statusMessage("Mail is already stored locally!");
return;
}
QString lfName = acc->getLocalFolder();
//qDebug("local folder " + lfName );
if ( lfName.isEmpty() )
@@ -628,45 +631,47 @@ void OpieMail::slotMoveCopyAllMail()
i18n("<center>Error while creating<br>new folder - breaking.</center>"));
return;
}
sels.hide();
qApp->processEvents();
//qDebug("hiding sels ");
mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails());
folderView->refreshCurrent();
}
void OpieMail::reEditMail()
{
if (!mailView->currentItem()) return;
ComposeMail compose( settings, this, 0, true );
compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data());
compose.slotAdjustColumns();
#ifndef DESKTOP_VERSION
compose.showMaximized();
#else
compose.resize(640,480);
#endif
mCurrentComposer = &compose;
compose.exec();
+ folderView->refreshOutgoing();
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;
+ folderView->refreshOutgoing();
raise();
}
}