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.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index 78652d7..894a386 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -222,13 +222,13 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
222 types.insert( "all", "*" ); 222 types.insert( "all", "*" );
223 QString str = Opie::OFileDialog::getSaveFileName( 1, 223 QString str = Opie::OFileDialog::getSaveFileName( 1,
224 "/", item->text( 2 ) , types, 0 ); 224 "/", item->text( 2 ) , types, 0 );
225 225
226 if( !str.isEmpty() ) 226 if( !str.isEmpty() )
227 { 227 {
228 encodedString*content = m_recMail.Wrapper()->fetchDecodedPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); 228 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] );
229 if (content) 229 if (content)
230 { 230 {
231 QFile output(str); 231 QFile output(str);
232 output.open(IO_WriteOnly); 232 output.open(IO_WriteOnly);
233 output.writeBlock(content->Content(),content->Length()); 233 output.writeBlock(content->Content(),content->Length());
234 output.close(); 234 output.close();
@@ -242,36 +242,36 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
242 if ( ( ( AttachItem* )item )->Partnumber() == -1 ) 242 if ( ( ( AttachItem* )item )->Partnumber() == -1 )
243 { 243 {
244 setText(); 244 setText();
245 } 245 }
246 else 246 else
247 { 247 {
248 if ( m_recMail.Wrapper() != 0l ) 248 if ( m_recMail->Wrapper() != 0l )
249 { // make sure that there is a wrapper , even after delete or simular actions 249 { // make sure that there is a wrapper , even after delete or simular actions
250 browser->setText( m_recMail.Wrapper()->fetchTextPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) ); 250 browser->setText( m_recMail->Wrapper()->fetchTextPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) );
251 } 251 }
252 } 252 }
253 break; 253 break;
254 } 254 }
255 delete menu; 255 delete menu;
256} 256}
257 257
258 258
259void ViewMail::setMail( RecMail mail ) 259void ViewMail::setMail( RecMailP mail )
260{ 260{
261 261
262 m_recMail = mail; 262 m_recMail = mail;
263 263
264 m_mail[0] = mail.getFrom(); 264 m_mail[0] = mail->getFrom();
265 m_mail[1] = mail.getSubject(); 265 m_mail[1] = mail->getSubject();
266 m_mail[3] = mail.getDate(); 266 m_mail[3] = mail->getDate();
267 m_mail[4] = mail.Msgid(); 267 m_mail[4] = mail->Msgid();
268 268
269 m_mail2[0] = mail.To(); 269 m_mail2[0] = mail->To();
270 m_mail2[1] = mail.CC(); 270 m_mail2[1] = mail->CC();
271 m_mail2[2] = mail.Bcc(); 271 m_mail2[2] = mail->Bcc();
272 272
273 setText(); 273 setText();
274} 274}
275 275
276 276
277 277
@@ -345,13 +345,13 @@ void ViewMail::setText()
345 m_gotBody = true; 345 m_gotBody = true;
346} 346}
347 347
348 348
349ViewMail::~ViewMail() 349ViewMail::~ViewMail()
350{ 350{
351 m_recMail.Wrapper()->cleanMimeCache(); 351 m_recMail->Wrapper()->cleanMimeCache();
352 hide(); 352 hide();
353} 353}
354 354
355void ViewMail::hide() 355void ViewMail::hide()
356{ 356{
357 QWidget::hide(); 357 QWidget::hide();
@@ -412,24 +412,24 @@ void ViewMail::slotReply()
412 QString prefix; 412 QString prefix;
413 if ( m_mail[1].find(QRegExp("^Re: .*$")) != -1) prefix = ""; 413 if ( m_mail[1].find(QRegExp("^Re: .*$")) != -1) prefix = "";
414 else prefix = "Re: "; // no i18n on purpose 414 else prefix = "Re: "; // no i18n on purpose
415 415
416 Settings *settings = new Settings(); 416 Settings *settings = new Settings();
417 ComposeMail composer( settings ,this, 0, true); 417 ComposeMail composer( settings ,this, 0, true);
418 if (m_recMail.Replyto().isEmpty()) { 418 if (m_recMail->Replyto().isEmpty()) {
419 composer.setTo( m_recMail.getFrom()); 419 composer.setTo( m_recMail->getFrom());
420 } else { 420 } else {
421 composer.setTo( m_recMail.Replyto()); 421 composer.setTo( m_recMail->Replyto());
422 } 422 }
423 composer.setSubject( prefix + m_mail[1] ); 423 composer.setSubject( prefix + m_mail[1] );
424 composer.setMessage( rtext ); 424 composer.setMessage( rtext );
425 composer.setInReplyTo(m_recMail.Msgid()); 425 composer.setInReplyTo(m_recMail->Msgid());
426 426
427 if ( QDialog::Accepted == QPEApplication::execDialog( &composer ) ) 427 if ( QDialog::Accepted == QPEApplication::execDialog( &composer ) )
428 { 428 {
429 m_recMail.Wrapper()->answeredMail(m_recMail); 429 m_recMail->Wrapper()->answeredMail(m_recMail);
430 } 430 }
431} 431}
432 432
433void ViewMail::slotForward() 433void ViewMail::slotForward()
434{ 434{
435 if (!m_gotBody) 435 if (!m_gotBody)
@@ -466,11 +466,11 @@ void ViewMail::slotForward()
466} 466}
467 467
468void ViewMail::slotDeleteMail( ) 468void ViewMail::slotDeleteMail( )
469{ 469{
470 if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 470 if ( QMessageBox::warning(this, tr("Delete Mail"), QString( tr("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
471 { 471 {
472 m_recMail.Wrapper()->deleteMail( m_recMail ); 472 m_recMail->Wrapper()->deleteMail( m_recMail );
473 hide(); 473 hide();
474 deleted = true; 474 deleted = true;
475 } 475 }
476} 476}