summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
Side-by-side diff
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
@@ -177,6 +177,12 @@ void IMAPaccount::read()
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;
}
@@ -196,6 +202,12 @@ void IMAPaccount::save()
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;
}
@@ -259,6 +271,7 @@ void POP3account::read()
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;
}
@@ -282,6 +295,7 @@ void POP3account::save()
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;
}
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
@@ -49,6 +49,9 @@ public:
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() { ; }
@@ -62,6 +65,7 @@ protected:
QString localFolder;
int maxMailSize;
QDateTime lastFetch;
+ bool leaveOnServer;
};
class IMAPaccount : public Account