author | zautrix <zautrix> | 2005-02-24 11:19:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-24 11:19:48 (UTC) |
commit | ff8a2f593fae5ffe82f889ab70d32bf02a45f4fb (patch) (side-by-side diff) | |
tree | b3b4c6ee66b7ae39fad43622a2badacdbe9ed4e1 | |
parent | 66ea8a0023a2a58e7887a41c265f2a7112b6b625 (diff) | |
download | kdepimpi-ff8a2f593fae5ffe82f889ab70d32bf02a45f4fb.zip kdepimpi-ff8a2f593fae5ffe82f889ab70d32bf02a45f4fb.tar.gz kdepimpi-ff8a2f593fae5ffe82f889ab70d32bf02a45f4fb.tar.bz2 |
ompi html fixes
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | kmicromail/viewmail.cpp | 23 | ||||
-rw-r--r-- | kmicromail/viewmail.h | 2 |
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. +OM/Pi: +Fixed a crash when displaying mails with "Show mail as html" was checked in the config. +Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. 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 ) m_mail[2] = body->Bodytext(); + m_showHtml = KOPrefs::instance()->mViewAsHtml; + if ( m_showHtml ) { + if ( m_mail[2].find ("<html>",0,false ) > -1 ) { + qDebug("html mail "); + } else { + qDebug("no html mail "); + m_showHtml = false; + } + } + showHtml->blockSignals( true ); + showHtml->setOn( m_showHtml ); + showHtml->blockSignals( false ); // qDebug("********text %s ",m_mail[2].latin1() ); @@ -333,3 +345,10 @@ void ViewMail::setMail(const RecMailP&mail ) - +void ViewMail::slotNextMail() +{ + nextMail->blockSignals( true ); + setCaption(i18n("Displaying next mail...please wait!")); + qApp->processEvents(); + emit showNextMail(this); + nextMail->blockSignals( false ); +} @@ -341,2 +360,3 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) sourceOn = false; + readConfig(); connect( reply, SIGNAL(activated()), SLOT(slotReply())); @@ -353,3 +373,2 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) - readConfig(); 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: protected slots: - void slotNextMail() { setCaption(i18n("Displaying next mail...please wait!")); qApp->processEvents();emit showNextMail(this); }; + void slotNextMail(); void slotReply(); |