author | alwin <alwin> | 2004-01-07 19:27:47 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-07 19:27:47 (UTC) |
commit | 24a62e8789083f446138aebfa11409b73886aa88 (patch) (side-by-side diff) | |
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) (ignore 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() user = conf->readEntry( "User","" ); if (user.isNull()) user = ""; password = conf->readEntryCrypt( "Password","" ); if (password.isNull()) password = ""; prefix = conf->readEntry("MailPrefix",""); if (prefix.isNull()) prefix = ""; + offline = conf->readBoolEntry("Offline",false); + delete conf; } void IMAPaccount::save() { qDebug( "saving " + getFileName() ); Settings::checkDirectory(); @@ -181,13 +183,15 @@ void IMAPaccount::save() conf->writeEntry( "Server", server ); conf->writeEntry( "Port", port ); conf->writeEntry( "SSL", ssl ); conf->writeEntry( "User", user ); conf->writeEntryCrypt( "Password", password ); conf->writeEntry( "MailPrefix",prefix); + conf->writeEntry( "Offline",offline); conf->write(); + delete conf; } QString IMAPaccount::getFileName() { return (QString) getenv( "HOME" ) + "/Applications/opiemail/imap-" + file; @@ -235,12 +239,14 @@ void POP3account::read() accountName = conf->readEntry( "Account" ); server = conf->readEntry( "Server" ); port = conf->readEntry( "Port" ); ssl = conf->readBoolEntry( "SSL" ); user = conf->readEntry( "User" ); password = conf->readEntryCrypt( "Password" ); + offline = conf->readBoolEntry("Offline",false); + delete conf; } void POP3account::save() { qDebug( "saving " + getFileName() ); Settings::checkDirectory(); @@ -250,13 +256,15 @@ void POP3account::save() conf->writeEntry( "Account", accountName ); conf->writeEntry( "Server", server ); conf->writeEntry( "Port", port ); conf->writeEntry( "SSL", ssl ); conf->writeEntry( "User", user ); conf->writeEntryCrypt( "Password", password ); + conf->writeEntry( "Offline",offline); conf->write(); + delete conf; } QString POP3account::getFileName() { return (QString) getenv( "HOME" ) + "/Applications/opiemail/pop3-" + file; @@ -310,12 +318,13 @@ void SMTPaccount::read() server = conf->readEntry( "Server" ); port = conf->readEntry( "Port" ); ssl = conf->readBoolEntry( "SSL" ); login = conf->readBoolEntry( "Login" ); user = conf->readEntry( "User" ); password = conf->readEntryCrypt( "Password" ); + delete conf; } void SMTPaccount::save() { qDebug( "saving " + getFileName() ); Settings::checkDirectory(); @@ -327,12 +336,13 @@ void SMTPaccount::save() conf->writeEntry( "Port", port ); conf->writeEntry( "SSL", ssl ); conf->writeEntry( "Login", login ); conf->writeEntry( "User", user ); conf->writeEntryCrypt( "Password", password ); conf->write(); + delete conf; } QString SMTPaccount::getFileName() { return (QString) getenv( "HOME" ) + "/Applications/opiemail/smtp-" + file; @@ -383,12 +393,13 @@ void NNTPaccount::read() server = conf->readEntry( "Server" ); port = conf->readEntry( "Port" ); ssl = conf->readBoolEntry( "SSL" ); login = conf->readBoolEntry( "Login" ); user = conf->readEntry( "User" ); password = conf->readEntryCrypt( "Password" ); + delete conf; } void NNTPaccount::save() { qDebug( "saving " + getFileName() ); Settings::checkDirectory(); @@ -400,12 +411,13 @@ void NNTPaccount::save() conf->writeEntry( "Port", port ); conf->writeEntry( "SSL", ssl ); conf->writeEntry( "Login", login ); conf->writeEntry( "User", user ); conf->writeEntryCrypt( "Password", password ); conf->write(); + delete conf; } QString NNTPaccount::getFileName() { return (QString) getenv( "HOME" ) + "/Applications/opiemail/nntp-" + file; |