summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-12-13 22:17:45 (UTC)
committer harlekin <harlekin>2003-12-13 22:17:45 (UTC)
commitf1fa9ca873169e803fcc28cecd756a3edaa30ec4 (patch) (side-by-side diff)
tree6e1f14694056c341427475d9fdddac1b9dcf99a7
parent8290f1a524b6f0051e49f8045d24e508d46868e2 (diff)
downloadopie-f1fa9ca873169e803fcc28cecd756a3edaa30ec4.zip
opie-f1fa9ca873169e803fcc28cecd756a3edaa30ec4.tar.gz
opie-f1fa9ca873169e803fcc28cecd756a3edaa30ec4.tar.bz2
make sure the wrapper pointer is not Ol
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp4
-rw-r--r--noncore/net/mail/viewmail.cpp7
2 files changed, 6 insertions, 5 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 560715c..8ef7ddd 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -73,43 +73,43 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
setCentralWidget( view );
layout = new QBoxLayout ( view, QBoxLayout::LeftToRight );
folderView = new AccountView( view );
folderView->header()->hide();
folderView->addColumn( tr( "Mailbox" ) );
folderView->hide();
layout->addWidget( folderView );
mailView = new QListView( view );
- mailView->addColumn( tr( "Status" ) );
+ mailView->addColumn( tr( "" ) );
mailView->addColumn( tr( "Subject" ),QListView::Manual );
mailView->addColumn( tr( "Sender" ),QListView::Manual );
mailView->addColumn( tr( "Date" ));
mailView->setAllColumnsShowFocus(true);
mailView->setSorting(-1);
layout->addWidget( mailView );
layout->setStretchFactor( folderView, 1 );
layout->setStretchFactor( mailView, 2 );
slotAdjustLayout();
connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this,
SLOT( displayMail( QListViewItem * ) ) );
connect(folderView,SIGNAL(refreshMailview(QList<RecMail>*)),this,SLOT(refreshMailView(QList<RecMail>*)));
- QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
+ QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
}
void MainWindow::slotAdjustLayout() {
QWidget *d = QApplication::desktop();
if ( d->width() < d->height() ) {
layout->setDirection( QBoxLayout::TopToBottom );
} else {
layout->setDirection( QBoxLayout::LeftToRight );
}
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index a73dac5..42707e3 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -103,48 +103,49 @@ for (unsigned int i = 0; i < body.Parts().count();++i) {
}
void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int c ) {
if (!item )
return;
QPopupMenu *menu = new QPopupMenu();
int ret=0;
if ( item->text( 0 ).left( 4 ) == "text" ) {
menu->insertItem( tr( "Show Text" ), 1 );
}
- menu->insertItem( tr( "Save Attachemt" ), 0 );
+ menu->insertItem( tr( "Save Attachment" ), 0 );
menu->insertSeparator(1);
ret = menu->exec( point, 0 );
switch(ret) {
case 0:
{ MimeTypes types;
types.insert( "all", "*" );
QString str = OFileDialog::getSaveFileName( 1,
"/", item->text( 1 ) , types, 0 );
if( !str.isEmpty() ) {
- qDebug( " first we will need a MIME wrapper" );
+ qDebug( "first we will need a MIME wrapper" );
}
}
break ;
case 1:
- qDebug( QString( "Test selected" ).arg( ( ( AttachItem* )item )->Partnumber() ) );
if ( ( ( AttachItem* )item )->Partnumber() == -1 ) {
setText();
} else {
+ if ( m_recMail.Wrapper() != 0l ) { // make sure that there is a wrapper , even after delete or simular actions
browser->setText( m_recMail.Wrapper()->fetchPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) );
+ }
}
break;
}
delete menu;
}
void ViewMail::setMail( RecMail mail ) {
m_recMail = mail;
m_mail[0] = mail.getFrom();