summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/settings.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/settings.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/settings.cpp12
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;