summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/composemail.cpp11
-rw-r--r--noncore/net/mail/composemailui.ui21
-rw-r--r--noncore/net/mail/settingsdialog.cpp6
-rw-r--r--noncore/net/mail/settingsdialogui.ui50
4 files changed, 78 insertions, 10 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,203 +1,214 @@
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
9ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 10ComposeMail::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() ) {
20 if ( it->getType().compare( "SMTP" ) == 0 ) { 25 if ( it->getType().compare( "SMTP" ) == 0 ) {
21 SMTPaccount *smtp = static_cast<SMTPaccount *>(it); 26 SMTPaccount *smtp = static_cast<SMTPaccount *>(it);
22 fromBox->insertItem( smtp->getMail() ); 27 fromBox->insertItem( smtp->getMail() );
23 smtpAccounts.append( smtp ); 28 smtpAccounts.append( smtp );
24 } 29 }
25 } 30 }
26 31
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() ) );
39 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); 45 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) );
40 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); 46 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) );
41 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); 47 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) );
42} 48}
43 49
44void ComposeMail::pickAddress( QLineEdit *line ) 50void ComposeMail::pickAddress( QLineEdit *line )
45{ 51{
46 QString names = AddressPicker::getNames(); 52 QString names = AddressPicker::getNames();
47 if ( line->text().isEmpty() ) { 53 if ( line->text().isEmpty() ) {
48 line->setText( names ); 54 line->setText( names );
49 } else if ( !names.isEmpty() ) { 55 } else if ( !names.isEmpty() ) {
50 line->setText( line->text() + ", " + names ); 56 line->setText( line->text() + ", " + names );
51 } 57 }
52} 58}
53 59
54 60
55void ComposeMail::setTo( const QString & to ) 61void ComposeMail::setTo( const QString & to )
56{ 62{
57/* QString toline; 63/* QString toline;
58 QStringList toEntry = to; 64 QStringList toEntry = to;
59 for ( QStringList::Iterator it = toEntry.begin(); it != toEntry.end(); ++it ) { 65 for ( QStringList::Iterator it = toEntry.begin(); it != toEntry.end(); ++it ) {
60 toline += (*it); 66 toline += (*it);
61 } 67 }
62 toLine->setText( toline ); 68 toLine->setText( toline );
63*/ 69*/
64toLine->setText( to ); 70toLine->setText( to );
65} 71}
66 72
67void ComposeMail::setSubject( const QString & subject ) 73void ComposeMail::setSubject( const QString & subject )
68{ 74{
69 subjectLine->setText( subject ); 75 subjectLine->setText( subject );
70} 76}
71 77
72void ComposeMail::setInReplyTo( const QString & messageId ) 78void ComposeMail::setInReplyTo( const QString & messageId )
73{ 79{
74 80
75} 81}
76 82
77void ComposeMail::setMessage( const QString & text ) 83void ComposeMail::setMessage( const QString & text )
78{ 84{
79 message->setText( text ); 85 message->setText( text );
80} 86}
81 87
82 88
83void ComposeMail::pickAddressTo() 89void ComposeMail::pickAddressTo()
84{ 90{
85 pickAddress( toLine ); 91 pickAddress( toLine );
86} 92}
87 93
88void ComposeMail::pickAddressCC() 94void ComposeMail::pickAddressCC()
89{ 95{
90 pickAddress( ccLine ); 96 pickAddress( ccLine );
91} 97}
92 98
93void ComposeMail::pickAddressBCC() 99void ComposeMail::pickAddressBCC()
94{ 100{
95 pickAddress( bccLine ); 101 pickAddress( bccLine );
96} 102}
97 103
98void ComposeMail::pickAddressReply() 104void ComposeMail::pickAddressReply()
99{ 105{
100 pickAddress( replyLine ); 106 pickAddress( replyLine );
101} 107}
102 108
103void ComposeMail::fillValues( int current ) 109void ComposeMail::fillValues( int current )
104{ 110{
105 SMTPaccount *smtp = smtpAccounts.at( current ); 111 SMTPaccount *smtp = smtpAccounts.at( current );
106 112
107 ccLine->clear(); 113 ccLine->clear();
108 if ( smtp->getUseCC() ) { 114 if ( smtp->getUseCC() ) {
109 ccLine->setText( smtp->getCC() ); 115 ccLine->setText( smtp->getCC() );
110 } 116 }
111 bccLine->clear(); 117 bccLine->clear();
112 if ( smtp->getUseBCC() ) { 118 if ( smtp->getUseBCC() ) {
113 bccLine->setText( smtp->getBCC() ); 119 bccLine->setText( smtp->getBCC() );
114 } 120 }
115 replyLine->clear(); 121 replyLine->clear();
116 if ( smtp->getUseReply() ) { 122 if ( smtp->getUseReply() ) {
117 replyLine->setText( smtp->getReply() ); 123 replyLine->setText( smtp->getReply() );
118 } 124 }
119 125
120 sigMultiLine->setText( smtp->getSignature() ); 126 sigMultiLine->setText( smtp->getSignature() );
121} 127}
122 128
123void ComposeMail::slotAdjustColumns() 129void ComposeMail::slotAdjustColumns()
124{ 130{
125 int currPage = tabWidget->currentPageIndex(); 131 int currPage = tabWidget->currentPageIndex();
126 132
127 tabWidget->showPage( attachTab ); 133 tabWidget->showPage( attachTab );
128 attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); 134 attList->setColumnWidth( 0, attList->visibleWidth() - 80 );
129 attList->setColumnWidth( 1, 80 ); 135 attList->setColumnWidth( 1, 80 );
130 136
131 tabWidget->setCurrentPage( currPage ); 137 tabWidget->setCurrentPage( currPage );
132} 138}
133 139
134void ComposeMail::addAttachment() 140void ComposeMail::addAttachment()
135{ 141{
136 DocLnk lnk = OFileDialog::getOpenFileName( 1, "/" ); 142 DocLnk lnk = OFileDialog::getOpenFileName( 1, "/" );
137 if ( !lnk.name().isEmpty() ) { 143 if ( !lnk.name().isEmpty() ) {
138 Attachment *att = new Attachment( lnk ); 144 Attachment *att = new Attachment( lnk );
139 (void) new AttachViewItem( attList, att ); 145 (void) new AttachViewItem( attList, att );
140 } 146 }
141} 147}
142 148
143void ComposeMail::removeAttachment() 149void ComposeMail::removeAttachment()
144{ 150{
145 if ( !attList->currentItem() ) { 151 if ( !attList->currentItem() ) {
146 QMessageBox::information( this, tr( "Error" ), 152 QMessageBox::information( this, tr( "Error" ),
147 tr( "<p>Please select a File.</p>" ), 153 tr( "<p>Please select a File.</p>" ),
148 tr( "Ok" ) ); 154 tr( "Ok" ) );
149 } else { 155 } else {
150 attList->takeItem( attList->currentItem() ); 156 attList->takeItem( attList->currentItem() );
151 } 157 }
152} 158}
153 159
154void ComposeMail::accept() 160void 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() );
162 173
163 if ( !toLine->text().isEmpty() ) { 174 if ( !toLine->text().isEmpty() ) {
164 mail->setTo( toLine->text() ); 175 mail->setTo( toLine->text() );
165 } else { 176 } else {
166 qDebug( "No Reciever spezified -> returning" ); 177 qDebug( "No Reciever spezified -> returning" );
167 return; 178 return;
168 } 179 }
169 180
170 mail->setCC( ccLine->text() ); 181 mail->setCC( ccLine->text() );
171 mail->setBCC( bccLine->text() ); 182 mail->setBCC( bccLine->text() );
172 mail->setReply( replyLine->text() ); 183 mail->setReply( replyLine->text() );
173 mail->setSubject( subjectLine->text() ); 184 mail->setSubject( subjectLine->text() );
174 QString txt = message->text(); 185 QString txt = message->text();
175 if ( !sigMultiLine->text().isEmpty() ) { 186 if ( !sigMultiLine->text().isEmpty() ) {
176 txt.append( "\n--\n" ); 187 txt.append( "\n--\n" );
177 txt.append( sigMultiLine->text() ); 188 txt.append( sigMultiLine->text() );
178 } 189 }
179 mail->setMessage( txt ); 190 mail->setMessage( txt );
180 AttachViewItem *it = (AttachViewItem *) attList->firstChild(); 191 AttachViewItem *it = (AttachViewItem *) attList->firstChild();
181 while ( it != NULL ) { 192 while ( it != NULL ) {
182 mail->addAttachment( it->getAttachment() ); 193 mail->addAttachment( it->getAttachment() );
183 it = (AttachViewItem *) it->itemBelow(); 194 it = (AttachViewItem *) it->itemBelow();
184 } 195 }
185 196
186 SMTPwrapper wrapper( settings ); 197 SMTPwrapper wrapper( settings );
187 wrapper.sendMail( *mail ); 198 wrapper.sendMail( *mail );
188 199
189 QDialog::accept(); 200 QDialog::accept();
190} 201}
191 202
192AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) 203AttachViewItem::AttachViewItem( QListView *parent, Attachment *att )
193 : QListViewItem( parent ) 204 : QListViewItem( parent )
194{ 205{
195 attachment = att; 206 attachment = att;
196 qDebug( att->getMimeType() ); 207 qDebug( att->getMimeType() );
197 setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? 208 setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ?
198 Resource::loadPixmap( "UnknownDocument-14" ) : 209 Resource::loadPixmap( "UnknownDocument-14" ) :
199 attachment->getDocLnk().pixmap() ); 210 attachment->getDocLnk().pixmap() );
200 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); 211 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() );
201 setText( 1, QString::number( att->getSize() ) ); 212 setText( 1, QString::number( att->getSize() ) );
202} 213}
203 214
diff --git a/noncore/net/mail/composemailui.ui b/noncore/net/mail/composemailui.ui
index 9f5feb9..4d225e4 100644
--- a/noncore/net/mail/composemailui.ui
+++ b/noncore/net/mail/composemailui.ui
@@ -1,328 +1,339 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>ComposeMailUI</class> 2<class>ComposeMailUI</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>ComposeMailUI</cstring> 7 <cstring>ComposeMailUI</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>264</width> 14 <width>260</width>
15 <height>360</height> 15 <height>360</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Compose Message</string> 20 <string>Compose Message</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <vbox> 28 <vbox>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>0</number> 31 <number>3</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>0</number> 35 <number>3</number>
36 </property> 36 </property>
37 <widget> 37 <widget>
38 <class>QCheckBox</class>
39 <property stdset="1">
40 <name>name</name>
41 <cstring>checkBoxLater</cstring>
42 </property>
43 <property stdset="1">
44 <name>text</name>
45 <string>send later</string>
46 </property>
47 </widget>
48 <widget>
38 <class>QTabWidget</class> 49 <class>QTabWidget</class>
39 <property stdset="1"> 50 <property stdset="1">
40 <name>name</name> 51 <name>name</name>
41 <cstring>tabWidget</cstring> 52 <cstring>tabWidget</cstring>
42 </property> 53 </property>
43 <property> 54 <property>
44 <name>layoutMargin</name> 55 <name>layoutMargin</name>
45 </property> 56 </property>
46 <property> 57 <property>
47 <name>layoutSpacing</name> 58 <name>layoutSpacing</name>
48 </property> 59 </property>
49 <widget> 60 <widget>
50 <class>QWidget</class> 61 <class>QWidget</class>
51 <property stdset="1"> 62 <property stdset="1">
52 <name>name</name> 63 <name>name</name>
53 <cstring>mailTab</cstring> 64 <cstring>mailTab</cstring>
54 </property> 65 </property>
55 <attribute> 66 <attribute>
56 <name>title</name> 67 <name>title</name>
57 <string>Mail</string> 68 <string>Mail</string>
58 </attribute> 69 </attribute>
59 <grid> 70 <grid>
60 <property stdset="1"> 71 <property stdset="1">
61 <name>margin</name> 72 <name>margin</name>
62 <number>4</number> 73 <number>-1</number>
63 </property> 74 </property>
64 <property stdset="1"> 75 <property stdset="1">
65 <name>spacing</name> 76 <name>spacing</name>
66 <number>3</number> 77 <number>-1</number>
67 </property> 78 </property>
68 <widget row="2" column="1" > 79 <widget row="2" column="1" >
69 <class>QLineEdit</class> 80 <class>QLineEdit</class>
70 <property stdset="1"> 81 <property stdset="1">
71 <name>name</name> 82 <name>name</name>
72 <cstring>subjectLine</cstring> 83 <cstring>subjectLine</cstring>
73 </property> 84 </property>
74 </widget> 85 </widget>
75 <widget row="3" column="0" rowspan="1" colspan="2" > 86 <widget row="3" column="0" rowspan="1" colspan="2" >
76 <class>QMultiLineEdit</class> 87 <class>QMultiLineEdit</class>
77 <property stdset="1"> 88 <property stdset="1">
78 <name>name</name> 89 <name>name</name>
79 <cstring>message</cstring> 90 <cstring>message</cstring>
80 </property> 91 </property>
81 </widget> 92 </widget>
82 <widget row="2" column="0" > 93 <widget row="2" column="0" >
83 <class>QLabel</class> 94 <class>QLabel</class>
84 <property stdset="1"> 95 <property stdset="1">
85 <name>name</name> 96 <name>name</name>
86 <cstring>subjectLabel</cstring> 97 <cstring>subjectLabel</cstring>
87 </property> 98 </property>
88 <property stdset="1"> 99 <property stdset="1">
89 <name>text</name> 100 <name>text</name>
90 <string>Subject</string> 101 <string>Subject</string>
91 </property> 102 </property>
92 </widget> 103 </widget>
93 <widget row="0" column="0" > 104 <widget row="0" column="0" >
94 <class>QLabel</class> 105 <class>QLabel</class>
95 <property stdset="1"> 106 <property stdset="1">
96 <name>name</name> 107 <name>name</name>
97 <cstring>fromLabel</cstring> 108 <cstring>fromLabel</cstring>
98 </property> 109 </property>
99 <property stdset="1"> 110 <property stdset="1">
100 <name>text</name> 111 <name>text</name>
101 <string>From</string> 112 <string>From</string>
102 </property> 113 </property>
103 </widget> 114 </widget>
104 <widget row="1" column="1" > 115 <widget row="1" column="1" >
105 <class>QLineEdit</class> 116 <class>QLineEdit</class>
106 <property stdset="1"> 117 <property stdset="1">
107 <name>name</name> 118 <name>name</name>
108 <cstring>toLine</cstring> 119 <cstring>toLine</cstring>
109 </property> 120 </property>
110 </widget> 121 </widget>
111 <widget row="0" column="1" > 122 <widget row="0" column="1" >
112 <class>QComboBox</class> 123 <class>QComboBox</class>
113 <property stdset="1"> 124 <property stdset="1">
114 <name>name</name> 125 <name>name</name>
115 <cstring>fromBox</cstring> 126 <cstring>fromBox</cstring>
116 </property> 127 </property>
117 </widget> 128 </widget>
118 <widget row="1" column="0" > 129 <widget row="1" column="0" >
119 <class>QPushButton</class> 130 <class>QPushButton</class>
120 <property stdset="1"> 131 <property stdset="1">
121 <name>name</name> 132 <name>name</name>
122 <cstring>toButton</cstring> 133 <cstring>toButton</cstring>
123 </property> 134 </property>
124 <property stdset="1"> 135 <property stdset="1">
125 <name>text</name> 136 <name>text</name>
126 <string>To</string> 137 <string>To</string>
127 </property> 138 </property>
128 </widget> 139 </widget>
129 </grid> 140 </grid>
130 </widget> 141 </widget>
131 <widget> 142 <widget>
132 <class>QWidget</class> 143 <class>QWidget</class>
133 <property stdset="1"> 144 <property stdset="1">
134 <name>name</name> 145 <name>name</name>
135 <cstring>optionsTab</cstring> 146 <cstring>optionsTab</cstring>
136 </property> 147 </property>
137 <attribute> 148 <attribute>
138 <name>title</name> 149 <name>title</name>
139 <string>Options</string> 150 <string>Options</string>
140 </attribute> 151 </attribute>
141 <grid> 152 <grid>
142 <property stdset="1"> 153 <property stdset="1">
143 <name>margin</name> 154 <name>margin</name>
144 <number>4</number> 155 <number>4</number>
145 </property> 156 </property>
146 <property stdset="1"> 157 <property stdset="1">
147 <name>spacing</name> 158 <name>spacing</name>
148 <number>3</number> 159 <number>3</number>
149 </property> 160 </property>
150 <widget row="3" column="0" > 161 <widget row="3" column="0" >
151 <class>QPushButton</class> 162 <class>QPushButton</class>
152 <property stdset="1"> 163 <property stdset="1">
153 <name>name</name> 164 <name>name</name>
154 <cstring>replyButton</cstring> 165 <cstring>replyButton</cstring>
155 </property> 166 </property>
156 <property stdset="1"> 167 <property stdset="1">
157 <name>text</name> 168 <name>text</name>
158 <string>Reply-To</string> 169 <string>Reply-To</string>
159 </property> 170 </property>
160 </widget> 171 </widget>
161 <widget row="2" column="0" > 172 <widget row="2" column="0" >
162 <class>QPushButton</class> 173 <class>QPushButton</class>
163 <property stdset="1"> 174 <property stdset="1">
164 <name>name</name> 175 <name>name</name>
165 <cstring>bccButton</cstring> 176 <cstring>bccButton</cstring>
166 </property> 177 </property>
167 <property stdset="1"> 178 <property stdset="1">
168 <name>text</name> 179 <name>text</name>
169 <string>BCC</string> 180 <string>BCC</string>
170 </property> 181 </property>
171 </widget> 182 </widget>
172 <widget row="1" column="1" > 183 <widget row="1" column="1" >
173 <class>QLineEdit</class> 184 <class>QLineEdit</class>
174 <property stdset="1"> 185 <property stdset="1">
175 <name>name</name> 186 <name>name</name>
176 <cstring>ccLine</cstring> 187 <cstring>ccLine</cstring>
177 </property> 188 </property>
178 </widget> 189 </widget>
179 <widget row="2" column="1" > 190 <widget row="2" column="1" >
180 <class>QLineEdit</class> 191 <class>QLineEdit</class>
181 <property stdset="1"> 192 <property stdset="1">
182 <name>name</name> 193 <name>name</name>
183 <cstring>bccLine</cstring> 194 <cstring>bccLine</cstring>
184 </property> 195 </property>
185 </widget> 196 </widget>
186 <widget row="3" column="1" > 197 <widget row="3" column="1" >
187 <class>QLineEdit</class> 198 <class>QLineEdit</class>
188 <property stdset="1"> 199 <property stdset="1">
189 <name>name</name> 200 <name>name</name>
190 <cstring>replyLine</cstring> 201 <cstring>replyLine</cstring>
191 </property> 202 </property>
192 </widget> 203 </widget>
193 <widget row="6" column="0" rowspan="1" colspan="2" > 204 <widget row="6" column="0" rowspan="1" colspan="2" >
194 <class>QMultiLineEdit</class> 205 <class>QMultiLineEdit</class>
195 <property stdset="1"> 206 <property stdset="1">
196 <name>name</name> 207 <name>name</name>
197 <cstring>sigMultiLine</cstring> 208 <cstring>sigMultiLine</cstring>
198 </property> 209 </property>
199 </widget> 210 </widget>
200 <widget row="5" column="0" > 211 <widget row="5" column="0" >
201 <class>QLabel</class> 212 <class>QLabel</class>
202 <property stdset="1"> 213 <property stdset="1">
203 <name>name</name> 214 <name>name</name>
204 <cstring>sigLabel</cstring> 215 <cstring>sigLabel</cstring>
205 </property> 216 </property>
206 <property stdset="1"> 217 <property stdset="1">
207 <name>text</name> 218 <name>text</name>
208 <string>Signature</string> 219 <string>Signature</string>
209 </property> 220 </property>
210 </widget> 221 </widget>
211 <spacer row="4" column="0" > 222 <spacer row="4" column="0" >
212 <property> 223 <property>
213 <name>name</name> 224 <name>name</name>
214 <cstring>Spacer3</cstring> 225 <cstring>Spacer3</cstring>
215 </property> 226 </property>
216 <property stdset="1"> 227 <property stdset="1">
217 <name>orientation</name> 228 <name>orientation</name>
218 <enum>Vertical</enum> 229 <enum>Vertical</enum>
219 </property> 230 </property>
220 <property stdset="1"> 231 <property stdset="1">
221 <name>sizeType</name> 232 <name>sizeType</name>
222 <enum>Expanding</enum> 233 <enum>Expanding</enum>
223 </property> 234 </property>
224 <property> 235 <property>
225 <name>sizeHint</name> 236 <name>sizeHint</name>
226 <size> 237 <size>
227 <width>20</width> 238 <width>20</width>
228 <height>20</height> 239 <height>20</height>
229 </size> 240 </size>
230 </property> 241 </property>
231 </spacer> 242 </spacer>
232 <widget row="1" column="0" > 243 <widget row="1" column="0" >
233 <class>QPushButton</class> 244 <class>QPushButton</class>
234 <property stdset="1"> 245 <property stdset="1">
235 <name>name</name> 246 <name>name</name>
236 <cstring>ccButton</cstring> 247 <cstring>ccButton</cstring>
237 </property> 248 </property>
238 <property stdset="1"> 249 <property stdset="1">
239 <name>text</name> 250 <name>text</name>
240 <string>CC</string> 251 <string>CC</string>
241 </property> 252 </property>
242 </widget> 253 </widget>
243 </grid> 254 </grid>
244 </widget> 255 </widget>
245 <widget> 256 <widget>
246 <class>QWidget</class> 257 <class>QWidget</class>
247 <property stdset="1"> 258 <property stdset="1">
248 <name>name</name> 259 <name>name</name>
249 <cstring>attachTab</cstring> 260 <cstring>attachTab</cstring>
250 </property> 261 </property>
251 <attribute> 262 <attribute>
252 <name>title</name> 263 <name>title</name>
253 <string>Attachment</string> 264 <string>Attachment</string>
254 </attribute> 265 </attribute>
255 <grid> 266 <grid>
256 <property stdset="1"> 267 <property stdset="1">
257 <name>margin</name> 268 <name>margin</name>
258 <number>4</number> 269 <number>4</number>
259 </property> 270 </property>
260 <property stdset="1"> 271 <property stdset="1">
261 <name>spacing</name> 272 <name>spacing</name>
262 <number>3</number> 273 <number>3</number>
263 </property> 274 </property>
264 <widget row="0" column="0" rowspan="1" colspan="3" > 275 <widget row="0" column="0" rowspan="1" colspan="3" >
265 <class>QListView</class> 276 <class>QListView</class>
266 <property stdset="1"> 277 <property stdset="1">
267 <name>name</name> 278 <name>name</name>
268 <cstring>attList</cstring> 279 <cstring>attList</cstring>
269 </property> 280 </property>
270 <property stdset="1"> 281 <property stdset="1">
271 <name>selectionMode</name> 282 <name>selectionMode</name>
272 <enum>Single</enum> 283 <enum>Single</enum>
273 </property> 284 </property>
274 <property stdset="1"> 285 <property stdset="1">
275 <name>allColumnsShowFocus</name> 286 <name>allColumnsShowFocus</name>
276 <bool>true</bool> 287 <bool>true</bool>
277 </property> 288 </property>
278 <property stdset="1"> 289 <property stdset="1">
279 <name>showSortIndicator</name> 290 <name>showSortIndicator</name>
280 <bool>true</bool> 291 <bool>true</bool>
281 </property> 292 </property>
282 </widget> 293 </widget>
283 <widget row="1" column="2" > 294 <widget row="1" column="2" >
284 <class>QPushButton</class> 295 <class>QPushButton</class>
285 <property stdset="1"> 296 <property stdset="1">
286 <name>name</name> 297 <name>name</name>
287 <cstring>deleteButton</cstring> 298 <cstring>deleteButton</cstring>
288 </property> 299 </property>
289 <property stdset="1"> 300 <property stdset="1">
290 <name>text</name> 301 <name>text</name>
291 <string>Delete File</string> 302 <string>Delete File</string>
292 </property> 303 </property>
293 </widget> 304 </widget>
294 <widget row="1" column="0" > 305 <widget row="1" column="0" >
295 <class>QPushButton</class> 306 <class>QPushButton</class>
296 <property stdset="1"> 307 <property stdset="1">
297 <name>name</name> 308 <name>name</name>
298 <cstring>addButton</cstring> 309 <cstring>addButton</cstring>
299 </property> 310 </property>
300 <property stdset="1"> 311 <property stdset="1">
301 <name>text</name> 312 <name>text</name>
302 <string>Add File</string> 313 <string>Add File</string>
303 </property> 314 </property>
304 </widget> 315 </widget>
305 </grid> 316 </grid>
306 </widget> 317 </widget>
307 </widget> 318 </widget>
308 </vbox> 319 </vbox>
309</widget> 320</widget>
310<tabstops> 321<tabstops>
311 <tabstop>fromBox</tabstop> 322 <tabstop>fromBox</tabstop>
312 <tabstop>toButton</tabstop> 323 <tabstop>toButton</tabstop>
313 <tabstop>toLine</tabstop> 324 <tabstop>toLine</tabstop>
314 <tabstop>subjectLine</tabstop> 325 <tabstop>subjectLine</tabstop>
315 <tabstop>message</tabstop> 326 <tabstop>message</tabstop>
316 <tabstop>tabWidget</tabstop> 327 <tabstop>tabWidget</tabstop>
317 <tabstop>ccButton</tabstop> 328 <tabstop>ccButton</tabstop>
318 <tabstop>ccLine</tabstop> 329 <tabstop>ccLine</tabstop>
319 <tabstop>bccButton</tabstop> 330 <tabstop>bccButton</tabstop>
320 <tabstop>bccLine</tabstop> 331 <tabstop>bccLine</tabstop>
321 <tabstop>replyButton</tabstop> 332 <tabstop>replyButton</tabstop>
322 <tabstop>replyLine</tabstop> 333 <tabstop>replyLine</tabstop>
323 <tabstop>sigMultiLine</tabstop> 334 <tabstop>sigMultiLine</tabstop>
324 <tabstop>attList</tabstop> 335 <tabstop>attList</tabstop>
325 <tabstop>addButton</tabstop> 336 <tabstop>addButton</tabstop>
326 <tabstop>deleteButton</tabstop> 337 <tabstop>deleteButton</tabstop>
327</tabstops> 338</tabstops>
328</UI> 339</UI>
diff --git a/noncore/net/mail/settingsdialog.cpp b/noncore/net/mail/settingsdialog.cpp
index 9741e94..f9de405 100644
--- a/noncore/net/mail/settingsdialog.cpp
+++ b/noncore/net/mail/settingsdialog.cpp
@@ -1,34 +1,38 @@
1#include <qradiobutton.h> 1#include <qcheckbox.h>
2 2
3#include <qpe/config.h> 3#include <qpe/config.h>
4 4
5#include "settingsdialog.h" 5#include "settingsdialog.h"
6 6
7 7
8SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 8SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
9 : SettingsDialogUI( parent, name, modal, fl ) { 9 : SettingsDialogUI( parent, name, modal, fl ) {
10 10
11 readConfig(); 11 readConfig();
12} 12}
13 13
14SettingsDialog::~SettingsDialog() { 14SettingsDialog::~SettingsDialog() {
15 15
16} 16}
17 17
18void SettingsDialog::readConfig() { 18void SettingsDialog::readConfig() {
19 Config cfg("mail"); 19 Config cfg("mail");
20 cfg.setGroup( "Settings" ); 20 cfg.setGroup( "Settings" );
21 showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) ); 21 showHtmlButton->setChecked( cfg.readBoolEntry( "showHtml", false ) );
22 cfg.setGroup( "Compose" );
23 checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) );
22} 24}
23 25
24void SettingsDialog::writeConfig() { 26void SettingsDialog::writeConfig() {
25 Config cfg( "mail" ); 27 Config cfg( "mail" );
26 cfg.setGroup( "Settings" ); 28 cfg.setGroup( "Settings" );
27 cfg.writeEntry( "showHtml", showHtmlButton->isChecked() ); 29 cfg.writeEntry( "showHtml", showHtmlButton->isChecked() );
30 cfg.setGroup( "Compose" );
31 cfg.writeEntry( "sendLater", checkBoxLater->isChecked() );;
28 32
29} 33}
30 34
31void SettingsDialog::accept() { 35void SettingsDialog::accept() {
32 writeConfig(); 36 writeConfig();
33 QDialog::accept(); 37 QDialog::accept();
34} 38}
diff --git a/noncore/net/mail/settingsdialogui.ui b/noncore/net/mail/settingsdialogui.ui
index 3b03aeb..c5589dc 100644
--- a/noncore/net/mail/settingsdialogui.ui
+++ b/noncore/net/mail/settingsdialogui.ui
@@ -1,116 +1,158 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>SettingsDialogUI</class> 2<class>SettingsDialogUI</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>SettingsDialogUI</cstring> 7 <cstring>SettingsDialogUI</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>328</width> 14 <width>324</width>
15 <height>379</height> 15 <height>379</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Settings Dialog</string> 20 <string>Settings Dialog</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <vbox> 28 <vbox>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>3</number> 31 <number>3</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>3</number> 35 <number>3</number>
36 </property> 36 </property>
37 <widget> 37 <widget>
38 <class>QTabWidget</class> 38 <class>QTabWidget</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>TabWidget2</cstring> 41 <cstring>TabWidget2</cstring>
42 </property> 42 </property>
43 <property> 43 <property>
44 <name>layoutMargin</name> 44 <name>layoutMargin</name>
45 </property> 45 </property>
46 <property> 46 <property>
47 <name>layoutSpacing</name> 47 <name>layoutSpacing</name>
48 </property> 48 </property>
49 <widget> 49 <widget>
50 <class>QWidget</class> 50 <class>QWidget</class>
51 <property stdset="1"> 51 <property stdset="1">
52 <name>name</name> 52 <name>name</name>
53 <cstring>tab</cstring> 53 <cstring>tab</cstring>
54 </property> 54 </property>
55 <attribute> 55 <attribute>
56 <name>title</name> 56 <name>title</name>
57 <string>View Mail</string> 57 <string>View Mail</string>
58 </attribute> 58 </attribute>
59 <vbox> 59 <vbox>
60 <property stdset="1"> 60 <property stdset="1">
61 <name>margin</name> 61 <name>margin</name>
62 <number>3</number> 62 <number>3</number>
63 </property> 63 </property>
64 <property stdset="1"> 64 <property stdset="1">
65 <name>spacing</name> 65 <name>spacing</name>
66 <number>3</number> 66 <number>3</number>
67 </property> 67 </property>
68 <widget> 68 <widget>
69 <class>QRadioButton</class> 69 <class>QCheckBox</class>
70 <property stdset="1"> 70 <property stdset="1">
71 <name>name</name> 71 <name>name</name>
72 <cstring>showHtmlButton</cstring> 72 <cstring>showHtmlButton</cstring>
73 </property> 73 </property>
74 <property stdset="1"> 74 <property stdset="1">
75 <name>text</name> 75 <name>text</name>
76 <string>View mail as Html </string> 76 <string>View mail as Html</string>
77 </property> 77 </property>
78 </widget> 78 </widget>
79 <spacer> 79 <spacer>
80 <property> 80 <property>
81 <name>name</name> 81 <name>name</name>
82 <cstring>Spacer1</cstring> 82 <cstring>Spacer1</cstring>
83 </property> 83 </property>
84 <property stdset="1"> 84 <property stdset="1">
85 <name>orientation</name> 85 <name>orientation</name>
86 <enum>Vertical</enum> 86 <enum>Vertical</enum>
87 </property> 87 </property>
88 <property stdset="1"> 88 <property stdset="1">
89 <name>sizeType</name> 89 <name>sizeType</name>
90 <enum>Expanding</enum> 90 <enum>Expanding</enum>
91 </property> 91 </property>
92 <property> 92 <property>
93 <name>sizeHint</name> 93 <name>sizeHint</name>
94 <size> 94 <size>
95 <width>20</width> 95 <width>20</width>
96 <height>20</height> 96 <height>20</height>
97 </size> 97 </size>
98 </property> 98 </property>
99 </spacer> 99 </spacer>
100 </vbox> 100 </vbox>
101 </widget> 101 </widget>
102 <widget> 102 <widget>
103 <class>QWidget</class> 103 <class>QWidget</class>
104 <property stdset="1"> 104 <property stdset="1">
105 <name>name</name> 105 <name>name</name>
106 <cstring>tab</cstring> 106 <cstring>tab</cstring>
107 </property> 107 </property>
108 <attribute> 108 <attribute>
109 <name>title</name> 109 <name>title</name>
110 <string>Tab 2</string> 110 <string>Compose Mail</string>
111 </attribute> 111 </attribute>
112 <vbox>
113 <property stdset="1">
114 <name>margin</name>
115 <number>3</number>
116 </property>
117 <property stdset="1">
118 <name>spacing</name>
119 <number>3</number>
120 </property>
121 <widget>
122 <class>QCheckBox</class>
123 <property stdset="1">
124 <name>name</name>
125 <cstring>checkBoxLater</cstring>
126 </property>
127 <property stdset="1">
128 <name>text</name>
129 <string>Send mails later ( enqueue in outbox )</string>
130 </property>
131 </widget>
132 <spacer>
133 <property>
134 <name>name</name>
135 <cstring>Spacer2</cstring>
136 </property>
137 <property stdset="1">
138 <name>orientation</name>
139 <enum>Vertical</enum>
140 </property>
141 <property stdset="1">
142 <name>sizeType</name>
143 <enum>Expanding</enum>
144 </property>
145 <property>
146 <name>sizeHint</name>
147 <size>
148 <width>20</width>
149 <height>20</height>
150 </size>
151 </property>
152 </spacer>
153 </vbox>
112 </widget> 154 </widget>
113 </widget> 155 </widget>
114 </vbox> 156 </vbox>
115</widget> 157</widget>
116</UI> 158</UI>