summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
authorzautrix <zautrix>2004-09-11 08:56:57 (UTC)
committer zautrix <zautrix>2004-09-11 08:56:57 (UTC)
commit0f45c977d7530b6ca827b7a7c7da7469f01800ca (patch) (side-by-side diff)
tree0368bbd4865a0b21bb197cfd0a190fd0c2cd9242 /kmicromail/libmailwrapper
parent1b41a0e3bf63364940daf132446939e3570c57ad (diff)
downloadkdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.zip
kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.tar.gz
kdepimpi-0f45c977d7530b6ca827b7a7c7da7469f01800ca.tar.bz2
More config changes
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/settings.cpp14
-rw-r--r--kmicromail/libmailwrapper/settings.h4
2 files changed, 18 insertions, 0 deletions
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp
index 90e32fa..f996d9c 100644
--- a/kmicromail/libmailwrapper/settings.cpp
+++ b/kmicromail/libmailwrapper/settings.cpp
@@ -174,12 +174,18 @@ void IMAPaccount::read()
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);
+ localFolder = conf->readEntry( "LocalFolder" );
+ maxMailSize = conf->readNumEntry( "MaxSize",0 );
+ int lf = conf->readNumEntry( "LastFetch",0 );
+ QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
+ leaveOnServer = conf->readBoolEntry("LeaveOnServer",false);
+ lastFetch = dt.addSecs( lf );
delete conf;
}
void IMAPaccount::save()
{
qDebug("saving %s ",getFileName().latin1() );
@@ -193,12 +199,18 @@ void IMAPaccount::save()
conf->writeEntry( "SSL", ssl );
conf->writeEntry( "ConnectionType", connectionType );
conf->writeEntry( "User", user );
conf->writeEntryCrypt( "Password", password );
conf->writeEntry( "MailPrefix",prefix);
conf->writeEntry( "Offline",offline);
+ conf->writeEntry( "LocalFolder", localFolder );
+ conf->writeEntry( "MaxSize", maxMailSize );
+ QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
+ int lf = dt.secsTo ( lastFetch );
+ conf->writeEntry( "LastFetch", lf );
+ conf->writeEntry( "LeaveOnServer", leaveOnServer);
conf->write();
delete conf;
}
QString IMAPaccount::getFileName()
@@ -256,12 +268,13 @@ void POP3account::read()
password = conf->readEntryCrypt( "Password" );
offline = conf->readBoolEntry("Offline",false);
localFolder = conf->readEntry( "LocalFolder" );
maxMailSize = conf->readNumEntry( "MaxSize",0 );
int lf = conf->readNumEntry( "LastFetch",0 );
QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
+ leaveOnServer = conf->readBoolEntry("LeaveOnServer",false);
lastFetch = dt.addSecs( lf );
delete conf;
}
void POP3account::save()
{
@@ -279,12 +292,13 @@ void POP3account::save()
conf->writeEntry( "Offline",offline);
conf->writeEntry( "LocalFolder", localFolder );
conf->writeEntry( "MaxSize", maxMailSize );
QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
int lf = dt.secsTo ( lastFetch );
conf->writeEntry( "LastFetch", lf );
+ conf->writeEntry( "LeaveOnServer", leaveOnServer);
conf->write();
delete conf;
}
QString POP3account::getFileName()
diff --git a/kmicromail/libmailwrapper/settings.h b/kmicromail/libmailwrapper/settings.h
index c33c403..85b817c 100644
--- a/kmicromail/libmailwrapper/settings.h
+++ b/kmicromail/libmailwrapper/settings.h
@@ -46,12 +46,15 @@ public:
void setMaxMailSize( int x ) { maxMailSize = x; }
int getMaxMailSize() { return maxMailSize; }
void setOffline(bool b) {offline = b;}
bool getOffline()const{return offline;}
+ bool getLeaveOnServer(){ return leaveOnServer;}
+ void setLeaveOnServer(bool b){ leaveOnServer = b;}
+
virtual QString getFileName() { return accountName; }
virtual void read() { ; }
virtual void save() { ; }
protected:
QString accountName, server, port, user, password;
@@ -59,12 +62,13 @@ protected:
int connectionType;
bool offline;
MAILLIB::ATYPE type;
QString localFolder;
int maxMailSize;
QDateTime lastFetch;
+ bool leaveOnServer;
};
class IMAPaccount : public Account
{
public: