-rw-r--r-- | noncore/net/mail/accountview.cpp | 5 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 7 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.h | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 6 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.h | 1 |
5 files changed, 15 insertions, 6 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 2ce89db..77fa706 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp @@ -1,4 +1,4 @@ -#include <stdlib.h> #include "accountview.h" #include <libmailwrapper/mailtypes.h> +#include <libmailwrapper/abstractmail.h> #include "defines.h" @@ -448,4 +448,3 @@ void AccountView::populate( QList<Account> list ) - QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); - (void) new MBOXviewItem(localfolders,this); + (void) new MBOXviewItem(AbstractMail::defaultLocalfolder(),this); diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp index f303d72..80d0b52 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.cpp +++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp @@ -94 +94,8 @@ int AbstractMail::createMbox(const QString&,const Folder*,const QString& delemit } + +QString AbstractMail::defaultLocalfolder() +{ + QString f = getenv( "HOME" ); + f += "/Applications/opiemail/localmail"; + return f; +} diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h index dab9e10..ca9caed 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.h +++ b/noncore/net/mail/libmailwrapper/abstractmail.h @@ -47,2 +47,4 @@ public: + static QString defaultLocalfolder(); + protected: diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index b9c4ff2..e054365 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp @@ -22,3 +22,3 @@ -#define USER_AGENT "OpieMail v0.1" +const char* SMTPwrapper::USER_AGENT="OpieMail v0.3"; @@ -490,3 +490,3 @@ void SMTPwrapper::storeMail(char*mail, size_t length, const QString&box) if (!mail) return; - QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); + QString localfolders = AbstractMail::defaultLocalfolder(); MBOXwrapper*wrap = new MBOXwrapper(localfolders); @@ -691,3 +691,3 @@ bool SMTPwrapper::flushOutbox(SMTPaccount*smtp) - QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); + QString localfolders = AbstractMail::defaultLocalfolder(); MBOXwrapper*wrap = new MBOXwrapper(localfolders); diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.h b/noncore/net/mail/libmailwrapper/smtpwrapper.h index 05becf2..4a4352f 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.h +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.h @@ -64,2 +64,3 @@ protected: int m_queuedMail; + static const char* USER_AGENT; |