From 0f45c977d7530b6ca827b7a7c7da7469f01800ca Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 11 Sep 2004 08:56:57 +0000 Subject: More config changes --- (limited to 'kmicromail/libmailwrapper') 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 -- cgit v0.9.0.2