summaryrefslogtreecommitdiff
path: root/noncore/net/mail/composemail.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/composemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/composemail.cpp17
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
@@ -9,10 +9,10 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
9 : ComposeMailUI( parent, name, modal, flags ) 9 : ComposeMailUI( parent, name, modal, flags )
10{ 10{
11 settings = s; 11 settings = s;
12 12
13 attList->addColumn( tr( "Name" ) ); 13 attList->addColumn( tr( "Name" ) );
14 attList->addColumn( tr( "Size" ) ); 14 attList->addColumn( tr( "Size" ) );
15 15
16 QList<Account> accounts = settings->getAccounts(); 16 QList<Account> accounts = settings->getAccounts();
17 Account *it; 17 Account *it;
18 for ( it = accounts.first(); it; it = accounts.next() ) { 18 for ( it = accounts.first(); it; it = accounts.next() ) {
@@ -26,7 +26,7 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m
26 if ( smtpAccounts.count() > 0 ) { 26 if ( smtpAccounts.count() > 0 ) {
27 fillValues( fromBox->currentItem() ); 27 fillValues( fromBox->currentItem() );
28 } else { 28 } else {
29 QMessageBox::information( this, tr( "Problem" ), 29 QMessageBox::information( this, tr( "Problem" ),
30 tr( "<p>Please create an SMTP account first.</p>" ), 30 tr( "<p>Please create an SMTP account first.</p>" ),
31 tr( "Ok" ) ); 31 tr( "Ok" ) );
32 } 32 }
@@ -50,6 +50,7 @@ void ComposeMail::pickAddress( QLineEdit *line )
50 } 50 }
51} 51}
52 52
53
53void ComposeMail::pickAddressTo() 54void ComposeMail::pickAddressTo()
54{ 55{
55 pickAddress( toLine ); 56 pickAddress( toLine );
@@ -93,7 +94,7 @@ void ComposeMail::fillValues( int current )
93void ComposeMail::slotAdjustColumns() 94void ComposeMail::slotAdjustColumns()
94{ 95{
95 int currPage = tabWidget->currentPageIndex(); 96 int currPage = tabWidget->currentPageIndex();
96 97
97 tabWidget->showPage( attachTab ); 98 tabWidget->showPage( attachTab );
98 attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); 99 attList->setColumnWidth( 0, attList->visibleWidth() - 80 );
99 attList->setColumnWidth( 1, 80 ); 100 attList->setColumnWidth( 1, 80 );
@@ -113,7 +114,7 @@ void ComposeMail::addAttachment()
113void ComposeMail::removeAttachment() 114void ComposeMail::removeAttachment()
114{ 115{
115 if ( !attList->currentItem() ) { 116 if ( !attList->currentItem() ) {
116 QMessageBox::information( this, tr( "Error" ), 117 QMessageBox::information( this, tr( "Error" ),
117 tr( "<p>Please select a File.</p>" ), 118 tr( "<p>Please select a File.</p>" ),
118 tr( "Ok" ) ); 119 tr( "Ok" ) );
119 } else { 120 } else {
@@ -123,7 +124,7 @@ void ComposeMail::removeAttachment()
123 124
124void ComposeMail::accept() 125void ComposeMail::accept()
125{ 126{
126 qDebug( "Sending Mail with " + 127 qDebug( "Sending Mail with " +
127 smtpAccounts.at( fromBox->currentItem() )->getAccountName() ); 128 smtpAccounts.at( fromBox->currentItem() )->getAccountName() );
128 Mail *mail = new Mail(); 129 Mail *mail = new Mail();
129 SMTPaccount *smtp = smtpAccounts.at( fromBox->currentItem() ); 130 SMTPaccount *smtp = smtpAccounts.at( fromBox->currentItem() );
@@ -164,8 +165,8 @@ AttachViewItem::AttachViewItem( QListView *parent, Attachment *att )
164{ 165{
165 attachment = att; 166 attachment = att;
166 qDebug( att->getMimeType() ); 167 qDebug( att->getMimeType() );
167 setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? 168 setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ?
168 Resource::loadPixmap( "UnknownDocument-14" ) : 169 Resource::loadPixmap( "UnknownDocument-14" ) :
169 attachment->getDocLnk().pixmap() ); 170 attachment->getDocLnk().pixmap() );
170 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); 171 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() );
171 setText( 1, QString::number( att->getSize() ) ); 172 setText( 1, QString::number( att->getSize() ) );