summaryrefslogtreecommitdiffabout
path: root/kmicromail
Side-by-side diff
Diffstat (limited to 'kmicromail') (more/less context) (show 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
@@ -18,2 +18,3 @@
#include <qlistview.h>
+#include <qspinbox.h>
@@ -422,2 +423,11 @@ void POP3config::fillValues()
passLine->setText( data->getPassword() );
+ localFolder->setText( data->getLocalFolder() );
+ int max = data->getMaxMailSize() ;
+ if ( max ) {
+ CheckBoxDown->setChecked( true );
+ SpinBoxDown->setValue ( max );
+ } else {
+ CheckBoxDown->setChecked( false );
+ SpinBoxDown->setValue ( 5 );
+ }
}
@@ -432,2 +442,4 @@ void POP3config::accept()
data->setPassword( passLine->text() );
+ data->setLocalFolder( localFolder->text() );
+ data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ;
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
@@ -124,3 +124,3 @@ void POP3wrapper::login()
- server = account->getServer().latin1();
+ server = account->getServer();
port = account->getPort().toUInt();
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
@@ -257,2 +257,7 @@ void POP3account::read()
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) );
+ lastFetch = dt.addSecs( lf );
delete conf;
@@ -274,2 +279,7 @@ 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->write();
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
@@ -10,2 +10,3 @@
#include <qlist.h>
+#include <qdatetime.h>
@@ -26,2 +27,5 @@ public:
+ void setLocalFolder( QString name ) { localFolder = name; }
+ const QString& getLocalFolder()const{ return localFolder; }
+
void setPort(const QString&str) { port = str; }
@@ -41,2 +45,4 @@ public:
+ void setMaxMailSize( int x ) { maxMailSize = x; }
+ int getMaxMailSize() { return maxMailSize; }
@@ -55,2 +61,5 @@ protected:
MAILLIB::ATYPE type;
+ QString localFolder;
+ int maxMailSize;
+ QDateTime lastFetch;
};
diff --git a/kmicromail/pop3configui.ui b/kmicromail/pop3configui.ui
index 1014ef4..a2d43bd 100644
--- a/kmicromail/pop3configui.ui
+++ b/kmicromail/pop3configui.ui
@@ -13,4 +13,4 @@
<y>0</y>
- <width>314</width>
- <height>410</height>
+ <width>322</width>
+ <height>404</height>
</rect>
@@ -30,3 +30,3 @@
<name>margin</name>
- <number>3</number>
+ <number>11</number>
</property>
@@ -34,3 +34,3 @@
<name>spacing</name>
- <number>3</number>
+ <number>6</number>
</property>
@@ -321,2 +321,88 @@
</widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout9</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Local storage folder:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>localFolder</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout10</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>CheckBoxDown</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Download only messages smaller</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QSpinBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>SpinBoxDown</cstring>
+ </property>
+ <property stdset="1">
+ <name>suffix</name>
+ <string>kB</string>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>99999</number>
+ </property>
+ <property stdset="1">
+ <name>minValue</name>
+ <number>1</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
<spacer>