summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-24 16:32:44 (UTC)
committer zautrix <zautrix>2005-01-24 16:32:44 (UTC)
commit6c89efd80c1e94a0c070025d07c7a4c656f2a81e (patch) (unidiff)
tree44e8cac0fe7b117be19ec8c1f14c9c888838fdb3
parentd4f5ce1bedd03191da5ecef2dc68381c10ef1fba (diff)
downloadkdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.zip
kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.tar.gz
kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.tar.bz2
view source
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-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
12 files changed, 68 insertions, 52 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index cbed872..2516b2a 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -19,12 +19,14 @@ OM/Pi:
19"Delete mail" icon in main window now deletes all selected mails. 19"Delete mail" icon in main window now deletes all selected mails.
20Fixed the problem, that the state flag of imap mails was ignored. 20Fixed the problem, that the state flag of imap mails was ignored.
21Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 21Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
22to idecate that they are already seen. 22to idecate that they are already seen.
23Fixed the problem that the body of some mails was not displayed in the 23Fixed the problem that the body of some mails was not displayed in the
24mail viewer when fetching them from the imap server directly to read them. 24mail viewer when fetching them from the imap server directly to read them.
25Made it (configurable) possible to show the "To:" field in the list view.
26Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
25 27
26 28
27 29
28********** VERSION 1.9.19 ************ 30********** VERSION 1.9.19 ************
29 31
30Added a lot of missing translations to KA/Pi, 32Added a lot of missing translations to KA/Pi,
diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp
index 342bbf3..2bae5f6 100644
--- a/kmicromail/koprefs.cpp
+++ b/kmicromail/koprefs.cpp
@@ -59,12 +59,13 @@ KOPrefs::KOPrefs() :
59 KPrefs::setCurrentGroup("General"); 59 KPrefs::setCurrentGroup("General");
60 addItemString("SendCodec",&mSendCodec,i18n ("userdefined") ); 60 addItemString("SendCodec",&mSendCodec,i18n ("userdefined") );
61 addItemString("SenderName",&mName,i18n ("Please set at") ); 61 addItemString("SenderName",&mName,i18n ("Please set at") );
62 addItemString("SenderEmail",&mEmail,i18n ("Settings@General TAB") ); 62 addItemString("SenderEmail",&mEmail,i18n ("Settings@General TAB") );
63 addItemBool("ViewMailAsHtml",&mViewAsHtml,false); 63 addItemBool("ViewMailAsHtml",&mViewAsHtml,false);
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);
66 addItemInt("CurrentCodec",&mCurrentCodec,0); 67 addItemInt("CurrentCodec",&mCurrentCodec,0);
67 68
68 KPrefs::setCurrentGroup("Fonts"); 69 KPrefs::setCurrentGroup("Fonts");
69 addItemFont("Application Font",&mAppFont); 70 addItemFont("Application Font",&mAppFont);
70 addItemFont("Compose Font",&mComposeFont); 71 addItemFont("Compose Font",&mComposeFont);
diff --git a/kmicromail/koprefs.h b/kmicromail/koprefs.h
index 91f3fa3..f2c4fbb 100644
--- a/kmicromail/koprefs.h
+++ b/kmicromail/koprefs.h
@@ -69,12 +69,12 @@ class KOPrefs : public KPimPrefs
69 QFont mReadFont; 69 QFont mReadFont;
70 QString mName; 70 QString mName;
71 QString mSendCodec; 71 QString mSendCodec;
72 QString mEmail; 72 QString mEmail;
73 QString mCurrentCodeName; 73 QString mCurrentCodeName;
74 int mCurrentCodec; 74 int mCurrentCodec;
75 bool mSendLater, mViewAsHtml, mUseKapi, isDirty; 75 bool mSendLater, mViewAsHtml, mUseKapi, isDirty, mShowToField;
76 private: 76 private:
77 77
78}; 78};
79 79
80#endif 80#endif
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 13d6681..5c8a5a9 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -144,12 +144,15 @@ void KOPrefsDialog::setupMailTab()
144 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); 144 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1);
145 145
146 146
147 ttt = addWidBool(i18n("Send mails later"), 147 ttt = addWidBool(i18n("Send mails later"),
148 &(KOPrefs::instance()->mSendLater),topFrame); 148 &(KOPrefs::instance()->mSendLater),topFrame);
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 /*
151 mCodecEdit = new QLineEdit(topFrame); 154 mCodecEdit = new QLineEdit(topFrame);
152 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); 155 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1);
153 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); 156 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1);
154 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); 157 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1);
155 */ 158 */
diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp
index 484a635..ffb835c 100644
--- a/kmicromail/mailistviewitem.cpp
+++ b/kmicromail/mailistviewitem.cpp
@@ -1,11 +1,12 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2#include "mailistviewitem.h" 2#include "mailistviewitem.h"
3#include <libmailwrapper/abstractmail.h> 3#include <libmailwrapper/abstractmail.h>
4#include <qtextstream.h> 4#include <qtextstream.h>
5#include <kiconloader.h> 5#include <kiconloader.h>
6#include "koprefs.h"
6//#include <qpe/resource.h> 7//#include <qpe/resource.h>
7 8
8MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) 9MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item )
9 :QListViewItem(parent,item),mail_data() 10 :QListViewItem(parent,item),mail_data()
10{ 11{
11} 12}
@@ -54,60 +55,16 @@ void MailListViewItem::showEntry()
54 } else { 55 } else {
55 //setText(3, fsize + "MB"); 56 //setText(3, fsize + "MB");
56 mKeyMap.insert(3, "M" +fsort ); 57 mKeyMap.insert(3, "M" +fsort );
57 } 58 }
58 setText(1,mail_data->getSubject()); 59 setText(1,mail_data->getSubject());
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}
109 66
110void MailListViewItem::storeData(const RecMailP&data) 67void MailListViewItem::storeData(const RecMailP&data)
111{ 68{
112 mail_data = data; 69 mail_data = data;
113} 70}
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 1dc374b..875ab77 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -130,12 +130,14 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
130 mailView = new QListView( split ); 130 mailView = new QListView( split );
131 mailView->addColumn( i18n( " " ) ); 131 mailView->addColumn( i18n( " " ) );
132 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 132 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
133 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 133 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
134 mailView->addColumn( i18n( "Size" ),QListView::Manual); 134 mailView->addColumn( i18n( "Size" ),QListView::Manual);
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);
137 //mailView->setSorting(-1); 139 //mailView->setSorting(-1);
138 mailView->setRootIsDecorated( false ); 140 mailView->setRootIsDecorated( false );
139 statusWidget = new StatusWidget( wrapperBox ); 141 statusWidget = new StatusWidget( wrapperBox );
140 statusWidget->hide(); 142 statusWidget->hide();
141 143
@@ -300,12 +302,14 @@ void MainWindow::slotAdjustColumns()
300 302
301 mailView->setColumnWidth( 0, 10 ); 303 mailView->setColumnWidth( 0, 10 );
302 mailView->setColumnWidth( 1, 100 ); 304 mailView->setColumnWidth( 1, 100 );
303 mailView->setColumnWidth( 2, 100 ); 305 mailView->setColumnWidth( 2, 100 );
304 mailView->setColumnWidth( 3, 50 ); 306 mailView->setColumnWidth( 3, 50 );
305 mailView->setColumnWidth( 4, 120 ); 307 mailView->setColumnWidth( 4, 120 );
308 if ( KOPrefs::instance()->mShowToField )
309 mailView->setColumnWidth( 5, 100 );
306} 310}
307 311
308void MainWindow::slotEditSettings() 312void MainWindow::slotEditSettings()
309{ 313{
310} 314}
311 315
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 915b3e8..6e54bf4 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -1,9 +1,13 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3 3
4
5#define protected public
6#include <qwidget.h>
7#undef protected
4#include "koprefsdialog.h" 8#include "koprefsdialog.h"
5#include <kapplication.h> 9#include <kapplication.h>
6#include <libkdepim/externalapphandler.h> 10#include <libkdepim/externalapphandler.h>
7#include <libkdepim/kpimglobalprefs.h> 11#include <libkdepim/kpimglobalprefs.h>
8#ifdef MINIKDE_KDIALOG_H 12#ifdef MINIKDE_KDIALOG_H
9#undef MINIKDE_KDIALOG_H 13#undef MINIKDE_KDIALOG_H
@@ -19,12 +23,13 @@
19#include "accountitem.h" 23#include "accountitem.h"
20#include "klocale.h" 24#include "klocale.h"
21 25
22#include <qmessagebox.h> 26#include <qmessagebox.h>
23#include <qtimer.h> 27#include <qtimer.h>
24#include <qcursor.h> 28#include <qcursor.h>
29#include <qtextbrowser.h>
25#include <qregexp.h> 30#include <qregexp.h>
26#include <qpe/global.h> 31#include <qpe/global.h>
27 32
28#ifdef DESKTOP_VERSION 33#ifdef DESKTOP_VERSION
29#include <qapplication.h> 34#include <qapplication.h>
30#else 35#else
@@ -38,21 +43,23 @@
38//using namespace Opie::Core; 43//using namespace Opie::Core;
39 44
40OpieMail::OpieMail( QWidget *parent, const char *name ) 45OpieMail::OpieMail( QWidget *parent, const char *name )
41 : MainWindow( parent, name) //, WStyle_ContextHelp ) 46 : MainWindow( parent, name) //, WStyle_ContextHelp )
42{ 47{
43 settings = new Settings(); 48 settings = new Settings();
44 49 tb = 0;
45 setIcon(SmallIcon( "kmicromail" ) ); 50 setIcon(SmallIcon( "kmicromail" ) );
46 folderView->populate( settings->getAccounts() ); 51 folderView->populate( settings->getAccounts() );
47 52
48} 53}
49 54
50OpieMail::~OpieMail() 55OpieMail::~OpieMail()
51{ 56{
52 if (settings) delete settings; 57 if (settings) delete settings;
58 if ( tb )
59 delete tb;
53} 60}
54 61
55void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 62void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
56{ 63{
57 64
58} 65}
@@ -300,12 +307,19 @@ void OpieMail::replyMail()
300 307
301} 308}
302void OpieMail::closeViewMail(ViewMail * vm) 309void OpieMail::closeViewMail(ViewMail * vm)
303{ 310{
304 vm->hide(); 311 vm->hide();
305} 312}
313
314void OpieMail::slotDownloadMail( )
315{
316 qDebug("slotDownloadMail( ) ");
317}
318
319
306void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) 320void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
307{ 321{
308 QListViewItem*item = mailView->currentItem(); 322 QListViewItem*item = mailView->currentItem();
309 if (!item ) { 323 if (!item ) {
310 closeViewMail(vm); 324 closeViewMail(vm);
311 return; 325 return;
@@ -352,12 +366,13 @@ void OpieMail::displayMail()
352 readMail.showMaximized(); 366 readMail.showMaximized();
353#else 367#else
354 readMail.resize( 640, 480); 368 readMail.resize( 640, 480);
355#endif 369#endif
356 connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) ); 370 connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) );
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
359 readMail.exec(); 374 readMail.exec();
360 375
361 if ( readMail.deleted ) 376 if ( readMail.deleted )
362 { 377 {
363 folderView->refreshCurrent(); 378 folderView->refreshCurrent();
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index a81a34c..b8a527f 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -43,18 +43,19 @@ protected slots:
43 virtual void refreshMailView(const QValueList<RecMailP>&); 43 virtual void refreshMailView(const QValueList<RecMailP>&);
44 virtual void mailLeftClicked( QListViewItem * ); 44 virtual void mailLeftClicked( QListViewItem * );
45 virtual void slotMoveCopyMail(); 45 virtual void slotMoveCopyMail();
46 virtual void slotMoveCopyAllMail(); 46 virtual void slotMoveCopyAllMail();
47 virtual void reEditMail(); 47 virtual void reEditMail();
48 void clearSelection(); 48 void clearSelection();
49 49 void slotDownloadMail();
50private: 50private:
51 void closeViewMail(ViewMail * vm); 51 void closeViewMail(ViewMail * vm);
52 QString mPendingEmail; 52 QString mPendingEmail;
53 QString mPendingName; 53 QString mPendingName;
54 QByteArray mPendingData; 54 QByteArray mPendingData;
55 QCString mPendingMessage; 55 QCString mPendingMessage;
56 Settings *settings; 56 Settings *settings;
57 QTextBrowser * tb;
57 58
58}; 59};
59 60
60#endif 61#endif
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 6d88cad..767a369 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -200,12 +200,30 @@ void ViewMail::setBody(const RecBodyP&body )
200 curItem=new AttachItem(attachments,curItem,type,desc,filename,fsize,i,body->Parts()[i]->Positionlist()); 200 curItem=new AttachItem(attachments,curItem,type,desc,filename,fsize,i,body->Parts()[i]->Positionlist());
201 } 201 }
202 } 202 }
203} 203}
204 204
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 )
207{ 225{
208 m_showHtml = state; 226 m_showHtml = state;
209 setText(); 227 setText();
210} 228}
211 229
@@ -317,19 +335,21 @@ void ViewMail::setMail(const RecMailP&mail )
317 335
318ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) 336ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
319 : ViewMailBase(parent, name, fl), _inLoop(false) 337 : ViewMailBase(parent, name, fl), _inLoop(false)
320{ 338{
321 m_gotBody = false; 339 m_gotBody = false;
322 deleted = false; 340 deleted = false;
323 341 sourceOn = false;
324 connect( reply, SIGNAL(activated()), SLOT(slotReply())); 342 connect( reply, SIGNAL(activated()), SLOT(slotReply()));
325 connect( forward, SIGNAL(activated()), SLOT(slotForward())); 343 connect( forward, SIGNAL(activated()), SLOT(slotForward()));
326 connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail() ) ); 344 connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail() ) );
327 connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) ); 345 connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) );
328 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 346 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
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
331 attachments->setEnabled(m_gotBody); 351 attachments->setEnabled(m_gotBody);
332 connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); 352 connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) );
333 353
334 readConfig(); 354 readConfig();
335 attachments->setSorting(-1); 355 attachments->setSorting(-1);
@@ -343,12 +363,14 @@ void ViewMail::readConfig()
343 showHtml->setOn( m_showHtml ); 363 showHtml->setOn( m_showHtml );
344} 364}
345 365
346void ViewMail::setText() 366void ViewMail::setText()
347{ 367{
348 368
369 viewSource->setText(i18n("View Source"));
370 sourceOn = false;
349 QString toString; 371 QString toString;
350 QString ccString; 372 QString ccString;
351 QString bccString; 373 QString bccString;
352 374
353 375
354 toString = m_mail2[0].join(","); 376 toString = m_mail2[0].join(",");
@@ -529,6 +551,7 @@ MailImageDlg::~MailImageDlg()
529 551
530void MailImageDlg::setName(const QString&fname) 552void MailImageDlg::setName(const QString&fname)
531{ 553{
532 qDebug("viewmail.cpp: MailImageDlg::setName Pending"); 554 qDebug("viewmail.cpp: MailImageDlg::setName Pending");
533 // m_imageview->setImage(fname); 555 // m_imageview->setImage(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
@@ -42,12 +42,13 @@ public:
42 void setMail(const RecMailP&mail ); 42 void setMail(const RecMailP&mail );
43 void setBody(const RecBodyP&body); 43 void setBody(const RecBodyP&body);
44 bool deleted; 44 bool deleted;
45 signals: 45 signals:
46 void showNextMail(ViewMail*); 46 void showNextMail(ViewMail*);
47 void deleteAndDisplayNextMail(ViewMail *); 47 void deleteAndDisplayNextMail(ViewMail *);
48 void signalDownloadMail();
48protected: 49protected:
49 QString deHtml(const QString &string); 50 QString deHtml(const QString &string);
50 AttachItem* searchParent(const QValueList<int>&path); 51 AttachItem* searchParent(const QValueList<int>&path);
51 AttachItem* lastChild(AttachItem*parent); 52 AttachItem* lastChild(AttachItem*parent);
52 53
53protected slots: 54protected slots:
@@ -55,16 +56,17 @@ protected slots:
55 void slotReply(); 56 void slotReply();
56 void slotForward(); 57 void slotForward();
57 void setText(); 58 void setText();
58 void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); 59 void slotItemClicked( QListViewItem * item , const QPoint & point, int c );
59 void slotDeleteMail( ); 60 void slotDeleteMail( );
60 void slotShowHtml( bool ); 61 void slotShowHtml( bool );
62 void slotViewSource();
61 63
62private: 64private:
63 void readConfig(); 65 void readConfig();
64 66 bool sourceOn;;
65 bool _inLoop; 67 bool _inLoop;
66 QString m_mailHtml; 68 QString m_mailHtml;
67 bool m_gotBody; 69 bool m_gotBody;
68 RecBodyP m_body; 70 RecBodyP m_body;
69 RecMailP m_recMail; 71 RecMailP m_recMail;
70 bool m_showHtml; 72 bool m_showHtml;
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index d21696a..9365c23 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -25,12 +25,20 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
25 mailmenu = new QPopupMenu( menubar ); 25 mailmenu = new QPopupMenu( menubar );
26 menubar->insertItem( i18n( "Mail" ), mailmenu ); 26 menubar->insertItem( i18n( "Mail" ), mailmenu );
27 27
28 toolbar->setHorizontalStretchable(true); 28 toolbar->setHorizontalStretchable(true);
29 addToolBar(toolbar); 29 addToolBar(toolbar);
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);
32 reply->addTo(toolbar); 40 reply->addTo(toolbar);
33 reply->addTo(mailmenu); 41 reply->addTo(mailmenu);
34 42
35 forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this); 43 forward = new QAction(i18n("Forward"),SmallIcon("forward"), 0, 0, this);
36 forward->addTo(toolbar); 44 forward->addTo(toolbar);
diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h
index c97e9e3..7ad1eec 100644
--- a/kmicromail/viewmailbase.h
+++ b/kmicromail/viewmailbase.h
@@ -17,13 +17,13 @@ class ViewMailBase : public QMainWindow
17 Q_OBJECT 17 Q_OBJECT
18 18
19public: 19public:
20 ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 20 ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
21 21
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;
25 QToolBar *toolbar; 25 QToolBar *toolbar;
26 QTextBrowser *browser; 26 QTextBrowser *browser;
27 OpenDiag *openDiag; 27 OpenDiag *openDiag;
28 QMenuBar *menubar; 28 QMenuBar *menubar;
29 QPopupMenu *mailmenu; 29 QPopupMenu *mailmenu;