summaryrefslogtreecommitdiff
path: root/noncore
authorharlekin <harlekin>2003-12-17 00:28:53 (UTC)
committer harlekin <harlekin>2003-12-17 00:28:53 (UTC)
commit27151bb106e2cbd7f649dae228189ebcaccd7aac (patch) (side-by-side diff)
tree8b4bf245e609eaedb8a5a150c2d2fd68ded0a6ca /noncore
parentfb054f9c69224e14f446f405098bd5166377f58d (diff)
downloadopie-27151bb106e2cbd7f649dae228189ebcaccd7aac.zip
opie-27151bb106e2cbd7f649dae228189ebcaccd7aac.tar.gz
opie-27151bb106e2cbd7f649dae228189ebcaccd7aac.tar.bz2
only refresh mailbox view if the mail was deleted, not allways
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/viewmail.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index 0947879..d86454c 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -163,56 +163,58 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
void ViewMail::setMail( RecMail mail ) {
m_recMail = mail;
m_mail[0] = mail.getFrom();
m_mail[1] = mail.getSubject();
m_mail[3] = mail.getDate();
m_mail[4] = mail.Msgid();
m_mail2[0] = mail.To();
m_mail2[1] = mail.CC();
m_mail2[2] = mail.Bcc();
setText();
}
ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
: ViewMailBase(parent, name, fl), _inLoop(false)
{
m_gotBody = false;
+ deleted = false;
connect(reply, SIGNAL(activated()), SLOT(slotReply()));
connect(forward, SIGNAL(activated()), SLOT(slotForward()));
connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail( ) ) );
attachments->setEnabled(m_gotBody);
connect( attachments, SIGNAL( clicked ( QListViewItem *, const QPoint & , int ) ), SLOT( slotItemClicked( QListViewItem *, const QPoint & , int ) ) );
+
}
void ViewMail::setText()
{
QString toString;
QString ccString;
QString bccString;
for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it ) {
toString += (*it);
}
for ( QStringList::Iterator it = ( m_mail2[1] ).begin(); it != ( m_mail2[1] ).end(); ++it ) {
ccString += (*it);
}
for ( QStringList::Iterator it = ( m_mail2[2] ).begin(); it != ( m_mail2[2] ).end(); ++it ) {
bccString += (*it);
}
setCaption( caption().arg( m_mail[0] ) );
m_mailHtml = "<html><body>"
"<table width=\"100%\" border=\"0\"><tr bgcolor=\"#FFDD76\"><td>"
"<div align=left><b>" + deHtml( m_mail[1] ) + "</b></div>"
@@ -312,36 +314,36 @@ void ViewMail::slotForward()
QString ftext;
ftext += QString("\n----- Forwarded message from %1 -----\n\n")
.arg( m_mail[0] );
if (!m_mail[3].isNull())
ftext += QString("Date: %1\n")
.arg( m_mail[3] );
if (!m_mail[0].isNull())
ftext += QString("From: %1\n")
.arg( m_mail[0] );
if (!m_mail[1].isNull())
ftext += QString("Subject: %1\n")
.arg( m_mail[1] );
ftext += QString("\n%1\n")
.arg( m_mail[2]);
ftext += QString("----- End forwarded message -----\n");
Settings *settings = new Settings();
ComposeMail composer( settings ,this, 0, true);
composer.setSubject( "Fwd: " + m_mail[1] );
composer.setMessage( ftext );
composer.showMaximized();
if ( QDialog::Accepted==composer.exec()) {
-
+
}
}
void ViewMail::slotDeleteMail( )
{
if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) {
m_recMail.Wrapper()->deleteMail( m_recMail );
hide();
deleted = true;
}
}