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.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp
index b15e692..449fdf1 100644
--- a/noncore/net/mail/composemail.cpp
+++ b/noncore/net/mail/composemail.cpp
@@ -1,21 +1,25 @@
1#include <qt.h>
2 1
2#include "composemail.h"
3
4#include <libmailwrapper/smtpwrapper.h>
5#include <libmailwrapper/storemail.h>
6#include <libmailwrapper/abstractmail.h>
7#include <libmailwrapper/mailtypes.h>
8
9/* OPIE */
3#include <opie2/ofiledialog.h> 10#include <opie2/ofiledialog.h>
4#include <opie2/odebug.h> 11#include <opie2/odebug.h>
5#include <qpe/resource.h> 12#include <qpe/resource.h>
6#include <qpe/config.h> 13#include <qpe/config.h>
7#include <qpe/global.h> 14#include <qpe/global.h>
8#include <qpe/contact.h> 15#include <qpe/contact.h>
9 16
10#include "composemail.h" 17/* QT */
18#include <qt.h>
11 19
12#include <libmailwrapper/smtpwrapper.h>
13#include <libmailwrapper/storemail.h>
14#include <libmailwrapper/abstractmail.h>
15#include <libmailwrapper/mailtypes.h>
16 20
17using namespace Opie::Core; 21using namespace Opie::Core;
18using namespace Opie::Ui; 22using namespace Opie::Ui;
19ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 23ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags )
20 : ComposeMailUI( parent, name, modal, flags ) 24 : ComposeMailUI( parent, name, modal, flags )
21{ 25{
@@ -181,18 +185,18 @@ void ComposeMail::removeAttachment()
181 } 185 }
182} 186}
183 187
184void ComposeMail::accept() 188void ComposeMail::accept()
185{ 189{
186 if ( checkBoxLater->isChecked() ) { 190 if ( checkBoxLater->isChecked() ) {
187 odebug << "Send later" << oendl; 191 odebug << "Send later" << oendl;
188 } 192 }
189 193
190#if 0 194#if 0
191 qDebug( "Sending Mail with " + 195 odebug << "Sending Mail with "
192 smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() ); 196 << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl;
193#endif 197#endif
194 Opie::Core::OSmartPointer<Mail> mail=new Mail; 198 Opie::Core::OSmartPointer<Mail> mail=new Mail;
195 199
196 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); 200 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() );
197 mail->setMail(fromBox->currentText()); 201 mail->setMail(fromBox->currentText());
198 202
@@ -254,13 +258,13 @@ void ComposeMail::reject()
254 } 258 }
255 QString txt = message->text(); 259 QString txt = message->text();
256 if ( !sigMultiLine->text().isEmpty() ) { 260 if ( !sigMultiLine->text().isEmpty() ) {
257 txt.append( "\n--\n" ); 261 txt.append( "\n--\n" );
258 txt.append( sigMultiLine->text() ); 262 txt.append( sigMultiLine->text() );
259 } 263 }
260 odebug << txt << oendl; 264 odebug << txt << oendl;
261 mail->setMessage( txt ); 265 mail->setMessage( txt );
262 266
263 /* only use the default drafts folder name! */ 267 /* only use the default drafts folder name! */
264 Storemail wrapper(AbstractMail::draftFolder()); 268 Storemail wrapper(AbstractMail::draftFolder());
265 wrapper.storeMail(mail); 269 wrapper.storeMail(mail);
266 270
@@ -290,13 +294,13 @@ void ComposeMail::reEditMail(const RecMailP&current)
290} 294}
291 295
292AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) 296AttachViewItem::AttachViewItem( QListView *parent, Attachment *att )
293 : QListViewItem( parent ) 297 : QListViewItem( parent )
294{ 298{
295 attachment = att; 299 attachment = att;
296 odebug << att->getMimeType() << oendl; 300 odebug << att->getMimeType() << oendl;
297 setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? 301 setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ?
298 Resource::loadPixmap( "UnknownDocument-14" ) : 302 Resource::loadPixmap( "UnknownDocument-14" ) :
299 attachment->getDocLnk().pixmap() ); 303 attachment->getDocLnk().pixmap() );
300 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); 304 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() );
301 setText( 1, QString::number( att->getSize() ) ); 305 setText( 1, QString::number( att->getSize() ) );
302} 306}