author | zautrix <zautrix> | 2005-01-24 16:32:44 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-24 16:32:44 (UTC) |
commit | 6c89efd80c1e94a0c070025d07c7a4c656f2a81e (patch) (unidiff) | |
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 | |||
@@ -205,2 +205,20 @@ void ViewMail::setBody(const RecBodyP&body ) | |||
205 | 205 | ||
206 | void ViewMail::slotViewSource() | ||
207 | { | ||
208 | |||
209 | if ( !sourceOn ) { | ||
210 | sourceOn = true; | ||
211 | viewSource->setText(i18n("View Body Text")); | ||
212 | encodedString*st = 0; | ||
213 | st = m_recMail->Wrapper()->fetchRawBody(m_recMail); | ||
214 | if ( st ) { | ||
215 | QString source = QString::fromUtf8( st->Content(), st->Length()); | ||
216 | browser->setText( source ); | ||
217 | delete st; | ||
218 | } | ||
219 | } else | ||
220 | setText(); | ||
221 | |||
222 | |||
223 | } | ||
206 | void ViewMail::slotShowHtml( bool state ) | 224 | void ViewMail::slotShowHtml( bool state ) |
@@ -322,3 +340,3 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) | |||
322 | deleted = false; | 340 | deleted = false; |
323 | 341 | sourceOn = false; | |
324 | connect( reply, SIGNAL(activated()), SLOT(slotReply())); | 342 | connect( reply, SIGNAL(activated()), SLOT(slotReply())); |
@@ -329,2 +347,4 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) | |||
329 | connect( nextMail, SIGNAL( activated() ), SLOT( slotNextMail() ) ); | 347 | connect( nextMail, SIGNAL( activated() ), SLOT( slotNextMail() ) ); |
348 | connect( viewSource, SIGNAL( activated() ), SLOT( slotViewSource() ) ); | ||
349 | connect( downloadMail, SIGNAL( activated() ), SIGNAL( signalDownloadMail() ) ); | ||
330 | 350 | ||
@@ -348,2 +368,4 @@ void ViewMail::setText() | |||
348 | 368 | ||
369 | viewSource->setText(i18n("View Source")); | ||
370 | sourceOn = false; | ||
349 | QString toString; | 371 | QString toString; |
@@ -534 +556,2 @@ void MailImageDlg::setName(const QString&fname) | |||
534 | } | 556 | } |
557 | |||