author | alwin <alwin> | 2004-01-07 19:27:47 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-07 19:27:47 (UTC) |
commit | 24a62e8789083f446138aebfa11409b73886aa88 (patch) (unidiff) | |
tree | 177bd3de4ad46fd29e93b87c6a0423a4ca132682 /noncore/net/mail/libmailwrapper/settings.cpp | |
parent | 7fdc50c5ff3fe42aba6d940165e99ed7150df4f1 (diff) | |
download | opie-24a62e8789083f446138aebfa11409b73886aa88.zip opie-24a62e8789083f446138aebfa11409b73886aa88.tar.gz opie-24a62e8789083f446138aebfa11409b73886aa88.tar.bz2 |
download mail mostly finished
accounts can be switched "offline"
Diffstat (limited to 'noncore/net/mail/libmailwrapper/settings.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index c5187f5..02a80a3 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp | |||
@@ -165,12 +165,14 @@ void IMAPaccount::read() | |||
165 | user = conf->readEntry( "User","" ); | 165 | user = conf->readEntry( "User","" ); |
166 | if (user.isNull()) user = ""; | 166 | if (user.isNull()) user = ""; |
167 | password = conf->readEntryCrypt( "Password","" ); | 167 | password = conf->readEntryCrypt( "Password","" ); |
168 | if (password.isNull()) password = ""; | 168 | if (password.isNull()) password = ""; |
169 | prefix = conf->readEntry("MailPrefix",""); | 169 | prefix = conf->readEntry("MailPrefix",""); |
170 | if (prefix.isNull()) prefix = ""; | 170 | if (prefix.isNull()) prefix = ""; |
171 | offline = conf->readBoolEntry("Offline",false); | ||
172 | delete conf; | ||
171 | } | 173 | } |
172 | 174 | ||
173 | void IMAPaccount::save() | 175 | void IMAPaccount::save() |
174 | { | 176 | { |
175 | qDebug( "saving " + getFileName() ); | 177 | qDebug( "saving " + getFileName() ); |
176 | Settings::checkDirectory(); | 178 | Settings::checkDirectory(); |
@@ -181,13 +183,15 @@ void IMAPaccount::save() | |||
181 | conf->writeEntry( "Server", server ); | 183 | conf->writeEntry( "Server", server ); |
182 | conf->writeEntry( "Port", port ); | 184 | conf->writeEntry( "Port", port ); |
183 | conf->writeEntry( "SSL", ssl ); | 185 | conf->writeEntry( "SSL", ssl ); |
184 | conf->writeEntry( "User", user ); | 186 | conf->writeEntry( "User", user ); |
185 | conf->writeEntryCrypt( "Password", password ); | 187 | conf->writeEntryCrypt( "Password", password ); |
186 | conf->writeEntry( "MailPrefix",prefix); | 188 | conf->writeEntry( "MailPrefix",prefix); |
189 | conf->writeEntry( "Offline",offline); | ||
187 | conf->write(); | 190 | conf->write(); |
191 | delete conf; | ||
188 | } | 192 | } |
189 | 193 | ||
190 | 194 | ||
191 | QString IMAPaccount::getFileName() | 195 | QString IMAPaccount::getFileName() |
192 | { | 196 | { |
193 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/imap-" + file; | 197 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/imap-" + file; |
@@ -235,12 +239,14 @@ void POP3account::read() | |||
235 | accountName = conf->readEntry( "Account" ); | 239 | accountName = conf->readEntry( "Account" ); |
236 | server = conf->readEntry( "Server" ); | 240 | server = conf->readEntry( "Server" ); |
237 | port = conf->readEntry( "Port" ); | 241 | port = conf->readEntry( "Port" ); |
238 | ssl = conf->readBoolEntry( "SSL" ); | 242 | ssl = conf->readBoolEntry( "SSL" ); |
239 | user = conf->readEntry( "User" ); | 243 | user = conf->readEntry( "User" ); |
240 | password = conf->readEntryCrypt( "Password" ); | 244 | password = conf->readEntryCrypt( "Password" ); |
245 | offline = conf->readBoolEntry("Offline",false); | ||
246 | delete conf; | ||
241 | } | 247 | } |
242 | 248 | ||
243 | void POP3account::save() | 249 | void POP3account::save() |
244 | { | 250 | { |
245 | qDebug( "saving " + getFileName() ); | 251 | qDebug( "saving " + getFileName() ); |
246 | Settings::checkDirectory(); | 252 | Settings::checkDirectory(); |
@@ -250,13 +256,15 @@ void POP3account::save() | |||
250 | conf->writeEntry( "Account", accountName ); | 256 | conf->writeEntry( "Account", accountName ); |
251 | conf->writeEntry( "Server", server ); | 257 | conf->writeEntry( "Server", server ); |
252 | conf->writeEntry( "Port", port ); | 258 | conf->writeEntry( "Port", port ); |
253 | conf->writeEntry( "SSL", ssl ); | 259 | conf->writeEntry( "SSL", ssl ); |
254 | conf->writeEntry( "User", user ); | 260 | conf->writeEntry( "User", user ); |
255 | conf->writeEntryCrypt( "Password", password ); | 261 | conf->writeEntryCrypt( "Password", password ); |
262 | conf->writeEntry( "Offline",offline); | ||
256 | conf->write(); | 263 | conf->write(); |
264 | delete conf; | ||
257 | } | 265 | } |
258 | 266 | ||
259 | 267 | ||
260 | QString POP3account::getFileName() | 268 | QString POP3account::getFileName() |
261 | { | 269 | { |
262 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/pop3-" + file; | 270 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/pop3-" + file; |
@@ -310,12 +318,13 @@ void SMTPaccount::read() | |||
310 | server = conf->readEntry( "Server" ); | 318 | server = conf->readEntry( "Server" ); |
311 | port = conf->readEntry( "Port" ); | 319 | port = conf->readEntry( "Port" ); |
312 | ssl = conf->readBoolEntry( "SSL" ); | 320 | ssl = conf->readBoolEntry( "SSL" ); |
313 | login = conf->readBoolEntry( "Login" ); | 321 | login = conf->readBoolEntry( "Login" ); |
314 | user = conf->readEntry( "User" ); | 322 | user = conf->readEntry( "User" ); |
315 | password = conf->readEntryCrypt( "Password" ); | 323 | password = conf->readEntryCrypt( "Password" ); |
324 | delete conf; | ||
316 | } | 325 | } |
317 | 326 | ||
318 | void SMTPaccount::save() | 327 | void SMTPaccount::save() |
319 | { | 328 | { |
320 | qDebug( "saving " + getFileName() ); | 329 | qDebug( "saving " + getFileName() ); |
321 | Settings::checkDirectory(); | 330 | Settings::checkDirectory(); |
@@ -327,12 +336,13 @@ void SMTPaccount::save() | |||
327 | conf->writeEntry( "Port", port ); | 336 | conf->writeEntry( "Port", port ); |
328 | conf->writeEntry( "SSL", ssl ); | 337 | conf->writeEntry( "SSL", ssl ); |
329 | conf->writeEntry( "Login", login ); | 338 | conf->writeEntry( "Login", login ); |
330 | conf->writeEntry( "User", user ); | 339 | conf->writeEntry( "User", user ); |
331 | conf->writeEntryCrypt( "Password", password ); | 340 | conf->writeEntryCrypt( "Password", password ); |
332 | conf->write(); | 341 | conf->write(); |
342 | delete conf; | ||
333 | } | 343 | } |
334 | 344 | ||
335 | 345 | ||
336 | QString SMTPaccount::getFileName() | 346 | QString SMTPaccount::getFileName() |
337 | { | 347 | { |
338 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/smtp-" + file; | 348 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/smtp-" + file; |
@@ -383,12 +393,13 @@ void NNTPaccount::read() | |||
383 | server = conf->readEntry( "Server" ); | 393 | server = conf->readEntry( "Server" ); |
384 | port = conf->readEntry( "Port" ); | 394 | port = conf->readEntry( "Port" ); |
385 | ssl = conf->readBoolEntry( "SSL" ); | 395 | ssl = conf->readBoolEntry( "SSL" ); |
386 | login = conf->readBoolEntry( "Login" ); | 396 | login = conf->readBoolEntry( "Login" ); |
387 | user = conf->readEntry( "User" ); | 397 | user = conf->readEntry( "User" ); |
388 | password = conf->readEntryCrypt( "Password" ); | 398 | password = conf->readEntryCrypt( "Password" ); |
399 | delete conf; | ||
389 | } | 400 | } |
390 | 401 | ||
391 | void NNTPaccount::save() | 402 | void NNTPaccount::save() |
392 | { | 403 | { |
393 | qDebug( "saving " + getFileName() ); | 404 | qDebug( "saving " + getFileName() ); |
394 | Settings::checkDirectory(); | 405 | Settings::checkDirectory(); |
@@ -400,12 +411,13 @@ void NNTPaccount::save() | |||
400 | conf->writeEntry( "Port", port ); | 411 | conf->writeEntry( "Port", port ); |
401 | conf->writeEntry( "SSL", ssl ); | 412 | conf->writeEntry( "SSL", ssl ); |
402 | conf->writeEntry( "Login", login ); | 413 | conf->writeEntry( "Login", login ); |
403 | conf->writeEntry( "User", user ); | 414 | conf->writeEntry( "User", user ); |
404 | conf->writeEntryCrypt( "Password", password ); | 415 | conf->writeEntryCrypt( "Password", password ); |
405 | conf->write(); | 416 | conf->write(); |
417 | delete conf; | ||
406 | } | 418 | } |
407 | 419 | ||
408 | 420 | ||
409 | QString NNTPaccount::getFileName() | 421 | QString NNTPaccount::getFileName() |
410 | { | 422 | { |
411 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/nntp-" + file; | 423 | return (QString) getenv( "HOME" ) + "/Applications/opiemail/nntp-" + file; |