Diffstat (limited to 'noncore/net/mail/composemail.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/composemail.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index 048fa85..f680f5c 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp | |||
@@ -1,19 +1,24 @@ | |||
1 | #include <qt.h> | 1 | #include <qt.h> |
2 | 2 | ||
3 | #include <opie/ofiledialog.h> | 3 | #include <opie/ofiledialog.h> |
4 | #include <qpe/resource.h> | 4 | #include <qpe/resource.h> |
5 | #include <qpe/config.h> | ||
5 | 6 | ||
6 | #include "composemail.h" | 7 | #include "composemail.h" |
7 | #include "smtpwrapper.h" | 8 | #include "smtpwrapper.h" |
8 | 9 | ||
9 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) | 10 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) |
10 | : ComposeMailUI( parent, name, modal, flags ) | 11 | : ComposeMailUI( parent, name, modal, flags ) |
11 | { | 12 | { |
12 | settings = s; | 13 | settings = s; |
13 | 14 | ||
15 | Config cfg( "mail" ); | ||
16 | cfg.setGroup( "Compose" ); | ||
17 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); | ||
18 | |||
14 | attList->addColumn( tr( "Name" ) ); | 19 | attList->addColumn( tr( "Name" ) ); |
15 | attList->addColumn( tr( "Size" ) ); | 20 | attList->addColumn( tr( "Size" ) ); |
16 | 21 | ||
17 | QList<Account> accounts = settings->getAccounts(); | 22 | QList<Account> accounts = settings->getAccounts(); |
18 | Account *it; | 23 | Account *it; |
19 | for ( it = accounts.first(); it; it = accounts.next() ) { | 24 | for ( it = accounts.first(); it; it = accounts.next() ) { |
@@ -27,12 +32,13 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m | |||
27 | if ( smtpAccounts.count() > 0 ) { | 32 | if ( smtpAccounts.count() > 0 ) { |
28 | fillValues( fromBox->currentItem() ); | 33 | fillValues( fromBox->currentItem() ); |
29 | } else { | 34 | } else { |
30 | QMessageBox::information( this, tr( "Problem" ), | 35 | QMessageBox::information( this, tr( "Problem" ), |
31 | tr( "<p>Please create an SMTP account first.</p>" ), | 36 | tr( "<p>Please create an SMTP account first.</p>" ), |
32 | tr( "Ok" ) ); | 37 | tr( "Ok" ) ); |
38 | return; | ||
33 | } | 39 | } |
34 | 40 | ||
35 | connect( fromBox, SIGNAL( activated( int ) ), SLOT( fillValues( int ) ) ); | 41 | connect( fromBox, SIGNAL( activated( int ) ), SLOT( fillValues( int ) ) ); |
36 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); | 42 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); |
37 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); | 43 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); |
38 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); | 44 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); |
@@ -150,12 +156,17 @@ void ComposeMail::removeAttachment() | |||
150 | attList->takeItem( attList->currentItem() ); | 156 | attList->takeItem( attList->currentItem() ); |
151 | } | 157 | } |
152 | } | 158 | } |
153 | 159 | ||
154 | void ComposeMail::accept() | 160 | void ComposeMail::accept() |
155 | { | 161 | { |
162 | if ( checkBoxLater->isChecked() ) { | ||
163 | qDebug( "Send later" ); | ||
164 | } | ||
165 | |||
166 | |||
156 | qDebug( "Sending Mail with " + | 167 | qDebug( "Sending Mail with " + |
157 | smtpAccounts.at( fromBox->currentItem() )->getAccountName() ); | 168 | smtpAccounts.at( fromBox->currentItem() )->getAccountName() ); |
158 | Mail *mail = new Mail(); | 169 | Mail *mail = new Mail(); |
159 | SMTPaccount *smtp = smtpAccounts.at( fromBox->currentItem() ); | 170 | SMTPaccount *smtp = smtpAccounts.at( fromBox->currentItem() ); |
160 | mail->setMail( smtp->getMail() ); | 171 | mail->setMail( smtp->getMail() ); |
161 | mail->setName( smtp->getName() ); | 172 | mail->setName( smtp->getName() ); |