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 | |||
@@ -18,3 +18,2 @@ | |||
18 | 18 | ||
19 | |||
20 | Settings::Settings() | 19 | Settings::Settings() |
@@ -29,3 +28,3 @@ void Settings::checkDirectory() | |||
29 | system( "mkdir -p $HOME/Applications/opiemail" ); | 28 | system( "mkdir -p $HOME/Applications/opiemail" ); |
30 | odebug << "$HOME/Applications/opiemail created" << oendl; | 29 | odebug << "$HOME/Applications/opiemail created" << oendl; |
31 | } | 30 | } |
@@ -57,3 +56,3 @@ void Settings::updateAccounts() | |||
57 | for ( it = imap.begin(); it != imap.end(); it++ ) { | 56 | for ( it = imap.begin(); it != imap.end(); it++ ) { |
58 | odebug << "Added IMAP account" << oendl; | 57 | odebug << "Added IMAP account" << oendl; |
59 | IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") ); | 58 | IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") ); |
@@ -64,3 +63,3 @@ void Settings::updateAccounts() | |||
64 | for ( it = pop3.begin(); it != pop3.end(); it++ ) { | 63 | for ( it = pop3.begin(); it != pop3.end(); it++ ) { |
65 | odebug << "Added POP account" << oendl; | 64 | odebug << "Added POP account" << oendl; |
66 | POP3account *account = new POP3account( (*it).replace(0, 5, "") ); | 65 | POP3account *account = new POP3account( (*it).replace(0, 5, "") ); |
@@ -71,3 +70,3 @@ void Settings::updateAccounts() | |||
71 | for ( it = smtp.begin(); it != smtp.end(); it++ ) { | 70 | for ( it = smtp.begin(); it != smtp.end(); it++ ) { |
72 | odebug << "Added SMTP account" << oendl; | 71 | odebug << "Added SMTP account" << oendl; |
73 | SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") ); | 72 | SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") ); |
@@ -78,3 +77,3 @@ void Settings::updateAccounts() | |||
78 | for ( it = nntp.begin(); it != nntp.end(); it++ ) { | 77 | for ( it = nntp.begin(); it != nntp.end(); it++ ) { |
79 | odebug << "Added NNTP account" << oendl; | 78 | odebug << "Added NNTP account" << oendl; |
80 | NNTPaccount *account = new NNTPaccount( (*it).replace(0, 5, "") ); | 79 | NNTPaccount *account = new NNTPaccount( (*it).replace(0, 5, "") ); |
@@ -182,3 +181,3 @@ void IMAPaccount::save() | |||
182 | { | 181 | { |
183 | odebug << "saving " + getFileName() << oendl; | 182 | odebug << "saving " + getFileName() << oendl; |
184 | Settings::checkDirectory(); | 183 | Settings::checkDirectory(); |
@@ -215,2 +214,4 @@ POP3account::POP3account() | |||
215 | port = POP3_PORT; | 214 | port = POP3_PORT; |
215 | m_CheckSize = true; | ||
216 | m_MaxSize = 1024; | ||
216 | } | 217 | } |
@@ -226,2 +227,4 @@ POP3account::POP3account( QString filename ) | |||
226 | port = POP3_PORT; | 227 | port = POP3_PORT; |
228 | m_CheckSize = true; | ||
229 | m_MaxSize = 1024; | ||
227 | } | 230 | } |
@@ -255,2 +258,4 @@ void POP3account::read() | |||
255 | offline = conf->readBoolEntry("Offline",false); | 258 | offline = conf->readBoolEntry("Offline",false); |
259 | m_CheckSize = conf->readBoolEntry("Checkmaxsize",true); | ||
260 | m_MaxSize = conf->readNumEntry("Maxsize",1024); | ||
256 | delete conf; | 261 | delete conf; |
@@ -260,3 +265,3 @@ void POP3account::save() | |||
260 | { | 265 | { |
261 | odebug << "saving " + getFileName() << oendl; | 266 | odebug << "saving " + getFileName() << oendl; |
262 | Settings::checkDirectory(); | 267 | Settings::checkDirectory(); |
@@ -273,2 +278,4 @@ void POP3account::save() | |||
273 | conf->writeEntry( "Offline",offline); | 278 | conf->writeEntry( "Offline",offline); |
279 | conf->writeEntry("Checkmaxsize",m_CheckSize); | ||
280 | conf->writeEntry("Maxsize",m_MaxSize); | ||
274 | conf->write(); | 281 | conf->write(); |
@@ -283,2 +290,22 @@ QString POP3account::getFileName() | |||
283 | 290 | ||
291 | bool POP3account::getCheckMaxSize()const | ||
292 | { | ||
293 | return m_CheckSize; | ||
294 | } | ||
295 | |||
296 | void POP3account::setCheckMaxSize(bool aValue) | ||
297 | { | ||
298 | m_CheckSize = aValue; | ||
299 | } | ||
300 | |||
301 | int POP3account::getMaxSize()const | ||
302 | { | ||
303 | return m_MaxSize; | ||
304 | } | ||
305 | |||
306 | void POP3account::setMaxSize(int aValue) | ||
307 | { | ||
308 | m_MaxSize = aValue; | ||
309 | } | ||
310 | |||
284 | SMTPaccount::SMTPaccount() | 311 | SMTPaccount::SMTPaccount() |
@@ -342,3 +369,3 @@ void SMTPaccount::save() | |||
342 | { | 369 | { |
343 | odebug << "saving " + getFileName() << oendl; | 370 | odebug << "saving " + getFileName() << oendl; |
344 | Settings::checkDirectory(); | 371 | Settings::checkDirectory(); |
@@ -419,3 +446,3 @@ void NNTPaccount::save() | |||
419 | { | 446 | { |
420 | odebug << "saving " + getFileName() << oendl; | 447 | odebug << "saving " + getFileName() << oendl; |
421 | Settings::checkDirectory(); | 448 | Settings::checkDirectory(); |