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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp
index 449fdf1..154c1d5 100644
--- a/noncore/net/mail/composemail.cpp
+++ b/noncore/net/mail/composemail.cpp
@@ -159,97 +159,97 @@ void ComposeMail::slotAdjustColumns()
159 int currPage = tabWidget->currentPageIndex(); 159 int currPage = tabWidget->currentPageIndex();
160 160
161 tabWidget->showPage( attachTab ); 161 tabWidget->showPage( attachTab );
162 attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); 162 attList->setColumnWidth( 0, attList->visibleWidth() - 80 );
163 attList->setColumnWidth( 1, 80 ); 163 attList->setColumnWidth( 1, 80 );
164 164
165 tabWidget->setCurrentPage( currPage ); 165 tabWidget->setCurrentPage( currPage );
166} 166}
167 167
168void ComposeMail::addAttachment() 168void ComposeMail::addAttachment()
169{ 169{
170 DocLnk lnk = OFileDialog::getOpenFileName( 1, "/" ); 170 DocLnk lnk = OFileDialog::getOpenFileName( 1, "/" );
171 if ( !lnk.name().isEmpty() ) { 171 if ( !lnk.name().isEmpty() ) {
172 Attachment *att = new Attachment( lnk ); 172 Attachment *att = new Attachment( lnk );
173 (void) new AttachViewItem( attList, att ); 173 (void) new AttachViewItem( attList, att );
174 } 174 }
175} 175}
176 176
177void ComposeMail::removeAttachment() 177void ComposeMail::removeAttachment()
178{ 178{
179 if ( !attList->currentItem() ) { 179 if ( !attList->currentItem() ) {
180 QMessageBox::information( this, tr( "Error" ), 180 QMessageBox::information( this, tr( "Error" ),
181 tr( "<p>Please select a File.</p>" ), 181 tr( "<p>Please select a File.</p>" ),
182 tr( "Ok" ) ); 182 tr( "Ok" ) );
183 } else { 183 } else {
184 attList->takeItem( attList->currentItem() ); 184 attList->takeItem( attList->currentItem() );
185 } 185 }
186} 186}
187 187
188void ComposeMail::accept() 188void ComposeMail::accept()
189{ 189{
190 if ( checkBoxLater->isChecked() ) { 190 if ( checkBoxLater->isChecked() ) {
191 odebug << "Send later" << oendl; 191 odebug << "Send later" << oendl;
192 } 192 }
193 193
194#if 0 194#if 0
195 odebug << "Sending Mail with " 195 odebug << "Sending Mail with "
196 << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl; 196 << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl;
197#endif 197#endif
198 Opie::Core::OSmartPointer<Mail> mail=new Mail; 198 Opie::Core::OSmartPointer<Mail> mail=new Mail;
199 199
200 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); 200 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() );
201 mail->setMail(fromBox->currentText()); 201 mail->setMail(fromBox->currentText());
202 202
203 if ( !toLine->text().isEmpty() ) { 203 if ( !toLine->text().isEmpty() ) {
204 mail->setTo( toLine->text() ); 204 mail->setTo( toLine->text() );
205 } else { 205 } else {
206 QMessageBox::warning(0,tr("Sending mail"), 206 QMessageBox::warning(0,tr("Sending mail"),
207 tr("No Receiver spezified" ) ); 207 tr("No Receiver specified" ) );
208 return; 208 return;
209 } 209 }
210 mail->setName(senderNameEdit->text()); 210 mail->setName(senderNameEdit->text());
211 mail->setCC( ccLine->text() ); 211 mail->setCC( ccLine->text() );
212 mail->setBCC( bccLine->text() ); 212 mail->setBCC( bccLine->text() );
213 mail->setReply( replyLine->text() ); 213 mail->setReply( replyLine->text() );
214 mail->setSubject( subjectLine->text() ); 214 mail->setSubject( subjectLine->text() );
215 if (!m_replyid.isEmpty()) { 215 if (!m_replyid.isEmpty()) {
216 QStringList ids; 216 QStringList ids;
217 ids.append(m_replyid); 217 ids.append(m_replyid);
218 mail->setInreply(ids); 218 mail->setInreply(ids);
219 } 219 }
220 QString txt = message->text(); 220 QString txt = message->text();
221 if ( !sigMultiLine->text().isEmpty() ) { 221 if ( !sigMultiLine->text().isEmpty() ) {
222 txt.append( "\n--\n" ); 222 txt.append( "\n--\n" );
223 txt.append( sigMultiLine->text() ); 223 txt.append( sigMultiLine->text() );
224 } 224 }
225 mail->setMessage( txt ); 225 mail->setMessage( txt );
226 AttachViewItem *it = (AttachViewItem *) attList->firstChild(); 226 AttachViewItem *it = (AttachViewItem *) attList->firstChild();
227 while ( it != NULL ) { 227 while ( it != NULL ) {
228 mail->addAttachment( it->getAttachment() ); 228 mail->addAttachment( it->getAttachment() );
229 it = (AttachViewItem *) it->nextSibling(); 229 it = (AttachViewItem *) it->nextSibling();
230 } 230 }
231 231
232 SMTPwrapper wrapper( smtp ); 232 SMTPwrapper wrapper( smtp );
233 wrapper.sendMail( mail,checkBoxLater->isChecked() ); 233 wrapper.sendMail( mail,checkBoxLater->isChecked() );
234 234
235 QDialog::accept(); 235 QDialog::accept();
236} 236}
237 237
238void ComposeMail::reject() 238void ComposeMail::reject()
239{ 239{
240 int yesno = QMessageBox::warning(0,tr("Store message"), 240 int yesno = QMessageBox::warning(0,tr("Store message"),
241 tr("Store message into drafts?"), 241 tr("Store message into drafts?"),
242 tr("Yes"), 242 tr("Yes"),
243 tr("No"),QString::null,0,1); 243 tr("No"),QString::null,0,1);
244 244
245 if (yesno == 0) { 245 if (yesno == 0) {
246 Opie::Core::OSmartPointer<Mail> mail=new Mail(); 246 Opie::Core::OSmartPointer<Mail> mail=new Mail();
247 mail->setMail(fromBox->currentText()); 247 mail->setMail(fromBox->currentText());
248 mail->setTo( toLine->text() ); 248 mail->setTo( toLine->text() );
249 mail->setName(senderNameEdit->text()); 249 mail->setName(senderNameEdit->text());
250 mail->setCC( ccLine->text() ); 250 mail->setCC( ccLine->text() );
251 mail->setBCC( bccLine->text() ); 251 mail->setBCC( bccLine->text() );
252 mail->setReply( replyLine->text() ); 252 mail->setReply( replyLine->text() );
253 mail->setSubject( subjectLine->text() ); 253 mail->setSubject( subjectLine->text() );
254 if (!m_replyid.isEmpty()) { 254 if (!m_replyid.isEmpty()) {
255 QStringList ids; 255 QStringList ids;