summaryrefslogtreecommitdiffabout
path: root/kmicromail
Unidiff
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/editaccounts.cpp12
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.cpp2
-rw-r--r--kmicromail/libmailwrapper/settings.cpp10
-rw-r--r--kmicromail/libmailwrapper/settings.h9
-rw-r--r--kmicromail/pop3configui.ui94
5 files changed, 122 insertions, 5 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index d272c3b..e7d2750 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -17,4 +17,5 @@
17#include <qtabwidget.h> 17#include <qtabwidget.h>
18#include <qlistview.h> 18#include <qlistview.h>
19#include <qspinbox.h>
19 20
20#include <libmailwrapper/nntpwrapper.h> 21#include <libmailwrapper/nntpwrapper.h>
@@ -421,4 +422,13 @@ void POP3config::fillValues()
421 userLine->setText( data->getUser() ); 422 userLine->setText( data->getUser() );
422 passLine->setText( data->getPassword() ); 423 passLine->setText( data->getPassword() );
424 localFolder->setText( data->getLocalFolder() );
425 int max = data->getMaxMailSize() ;
426 if ( max ) {
427 CheckBoxDown->setChecked( true );
428 SpinBoxDown->setValue ( max );
429 } else {
430 CheckBoxDown->setChecked( false );
431 SpinBoxDown->setValue ( 5 );
432 }
423} 433}
424 434
@@ -431,4 +441,6 @@ void POP3config::accept()
431 data->setUser( userLine->text() ); 441 data->setUser( userLine->text() );
432 data->setPassword( passLine->text() ); 442 data->setPassword( passLine->text() );
443 data->setLocalFolder( localFolder->text() );
444 data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ;
433 445
434 QDialog::accept(); 446 QDialog::accept();
diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp
index 8d2f778..1edec9e 100644
--- a/kmicromail/libmailwrapper/pop3wrapper.cpp
+++ b/kmicromail/libmailwrapper/pop3wrapper.cpp
@@ -123,5 +123,5 @@ void POP3wrapper::login()
123 int err = MAILPOP3_NO_ERROR; 123 int err = MAILPOP3_NO_ERROR;
124 124
125 server = account->getServer().latin1(); 125 server = account->getServer();
126 port = account->getPort().toUInt(); 126 port = account->getPort().toUInt();
127 127
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp
index b0a539e..90e32fa 100644
--- a/kmicromail/libmailwrapper/settings.cpp
+++ b/kmicromail/libmailwrapper/settings.cpp
@@ -256,4 +256,9 @@ void POP3account::read()
256 password = conf->readEntryCrypt( "Password" ); 256 password = conf->readEntryCrypt( "Password" );
257 offline = conf->readBoolEntry("Offline",false); 257 offline = conf->readBoolEntry("Offline",false);
258 localFolder = conf->readEntry( "LocalFolder" );
259 maxMailSize = conf->readNumEntry( "MaxSize",0 );
260 int lf = conf->readNumEntry( "LastFetch",0 );
261 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
262 lastFetch = dt.addSecs( lf );
258 delete conf; 263 delete conf;
259} 264}
@@ -273,4 +278,9 @@ void POP3account::save()
273 conf->writeEntryCrypt( "Password", password ); 278 conf->writeEntryCrypt( "Password", password );
274 conf->writeEntry( "Offline",offline); 279 conf->writeEntry( "Offline",offline);
280 conf->writeEntry( "LocalFolder", localFolder );
281 conf->writeEntry( "MaxSize", maxMailSize );
282 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
283 int lf = dt.secsTo ( lastFetch );
284 conf->writeEntry( "LastFetch", lf );
275 conf->write(); 285 conf->write();
276 delete conf; 286 delete conf;
diff --git a/kmicromail/libmailwrapper/settings.h b/kmicromail/libmailwrapper/settings.h
index ba3ec89..c33c403 100644
--- a/kmicromail/libmailwrapper/settings.h
+++ b/kmicromail/libmailwrapper/settings.h
@@ -9,4 +9,5 @@
9#include <qobject.h> 9#include <qobject.h>
10#include <qlist.h> 10#include <qlist.h>
11#include <qdatetime.h>
11 12
12class Account 13class Account
@@ -25,4 +26,7 @@ public:
25 const QString&getServer()const{ return server; } 26 const QString&getServer()const{ return server; }
26 27
28 void setLocalFolder( QString name ) { localFolder = name; }
29 const QString& getLocalFolder()const{ return localFolder; }
30
27 void setPort(const QString&str) { port = str; } 31 void setPort(const QString&str) { port = str; }
28 const QString&getPort()const{ return port; } 32 const QString&getPort()const{ return port; }
@@ -40,4 +44,6 @@ public:
40 int ConnectionType() { return connectionType; } 44 int ConnectionType() { return connectionType; }
41 45
46 void setMaxMailSize( int x ) { maxMailSize = x; }
47 int getMaxMailSize() { return maxMailSize; }
42 48
43 void setOffline(bool b) {offline = b;} 49 void setOffline(bool b) {offline = b;}
@@ -54,4 +60,7 @@ protected:
54 bool offline; 60 bool offline;
55 MAILLIB::ATYPE type; 61 MAILLIB::ATYPE type;
62 QString localFolder;
63 int maxMailSize;
64 QDateTime lastFetch;
56}; 65};
57 66
diff --git a/kmicromail/pop3configui.ui b/kmicromail/pop3configui.ui
index 1014ef4..a2d43bd 100644
--- a/kmicromail/pop3configui.ui
+++ b/kmicromail/pop3configui.ui
@@ -12,6 +12,6 @@
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>314</width> 14 <width>322</width>
15 <height>410</height> 15 <height>404</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
@@ -29,9 +29,9 @@
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>3</number> 31 <number>11</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>3</number> 35 <number>6</number>
36 </property> 36 </property>
37 <widget> 37 <widget>
@@ -320,4 +320,90 @@
320 </hbox> 320 </hbox>
321 </widget> 321 </widget>
322 <widget>
323 <class>QLayoutWidget</class>
324 <property stdset="1">
325 <name>name</name>
326 <cstring>Layout9</cstring>
327 </property>
328 <hbox>
329 <property stdset="1">
330 <name>margin</name>
331 <number>0</number>
332 </property>
333 <property stdset="1">
334 <name>spacing</name>
335 <number>6</number>
336 </property>
337 <widget>
338 <class>QLabel</class>
339 <property stdset="1">
340 <name>name</name>
341 <cstring>TextLabel1_2</cstring>
342 </property>
343 <property stdset="1">
344 <name>text</name>
345 <string>Local storage folder:</string>
346 </property>
347 </widget>
348 <widget>
349 <class>QLineEdit</class>
350 <property stdset="1">
351 <name>name</name>
352 <cstring>localFolder</cstring>
353 </property>
354 <property stdset="1">
355 <name>text</name>
356 <string></string>
357 </property>
358 </widget>
359 </hbox>
360 </widget>
361 <widget>
362 <class>QLayoutWidget</class>
363 <property stdset="1">
364 <name>name</name>
365 <cstring>Layout10</cstring>
366 </property>
367 <hbox>
368 <property stdset="1">
369 <name>margin</name>
370 <number>0</number>
371 </property>
372 <property stdset="1">
373 <name>spacing</name>
374 <number>6</number>
375 </property>
376 <widget>
377 <class>QCheckBox</class>
378 <property stdset="1">
379 <name>name</name>
380 <cstring>CheckBoxDown</cstring>
381 </property>
382 <property stdset="1">
383 <name>text</name>
384 <string>Download only messages smaller</string>
385 </property>
386 </widget>
387 <widget>
388 <class>QSpinBox</class>
389 <property stdset="1">
390 <name>name</name>
391 <cstring>SpinBoxDown</cstring>
392 </property>
393 <property stdset="1">
394 <name>suffix</name>
395 <string>kB</string>
396 </property>
397 <property stdset="1">
398 <name>maxValue</name>
399 <number>99999</number>
400 </property>
401 <property stdset="1">
402 <name>minValue</name>
403 <number>1</number>
404 </property>
405 </widget>
406 </hbox>
407 </widget>
322 <spacer> 408 <spacer>
323 <property> 409 <property>