summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-02-28 14:46:07 (UTC)
committer zautrix <zautrix>2005-02-28 14:46:07 (UTC)
commitb1f912cbb6a9daf050e94d337de0e0e73417284a (patch) (side-by-side diff)
tree09220df0ef11ccc32c4eafcc2a63b64056068036 /kmicromail
parentff810f8f74f6928e664bf52f8e8d128edb8ac5ad (diff)
downloadkdepimpi-b1f912cbb6a9daf050e94d337de0e0e73417284a.zip
kdepimpi-b1f912cbb6a9daf050e94d337de0e0e73417284a.tar.gz
kdepimpi-b1f912cbb6a9daf050e94d337de0e0e73417284a.tar.bz2
ompi refresh outgoing fix
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/accountview.cpp18
-rw-r--r--kmicromail/accountview.h1
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp26
-rw-r--r--kmicromail/opiemail.cpp2
4 files changed, 35 insertions, 12 deletions
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index c9c4a0f..3ad3e9b 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -100,2 +100,20 @@ void AccountView::refresh(QListViewItem *item)
}
+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" )
+ refreshCurrent();
+}
diff --git a/kmicromail/accountview.h b/kmicromail/accountview.h
index 79ed2e7..e403cb8 100644
--- a/kmicromail/accountview.h
+++ b/kmicromail/accountview.h
@@ -32,2 +32,3 @@ public slots:
virtual void refreshCurrent();
+ virtual void refreshOutgoing();
virtual void slotHold(int, QListViewItem *,const QPoint&,int);
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index f54fe2b..24f4786 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -161,3 +161,3 @@ void SMTPwrapper::storeFailedMail(const char*data,unsigned int size, const char*
QMessageBox::critical(0,i18n("Error sending mail"),
- i18n("<center>%1</center>").arg(failuremessage));
+ failuremessage);
}
@@ -221,3 +221,3 @@ void SMTPwrapper::connect_server()
if ( ssl ) {
- ; // odebug << "SSL session" << oendl;
+ qDebug("smtp: ssl_connect ");
err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port );
@@ -228,4 +228,4 @@ void SMTPwrapper::connect_server()
if ( err != MAILSMTP_NO_ERROR ) {
- ; // odebug << "Error init connection" << oendl;
- failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err));
+ qDebug("Error init SMTP connection" );
+ failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err));
result = 0;
@@ -233,2 +233,3 @@ void SMTPwrapper::connect_server()
+ qDebug("SMTP connection inited ");
/* switch to tls after init 'cause there it will send the ehlo */
@@ -238,7 +239,8 @@ void SMTPwrapper::connect_server()
result = 0;
- failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err));
+ qDebug("Error init SMTP connection ");
+ failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err));
}
}
-
if (try_tls) {
+ qDebug("Smpt: Try tls ");
err = start_smtp_tls();
@@ -246,2 +248,3 @@ void SMTPwrapper::connect_server()
try_tls = false;
+ qDebug("no tls ");
} else {
@@ -250,6 +253,6 @@ void SMTPwrapper::connect_server()
}
-
+ //qDebug("mailesmtp_ehlo %d ",err );
if (!try_tls && force_tls) {
result = 0;
- failuretext = i18n("Error init SMTP tls: %1").arg(mailsmtpError(err));
+ failuretext = i18n("Error init SMTP tls:%1").arg(mailsmtpError(err));
}
@@ -269,3 +272,3 @@ void SMTPwrapper::connect_server()
result = 0;
- failuretext=i18n("Login aborted - storing mail to localfolder");
+ failuretext=i18n("Login aborted - \nstoring mail to localfolder");
}
@@ -279,3 +282,3 @@ void SMTPwrapper::connect_server()
if ( err == MAILSMTP_NO_ERROR ) {
- ; // odebug << "auth ok" << oendl;
+ qDebug("Smtp authentification ok ");
} else {
@@ -308,3 +311,4 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size )
if ( err != MAILSMTP_NO_ERROR ) {
- failuretext=i18n("Error sending mail: %1").arg(mailsmtpError(err));
+ qDebug("Error sending mail");
+ failuretext=i18n("Error sending mail:\n%1").arg(mailsmtpError(err));
result = 0;
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index e159b73..f68467c 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -238,3 +238,3 @@ void OpieMail::slotSendQueued()
}
- // pending refresh list view, if outgoing is displayed
+ folderView->refreshOutgoing();
}