summaryrefslogtreecommitdiffabout
path: root/kmicromail/viewmail.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/viewmail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/viewmail.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 6d88cad..767a369 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -205,2 +205,20 @@ void ViewMail::setBody(const RecBodyP&body )
+void ViewMail::slotViewSource()
+{
+
+ if ( !sourceOn ) {
+ sourceOn = true;
+ viewSource->setText(i18n("View Body Text"));
+ encodedString*st = 0;
+ st = m_recMail->Wrapper()->fetchRawBody(m_recMail);
+ if ( st ) {
+ QString source = QString::fromUtf8( st->Content(), st->Length());
+ browser->setText( source );
+ delete st;
+ }
+ } else
+ setText();
+
+
+}
void ViewMail::slotShowHtml( bool state )
@@ -322,3 +340,3 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
deleted = false;
-
+ sourceOn = false;
connect( reply, SIGNAL(activated()), SLOT(slotReply()));
@@ -329,2 +347,4 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
connect( nextMail, SIGNAL( activated() ), SLOT( slotNextMail() ) );
+ connect( viewSource, SIGNAL( activated() ), SLOT( slotViewSource() ) );
+ connect( downloadMail, SIGNAL( activated() ), SIGNAL( signalDownloadMail() ) );
@@ -348,2 +368,4 @@ void ViewMail::setText()
+ viewSource->setText(i18n("View Source"));
+ sourceOn = false;
QString toString;
@@ -534 +556,2 @@ void MailImageDlg::setName(const QString&fname)
}
+