author | alwin <alwin> | 2004-10-24 00:55:14 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-10-24 00:55:14 (UTC) |
commit | 9755bc969d17fc683791abc5c6fbd50fa3112486 (patch) (side-by-side diff) | |
tree | 0fdcf7b52b2f4627dd3efcd7330b116c4d9c4d98 /noncore/net/mail/libmailwrapper/settings.cpp | |
parent | 12eed25c7f18285f0e342d49fd3c41eb4b14e151 (diff) | |
download | opie-9755bc969d17fc683791abc5c6fbd50fa3112486.zip opie-9755bc969d17fc683791abc5c6fbd50fa3112486.tar.gz opie-9755bc969d17fc683791abc5c6fbd50fa3112486.tar.bz2 |
new options for pop3 accounts
KATE eated a lot of last spaces in files
some tryouts
Diffstat (limited to 'noncore/net/mail/libmailwrapper/settings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index 3c9b25c..09be91b 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp @@ -17,5 +17,4 @@ #define NNTP_SSL_PORT "563" - Settings::Settings() : QObject() @@ -28,5 +27,5 @@ void Settings::checkDirectory() if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) { system( "mkdir -p $HOME/Applications/opiemail" ); - odebug << "$HOME/Applications/opiemail created" << oendl; + odebug << "$HOME/Applications/opiemail created" << oendl; } } @@ -56,5 +55,5 @@ void Settings::updateAccounts() QStringList imap = dir.entryList( "imap-*" ); for ( it = imap.begin(); it != imap.end(); it++ ) { - odebug << "Added IMAP account" << oendl; + odebug << "Added IMAP account" << oendl; IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") ); accounts.append( account ); @@ -63,5 +62,5 @@ void Settings::updateAccounts() QStringList pop3 = dir.entryList( "pop3-*" ); for ( it = pop3.begin(); it != pop3.end(); it++ ) { - odebug << "Added POP account" << oendl; + odebug << "Added POP account" << oendl; POP3account *account = new POP3account( (*it).replace(0, 5, "") ); accounts.append( account ); @@ -70,5 +69,5 @@ void Settings::updateAccounts() QStringList smtp = dir.entryList( "smtp-*" ); for ( it = smtp.begin(); it != smtp.end(); it++ ) { - odebug << "Added SMTP account" << oendl; + odebug << "Added SMTP account" << oendl; SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") ); accounts.append( account ); @@ -77,5 +76,5 @@ void Settings::updateAccounts() QStringList nntp = dir.entryList( "nntp-*" ); for ( it = nntp.begin(); it != nntp.end(); it++ ) { - odebug << "Added NNTP account" << oendl; + odebug << "Added NNTP account" << oendl; NNTPaccount *account = new NNTPaccount( (*it).replace(0, 5, "") ); accounts.append( account ); @@ -181,5 +180,5 @@ void IMAPaccount::read() void IMAPaccount::save() { - odebug << "saving " + getFileName() << oendl; + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); @@ -214,4 +213,6 @@ POP3account::POP3account() type = MAILLIB::A_POP3; port = POP3_PORT; + m_CheckSize = true; + m_MaxSize = 1024; } @@ -225,4 +226,6 @@ POP3account::POP3account( QString filename ) type = MAILLIB::A_POP3; port = POP3_PORT; + m_CheckSize = true; + m_MaxSize = 1024; } @@ -254,4 +257,6 @@ void POP3account::read() password = conf->readEntryCrypt( "Password" ); offline = conf->readBoolEntry("Offline",false); + m_CheckSize = conf->readBoolEntry("Checkmaxsize",true); + m_MaxSize = conf->readNumEntry("Maxsize",1024); delete conf; } @@ -259,5 +264,5 @@ void POP3account::read() void POP3account::save() { - odebug << "saving " + getFileName() << oendl; + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); @@ -272,4 +277,6 @@ void POP3account::save() conf->writeEntryCrypt( "Password", password ); conf->writeEntry( "Offline",offline); + conf->writeEntry("Checkmaxsize",m_CheckSize); + conf->writeEntry("Maxsize",m_MaxSize); conf->write(); delete conf; @@ -282,4 +289,24 @@ QString POP3account::getFileName() } +bool POP3account::getCheckMaxSize()const +{ + return m_CheckSize; +} + +void POP3account::setCheckMaxSize(bool aValue) +{ + m_CheckSize = aValue; +} + +int POP3account::getMaxSize()const +{ + return m_MaxSize; +} + +void POP3account::setMaxSize(int aValue) +{ + m_MaxSize = aValue; +} + SMTPaccount::SMTPaccount() : Account() @@ -341,5 +368,5 @@ void SMTPaccount::read() void SMTPaccount::save() { - odebug << "saving " + getFileName() << oendl; + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); @@ -418,5 +445,5 @@ void NNTPaccount::read() void NNTPaccount::save() { - odebug << "saving " + getFileName() << oendl; + odebug << "saving " + getFileName() << oendl; Settings::checkDirectory(); |