summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt3
-rw-r--r--kmicromail/accountview.cpp5
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp12
-rw-r--r--kmicromail/opiemail.cpp5
4 files changed, 18 insertions, 7 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index dc22fc6..a9b6c87 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,32 +1,35 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.0.13 ************
Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter.
In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down".
+OM/Pi:
+Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails.
+
********** VERSION 2.0.12 ************
KO/Pi:
Fixed a bug in todo start/due date handling for non recurring todos with a start and due date.
Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes.
Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer.
Fixed problem in pi-sync mode when wrong password was sent.
OM/Pi:
Fixed a crash when displaying mails with "Show mail as html" was checked in the config.
Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled.
********** VERSION 2.0.11 ************
Fixed some problems in pi-sync mode
(e.g. details of events were not synced properly)
********** VERSION 2.0.10 ************
KO/Pi:
In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view.
This is fixed.
Changed the search dialog a bit to make it more user friendly.
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index 3ad3e9b..e9be224 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -92,50 +92,53 @@ void AccountView::refresh(QListViewItem *item)
if ( item )
{
m_currentItem = item;
QValueList<RecMailP> headerlist;
AccountViewItem *view = static_cast<AccountViewItem *>(item);
view->refresh(headerlist);
emit refreshMailview(headerlist);
}
}
void AccountView::refreshOutgoing()
{
m_currentItem = currentItem();
if ( !m_currentItem ) return;
AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem);
QString bName = view->getFolder()->getDisplayName();
if (bName.startsWith("/")&&bName.length()>1)
{
bName.replace(0,1,"");
}
int pos = bName.findRev("/");
if (pos > 0)
{
bName.replace(0,pos+1,"");
}
- if ( bName.lower() == "outgoing" )
+ //qDebug("name *%s* ",bName.lower().latin1() );
+ if ( bName.lower() == "outgoing" || bName.lower() == "sent" || bName.lower() == "sendfailed" ) {
refreshCurrent();
+ // qDebug("refresh ");
+ }
}
void AccountView::refreshCurrent()
{
m_currentItem = currentItem();
if ( !m_currentItem ) return;
QValueList<RecMailP> headerlist;
AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem);
view->refresh(headerlist);
emit refreshMailview(headerlist);
}
void AccountView::refreshAll()
{
}
RecBodyP AccountView::fetchBody(const RecMailP&aMail)
{
QListViewItem*item = selectedItem ();
if (!item) return new RecBody();
AccountViewItem *view = static_cast<AccountViewItem *>(item);
return view->fetchBody(aMail);
}
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index 24f4786..5096f67 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -21,50 +21,51 @@
using namespace Opie::Core;
progressMailSend*SMTPwrapper::sendProgress = 0;
SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp )
: Generatemail()
{
m_SmtpAccount = aSmtp;
KConfig cfg( locateLocal("config", "kopiemailrc" ) );
cfg.setGroup( "Status" );
m_queuedMail = cfg.readNumEntry( "outgoing", 0 );
emit queuedMails( m_queuedMail );
connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) );
m_smtp = 0;
}
SMTPwrapper::~SMTPwrapper()
{
disc_server();
}
void SMTPwrapper::emitQCop( int queued ) {
#ifndef DESKTOP_VERSION
- QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" );
- env << queued;
+ // LR : not used in kde-pim
+ //QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" );
+ //env << queued;
#endif
}
QString SMTPwrapper::mailsmtpError( int errnum ) {
switch ( errnum ) {
case MAILSMTP_NO_ERROR:
return i18n( "No error" );
case MAILSMTP_ERROR_UNEXPECTED_CODE:
return i18n( "Unexpected error code" );
case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE:
return i18n( "Service not available" );
case MAILSMTP_ERROR_STREAM:
return i18n( "Stream error" );
case MAILSMTP_ERROR_HOSTNAME:
return i18n( "gethostname() failed" );
case MAILSMTP_ERROR_NOT_IMPLEMENTED:
return i18n( "Not implemented" );
case MAILSMTP_ERROR_ACTION_NOT_TAKEN:
return i18n( "Error, action not taken" );
case MAILSMTP_ERROR_EXCEED_STORAGE_ALLOCATION:
return i18n( "Data exceeds storage allocation" );
case MAILSMTP_ERROR_IN_PROCESSING:
return i18n( "Error in processing" );
case MAILSMTP_ERROR_STARTTLS_NOT_SUPPORTED:
@@ -420,51 +421,50 @@ bool SMTPwrapper::flushOutbox() {
oldPw = m_SmtpAccount->getPassword();
oldUser = m_SmtpAccount->getUser();
if (m_SmtpAccount->getLogin() && (m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty()) ) {
// get'em
QString user,pass;
LoginDialog login( m_SmtpAccount->getUser(), m_SmtpAccount->getPassword(), NULL, 0, true );
login.show();
if ( QDialog::Accepted == login.exec() ) {
// ok
user = login.getUser().latin1();
pass = login.getPassword().latin1();
reset_user_value = true;
m_SmtpAccount->setUser(user);
m_SmtpAccount->setPassword(pass);
} else {
return true;
}
}
sendProgress = new progressMailSend();
sendProgress->show();
sendProgress->setMaxMails(mailsToSend.count());
- while (mailsToSend.count()>0) {
+ while (returnValue && mailsToSend.count()>0) {
if (sendQueuedMail(wrap, (*mailsToSend.begin()))==0) {
QMessageBox::critical(0,i18n("Error sending mail"),
- i18n("Error sending queued mail - breaking"));
+ i18n("Error sending queued mail.\nBreaking."));
returnValue = false;
- break;
}
mailsToRemove.append((*mailsToSend.begin()));
mailsToSend.remove(mailsToSend.begin());
sendProgress->setCurrentMails(mailsToRemove.count());
}
if (reset_user_value) {
m_SmtpAccount->setUser(oldUser);
m_SmtpAccount->setPassword(oldPw);
}
KConfig cfg( locateLocal("config", "kopiemailrc" ) );
cfg.setGroup( "Status" );
- m_queuedMail = 0;
+ m_queuedMail = mailsToSend.count();
cfg.writeEntry( "outgoing", m_queuedMail );
emit queuedMails( m_queuedMail );
sendProgress->hide();
delete sendProgress;
sendProgress = 0;
wrap->deleteMails(mbox,mailsToRemove);
delete wrap;
return returnValue;
}
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();
}
}