summaryrefslogtreecommitdiffabout
path: root/kmicromail
Unidiff
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/accountitem.cpp12
-rw-r--r--kmicromail/accountitem.h1
-rw-r--r--kmicromail/accountview.cpp27
-rw-r--r--kmicromail/accountview.h1
-rw-r--r--kmicromail/imapconfigui.ui506
-rw-r--r--kmicromail/libmailwrapper/settings.cpp14
-rw-r--r--kmicromail/libmailwrapper/settings.h4
-rw-r--r--kmicromail/pop3configui.ui19
8 files changed, 434 insertions, 150 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp
index d0321ef..1698b40 100644
--- a/kmicromail/accountitem.cpp
+++ b/kmicromail/accountitem.cpp
@@ -92,6 +92,7 @@ QPopupMenu * POP3viewItem::getContextMenu()
92 { 92 {
93 m->insertItem(QObject::tr("Disconnect",contextName),0); 93 m->insertItem(QObject::tr("Disconnect",contextName),0);
94 m->insertItem(QObject::tr("Set offline",contextName),1); 94 m->insertItem(QObject::tr("Set offline",contextName),1);
95 m->insertItem(QObject::tr("Download messages",contextName),2);
95 } 96 }
96 else 97 else
97 { 98 {
@@ -135,6 +136,15 @@ void POP3viewItem::contextMenuSelected(int which)
135 case 1: 136 case 1:
136 setOnOffline(); 137 setOnOffline();
137 break; 138 break;
139 case 2: // daunlood
140 AccountView*bl = accountView();
141 if (!bl) return;
142 AccountViewItem* in = findSubItem( "inbox" , 0);
143 if ( ! in )
144 return;
145 bl->downloadMailsInbox(in->getFolder() ,getWrapper());
146 setOnOffline();
147 break;
138 } 148 }
139} 149}
140 150
@@ -1105,7 +1115,7 @@ void AccountViewItem::removeChilds()
1105bool AccountViewItem::matchName(const QString&name)const 1115bool AccountViewItem::matchName(const QString&name)const
1106{ 1116{
1107 if (!folder) return false; 1117 if (!folder) return false;
1108 return folder->getDisplayName()==name; 1118 return folder->getDisplayName().lower()==name.lower();
1109} 1119}
1110 1120
1111 1121
diff --git a/kmicromail/accountitem.h b/kmicromail/accountitem.h
index f125eeb..faf919d 100644
--- a/kmicromail/accountitem.h
+++ b/kmicromail/accountitem.h
@@ -36,6 +36,7 @@ public:
36 virtual AccountView*accountView(); 36 virtual AccountView*accountView();
37 virtual bool matchName(const QString&name)const; 37 virtual bool matchName(const QString&name)const;
38 virtual bool isDraftfolder(); 38 virtual bool isDraftfolder();
39 Opie::Core::OSmartPointer<Folder> getFolder() { return folder; };
39 40
40protected: 41protected:
41 AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0); 42 AccountViewItem*findSubItem(const QString&path,AccountViewItem*start=0);
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index 4ead545..85523b1 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -139,6 +139,33 @@ void AccountView::setupFolderselect(Selectstore*sels)
139 sels->addAccounts(imapAccounts[i]->getWrapper(),imapAccounts[i]->subFolders()); 139 sels->addAccounts(imapAccounts[i]->getWrapper(),imapAccounts[i]->subFolders());
140 } 140 }
141} 141}
142void AccountView::downloadMailsInbox(const FolderP&fromFolder,AbstractMail*fromWrapper)
143{
144 AbstractMail*targetMail = 0;
145 QString targetFolder = "";
146 Selectstore sels;
147 setupFolderselect(&sels);
148 if (!sels.exec()) return;
149 targetMail = sels.currentMail();
150 targetFolder = sels.currentFolder();
151 if ( (fromWrapper==targetMail && fromFolder->getName()==targetFolder) ||
152 targetFolder.isEmpty())
153 {
154 return;
155 }
156 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
157 {
158 QMessageBox::critical(0,tr("Error creating new Folder"),
159 tr("<center>Error while creating<br>new folder - breaking.</center>"));
160 return;
161 }
162 int maxsize = 0;
163 if ( sels.useSize->isChecked())
164 maxsize = sels.sizeSpinBox->value();
165
166 fromWrapper->mvcpAllMails(fromFolder,targetFolder,targetMail,sels.moveMails(), maxsize);
167 refreshCurrent();
168}
142 169
143void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper) 170void AccountView::downloadMails(const FolderP&fromFolder,AbstractMail*fromWrapper)
144{ 171{
diff --git a/kmicromail/accountview.h b/kmicromail/accountview.h
index 787b0b0..fcf33d1 100644
--- a/kmicromail/accountview.h
+++ b/kmicromail/accountview.h
@@ -23,6 +23,7 @@ public:
23 virtual void populate( QList<Account> list ); 23 virtual void populate( QList<Account> list );
24 virtual RecBodyP fetchBody(const Opie::Core::OSmartPointer<RecMail>&aMail); 24 virtual RecBodyP fetchBody(const Opie::Core::OSmartPointer<RecMail>&aMail);
25 virtual void downloadMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); 25 virtual void downloadMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper);
26 virtual void downloadMailsInbox(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper);
26 virtual bool currentisDraft(); 27 virtual bool currentisDraft();
27 28
28public slots: 29public slots:
diff --git a/kmicromail/imapconfigui.ui b/kmicromail/imapconfigui.ui
index a96c1a2..2e4c9ca 100644
--- a/kmicromail/imapconfigui.ui
+++ b/kmicromail/imapconfigui.ui
@@ -11,8 +11,8 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>425</width> 14 <width>306</width>
15 <height>428</height> 15 <height>396</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
@@ -25,74 +25,55 @@
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <grid> 28 <vbox>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>3</number> 31 <number>3</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>1</number>
36 </property> 36 </property>
37 <widget row="2" column="1" > 37 <widget>
38 <class>QLineEdit</class> 38 <class>QLayoutWidget</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>serverLine</cstring> 41 <cstring>Layout22</cstring>
42 </property> 42 </property>
43 </widget> 43 <hbox>
44 <widget row="3" column="0" > 44 <property stdset="1">
45 <class>QLabel</class> 45 <name>margin</name>
46 <property stdset="1"> 46 <number>0</number>
47 <name>name</name> 47 </property>
48 <cstring>portLabel</cstring> 48 <property stdset="1">
49 </property> 49 <name>spacing</name>
50 <property stdset="1"> 50 <number>6</number>
51 <name>text</name> 51 </property>
52 <string>Port</string> 52 <widget>
53 </property> 53 <class>QLabel</class>
54 <property stdset="1">
55 <name>name</name>
56 <cstring>accountLabel</cstring>
57 </property>
58 <property stdset="1">
59 <name>text</name>
60 <string>Account</string>
61 </property>
62 </widget>
63 <widget>
64 <class>QLineEdit</class>
65 <property stdset="1">
66 <name>name</name>
67 <cstring>accountLine</cstring>
68 </property>
69 <property>
70 <name>toolTip</name>
71 <string>Name of the Account</string>
72 </property>
73 </widget>
74 </hbox>
54 </widget> 75 </widget>
55 <widget row="2" column="0" > 76 <widget>
56 <class>QLabel</class>
57 <property stdset="1">
58 <name>name</name>
59 <cstring>serverLabel</cstring>
60 </property>
61 <property stdset="1">
62 <name>text</name>
63 <string>Server</string>
64 </property>
65 </widget>
66 <widget row="3" column="1" >
67 <class>QLineEdit</class>
68 <property stdset="1">
69 <name>name</name>
70 <cstring>portLine</cstring>
71 </property>
72 </widget>
73 <widget row="0" column="1" >
74 <class>QLineEdit</class>
75 <property stdset="1">
76 <name>name</name>
77 <cstring>accountLine</cstring>
78 </property>
79 <property>
80 <name>toolTip</name>
81 <string>Name of the Account</string>
82 </property>
83 </widget>
84 <widget row="0" column="0" >
85 <class>QLabel</class>
86 <property stdset="1">
87 <name>name</name>
88 <cstring>accountLabel</cstring>
89 </property>
90 <property stdset="1">
91 <name>text</name>
92 <string>Account</string>
93 </property>
94 </widget>
95 <widget row="1" column="0" rowspan="1" colspan="2" >
96 <class>Line</class> 77 <class>Line</class>
97 <property stdset="1"> 78 <property stdset="1">
98 <name>name</name> 79 <name>name</name>
@@ -103,75 +84,123 @@
103 <enum>Horizontal</enum> 84 <enum>Horizontal</enum>
104 </property> 85 </property>
105 </widget> 86 </widget>
106 <spacer row="12" column="1" > 87 <widget>
107 <property> 88 <class>QLayoutWidget</class>
108 <name>name</name>
109 <cstring>spacer</cstring>
110 </property>
111 <property stdset="1">
112 <name>orientation</name>
113 <enum>Vertical</enum>
114 </property>
115 <property stdset="1">
116 <name>sizeType</name>
117 <enum>Expanding</enum>
118 </property>
119 <property>
120 <name>sizeHint</name>
121 <size>
122 <width>20</width>
123 <height>20</height>
124 </size>
125 </property>
126 </spacer>
127 <widget row="8" column="1" >
128 <class>QLineEdit</class>
129 <property stdset="1"> 89 <property stdset="1">
130 <name>name</name> 90 <name>name</name>
131 <cstring>userLine</cstring> 91 <cstring>Layout23</cstring>
132 </property> 92 </property>
133 </widget> 93 <hbox>
134 <widget row="9" column="1" > 94 <property stdset="1">
135 <class>QLineEdit</class> 95 <name>margin</name>
136 <property stdset="1"> 96 <number>0</number>
137 <name>name</name> 97 </property>
138 <cstring>passLine</cstring> 98 <property stdset="1">
139 </property> 99 <name>spacing</name>
140 <property stdset="1"> 100 <number>6</number>
141 <name>echoMode</name> 101 </property>
142 <enum>Password</enum> 102 <widget>
143 </property> 103 <class>QLabel</class>
144 </widget> 104 <property stdset="1">
145 <widget row="11" column="0" > 105 <name>name</name>
146 <class>QLabel</class> 106 <cstring>serverLabel</cstring>
147 <property stdset="1"> 107 </property>
148 <name>name</name> 108 <property stdset="1">
149 <cstring>prefixLabel</cstring> 109 <name>text</name>
150 </property> 110 <string>Server</string>
151 <property stdset="1"> 111 </property>
152 <name>text</name> 112 </widget>
153 <string>Prefix</string> 113 <widget>
154 </property> 114 <class>QLineEdit</class>
115 <property stdset="1">
116 <name>name</name>
117 <cstring>serverLine</cstring>
118 </property>
119 </widget>
120 </hbox>
155 </widget> 121 </widget>
156 <widget row="11" column="1" > 122 <widget>
157 <class>QLineEdit</class> 123 <class>QLayoutWidget</class>
158 <property stdset="1"> 124 <property stdset="1">
159 <name>name</name> 125 <name>name</name>
160 <cstring>prefixLine</cstring> 126 <cstring>Layout24</cstring>
161 </property> 127 </property>
128 <hbox>
129 <property stdset="1">
130 <name>margin</name>
131 <number>0</number>
132 </property>
133 <property stdset="1">
134 <name>spacing</name>
135 <number>6</number>
136 </property>
137 <widget>
138 <class>QLabel</class>
139 <property stdset="1">
140 <name>name</name>
141 <cstring>portLabel</cstring>
142 </property>
143 <property stdset="1">
144 <name>text</name>
145 <string>Port</string>
146 </property>
147 </widget>
148 <widget>
149 <class>QLineEdit</class>
150 <property stdset="1">
151 <name>name</name>
152 <cstring>portLine</cstring>
153 </property>
154 </widget>
155 </hbox>
162 </widget> 156 </widget>
163 <widget row="8" column="0" > 157 <widget>
164 <class>QLabel</class> 158 <class>QLayoutWidget</class>
165 <property stdset="1"> 159 <property stdset="1">
166 <name>name</name> 160 <name>name</name>
167 <cstring>userLabel</cstring> 161 <cstring>Layout16</cstring>
168 </property> 162 </property>
169 <property stdset="1"> 163 <vbox>
170 <name>text</name> 164 <property stdset="1">
171 <string>User</string> 165 <name>margin</name>
172 </property> 166 <number>0</number>
167 </property>
168 <property stdset="1">
169 <name>spacing</name>
170 <number>6</number>
171 </property>
172 <widget>
173 <class>QLabel</class>
174 <property stdset="1">
175 <name>name</name>
176 <cstring>TextLabel1</cstring>
177 </property>
178 <property stdset="1">
179 <name>text</name>
180 <string>Use secure sockets:</string>
181 </property>
182 </widget>
183 <widget>
184 <class>QComboBox</class>
185 <property stdset="1">
186 <name>name</name>
187 <cstring>ComboBox1</cstring>
188 </property>
189 </widget>
190 <widget>
191 <class>QLineEdit</class>
192 <property stdset="1">
193 <name>name</name>
194 <cstring>CommandEdit</cstring>
195 </property>
196 <property stdset="1">
197 <name>text</name>
198 <string>ssh $SERVER exec</string>
199 </property>
200 </widget>
201 </vbox>
173 </widget> 202 </widget>
174 <widget row="7" column="0" rowspan="1" colspan="2" > 203 <widget>
175 <class>Line</class> 204 <class>Line</class>
176 <property stdset="1"> 205 <property stdset="1">
177 <name>name</name> 206 <name>name</name>
@@ -196,7 +225,81 @@
196 <name>layoutSpacing</name> 225 <name>layoutSpacing</name>
197 </property> 226 </property>
198 </widget> 227 </widget>
199 <widget row="10" column="0" rowspan="1" colspan="2" > 228 <widget>
229 <class>QLayoutWidget</class>
230 <property stdset="1">
231 <name>name</name>
232 <cstring>Layout25</cstring>
233 </property>
234 <hbox>
235 <property stdset="1">
236 <name>margin</name>
237 <number>0</number>
238 </property>
239 <property stdset="1">
240 <name>spacing</name>
241 <number>6</number>
242 </property>
243 <widget>
244 <class>QLabel</class>
245 <property stdset="1">
246 <name>name</name>
247 <cstring>userLabel</cstring>
248 </property>
249 <property stdset="1">
250 <name>text</name>
251 <string>User</string>
252 </property>
253 </widget>
254 <widget>
255 <class>QLineEdit</class>
256 <property stdset="1">
257 <name>name</name>
258 <cstring>userLine</cstring>
259 </property>
260 </widget>
261 </hbox>
262 </widget>
263 <widget>
264 <class>QLayoutWidget</class>
265 <property stdset="1">
266 <name>name</name>
267 <cstring>Layout26</cstring>
268 </property>
269 <hbox>
270 <property stdset="1">
271 <name>margin</name>
272 <number>0</number>
273 </property>
274 <property stdset="1">
275 <name>spacing</name>
276 <number>6</number>
277 </property>
278 <widget>
279 <class>QLabel</class>
280 <property stdset="1">
281 <name>name</name>
282 <cstring>passLabel</cstring>
283 </property>
284 <property stdset="1">
285 <name>text</name>
286 <string>Password</string>
287 </property>
288 </widget>
289 <widget>
290 <class>QLineEdit</class>
291 <property stdset="1">
292 <name>name</name>
293 <cstring>passLine</cstring>
294 </property>
295 <property stdset="1">
296 <name>echoMode</name>
297 <enum>Password</enum>
298 </property>
299 </widget>
300 </hbox>
301 </widget>
302 <widget>
200 <class>Line</class> 303 <class>Line</class>
201 <property stdset="1"> 304 <property stdset="1">
202 <name>name</name> 305 <name>name</name>
@@ -207,47 +310,160 @@
207 <enum>Horizontal</enum> 310 <enum>Horizontal</enum>
208 </property> 311 </property>
209 </widget> 312 </widget>
210 <widget row="9" column="0" > 313 <widget>
211 <class>QLabel</class> 314 <class>QLayoutWidget</class>
212 <property stdset="1"> 315 <property stdset="1">
213 <name>name</name> 316 <name>name</name>
214 <cstring>passLabel</cstring> 317 <cstring>Layout27</cstring>
215 </property> 318 </property>
319 <hbox>
320 <property stdset="1">
321 <name>margin</name>
322 <number>0</number>
323 </property>
324 <property stdset="1">
325 <name>spacing</name>
326 <number>6</number>
327 </property>
328 <widget>
329 <class>QLabel</class>
330 <property stdset="1">
331 <name>name</name>
332 <cstring>prefixLabel</cstring>
333 </property>
334 <property stdset="1">
335 <name>text</name>
336 <string>Prefix</string>
337 </property>
338 </widget>
339 <widget>
340 <class>QLineEdit</class>
341 <property stdset="1">
342 <name>name</name>
343 <cstring>prefixLine</cstring>
344 </property>
345 </widget>
346 </hbox>
347 </widget>
348 <widget>
349 <class>QLayoutWidget</class>
216 <property stdset="1"> 350 <property stdset="1">
217 <name>text</name> 351 <name>name</name>
218 <string>Password</string> 352 <cstring>Layout11</cstring>
219 </property> 353 </property>
354 <hbox>
355 <property stdset="1">
356 <name>margin</name>
357 <number>0</number>
358 </property>
359 <property stdset="1">
360 <name>spacing</name>
361 <number>6</number>
362 </property>
363 <widget>
364 <class>QLabel</class>
365 <property stdset="1">
366 <name>name</name>
367 <cstring>TextLabel1_2</cstring>
368 </property>
369 <property stdset="1">
370 <name>text</name>
371 <string>Local storage folder:</string>
372 </property>
373 </widget>
374 <widget>
375 <class>QLineEdit</class>
376 <property stdset="1">
377 <name>name</name>
378 <cstring>localFolder</cstring>
379 </property>
380 <property stdset="1">
381 <name>text</name>
382 <string></string>
383 </property>
384 </widget>
385 </hbox>
386 </widget>
387 <widget>
388 <class>QLayoutWidget</class>
389 <property stdset="1">
390 <name>name</name>
391 <cstring>Layout12</cstring>
392 </property>
393 <hbox>
394 <property stdset="1">
395 <name>margin</name>
396 <number>0</number>
397 </property>
398 <property stdset="1">
399 <name>spacing</name>
400 <number>6</number>
401 </property>
402 <widget>
403 <class>QCheckBox</class>
404 <property stdset="1">
405 <name>name</name>
406 <cstring>CheckBoxDown</cstring>
407 </property>
408 <property stdset="1">
409 <name>text</name>
410 <string>Download only messages smaller</string>
411 </property>
412 </widget>
413 <widget>
414 <class>QSpinBox</class>
415 <property stdset="1">
416 <name>name</name>
417 <cstring>SpinBoxDown</cstring>
418 </property>
419 <property stdset="1">
420 <name>suffix</name>
421 <string>kB</string>
422 </property>
423 <property stdset="1">
424 <name>maxValue</name>
425 <number>99999</number>
426 </property>
427 <property stdset="1">
428 <name>minValue</name>
429 <number>1</number>
430 </property>
431 </widget>
432 </hbox>
220 </widget> 433 </widget>
221 <widget row="6" column="0" rowspan="1" colspan="2" > 434 <widget>
222 <class>QLineEdit</class> 435 <class>QCheckBox</class>
223 <property stdset="1"> 436 <property stdset="1">
224 <name>name</name> 437 <name>name</name>
225 <cstring>CommandEdit</cstring> 438 <cstring>CheckBoxLeaveOn</cstring>
226 </property> 439 </property>
227 <property stdset="1"> 440 <property stdset="1">
228 <name>text</name> 441 <name>text</name>
229 <string>ssh $SERVER exec</string> 442 <string>Leave Messages on Server</string>
230 </property> 443 </property>
231 </widget> 444 </widget>
232 <widget row="5" column="0" rowspan="1" colspan="2" > 445 <spacer>
233 <class>QComboBox</class> 446 <property>
234 <property stdset="1">
235 <name>name</name> 447 <name>name</name>
236 <cstring>ComboBox1</cstring> 448 <cstring>spacer</cstring>
237 </property> 449 </property>
238 </widget>
239 <widget row="4" column="0" rowspan="1" colspan="2" >
240 <class>QLabel</class>
241 <property stdset="1"> 450 <property stdset="1">
242 <name>name</name> 451 <name>orientation</name>
243 <cstring>TextLabel1</cstring> 452 <enum>Vertical</enum>
244 </property> 453 </property>
245 <property stdset="1"> 454 <property stdset="1">
246 <name>text</name> 455 <name>sizeType</name>
247 <string>Use secure sockets:</string> 456 <enum>Expanding</enum>
248 </property> 457 </property>
249 </widget> 458 <property>
250 </grid> 459 <name>sizeHint</name>
460 <size>
461 <width>20</width>
462 <height>20</height>
463 </size>
464 </property>
465 </spacer>
466 </vbox>
251</widget> 467</widget>
252<tabstops> 468<tabstops>
253 <tabstop>accountLine</tabstop> 469 <tabstop>accountLine</tabstop>
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()
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
@@ -196,6 +202,12 @@ void IMAPaccount::save()
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}
@@ -259,6 +271,7 @@ void POP3account::read()
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}
@@ -282,6 +295,7 @@ void POP3account::save()
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}
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:
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() { ; }
@@ -62,6 +65,7 @@ protected:
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
diff --git a/kmicromail/pop3configui.ui b/kmicromail/pop3configui.ui
index a2d43bd..6acd394 100644
--- a/kmicromail/pop3configui.ui
+++ b/kmicromail/pop3configui.ui
@@ -11,8 +11,8 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>322</width> 14 <width>306</width>
15 <height>404</height> 15 <height>371</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
@@ -28,11 +28,11 @@
28 <vbox> 28 <vbox>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>11</number> 31 <number>3</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>6</number> 35 <number>1</number>
36 </property> 36 </property>
37 <widget> 37 <widget>
38 <class>QLayoutWidget</class> 38 <class>QLayoutWidget</class>
@@ -405,6 +405,17 @@
405 </widget> 405 </widget>
406 </hbox> 406 </hbox>
407 </widget> 407 </widget>
408 <widget>
409 <class>QCheckBox</class>
410 <property stdset="1">
411 <name>name</name>
412 <cstring>CheckBoxLeaveOn</cstring>
413 </property>
414 <property stdset="1">
415 <name>text</name>
416 <string>Leave Messages on Server</string>
417 </property>
418 </widget>
408 <spacer> 419 <spacer>
409 <property> 420 <property>
410 <name>name</name> 421 <name>name</name>