author | zautrix <zautrix> | 2005-02-24 11:19:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-24 11:19:48 (UTC) |
commit | ff8a2f593fae5ffe82f889ab70d32bf02a45f4fb (patch) (unidiff) | |
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 | |||
@@ -8,8 +8,11 @@ Fixed some layout problems in the KO/Pi agenda view when there were many conflic | |||
8 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. | 8 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. |
9 | 9 | ||
10 | Fixed problem in pi-sync mode when wrong password was sent. | 10 | Fixed problem in pi-sync mode when wrong password was sent. |
11 | 11 | ||
12 | OM/Pi: | ||
13 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. | ||
14 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. | ||
12 | 15 | ||
13 | ********** VERSION 2.0.11 ************ | 16 | ********** VERSION 2.0.11 ************ |
14 | 17 | ||
15 | Fixed some problems in pi-sync mode | 18 | Fixed some problems in pi-sync mode |
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index 726f540..685b4e4 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp | |||
@@ -98,8 +98,20 @@ void ViewMail::setBody(const RecBodyP&body ) | |||
98 | { | 98 | { |
99 | 99 | ||
100 | m_body = body; | 100 | m_body = 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() ); |
103 | attachbutton->setEnabled(body->Parts().count()>0); | 115 | attachbutton->setEnabled(body->Parts().count()>0); |
104 | attachments->setEnabled(body->Parts().count()>0); | 116 | attachments->setEnabled(body->Parts().count()>0); |
105 | if (body->Parts().count()==0) | 117 | if (body->Parts().count()==0) |
@@ -330,16 +342,24 @@ void ViewMail::setMail(const RecMailP&mail ) | |||
330 | 342 | ||
331 | setText(); | 343 | setText(); |
332 | } | 344 | } |
333 | 345 | ||
334 | 346 | void 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 | ||
336 | ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) | 355 | ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) |
337 | : ViewMailBase(parent, name, fl), _inLoop(false) | 356 | : ViewMailBase(parent, name, fl), _inLoop(false) |
338 | { | 357 | { |
339 | m_gotBody = false; | 358 | m_gotBody = false; |
340 | deleted = false; | 359 | deleted = false; |
341 | sourceOn = false; | 360 | sourceOn = false; |
361 | readConfig(); | ||
342 | connect( reply, SIGNAL(activated()), SLOT(slotReply())); | 362 | connect( reply, SIGNAL(activated()), SLOT(slotReply())); |
343 | connect( forward, SIGNAL(activated()), SLOT(slotForward())); | 363 | connect( forward, SIGNAL(activated()), SLOT(slotForward())); |
344 | connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail() ) ); | 364 | connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail() ) ); |
345 | connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) ); | 365 | connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) ); |
@@ -350,9 +370,8 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) | |||
350 | 370 | ||
351 | attachments->setEnabled(m_gotBody); | 371 | attachments->setEnabled(m_gotBody); |
352 | connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); | 372 | connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); |
353 | 373 | ||
354 | readConfig(); | ||
355 | attachments->setSorting(-1); | 374 | attachments->setSorting(-1); |
356 | } | 375 | } |
357 | 376 | ||
358 | void ViewMail::readConfig() | 377 | void ViewMail::readConfig() |
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h index fc5edcf..bb5b685 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h | |||
@@ -53,9 +53,9 @@ protected: | |||
53 | AttachItem* searchParent(const QValueList<int>&path); | 53 | AttachItem* searchParent(const QValueList<int>&path); |
54 | AttachItem* lastChild(AttachItem*parent); | 54 | AttachItem* lastChild(AttachItem*parent); |
55 | 55 | ||
56 | protected slots: | 56 | protected 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(); |
59 | void slotForward(); | 59 | void slotForward(); |
60 | void setText(); | 60 | void setText(); |
61 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); | 61 | void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); |