-rw-r--r-- | noncore/net/mail/accountitem.cpp | 1 | ||||
-rw-r--r-- | noncore/net/mail/addresspicker.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/sendmailprogress.cpp | 1 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/statusmail.cpp | 1 | ||||
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/newmaildir.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.cpp | 4 | ||||
-rw-r--r-- | noncore/net/mail/selectsmtp.cpp | 7 | ||||
-rw-r--r-- | noncore/net/mail/viewmail.cpp | 3 | ||||
-rw-r--r-- | noncore/net/mail/viewmailbase.cpp | 1 |
12 files changed, 0 insertions, 28 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp index 32a96ff..e925d8d 100644 --- a/noncore/net/mail/accountitem.cpp +++ b/noncore/net/mail/accountitem.cpp | |||
@@ -1,36 +1,35 @@ | |||
1 | 1 | ||
2 | #include "accountitem.h" | 2 | #include "accountitem.h" |
3 | #include "accountview.h" | 3 | #include "accountview.h" |
4 | #include "selectstore.h" | ||
5 | #include "newmaildir.h" | 4 | #include "newmaildir.h" |
6 | #include "defines.h" | 5 | #include "defines.h" |
7 | 6 | ||
8 | /* OPIE */ | 7 | /* OPIE */ |
9 | #include <libmailwrapper/mailtypes.h> | 8 | #include <libmailwrapper/mailtypes.h> |
10 | #include <libmailwrapper/abstractmail.h> | 9 | #include <libmailwrapper/abstractmail.h> |
11 | #include <libmailwrapper/mailwrapper.h> | 10 | #include <libmailwrapper/mailwrapper.h> |
12 | #include <qpe/qpeapplication.h> | 11 | #include <qpe/qpeapplication.h> |
13 | 12 | ||
14 | /* QT */ | 13 | /* QT */ |
15 | #include <qpopupmenu.h> | 14 | #include <qpopupmenu.h> |
16 | #include <qmessagebox.h> | 15 | #include <qmessagebox.h> |
17 | 16 | ||
18 | #define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} | 17 | #define SETPIX(x) if (!account->getOffline()) {setPixmap( 0,x);} else {setPixmap( 0, PIXMAP_OFFLINE );} |
19 | /** | 18 | /** |
20 | * POP3 Account stuff | 19 | * POP3 Account stuff |
21 | */ | 20 | */ |
22 | POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent ) | 21 | POP3viewItem::POP3viewItem( POP3account *a, AccountView *parent ) |
23 | : AccountViewItem( parent ) | 22 | : AccountViewItem( parent ) |
24 | { | 23 | { |
25 | account = a; | 24 | account = a; |
26 | wrapper = AbstractMail::getWrapper( account ); | 25 | wrapper = AbstractMail::getWrapper( account ); |
27 | SETPIX(PIXMAP_POP3FOLDER); | 26 | SETPIX(PIXMAP_POP3FOLDER); |
28 | #if 0 | 27 | #if 0 |
29 | if (!account->getOffline()) | 28 | if (!account->getOffline()) |
30 | { | 29 | { |
31 | setPixmap( 0, ); | 30 | setPixmap( 0, ); |
32 | } | 31 | } |
33 | else | 32 | else |
34 | { | 33 | { |
35 | setPixmap( 0, PIXMAP_OFFLINE ); | 34 | setPixmap( 0, PIXMAP_OFFLINE ); |
36 | } | 35 | } |
diff --git a/noncore/net/mail/addresspicker.cpp b/noncore/net/mail/addresspicker.cpp index 35f9cd4..50c82e5 100644 --- a/noncore/net/mail/addresspicker.cpp +++ b/noncore/net/mail/addresspicker.cpp | |||
@@ -1,47 +1,45 @@ | |||
1 | 1 | ||
2 | #include "composemail.h" | 2 | #include "composemail.h" |
3 | 3 | ||
4 | /* OPIE */ | 4 | /* OPIE */ |
5 | #include <opie2/ocontactaccess.h> | 5 | #include <opie2/ocontactaccess.h> |
6 | #include <opie2/opimcontact.h> | 6 | #include <opie2/opimcontact.h> |
7 | #include <qpe/resource.h> | 7 | #include <qpe/resource.h> |
8 | #include <qpe/qpeapplication.h> | 8 | #include <qpe/qpeapplication.h> |
9 | 9 | ||
10 | /* QT */ | 10 | /* QT */ |
11 | #include <qpushbutton.h> | 11 | #include <qpushbutton.h> |
12 | #include <qmessagebox.h> | 12 | #include <qmessagebox.h> |
13 | #include <qtextstream.h> | ||
14 | #include <qlistbox.h> | 13 | #include <qlistbox.h> |
15 | #include <qfile.h> | ||
16 | 14 | ||
17 | /* STD */ | 15 | /* STD */ |
18 | #include <stdlib.h> | 16 | #include <stdlib.h> |
19 | 17 | ||
20 | AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFlags flags ) | 18 | AddressPicker::AddressPicker( QWidget *parent, const char *name, bool modal, WFlags flags ) |
21 | : AddressPickerUI( parent, name, modal, flags ) | 19 | : AddressPickerUI( parent, name, modal, flags ) |
22 | { | 20 | { |
23 | okButton->setIconSet( Resource::loadPixmap( "enter" ) ); | 21 | okButton->setIconSet( Resource::loadPixmap( "enter" ) ); |
24 | cancelButton->setIconSet( Resource::loadPixmap( "editdelete" ) ); | 22 | cancelButton->setIconSet( Resource::loadPixmap( "editdelete" ) ); |
25 | 23 | ||
26 | connect(okButton, SIGNAL(clicked()), SLOT(accept())); | 24 | connect(okButton, SIGNAL(clicked()), SLOT(accept())); |
27 | connect(cancelButton, SIGNAL(clicked()), SLOT(close())); | 25 | connect(cancelButton, SIGNAL(clicked()), SLOT(close())); |
28 | Opie::OPimContactAccess::List::Iterator it; | 26 | Opie::OPimContactAccess::List::Iterator it; |
29 | 27 | ||
30 | QString lineEmail, lineName, contactLine; | 28 | QString lineEmail, lineName, contactLine; |
31 | /* what name has to set here???? */ | 29 | /* what name has to set here???? */ |
32 | Opie::OPimContactAccess m_contactdb("opiemail"); | 30 | Opie::OPimContactAccess m_contactdb("opiemail"); |
33 | 31 | ||
34 | QStringList mails; | 32 | QStringList mails; |
35 | QString pre,suf; | 33 | QString pre,suf; |
36 | Opie::OPimContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 ); | 34 | Opie::OPimContactAccess::List m_list = m_contactdb.sorted( true, 0, 0, 0 ); |
37 | for ( it = m_list.begin(); it != m_list.end(); ++it ) | 35 | for ( it = m_list.begin(); it != m_list.end(); ++it ) |
38 | { | 36 | { |
39 | if ((*it).defaultEmail().length()!=0) | 37 | if ((*it).defaultEmail().length()!=0) |
40 | { | 38 | { |
41 | mails = (*it).emailList(); | 39 | mails = (*it).emailList(); |
42 | if ((*it).fileAs().length()>0) | 40 | if ((*it).fileAs().length()>0) |
43 | { | 41 | { |
44 | pre = "\""+(*it).firstName()+" "+(*it).lastName()+"\" <"; | 42 | pre = "\""+(*it).firstName()+" "+(*it).lastName()+"\" <"; |
45 | suf = ">"; | 43 | suf = ">"; |
46 | } | 44 | } |
47 | else | 45 | else |
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index 741a8e1..9960f88 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp | |||
@@ -1,41 +1,39 @@ | |||
1 | #include "abstractmail.h" | 1 | #include "abstractmail.h" |
2 | #include "imapwrapper.h" | 2 | #include "imapwrapper.h" |
3 | #include "pop3wrapper.h" | 3 | #include "pop3wrapper.h" |
4 | #include "nntpwrapper.h" | 4 | #include "nntpwrapper.h" |
5 | #include "mhwrapper.h" | 5 | #include "mhwrapper.h" |
6 | #include "mboxwrapper.h" | ||
7 | #include "mailtypes.h" | 6 | #include "mailtypes.h" |
8 | 7 | ||
9 | #include <qstring.h> | ||
10 | #include <qfile.h> | 8 | #include <qfile.h> |
11 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
12 | #include <stdlib.h> | 10 | #include <stdlib.h> |
13 | #include <libetpan/mailmime_content.h> | 11 | #include <libetpan/mailmime_content.h> |
14 | #include <libetpan/mailmime.h> | 12 | #include <libetpan/mailmime.h> |
15 | 13 | ||
16 | AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) | 14 | AbstractMail* AbstractMail::getWrapper(IMAPaccount *a) |
17 | { | 15 | { |
18 | return new IMAPwrapper(a); | 16 | return new IMAPwrapper(a); |
19 | } | 17 | } |
20 | 18 | ||
21 | AbstractMail* AbstractMail::getWrapper(POP3account *a) | 19 | AbstractMail* AbstractMail::getWrapper(POP3account *a) |
22 | { | 20 | { |
23 | return new POP3wrapper(a); | 21 | return new POP3wrapper(a); |
24 | } | 22 | } |
25 | 23 | ||
26 | AbstractMail* AbstractMail::getWrapper(NNTPaccount *a) | 24 | AbstractMail* AbstractMail::getWrapper(NNTPaccount *a) |
27 | { | 25 | { |
28 | return new NNTPwrapper(a); | 26 | return new NNTPwrapper(a); |
29 | } | 27 | } |
30 | 28 | ||
31 | AbstractMail* AbstractMail::getWrapper(const QString&a,const QString&name) | 29 | AbstractMail* AbstractMail::getWrapper(const QString&a,const QString&name) |
32 | { | 30 | { |
33 | return new MHwrapper(a,name); | 31 | return new MHwrapper(a,name); |
34 | } | 32 | } |
35 | 33 | ||
36 | encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) | 34 | encodedString* AbstractMail::decode_String(const encodedString*text,const QString&enc) |
37 | { | 35 | { |
38 | qDebug("Decode string start"); | 36 | qDebug("Decode string start"); |
39 | char*result_text; | 37 | char*result_text; |
40 | size_t index = 0; | 38 | size_t index = 0; |
41 | /* reset for recursive use! */ | 39 | /* reset for recursive use! */ |
diff --git a/noncore/net/mail/libmailwrapper/sendmailprogress.cpp b/noncore/net/mail/libmailwrapper/sendmailprogress.cpp index ef22750..dc0c75a 100644 --- a/noncore/net/mail/libmailwrapper/sendmailprogress.cpp +++ b/noncore/net/mail/libmailwrapper/sendmailprogress.cpp | |||
@@ -1,36 +1,35 @@ | |||
1 | #include "sendmailprogress.h" | 1 | #include "sendmailprogress.h" |
2 | #include <qprogressbar.h> | 2 | #include <qprogressbar.h> |
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qstring.h> | ||
5 | 4 | ||
6 | progressMailSend::progressMailSend(QWidget*parent, const char * name) | 5 | progressMailSend::progressMailSend(QWidget*parent, const char * name) |
7 | :progressMailSendUI(parent,name,true),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0) | 6 | :progressMailSendUI(parent,name,true),m_current_mail(0),m_current_single(0),m_max_mail(0),m_max_single(0) |
8 | { | 7 | { |
9 | } | 8 | } |
10 | 9 | ||
11 | progressMailSend::~progressMailSend() | 10 | progressMailSend::~progressMailSend() |
12 | { | 11 | { |
13 | } | 12 | } |
14 | 13 | ||
15 | void progressMailSend::setMaxMails(unsigned int aMaxMails) | 14 | void progressMailSend::setMaxMails(unsigned int aMaxMails) |
16 | { | 15 | { |
17 | m_max_mail = aMaxMails; | 16 | m_max_mail = aMaxMails; |
18 | allMailProgressBar->setTotalSteps(aMaxMails); | 17 | allMailProgressBar->setTotalSteps(aMaxMails); |
19 | setMails(); | 18 | setMails(); |
20 | } | 19 | } |
21 | 20 | ||
22 | void progressMailSend::setCurrentMails(unsigned int aCurrent) | 21 | void progressMailSend::setCurrentMails(unsigned int aCurrent) |
23 | { | 22 | { |
24 | m_current_mail = aCurrent; | 23 | m_current_mail = aCurrent; |
25 | allMailProgressBar->setProgress(aCurrent); | 24 | allMailProgressBar->setProgress(aCurrent); |
26 | setMails(); | 25 | setMails(); |
27 | } | 26 | } |
28 | 27 | ||
29 | void progressMailSend::setSingleMail(unsigned int aCurrent,unsigned int aMax) | 28 | void progressMailSend::setSingleMail(unsigned int aCurrent,unsigned int aMax) |
30 | { | 29 | { |
31 | m_current_single = aCurrent; | 30 | m_current_single = aCurrent; |
32 | m_max_single = aMax; | 31 | m_max_single = aMax; |
33 | setSingle(); | 32 | setSingle(); |
34 | } | 33 | } |
35 | 34 | ||
36 | void progressMailSend::setSingle() | 35 | void progressMailSend::setSingle() |
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index d75d52a..d7a005e 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp | |||
@@ -1,41 +1,39 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include <sys/stat.h> | 2 | #include <sys/stat.h> |
3 | #include <sys/types.h> | 3 | #include <sys/types.h> |
4 | #include <unistd.h> | 4 | #include <unistd.h> |
5 | #include <fcntl.h> | 5 | #include <fcntl.h> |
6 | #include <string.h> | 6 | #include <string.h> |
7 | #include <qdir.h> | ||
8 | #include <qt.h> | 7 | #include <qt.h> |
9 | #include <qmessagebox.h> | ||
10 | 8 | ||
11 | #include <qpe/config.h> | 9 | #include <qpe/config.h> |
12 | #include <qpe/qcopenvelope_qws.h> | 10 | #include <qpe/qcopenvelope_qws.h> |
13 | 11 | ||
14 | #include <libetpan/libetpan.h> | 12 | #include <libetpan/libetpan.h> |
15 | 13 | ||
16 | #include "smtpwrapper.h" | 14 | #include "smtpwrapper.h" |
17 | #include "mailwrapper.h" | 15 | #include "mailwrapper.h" |
18 | #include "abstractmail.h" | 16 | #include "abstractmail.h" |
19 | #include "logindialog.h" | 17 | #include "logindialog.h" |
20 | #include "mailtypes.h" | 18 | #include "mailtypes.h" |
21 | #include "sendmailprogress.h" | 19 | #include "sendmailprogress.h" |
22 | 20 | ||
23 | const char* SMTPwrapper::USER_AGENT="OpieMail v0.4"; | 21 | const char* SMTPwrapper::USER_AGENT="OpieMail v0.4"; |
24 | 22 | ||
25 | progressMailSend*SMTPwrapper::sendProgress = 0; | 23 | progressMailSend*SMTPwrapper::sendProgress = 0; |
26 | 24 | ||
27 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) | 25 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) |
28 | : QObject() | 26 | : QObject() |
29 | { | 27 | { |
30 | m_SmtpAccount = aSmtp; | 28 | m_SmtpAccount = aSmtp; |
31 | Config cfg( "mail" ); | 29 | Config cfg( "mail" ); |
32 | cfg.setGroup( "Status" ); | 30 | cfg.setGroup( "Status" ); |
33 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); | 31 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); |
34 | emit queuedMails( m_queuedMail ); | 32 | emit queuedMails( m_queuedMail ); |
35 | connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) ); | 33 | connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) ); |
36 | m_smtp = 0; | 34 | m_smtp = 0; |
37 | } | 35 | } |
38 | 36 | ||
39 | SMTPwrapper::~SMTPwrapper() | 37 | SMTPwrapper::~SMTPwrapper() |
40 | { | 38 | { |
41 | disc_server(); | 39 | disc_server(); |
diff --git a/noncore/net/mail/libmailwrapper/statusmail.cpp b/noncore/net/mail/libmailwrapper/statusmail.cpp index 172c58f..4134e79 100644 --- a/noncore/net/mail/libmailwrapper/statusmail.cpp +++ b/noncore/net/mail/libmailwrapper/statusmail.cpp | |||
@@ -1,34 +1,33 @@ | |||
1 | #include "statusmail.h" | 1 | #include "statusmail.h" |
2 | #include <qlist.h> | ||
3 | 2 | ||
4 | StatusMail::StatusMail(QList<Account>&list) | 3 | StatusMail::StatusMail(QList<Account>&list) |
5 | { | 4 | { |
6 | currentImapStat.message_count=0; | 5 | currentImapStat.message_count=0; |
7 | currentImapStat.message_unseen=0; | 6 | currentImapStat.message_unseen=0; |
8 | currentImapStat.message_recent=0; | 7 | currentImapStat.message_recent=0; |
9 | lastPop3Stat = currentImapStat; | 8 | lastPop3Stat = currentImapStat; |
10 | currentPop3Stat = currentImapStat; | 9 | currentPop3Stat = currentImapStat; |
11 | connectionList.setAutoDelete(true); | 10 | connectionList.setAutoDelete(true); |
12 | connectionList.clear(); | 11 | connectionList.clear(); |
13 | initAccounts(list); | 12 | initAccounts(list); |
14 | } | 13 | } |
15 | 14 | ||
16 | StatusMail::~StatusMail() | 15 | StatusMail::~StatusMail() |
17 | { | 16 | { |
18 | } | 17 | } |
19 | 18 | ||
20 | void StatusMail::initAccounts(QList<Account>&accounts) | 19 | void StatusMail::initAccounts(QList<Account>&accounts) |
21 | { | 20 | { |
22 | 21 | ||
23 | Account *it; | 22 | Account *it; |
24 | folderStat currentStat; | 23 | folderStat currentStat; |
25 | AbstractMail * current = 0; | 24 | AbstractMail * current = 0; |
26 | currentPop3Stat.message_count=0; | 25 | currentPop3Stat.message_count=0; |
27 | currentPop3Stat.message_recent=0; | 26 | currentPop3Stat.message_recent=0; |
28 | currentPop3Stat.message_unseen=0; | 27 | currentPop3Stat.message_unseen=0; |
29 | for ( it = accounts.first(); it; it = accounts.next() ) { | 28 | for ( it = accounts.first(); it; it = accounts.next() ) { |
30 | if ( it->getType().compare( "IMAP" ) == 0 && !it->getOffline() ) { | 29 | if ( it->getType().compare( "IMAP" ) == 0 && !it->getOffline() ) { |
31 | IMAPaccount*ima = static_cast<IMAPaccount *>(it); | 30 | IMAPaccount*ima = static_cast<IMAPaccount *>(it); |
32 | current = AbstractMail::getWrapper(ima); | 31 | current = AbstractMail::getWrapper(ima); |
33 | connectionList.append(current); | 32 | connectionList.append(current); |
34 | current->statusFolder(currentStat); | 33 | current->statusFolder(currentStat); |
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index 3f34fe7..bcf0866 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp | |||
@@ -1,41 +1,39 @@ | |||
1 | #include <qlabel.h> | 1 | #include <qlabel.h> |
2 | #include <qvbox.h> | 2 | #include <qvbox.h> |
3 | #include <qheader.h> | 3 | #include <qheader.h> |
4 | #include <qtimer.h> | 4 | #include <qtimer.h> |
5 | #include <qlayout.h> | 5 | #include <qlayout.h> |
6 | #include <qmessagebox.h> | ||
7 | 6 | ||
8 | #include <qpe/qpeapplication.h> | 7 | #include <qpe/qpeapplication.h> |
9 | #include <qpe/resource.h> | ||
10 | 8 | ||
11 | #include "defines.h" | 9 | #include "defines.h" |
12 | #include "mainwindow.h" | 10 | #include "mainwindow.h" |
13 | 11 | ||
14 | 12 | ||
15 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | 13 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) |
16 | : QMainWindow( parent, name, flags ) | 14 | : QMainWindow( parent, name, flags ) |
17 | { | 15 | { |
18 | 16 | ||
19 | setCaption( tr( "Mail" ) ); | 17 | setCaption( tr( "Mail" ) ); |
20 | setToolBarsMovable( false ); | 18 | setToolBarsMovable( false ); |
21 | 19 | ||
22 | toolBar = new QToolBar( this ); | 20 | toolBar = new QToolBar( this ); |
23 | menuBar = new QMenuBar( toolBar ); | 21 | menuBar = new QMenuBar( toolBar ); |
24 | mailMenu = new QPopupMenu( menuBar ); | 22 | mailMenu = new QPopupMenu( menuBar ); |
25 | menuBar->insertItem( tr( "Mail" ), mailMenu ); | 23 | menuBar->insertItem( tr( "Mail" ), mailMenu ); |
26 | settingsMenu = new QPopupMenu( menuBar ); | 24 | settingsMenu = new QPopupMenu( menuBar ); |
27 | menuBar->insertItem( tr( "Settings" ), settingsMenu ); | 25 | menuBar->insertItem( tr( "Settings" ), settingsMenu ); |
28 | 26 | ||
29 | addToolBar( toolBar ); | 27 | addToolBar( toolBar ); |
30 | toolBar->setHorizontalStretchable( true ); | 28 | toolBar->setHorizontalStretchable( true ); |
31 | 29 | ||
32 | QLabel *spacer = new QLabel( toolBar ); | 30 | QLabel *spacer = new QLabel( toolBar ); |
33 | spacer->setBackgroundMode( QWidget::PaletteButton ); | 31 | spacer->setBackgroundMode( QWidget::PaletteButton ); |
34 | toolBar->setStretchableWidget( spacer ); | 32 | toolBar->setStretchableWidget( spacer ); |
35 | 33 | ||
36 | composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, | 34 | composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, |
37 | 0, 0, this ); | 35 | 0, 0, this ); |
38 | composeMail->addTo( toolBar ); | 36 | composeMail->addTo( toolBar ); |
39 | composeMail->addTo( mailMenu ); | 37 | composeMail->addTo( mailMenu ); |
40 | 38 | ||
41 | sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, | 39 | sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, |
diff --git a/noncore/net/mail/newmaildir.cpp b/noncore/net/mail/newmaildir.cpp index ab0d4e3..e6e9dc7 100644 --- a/noncore/net/mail/newmaildir.cpp +++ b/noncore/net/mail/newmaildir.cpp | |||
@@ -1,35 +1,33 @@ | |||
1 | #include "newmaildir.h" | 1 | #include "newmaildir.h" |
2 | #include <qdialog.h> | ||
3 | #include <qvariant.h> | ||
4 | #include <qlineedit.h> | 2 | #include <qlineedit.h> |
5 | #include <qcheckbox.h> | 3 | #include <qcheckbox.h> |
6 | 4 | ||
7 | Newmdirdlg::Newmdirdlg( QWidget* parent, const char* name,bool no_sub) | 5 | Newmdirdlg::Newmdirdlg( QWidget* parent, const char* name,bool no_sub) |
8 | : Newmdirdlgui(parent,name,true),ndir(""),possible_subs(false) | 6 | : Newmdirdlgui(parent,name,true),ndir(""),possible_subs(false) |
9 | { | 7 | { |
10 | if (no_sub) { | 8 | if (no_sub) { |
11 | subdirsPossibleBox->setChecked(false); | 9 | subdirsPossibleBox->setChecked(false); |
12 | subdirsPossibleBox->hide(); | 10 | subdirsPossibleBox->hide(); |
13 | } | 11 | } |
14 | } | 12 | } |
15 | 13 | ||
16 | Newmdirdlg::~Newmdirdlg() | 14 | Newmdirdlg::~Newmdirdlg() |
17 | { | 15 | { |
18 | } | 16 | } |
19 | 17 | ||
20 | void Newmdirdlg::accept() | 18 | void Newmdirdlg::accept() |
21 | { | 19 | { |
22 | ndir = dirnameEdit->text(); | 20 | ndir = dirnameEdit->text(); |
23 | possible_subs = subdirsPossibleBox->isChecked(); | 21 | possible_subs = subdirsPossibleBox->isChecked(); |
24 | if (ndir.isEmpty()) { | 22 | if (ndir.isEmpty()) { |
25 | return; | 23 | return; |
26 | } | 24 | } |
27 | Newmdirdlgui::accept(); | 25 | Newmdirdlgui::accept(); |
28 | } | 26 | } |
29 | 27 | ||
30 | const QString&Newmdirdlg::Newdir()const | 28 | const QString&Newmdirdlg::Newdir()const |
31 | { | 29 | { |
32 | return ndir; | 30 | return ndir; |
33 | } | 31 | } |
34 | 32 | ||
35 | const bool Newmdirdlg::subpossible()const | 33 | const bool Newmdirdlg::subpossible()const |
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index abf93dc..6bfc824 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp | |||
@@ -1,54 +1,50 @@ | |||
1 | 1 | ||
2 | #include "settingsdialog.h" | 2 | #include "settingsdialog.h" |
3 | #include "opiemail.h" | 3 | #include "opiemail.h" |
4 | #include "editaccounts.h" | 4 | #include "editaccounts.h" |
5 | #include "composemail.h" | 5 | #include "composemail.h" |
6 | #include "mailistviewitem.h" | 6 | #include "mailistviewitem.h" |
7 | #include "viewmail.h" | 7 | #include "viewmail.h" |
8 | #include "selectstore.h" | 8 | #include "selectstore.h" |
9 | #include "selectsmtp.h" | 9 | #include "selectsmtp.h" |
10 | 10 | ||
11 | /* OPIE */ | 11 | /* OPIE */ |
12 | #include <libmailwrapper/smtpwrapper.h> | 12 | #include <libmailwrapper/smtpwrapper.h> |
13 | #include <libmailwrapper/mailtypes.h> | 13 | #include <libmailwrapper/mailtypes.h> |
14 | #include <libmailwrapper/abstractmail.h> | 14 | #include <libmailwrapper/abstractmail.h> |
15 | #include <qpe/qcopenvelope_qws.h> | ||
16 | #include <qpe/resource.h> | 15 | #include <qpe/resource.h> |
17 | #include <qpe/qpeapplication.h> | 16 | #include <qpe/qpeapplication.h> |
18 | 17 | ||
19 | /* QT */ | 18 | /* QT */ |
20 | #include <qmessagebox.h> | ||
21 | #include <qaction.h> | ||
22 | #include <qapplication.h> | ||
23 | 19 | ||
24 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) | 20 | OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags ) |
25 | : MainWindow( parent, name, WStyle_ContextHelp ) | 21 | : MainWindow( parent, name, WStyle_ContextHelp ) |
26 | { | 22 | { |
27 | settings = new Settings(); | 23 | settings = new Settings(); |
28 | 24 | ||
29 | folderView->populate( settings->getAccounts() ); | 25 | folderView->populate( settings->getAccounts() ); |
30 | } | 26 | } |
31 | 27 | ||
32 | OpieMail::~OpieMail() | 28 | OpieMail::~OpieMail() |
33 | { | 29 | { |
34 | if (settings) delete settings; | 30 | if (settings) delete settings; |
35 | } | 31 | } |
36 | 32 | ||
37 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) | 33 | void OpieMail::appMessage(const QCString &msg, const QByteArray &data) |
38 | { | 34 | { |
39 | // copied from old mail2 | 35 | // copied from old mail2 |
40 | if (msg == "writeMail(QString,QString)") | 36 | if (msg == "writeMail(QString,QString)") |
41 | { | 37 | { |
42 | QDataStream stream(data,IO_ReadOnly); | 38 | QDataStream stream(data,IO_ReadOnly); |
43 | QString name, email; | 39 | QString name, email; |
44 | stream >> name >> email; | 40 | stream >> name >> email; |
45 | // removing the whitespaces at beginning and end is needed! | 41 | // removing the whitespaces at beginning and end is needed! |
46 | slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); | 42 | slotwriteMail(name.stripWhiteSpace(),email.stripWhiteSpace()); |
47 | } | 43 | } |
48 | else if (msg == "newMail()") | 44 | else if (msg == "newMail()") |
49 | { | 45 | { |
50 | slotComposeMail(); | 46 | slotComposeMail(); |
51 | } | 47 | } |
52 | } | 48 | } |
53 | 49 | ||
54 | void OpieMail::slotwriteMail(const QString&name,const QString&email) | 50 | void OpieMail::slotwriteMail(const QString&name,const QString&email) |
diff --git a/noncore/net/mail/selectsmtp.cpp b/noncore/net/mail/selectsmtp.cpp index 79b10ef..82e8a0b 100644 --- a/noncore/net/mail/selectsmtp.cpp +++ b/noncore/net/mail/selectsmtp.cpp | |||
@@ -1,41 +1,34 @@ | |||
1 | #include "selectsmtp.h" | 1 | #include "selectsmtp.h" |
2 | #include <libmailwrapper/mailwrapper.h> | 2 | #include <libmailwrapper/mailwrapper.h> |
3 | #include <qlist.h> | ||
4 | #include <qlabel.h> | ||
5 | #include <qlayout.h> | ||
6 | #include <qcheckbox.h> | ||
7 | #include <qframe.h> | ||
8 | #include <qlineedit.h> | ||
9 | #include <qcombobox.h> | ||
10 | 3 | ||
11 | selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl) | 4 | selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl) |
12 | : selectstoreui(parent,name,modal,fl) | 5 | : selectstoreui(parent,name,modal,fl) |
13 | { | 6 | { |
14 | //m_smtpList.setAutoDelete(false); | 7 | //m_smtpList.setAutoDelete(false); |
15 | m_smtpList = 0; | 8 | m_smtpList = 0; |
16 | //headlabel->setText(tr("<center>Select SMTP account to use</center>")); | 9 | //headlabel->setText(tr("<center>Select SMTP account to use</center>")); |
17 | headlabel->hide(); | 10 | headlabel->hide(); |
18 | folderSelection->hide(); | 11 | folderSelection->hide(); |
19 | folderLabel->hide(); | 12 | folderLabel->hide(); |
20 | accountlabel->setText("<center>SMTP Accounts</center>"); | 13 | accountlabel->setText("<center>SMTP Accounts</center>"); |
21 | Line1->hide(); | 14 | Line1->hide(); |
22 | newFoldersel->hide(); | 15 | newFoldersel->hide(); |
23 | newFolderedit->hide(); | 16 | newFolderedit->hide(); |
24 | newFolderLabel->hide(); | 17 | newFolderLabel->hide(); |
25 | Line2->hide(); | 18 | Line2->hide(); |
26 | selMove->hide(); | 19 | selMove->hide(); |
27 | m_current_smtp = 0; | 20 | m_current_smtp = 0; |
28 | setCaption(tr("Select SMTP Account")); | 21 | setCaption(tr("Select SMTP Account")); |
29 | } | 22 | } |
30 | 23 | ||
31 | selectsmtp::~selectsmtp() | 24 | selectsmtp::~selectsmtp() |
32 | { | 25 | { |
33 | } | 26 | } |
34 | 27 | ||
35 | void selectsmtp::slotAccountselected(int which) | 28 | void selectsmtp::slotAccountselected(int which) |
36 | { | 29 | { |
37 | if (!m_smtpList || (unsigned)which>=m_smtpList->count() || which < 0) { | 30 | if (!m_smtpList || (unsigned)which>=m_smtpList->count() || which < 0) { |
38 | m_current_smtp = 0; | 31 | m_current_smtp = 0; |
39 | return; | 32 | return; |
40 | } | 33 | } |
41 | m_current_smtp = m_smtpList->at(which); | 34 | m_current_smtp = m_smtpList->at(which); |
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index 8636957..ec93f8d 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp | |||
@@ -1,54 +1,51 @@ | |||
1 | #include "composemail.h" | 1 | #include "composemail.h" |
2 | #include "viewmail.h" | 2 | #include "viewmail.h" |
3 | #include "accountview.h" | ||
4 | 3 | ||
5 | /* OPIE */ | 4 | /* OPIE */ |
6 | #include <libmailwrapper/settings.h> | 5 | #include <libmailwrapper/settings.h> |
7 | #include <libmailwrapper/abstractmail.h> | 6 | #include <libmailwrapper/abstractmail.h> |
8 | #include <libmailwrapper/mailtypes.h> | 7 | #include <libmailwrapper/mailtypes.h> |
9 | 8 | ||
10 | #include <opie2/ofiledialog.h> | 9 | #include <opie2/ofiledialog.h> |
11 | #include <qpe/config.h> | 10 | #include <qpe/config.h> |
12 | #include <qpe/qpeapplication.h> | 11 | #include <qpe/qpeapplication.h> |
13 | 12 | ||
14 | /* QT */ | 13 | /* QT */ |
15 | #include <qtextbrowser.h> | 14 | #include <qtextbrowser.h> |
16 | #include <qmessagebox.h> | 15 | #include <qmessagebox.h> |
17 | #include <qtextstream.h> | 16 | #include <qtextstream.h> |
18 | #include <qaction.h> | 17 | #include <qaction.h> |
19 | #include <qpopupmenu.h> | 18 | #include <qpopupmenu.h> |
20 | #include <qfile.h> | 19 | #include <qfile.h> |
21 | #include <qapplication.h> | ||
22 | #include <qvaluelist.h> | ||
23 | 20 | ||
24 | AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 21 | AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
25 | const QString&fsize,int num,const QValueList<int>&path) | 22 | const QString&fsize,int num,const QValueList<int>&path) |
26 | : QListViewItem(parent,after),_partNum(num) | 23 | : QListViewItem(parent,after),_partNum(num) |
27 | { | 24 | { |
28 | _path=path; | 25 | _path=path; |
29 | setText(0, mime); | 26 | setText(0, mime); |
30 | setText(1, desc); | 27 | setText(1, desc); |
31 | setText(2, file); | 28 | setText(2, file); |
32 | setText(3, fsize); | 29 | setText(3, fsize); |
33 | } | 30 | } |
34 | 31 | ||
35 | AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, | 32 | AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, |
36 | const QString&fsize,int num,const QValueList<int>&path) | 33 | const QString&fsize,int num,const QValueList<int>&path) |
37 | : QListViewItem(parent,after),_partNum(num) | 34 | : QListViewItem(parent,after),_partNum(num) |
38 | { | 35 | { |
39 | _path=path; | 36 | _path=path; |
40 | setText(0, mime); | 37 | setText(0, mime); |
41 | setText(1, desc); | 38 | setText(1, desc); |
42 | setText(2, file); | 39 | setText(2, file); |
43 | setText(3, fsize); | 40 | setText(3, fsize); |
44 | } | 41 | } |
45 | 42 | ||
46 | bool AttachItem::isParentof(const QValueList<int>&path) | 43 | bool AttachItem::isParentof(const QValueList<int>&path) |
47 | { | 44 | { |
48 | /* if not set, then no parent */ | 45 | /* if not set, then no parent */ |
49 | if (path.count()==0||_path.count()==0) return false; | 46 | if (path.count()==0||_path.count()==0) return false; |
50 | /* the parent must have one digit less then a child */ | 47 | /* the parent must have one digit less then a child */ |
51 | if (path.count()!=_path.count()+1) return false; | 48 | if (path.count()!=_path.count()+1) return false; |
52 | for (unsigned int i=0; i < _path.count();++i) | 49 | for (unsigned int i=0; i < _path.count();++i) |
53 | { | 50 | { |
54 | if (_path[i]!=path[i]) return false; | 51 | if (_path[i]!=path[i]) return false; |
diff --git a/noncore/net/mail/viewmailbase.cpp b/noncore/net/mail/viewmailbase.cpp index 7f1d8a0..c2bf08c 100644 --- a/noncore/net/mail/viewmailbase.cpp +++ b/noncore/net/mail/viewmailbase.cpp | |||
@@ -1,38 +1,37 @@ | |||
1 | #include <qtextbrowser.h> | 1 | #include <qtextbrowser.h> |
2 | #include <qlistview.h> | 2 | #include <qlistview.h> |
3 | #include <qaction.h> | 3 | #include <qaction.h> |
4 | #include <qlabel.h> | 4 | #include <qlabel.h> |
5 | #include <qvbox.h> | 5 | #include <qvbox.h> |
6 | #include <qpopupmenu.h> | ||
7 | 6 | ||
8 | #include <qpe/qpetoolbar.h> | 7 | #include <qpe/qpetoolbar.h> |
9 | #include <qmenubar.h> | 8 | #include <qmenubar.h> |
10 | #include <qpe/resource.h> | 9 | #include <qpe/resource.h> |
11 | 10 | ||
12 | #include "viewmailbase.h" | 11 | #include "viewmailbase.h" |
13 | //#include "opendiag.h" | 12 | //#include "opendiag.h" |
14 | 13 | ||
15 | ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) | 14 | ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) |
16 | : QMainWindow(parent, name, fl) | 15 | : QMainWindow(parent, name, fl) |
17 | { | 16 | { |
18 | setCaption(tr("E-Mail by %1")); | 17 | setCaption(tr("E-Mail by %1")); |
19 | setToolBarsMovable(false); | 18 | setToolBarsMovable(false); |
20 | 19 | ||
21 | toolbar = new QToolBar(this); | 20 | toolbar = new QToolBar(this); |
22 | menubar = new QMenuBar( toolbar ); | 21 | menubar = new QMenuBar( toolbar ); |
23 | mailmenu = new QPopupMenu( menubar ); | 22 | mailmenu = new QPopupMenu( menubar ); |
24 | menubar->insertItem( tr( "Mail" ), mailmenu ); | 23 | menubar->insertItem( tr( "Mail" ), mailmenu ); |
25 | 24 | ||
26 | toolbar->setHorizontalStretchable(true); | 25 | toolbar->setHorizontalStretchable(true); |
27 | addToolBar(toolbar); | 26 | addToolBar(toolbar); |
28 | 27 | ||
29 | QLabel *spacer = new QLabel(toolbar); | 28 | QLabel *spacer = new QLabel(toolbar); |
30 | spacer->setBackgroundMode(QWidget::PaletteButton); | 29 | spacer->setBackgroundMode(QWidget::PaletteButton); |
31 | toolbar->setStretchableWidget(spacer); | 30 | toolbar->setStretchableWidget(spacer); |
32 | 31 | ||
33 | reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); | 32 | reply = new QAction(tr("Reply"), QIconSet(Resource::loadPixmap("mail/reply")), 0, 0, this); |
34 | reply->addTo(toolbar); | 33 | reply->addTo(toolbar); |
35 | reply->addTo(mailmenu); | 34 | reply->addTo(mailmenu); |
36 | 35 | ||
37 | forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); | 36 | forward = new QAction(tr("Forward"), QIconSet(Resource::loadPixmap("mail/forward")), 0, 0, this); |
38 | forward->addTo(toolbar); | 37 | forward->addTo(toolbar); |