summaryrefslogtreecommitdiffabout
path: root/kmicromail
Unidiff
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefs.cpp1
-rw-r--r--kmicromail/koprefs.h2
-rw-r--r--kmicromail/koprefsdialog.cpp3
-rw-r--r--kmicromail/mailistviewitem.cpp49
-rw-r--r--kmicromail/mainwindow.cpp4
-rw-r--r--kmicromail/opiemail.cpp17
-rw-r--r--kmicromail/opiemail.h3
-rw-r--r--kmicromail/viewmail.cpp25
-rw-r--r--kmicromail/viewmail.h4
-rw-r--r--kmicromail/viewmailbase.cpp8
-rw-r--r--kmicromail/viewmailbase.h2
11 files changed, 66 insertions, 52 deletions
diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp
index 342bbf3..2bae5f6 100644
--- a/kmicromail/koprefs.cpp
+++ b/kmicromail/koprefs.cpp
@@ -64,2 +64,3 @@ KOPrefs::KOPrefs() :
64 addItemBool("SendMailLater",&mSendLater,true); 64 addItemBool("SendMailLater",&mSendLater,true);
65 addItemBool("ShowToField",&mShowToField,false);
65 addItemBool("UseKapi",&mUseKapi,false); 66 addItemBool("UseKapi",&mUseKapi,false);
diff --git a/kmicromail/koprefs.h b/kmicromail/koprefs.h
index 91f3fa3..f2c4fbb 100644
--- a/kmicromail/koprefs.h
+++ b/kmicromail/koprefs.h
@@ -74,3 +74,3 @@ class KOPrefs : public KPimPrefs
74 int mCurrentCodec; 74 int mCurrentCodec;
75 bool mSendLater, mViewAsHtml, mUseKapi, isDirty; 75 bool mSendLater, mViewAsHtml, mUseKapi, isDirty, mShowToField;
76 private: 76 private:
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 13d6681..5c8a5a9 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -149,2 +149,5 @@ void KOPrefsDialog::setupMailTab()
149 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); 149 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
150 ttt = addWidBool(i18n("Show \"To\" field in list view"),
151 &(KOPrefs::instance()->mShowToField),topFrame);
152 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1);
150 /* 153 /*
diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp
index 484a635..ffb835c 100644
--- a/kmicromail/mailistviewitem.cpp
+++ b/kmicromail/mailistviewitem.cpp
@@ -5,2 +5,3 @@
5#include <kiconloader.h> 5#include <kiconloader.h>
6#include "koprefs.h"
6//#include <qpe/resource.h> 7//#include <qpe/resource.h>
@@ -59,50 +60,6 @@ void MailListViewItem::showEntry()
59 setText(2,mail_data->getFrom()); 60 setText(2,mail_data->getFrom());
60#if 0
61 QString date = mail_data->getDate();
62
63 int kom = date.find( ",")+2;
64 if ( kom == 1 )
65 kom = 0;
66 if ( date.mid(kom,1) == " ")
67 ++kom;
68 if ( date.mid(kom+1,1) == " " )
69 date = "0" + date.mid( kom );
70 else if ( kom )
71 date = date.mid( kom );
72 if ( kom || date.mid(2,1 ) == " ") {
73 QString mon = date.mid(3,3);
74 QString so = 00;
75 if ( mon == "Jan" )
76 so = "01";
77 else if ( mon == "Feb" )
78 so = "02";
79 else if ( mon == "Mar" )
80 so = "03";
81 else if ( mon == "Apr" )
82 so = "04";
83 else if ( mon == "May" )
84 so = "05";
85 else if ( mon == "Jun" )
86 so = "06";
87 else if ( mon == "Jul" )
88 so = "07";
89 else if ( mon == "Aug" )
90 so = "08";
91 else if ( mon == "Sep" )
92 so = "09";
93 else if ( mon == "Oct" )
94 so = "10";
95 else if ( mon == "Nov" )
96 so = "11";
97 else if ( mon == "Dec" )
98 so = "12";
99 date = date.mid(7,4)+so+date.left(2)+date.mid(12,14);
100 }
101 //qDebug("insert Date %s ", date.latin1());
102 // if ( date.left(1) != "1" || date.left(1) != "2" )
103 // date = date.mid(5);
104 mKeyMap.insert(4,date);
105#endif
106 mKeyMap.insert(4,mail_data->getIsoDate()); 61 mKeyMap.insert(4,mail_data->getIsoDate());
107 setText(4,mail_data->getDate()); 62 setText(4,mail_data->getDate());
63 if ( KOPrefs::instance()->mShowToField )
64 setText(5,mail_data->To()[0]);
108} 65}
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 1dc374b..875ab77 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -135,2 +135,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
135 mailView->addColumn( i18n( "Date" ),QListView::Manual); 135 mailView->addColumn( i18n( "Date" ),QListView::Manual);
136 if ( KOPrefs::instance()->mShowToField )
137 mailView->addColumn( i18n( "To" ),QListView::Manual);
136 mailView->setAllColumnsShowFocus(true); 138 mailView->setAllColumnsShowFocus(true);
@@ -305,2 +307,4 @@ void MainWindow::slotAdjustColumns()
305 mailView->setColumnWidth( 4, 120 ); 307 mailView->setColumnWidth( 4, 120 );
308 if ( KOPrefs::instance()->mShowToField )
309 mailView->setColumnWidth( 5, 100 );
306} 310}
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 915b3e8..6e54bf4 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -3,2 +3,6 @@
3 3
4
5#define protected public
6#include <qwidget.h>
7#undef protected
4#include "koprefsdialog.h" 8#include "koprefsdialog.h"
@@ -24,2 +28,3 @@
24#include <qcursor.h> 28#include <qcursor.h>
29#include <qtextbrowser.h>
25#include <qregexp.h> 30#include <qregexp.h>
@@ -43,3 +48,3 @@ OpieMail::OpieMail( QWidget *parent, const char *name )
43 settings = new Settings(); 48 settings = new Settings();
44 49 tb = 0;
45 setIcon(SmallIcon( "kmicromail" ) ); 50 setIcon(SmallIcon( "kmicromail" ) );
@@ -52,2 +57,4 @@ OpieMail::~OpieMail()
52 if (settings) delete settings; 57 if (settings) delete settings;
58 if ( tb )
59 delete tb;
53} 60}
@@ -305,2 +312,9 @@ void OpieMail::closeViewMail(ViewMail * vm)
305} 312}
313
314void OpieMail::slotDownloadMail( )
315{
316 qDebug("slotDownloadMail( ) ");
317}
318
319
306void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) 320void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
@@ -357,2 +371,3 @@ void OpieMail::displayMail()
357 connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) ); 371 connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) );
372 connect( &readMail,SIGNAL( signalDownloadMail() ), this, SLOT( slotDownloadMail() ) );
358 373
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index a81a34c..b8a527f 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -48,3 +48,3 @@ protected slots:
48 void clearSelection(); 48 void clearSelection();
49 49 void slotDownloadMail();
50private: 50private:
@@ -56,2 +56,3 @@ private:
56 Settings *settings; 56 Settings *settings;
57 QTextBrowser * tb;
57 58
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
206void 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}
206void ViewMail::slotShowHtml( bool state ) 224void 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
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index d85b8b2..561989e 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -47,2 +47,3 @@ public:
47 void deleteAndDisplayNextMail(ViewMail *); 47 void deleteAndDisplayNextMail(ViewMail *);
48 void signalDownloadMail();
48protected: 49protected:
@@ -60,2 +61,3 @@ protected slots:
60 void slotShowHtml( bool ); 61 void slotShowHtml( bool );
62 void slotViewSource();
61 63
@@ -63,3 +65,3 @@ private:
63 void readConfig(); 65 void readConfig();
64 66 bool sourceOn;;
65 bool _inLoop; 67 bool _inLoop;
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index d21696a..9365c23 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -30,2 +30,10 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
30 30
31 viewSource = new QAction(i18n("View Source"), 0, 0, this);
32 viewSource->addTo(mailmenu);
33
34 downloadMail= new QAction(i18n("Download Mail"),SmallIcon("add"), 0, 0, this);
35 downloadMail->addTo(toolbar);
36 downloadMail->addTo(mailmenu);
37
38
31 reply = new QAction(i18n("Reply"),SmallIcon("reply"), 0, 0, this); 39 reply = new QAction(i18n("Reply"),SmallIcon("reply"), 0, 0, this);
diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h
index c97e9e3..7ad1eec 100644
--- a/kmicromail/viewmailbase.h
+++ b/kmicromail/viewmailbase.h
@@ -22,3 +22,3 @@ public:
22protected: 22protected:
23 QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail; 23 QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail, *downloadMail, *viewSource;
24 QListView *attachments; 24 QListView *attachments;