Diffstat (limited to 'noncore/net/mail/libmailwrapper/settings.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 29 |
1 files changed, 28 insertions, 1 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 | |||
@@ -16,7 +16,6 @@ | |||
16 | #define NNTP_PORT "119" | 16 | #define NNTP_PORT "119" |
17 | #define NNTP_SSL_PORT "563" | 17 | #define NNTP_SSL_PORT "563" |
18 | 18 | ||
19 | |||
20 | Settings::Settings() | 19 | Settings::Settings() |
21 | : QObject() | 20 | : QObject() |
22 | { | 21 | { |
@@ -213,6 +212,8 @@ POP3account::POP3account() | |||
213 | connectionType = 1; | 212 | connectionType = 1; |
214 | type = MAILLIB::A_POP3; | 213 | type = MAILLIB::A_POP3; |
215 | port = POP3_PORT; | 214 | port = POP3_PORT; |
215 | m_CheckSize = true; | ||
216 | m_MaxSize = 1024; | ||
216 | } | 217 | } |
217 | 218 | ||
218 | POP3account::POP3account( QString filename ) | 219 | POP3account::POP3account( QString filename ) |
@@ -224,6 +225,8 @@ POP3account::POP3account( QString filename ) | |||
224 | connectionType = 1; | 225 | connectionType = 1; |
225 | type = MAILLIB::A_POP3; | 226 | type = MAILLIB::A_POP3; |
226 | port = POP3_PORT; | 227 | port = POP3_PORT; |
228 | m_CheckSize = true; | ||
229 | m_MaxSize = 1024; | ||
227 | } | 230 | } |
228 | 231 | ||
229 | QString POP3account::getUniqueFileName() | 232 | QString POP3account::getUniqueFileName() |
@@ -253,6 +256,8 @@ void POP3account::read() | |||
253 | user = conf->readEntry( "User" ); | 256 | user = conf->readEntry( "User" ); |
254 | password = conf->readEntryCrypt( "Password" ); | 257 | password = conf->readEntryCrypt( "Password" ); |
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; |
257 | } | 262 | } |
258 | 263 | ||
@@ -271,6 +276,8 @@ void POP3account::save() | |||
271 | conf->writeEntry( "User", user ); | 276 | conf->writeEntry( "User", user ); |
272 | conf->writeEntryCrypt( "Password", password ); | 277 | conf->writeEntryCrypt( "Password", password ); |
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(); |
275 | delete conf; | 282 | delete conf; |
276 | } | 283 | } |
@@ -281,6 +288,26 @@ QString POP3account::getFileName() | |||
281 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/pop3-" + file; | 288 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/pop3-" + file; |
282 | } | 289 | } |
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() |
285 | : Account() | 312 | : Account() |
286 | { | 313 | { |