author | zautrix <zautrix> | 2005-01-24 16:32:44 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-24 16:32:44 (UTC) |
commit | 6c89efd80c1e94a0c070025d07c7a4c656f2a81e (patch) (side-by-side diff) | |
tree | 44e8cac0fe7b117be19ec8c1f14c9c888838fdb3 /kmicromail/viewmail.cpp | |
parent | d4f5ce1bedd03191da5ecef2dc68381c10ef1fba (diff) | |
download | kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.zip kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.tar.gz kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.tar.bz2 |
view source
-rw-r--r-- | kmicromail/viewmail.cpp | 25 |
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 @@ -204,4 +204,22 @@ 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 ) { @@ -321,5 +339,5 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) m_gotBody = false; deleted = false; - + sourceOn = false; connect( reply, SIGNAL(activated()), SLOT(slotReply())); connect( forward, SIGNAL(activated()), SLOT(slotForward())); @@ -328,4 +346,6 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); connect( nextMail, SIGNAL( activated() ), SLOT( slotNextMail() ) ); + connect( viewSource, SIGNAL( activated() ), SLOT( slotViewSource() ) ); + connect( downloadMail, SIGNAL( activated() ), SIGNAL( signalDownloadMail() ) ); attachments->setEnabled(m_gotBody); @@ -347,4 +367,6 @@ void ViewMail::setText() { + viewSource->setText(i18n("View Source")); + sourceOn = false; QString toString; QString ccString; @@ -533,2 +555,3 @@ void MailImageDlg::setName(const QString&fname) // m_imageview->setImage(fname); } + |