summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt3
-rw-r--r--kmicromail/viewmail.cpp23
-rw-r--r--kmicromail/viewmail.h2
3 files changed, 25 insertions, 3 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 0596511..86ac9b5 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -11,2 +11,5 @@ Fixed problem in pi-sync mode when wrong password was sent.
11 11
12OM/Pi:
13Fixed a crash when displaying mails with "Show mail as html" was checked in the config.
14Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled.
12 15
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 726f540..685b4e4 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -101,2 +101,14 @@ void ViewMail::setBody(const RecBodyP&body )
101 m_mail[2] = body->Bodytext(); 101 m_mail[2] = body->Bodytext();
102 m_showHtml = KOPrefs::instance()->mViewAsHtml;
103 if ( m_showHtml ) {
104 if ( m_mail[2].find ("<html>",0,false ) > -1 ) {
105 qDebug("html mail ");
106 } else {
107 qDebug("no html mail ");
108 m_showHtml = false;
109 }
110 }
111 showHtml->blockSignals( true );
112 showHtml->setOn( m_showHtml );
113 showHtml->blockSignals( false );
102 // qDebug("********text %s ",m_mail[2].latin1() ); 114 // qDebug("********text %s ",m_mail[2].latin1() );
@@ -333,3 +345,10 @@ void ViewMail::setMail(const RecMailP&mail )
333 345
334 346void ViewMail::slotNextMail()
347{
348 nextMail->blockSignals( true );
349 setCaption(i18n("Displaying next mail...please wait!"));
350 qApp->processEvents();
351 emit showNextMail(this);
352 nextMail->blockSignals( false );
353}
335 354
@@ -341,2 +360,3 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
341 sourceOn = false; 360 sourceOn = false;
361 readConfig();
342 connect( reply, SIGNAL(activated()), SLOT(slotReply())); 362 connect( reply, SIGNAL(activated()), SLOT(slotReply()));
@@ -353,3 +373,2 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
353 373
354 readConfig();
355 attachments->setSorting(-1); 374 attachments->setSorting(-1);
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index fc5edcf..bb5b685 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -56,3 +56,3 @@ protected:
56protected slots: 56protected slots:
57 void slotNextMail() { setCaption(i18n("Displaying next mail...please wait!")); qApp->processEvents();emit showNextMail(this); }; 57 void slotNextMail();
58 void slotReply(); 58 void slotReply();