summaryrefslogtreecommitdiff
path: root/noncore/net/mail/viewmail.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/viewmail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/viewmail.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index c24d5d3..a73dac5 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -7,12 +7,13 @@
7 7
8#include <opie/ofiledialog.h> 8#include <opie/ofiledialog.h>
9 9
10#include "settings.h" 10#include "settings.h"
11#include "composemail.h" 11#include "composemail.h"
12#include "viewmail.h" 12#include "viewmail.h"
13#include "abstractmail.h"
13 14
14AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&file,const QString&desc,int num) 15AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&file,const QString&desc,int num)
15 : QListViewItem(parent,after),_partNum(num) 16 : QListViewItem(parent,after),_partNum(num)
16{ 17{
17 setText(0, mime); 18 setText(0, mime);
18 setText(1, file); 19 setText(1, file);
@@ -127,27 +128,28 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
127 qDebug( " first we will need a MIME wrapper" ); 128 qDebug( " first we will need a MIME wrapper" );
128 } 129 }
129 } 130 }
130 break ; 131 break ;
131 132
132 case 1: 133 case 1:
133
134 qDebug( QString( "Test selected" ).arg( ( ( AttachItem* )item )->Partnumber() ) ); 134 qDebug( QString( "Test selected" ).arg( ( ( AttachItem* )item )->Partnumber() ) );
135 if ( ( ( AttachItem* )item )->Partnumber() == -1 ) { 135 if ( ( ( AttachItem* )item )->Partnumber() == -1 ) {
136 setText(); 136 setText();
137 } else { 137 } else {
138 browser->setText( ( m_body.Parts()[( ( AttachItem* )item )->Partnumber() ] ).Identifier() ); 138 browser->setText( m_recMail.Wrapper()->fetchPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) );
139 } 139 }
140 break; 140 break;
141 } 141 }
142 delete menu; 142 delete menu;
143} 143}
144 144
145 145
146void ViewMail::setMail( RecMail mail ) { 146void ViewMail::setMail( RecMail mail ) {
147 147
148m_recMail = mail;
149
148m_mail[0] = mail.getFrom(); 150m_mail[0] = mail.getFrom();
149m_mail[1] = mail.getSubject(); 151m_mail[1] = mail.getSubject();
150m_mail[3] = mail.getDate(); 152m_mail[3] = mail.getDate();
151m_mail[4] = mail.Msgid(); 153m_mail[4] = mail.Msgid();
152 154
153m_mail2[0] = mail.To(); 155m_mail2[0] = mail.To();