summaryrefslogtreecommitdiff
path: root/noncore/net/mail/viewmail.cpp
authorharlekin <harlekin>2003-12-20 00:05:37 (UTC)
committer harlekin <harlekin>2003-12-20 00:05:37 (UTC)
commitdc088ad432189b4883f7654ef6b2c1e2f69112cc (patch) (side-by-side diff)
tree090f6afd960e644d7da1fae3b8c8ffa97b669b59 /noncore/net/mail/viewmail.cpp
parent00a0c8cf03fe746c1e3ba608bf298c8e66d065f9 (diff)
downloadopie-dc088ad432189b4883f7654ef6b2c1e2f69112cc.zip
opie-dc088ad432189b4883f7654ef6b2c1e2f69112cc.tar.gz
opie-dc088ad432189b4883f7654ef6b2c1e2f69112cc.tar.bz2
- beginning of a settings dialog
- button for switching between html and plain text view of the mail - hide some unused icons - completed alwins idea about status icons ( alwin you missed the one that sets the read icon .-) ) - beginning of a status widget -
Diffstat (limited to 'noncore/net/mail/viewmail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/viewmail.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index d86454c..e11fe1f 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -8,2 +8,4 @@
+#include <qpe/config.h>
+
#include <opie/ofiledialog.h>
@@ -111,2 +113,8 @@ for (unsigned int i = 0; i < body.Parts().count();++i) {
+
+void ViewMail::slotShowHtml( bool state ) {
+ m_showHtml = state;
+ setText();
+}
+
void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) {
@@ -191,2 +199,3 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail( ) ) );
+ connect( showHtml, SIGNAL( toggled( bool ) ), SLOT( slotShowHtml( bool ) ) );
@@ -195,2 +204,3 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
+ readConfig();
@@ -198,2 +208,9 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
+void ViewMail::readConfig() {
+ Config cfg( "mail" );
+ cfg.setGroup( "Settings" );
+ m_showHtml = cfg.readBoolEntry( "showHtml", false );
+ showHtml->setOn( m_showHtml );
+}
+
void ViewMail::setText()
@@ -227,3 +244,7 @@ void ViewMail::setText()
+ if ( !m_showHtml ) {
browser->setText( QString( m_mailHtml) + deHtml( m_mail[2] ) + "</font></html>" );
+ } else {
+ browser->setText( QString( m_mailHtml) + m_mail[2] + "</font></html>" );
+ }
// remove later in favor of a real handling