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) (unidiff)
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) (show 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()
174 if (user.isNull()) user = ""; 174 if (user.isNull()) user = "";
175 password = conf->readEntryCrypt( "Password","" ); 175 password = conf->readEntryCrypt( "Password","" );
176 if (password.isNull()) password = ""; 176 if (password.isNull()) password = "";
177 prefix = conf->readEntry("MailPrefix",""); 177 prefix = conf->readEntry("MailPrefix","");
178 if (prefix.isNull()) prefix = ""; 178 if (prefix.isNull()) prefix = "";
179 offline = conf->readBoolEntry("Offline",false); 179 offline = conf->readBoolEntry("Offline",false);
180 localFolder = conf->readEntry( "LocalFolder" );
181 maxMailSize = conf->readNumEntry( "MaxSize",0 );
182 int lf = conf->readNumEntry( "LastFetch",0 );
183 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
184 leaveOnServer = conf->readBoolEntry("LeaveOnServer",false);
185 lastFetch = dt.addSecs( lf );
180 delete conf; 186 delete conf;
181} 187}
182 188
183void IMAPaccount::save() 189void IMAPaccount::save()
184{ 190{
185 qDebug("saving %s ",getFileName().latin1() ); 191 qDebug("saving %s ",getFileName().latin1() );
@@ -193,12 +199,18 @@ void IMAPaccount::save()
193 conf->writeEntry( "SSL", ssl ); 199 conf->writeEntry( "SSL", ssl );
194 conf->writeEntry( "ConnectionType", connectionType ); 200 conf->writeEntry( "ConnectionType", connectionType );
195 conf->writeEntry( "User", user ); 201 conf->writeEntry( "User", user );
196 conf->writeEntryCrypt( "Password", password ); 202 conf->writeEntryCrypt( "Password", password );
197 conf->writeEntry( "MailPrefix",prefix); 203 conf->writeEntry( "MailPrefix",prefix);
198 conf->writeEntry( "Offline",offline); 204 conf->writeEntry( "Offline",offline);
205 conf->writeEntry( "LocalFolder", localFolder );
206 conf->writeEntry( "MaxSize", maxMailSize );
207 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
208 int lf = dt.secsTo ( lastFetch );
209 conf->writeEntry( "LastFetch", lf );
210 conf->writeEntry( "LeaveOnServer", leaveOnServer);
199 conf->write(); 211 conf->write();
200 delete conf; 212 delete conf;
201} 213}
202 214
203 215
204QString IMAPaccount::getFileName() 216QString IMAPaccount::getFileName()
@@ -256,12 +268,13 @@ void POP3account::read()
256 password = conf->readEntryCrypt( "Password" ); 268 password = conf->readEntryCrypt( "Password" );
257 offline = conf->readBoolEntry("Offline",false); 269 offline = conf->readBoolEntry("Offline",false);
258 localFolder = conf->readEntry( "LocalFolder" ); 270 localFolder = conf->readEntry( "LocalFolder" );
259 maxMailSize = conf->readNumEntry( "MaxSize",0 ); 271 maxMailSize = conf->readNumEntry( "MaxSize",0 );
260 int lf = conf->readNumEntry( "LastFetch",0 ); 272 int lf = conf->readNumEntry( "LastFetch",0 );
261 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); 273 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
274 leaveOnServer = conf->readBoolEntry("LeaveOnServer",false);
262 lastFetch = dt.addSecs( lf ); 275 lastFetch = dt.addSecs( lf );
263 delete conf; 276 delete conf;
264} 277}
265 278
266void POP3account::save() 279void POP3account::save()
267{ 280{
@@ -279,12 +292,13 @@ void POP3account::save()
279 conf->writeEntry( "Offline",offline); 292 conf->writeEntry( "Offline",offline);
280 conf->writeEntry( "LocalFolder", localFolder ); 293 conf->writeEntry( "LocalFolder", localFolder );
281 conf->writeEntry( "MaxSize", maxMailSize ); 294 conf->writeEntry( "MaxSize", maxMailSize );
282 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); 295 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
283 int lf = dt.secsTo ( lastFetch ); 296 int lf = dt.secsTo ( lastFetch );
284 conf->writeEntry( "LastFetch", lf ); 297 conf->writeEntry( "LastFetch", lf );
298 conf->writeEntry( "LeaveOnServer", leaveOnServer);
285 conf->write(); 299 conf->write();
286 delete conf; 300 delete conf;
287} 301}
288 302
289 303
290QString POP3account::getFileName() 304QString 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:
46 void setMaxMailSize( int x ) { maxMailSize = x; } 46 void setMaxMailSize( int x ) { maxMailSize = x; }
47 int getMaxMailSize() { return maxMailSize; } 47 int getMaxMailSize() { return maxMailSize; }
48 48
49 void setOffline(bool b) {offline = b;} 49 void setOffline(bool b) {offline = b;}
50 bool getOffline()const{return offline;} 50 bool getOffline()const{return offline;}
51 51
52 bool getLeaveOnServer(){ return leaveOnServer;}
53 void setLeaveOnServer(bool b){ leaveOnServer = b;}
54
52 virtual QString getFileName() { return accountName; } 55 virtual QString getFileName() { return accountName; }
53 virtual void read() { ; } 56 virtual void read() { ; }
54 virtual void save() { ; } 57 virtual void save() { ; }
55 58
56protected: 59protected:
57 QString accountName, server, port, user, password; 60 QString accountName, server, port, user, password;
@@ -59,12 +62,13 @@ protected:
59 int connectionType; 62 int connectionType;
60 bool offline; 63 bool offline;
61 MAILLIB::ATYPE type; 64 MAILLIB::ATYPE type;
62 QString localFolder; 65 QString localFolder;
63 int maxMailSize; 66 int maxMailSize;
64 QDateTime lastFetch; 67 QDateTime lastFetch;
68 bool leaveOnServer;
65}; 69};
66 70
67class IMAPaccount : public Account 71class IMAPaccount : public Account
68{ 72{
69 73
70public: 74public: