Diffstat (limited to 'noncore/net/mail/composemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/composemail.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index 88dd780..96787e4 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp @@ -6,16 +6,16 @@ #include "composemail.h" ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) : ComposeMailUI( parent, name, modal, flags ) { settings = s; - + attList->addColumn( tr( "Name" ) ); attList->addColumn( tr( "Size" ) ); - + QList<Account> accounts = settings->getAccounts(); Account *it; for ( it = accounts.first(); it; it = accounts.next() ) { if ( it->getType().compare( "SMTP" ) == 0 ) { SMTPaccount *smtp = static_cast<SMTPaccount *>(it); fromBox->insertItem( smtp->getMail() ); @@ -23,13 +23,13 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m } } if ( smtpAccounts.count() > 0 ) { fillValues( fromBox->currentItem() ); } else { - QMessageBox::information( this, tr( "Problem" ), + QMessageBox::information( this, tr( "Problem" ), tr( "<p>Please create an SMTP account first.</p>" ), tr( "Ok" ) ); } connect( fromBox, SIGNAL( activated( int ) ), SLOT( fillValues( int ) ) ); connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); @@ -47,12 +47,13 @@ void ComposeMail::pickAddress( QLineEdit *line ) line->setText( names ); } else if ( !names.isEmpty() ) { line->setText( line->text() + ", " + names ); } } + void ComposeMail::pickAddressTo() { pickAddress( toLine ); } void ComposeMail::pickAddressCC() @@ -90,13 +91,13 @@ void ComposeMail::fillValues( int current ) sigMultiLine->setText( smtp->getSignature() ); } void ComposeMail::slotAdjustColumns() { int currPage = tabWidget->currentPageIndex(); - + tabWidget->showPage( attachTab ); attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); attList->setColumnWidth( 1, 80 ); tabWidget->setCurrentPage( currPage ); } @@ -110,23 +111,23 @@ void ComposeMail::addAttachment() } } void ComposeMail::removeAttachment() { if ( !attList->currentItem() ) { - QMessageBox::information( this, tr( "Error" ), + QMessageBox::information( this, tr( "Error" ), tr( "<p>Please select a File.</p>" ), tr( "Ok" ) ); } else { attList->takeItem( attList->currentItem() ); } } void ComposeMail::accept() { - qDebug( "Sending Mail with " + + qDebug( "Sending Mail with " + smtpAccounts.at( fromBox->currentItem() )->getAccountName() ); Mail *mail = new Mail(); SMTPaccount *smtp = smtpAccounts.at( fromBox->currentItem() ); mail->setMail( smtp->getMail() ); mail->setName( smtp->getName() ); @@ -161,13 +162,13 @@ void ComposeMail::accept() AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) : QListViewItem( parent ) { attachment = att; qDebug( att->getMimeType() ); - setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? - Resource::loadPixmap( "UnknownDocument-14" ) : + setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? + Resource::loadPixmap( "UnknownDocument-14" ) : attachment->getDocLnk().pixmap() ); setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); setText( 1, QString::number( att->getSize() ) ); } |