summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2004-10-30 17:07:04 (UTC)
committer zautrix <zautrix>2004-10-30 17:07:04 (UTC)
commit28df10a0eb5ff343191755a06391bc6ce2fd84b0 (patch) (unidiff)
tree930882e7400006887d68fd434939e3a376b8631b /kmicromail
parentc8662dc632987a317386b923e24acb9507859528 (diff)
downloadkdepimpi-28df10a0eb5ff343191755a06391bc6ce2fd84b0.zip
kdepimpi-28df10a0eb5ff343191755a06391bc6ce2fd84b0.tar.gz
kdepimpi-28df10a0eb5ff343191755a06391bc6ce2fd84b0.tar.bz2
ompi fixes
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/composemailui.ui11
-rw-r--r--kmicromail/libmailwrapper/libmailwrapper.pro2
-rw-r--r--kmicromail/mainwindow.cpp3
-rw-r--r--kmicromail/opiemail.cpp26
-rw-r--r--kmicromail/qpe/qdialog.h8
-rw-r--r--kmicromail/qpe/qdialog_hacked.cpp5
6 files changed, 35 insertions, 20 deletions
diff --git a/kmicromail/composemailui.ui b/kmicromail/composemailui.ui
index c66b0c8..029922c 100644
--- a/kmicromail/composemailui.ui
+++ b/kmicromail/composemailui.ui
@@ -1,473 +1,480 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>ComposeMailUI</class> 2<class>ComposeMailUI</class>
3<include location="local">tr.h</include> 3<include location="local">tr.h</include>
4<widget> 4<widget>
5 <class>QDialog</class> 5 <class>QDialog</class>
6 <property stdset="1"> 6 <property stdset="1">
7 <name>name</name> 7 <name>name</name>
8 <cstring>ComposeMailUI</cstring> 8 <cstring>ComposeMailUI</cstring>
9 </property> 9 </property>
10 <property stdset="1"> 10 <property stdset="1">
11 <name>geometry</name> 11 <name>geometry</name>
12 <rect> 12 <rect>
13 <x>0</x> 13 <x>0</x>
14 <y>0</y> 14 <y>0</y>
15 <width>276</width> 15 <width>579</width>
16 <height>263</height> 16 <height>476</height>
17 </rect> 17 </rect>
18 </property> 18 </property>
19 <property stdset="1"> 19 <property stdset="1">
20 <name>sizePolicy</name>
21 <sizepolicy>
22 <hsizetype>7</hsizetype>
23 <vsizetype>7</vsizetype>
24 </sizepolicy>
25 </property>
26 <property stdset="1">
20 <name>caption</name> 27 <name>caption</name>
21 <string>Compose Message</string> 28 <string>Compose Message</string>
22 </property> 29 </property>
23 <property> 30 <property>
24 <name>layoutMargin</name> 31 <name>layoutMargin</name>
25 </property> 32 </property>
26 <property> 33 <property>
27 <name>layoutSpacing</name> 34 <name>layoutSpacing</name>
28 </property> 35 </property>
29 <grid> 36 <grid>
30 <property stdset="1"> 37 <property stdset="1">
31 <name>margin</name> 38 <name>margin</name>
32 <number>2</number> 39 <number>2</number>
33 </property> 40 </property>
34 <property stdset="1"> 41 <property stdset="1">
35 <name>spacing</name> 42 <name>spacing</name>
36 <number>1</number> 43 <number>1</number>
37 </property> 44 </property>
38 <widget row="1" column="0" rowspan="1" colspan="4" > 45 <widget row="1" column="0" rowspan="1" colspan="4" >
39 <class>QTabWidget</class> 46 <class>QTabWidget</class>
40 <property stdset="1"> 47 <property stdset="1">
41 <name>name</name> 48 <name>name</name>
42 <cstring>tabWidget</cstring> 49 <cstring>tabWidget</cstring>
43 </property> 50 </property>
44 <property> 51 <property>
45 <name>layoutMargin</name> 52 <name>layoutMargin</name>
46 </property> 53 </property>
47 <property> 54 <property>
48 <name>layoutSpacing</name> 55 <name>layoutSpacing</name>
49 </property> 56 </property>
50 <widget> 57 <widget>
51 <class>QWidget</class> 58 <class>QWidget</class>
52 <property stdset="1"> 59 <property stdset="1">
53 <name>name</name> 60 <name>name</name>
54 <cstring>mailTab</cstring> 61 <cstring>mailTab</cstring>
55 </property> 62 </property>
56 <attribute> 63 <attribute>
57 <name>title</name> 64 <name>title</name>
58 <string>Mail</string> 65 <string>Mail</string>
59 </attribute> 66 </attribute>
60 <vbox> 67 <vbox>
61 <property stdset="1"> 68 <property stdset="1">
62 <name>margin</name> 69 <name>margin</name>
63 <number>1</number> 70 <number>1</number>
64 </property> 71 </property>
65 <property stdset="1"> 72 <property stdset="1">
66 <name>spacing</name> 73 <name>spacing</name>
67 <number>1</number> 74 <number>1</number>
68 </property> 75 </property>
69 <widget> 76 <widget>
70 <class>QLayoutWidget</class> 77 <class>QLayoutWidget</class>
71 <property stdset="1"> 78 <property stdset="1">
72 <name>name</name> 79 <name>name</name>
73 <cstring>Layout10</cstring> 80 <cstring>Layout10</cstring>
74 </property> 81 </property>
75 <property> 82 <property>
76 <name>layoutSpacing</name> 83 <name>layoutSpacing</name>
77 </property> 84 </property>
78 <grid> 85 <grid>
79 <property stdset="1"> 86 <property stdset="1">
80 <name>margin</name> 87 <name>margin</name>
81 <number>0</number> 88 <number>0</number>
82 </property> 89 </property>
83 <property stdset="1"> 90 <property stdset="1">
84 <name>spacing</name> 91 <name>spacing</name>
85 <number>1</number> 92 <number>1</number>
86 </property> 93 </property>
87 <widget row="0" column="1" > 94 <widget row="0" column="1" >
88 <class>QLayoutWidget</class> 95 <class>QLayoutWidget</class>
89 <property stdset="1"> 96 <property stdset="1">
90 <name>name</name> 97 <name>name</name>
91 <cstring>Layout9</cstring> 98 <cstring>Layout9</cstring>
92 </property> 99 </property>
93 <property> 100 <property>
94 <name>layoutSpacing</name> 101 <name>layoutSpacing</name>
95 </property> 102 </property>
96 <grid> 103 <grid>
97 <property stdset="1"> 104 <property stdset="1">
98 <name>margin</name> 105 <name>margin</name>
99 <number>0</number> 106 <number>0</number>
100 </property> 107 </property>
101 <property stdset="1"> 108 <property stdset="1">
102 <name>spacing</name> 109 <name>spacing</name>
103 <number>3</number> 110 <number>3</number>
104 </property> 111 </property>
105 <widget row="0" column="1" > 112 <widget row="0" column="1" >
106 <class>QComboBox</class> 113 <class>QComboBox</class>
107 <property stdset="1"> 114 <property stdset="1">
108 <name>name</name> 115 <name>name</name>
109 <cstring>fromBox</cstring> 116 <cstring>fromBox</cstring>
110 </property> 117 </property>
111 <property stdset="1"> 118 <property stdset="1">
112 <name>sizePolicy</name> 119 <name>sizePolicy</name>
113 <sizepolicy> 120 <sizepolicy>
114 <hsizetype>3</hsizetype> 121 <hsizetype>3</hsizetype>
115 <vsizetype>0</vsizetype> 122 <vsizetype>0</vsizetype>
116 </sizepolicy> 123 </sizepolicy>
117 </property> 124 </property>
118 <property stdset="1"> 125 <property stdset="1">
119 <name>editable</name> 126 <name>editable</name>
120 <bool>true</bool> 127 <bool>true</bool>
121 </property> 128 </property>
122 <property stdset="1"> 129 <property stdset="1">
123 <name>duplicatesEnabled</name> 130 <name>duplicatesEnabled</name>
124 <bool>false</bool> 131 <bool>false</bool>
125 </property> 132 </property>
126 </widget> 133 </widget>
127 <widget row="0" column="0" > 134 <widget row="0" column="0" >
128 <class>QLineEdit</class> 135 <class>QLineEdit</class>
129 <property stdset="1"> 136 <property stdset="1">
130 <name>name</name> 137 <name>name</name>
131 <cstring>senderNameEdit</cstring> 138 <cstring>senderNameEdit</cstring>
132 </property> 139 </property>
133 <property stdset="1"> 140 <property stdset="1">
134 <name>sizePolicy</name> 141 <name>sizePolicy</name>
135 <sizepolicy> 142 <sizepolicy>
136 <hsizetype>0</hsizetype> 143 <hsizetype>0</hsizetype>
137 <vsizetype>0</vsizetype> 144 <vsizetype>0</vsizetype>
138 </sizepolicy> 145 </sizepolicy>
139 </property> 146 </property>
140 <property stdset="1"> 147 <property stdset="1">
141 <name>minimumSize</name> 148 <name>minimumSize</name>
142 <size> 149 <size>
143 <width>70</width> 150 <width>70</width>
144 <height>0</height> 151 <height>0</height>
145 </size> 152 </size>
146 </property> 153 </property>
147 <property stdset="1"> 154 <property stdset="1">
148 <name>maximumSize</name> 155 <name>maximumSize</name>
149 <size> 156 <size>
150 <width>180</width> 157 <width>180</width>
151 <height>32767</height> 158 <height>32767</height>
152 </size> 159 </size>
153 </property> 160 </property>
154 </widget> 161 </widget>
155 </grid> 162 </grid>
156 </widget> 163 </widget>
157 <widget row="2" column="1" > 164 <widget row="2" column="1" >
158 <class>QLineEdit</class> 165 <class>QLineEdit</class>
159 <property stdset="1"> 166 <property stdset="1">
160 <name>name</name> 167 <name>name</name>
161 <cstring>subjectLine</cstring> 168 <cstring>subjectLine</cstring>
162 </property> 169 </property>
163 <property stdset="1"> 170 <property stdset="1">
164 <name>sizePolicy</name> 171 <name>sizePolicy</name>
165 <sizepolicy> 172 <sizepolicy>
166 <hsizetype>3</hsizetype> 173 <hsizetype>3</hsizetype>
167 <vsizetype>0</vsizetype> 174 <vsizetype>0</vsizetype>
168 </sizepolicy> 175 </sizepolicy>
169 </property> 176 </property>
170 </widget> 177 </widget>
171 <widget row="1" column="1" > 178 <widget row="1" column="1" >
172 <class>QLineEdit</class> 179 <class>QLineEdit</class>
173 <property stdset="1"> 180 <property stdset="1">
174 <name>name</name> 181 <name>name</name>
175 <cstring>toLine</cstring> 182 <cstring>toLine</cstring>
176 </property> 183 </property>
177 <property stdset="1"> 184 <property stdset="1">
178 <name>sizePolicy</name> 185 <name>sizePolicy</name>
179 <sizepolicy> 186 <sizepolicy>
180 <hsizetype>3</hsizetype> 187 <hsizetype>3</hsizetype>
181 <vsizetype>0</vsizetype> 188 <vsizetype>0</vsizetype>
182 </sizepolicy> 189 </sizepolicy>
183 </property> 190 </property>
184 </widget> 191 </widget>
185 <widget row="2" column="0" > 192 <widget row="2" column="0" >
186 <class>QLabel</class> 193 <class>QLabel</class>
187 <property stdset="1"> 194 <property stdset="1">
188 <name>name</name> 195 <name>name</name>
189 <cstring>subjectLabel</cstring> 196 <cstring>subjectLabel</cstring>
190 </property> 197 </property>
191 <property stdset="1"> 198 <property stdset="1">
192 <name>text</name> 199 <name>text</name>
193 <string>Subject</string> 200 <string>Subject</string>
194 </property> 201 </property>
195 </widget> 202 </widget>
196 <widget row="0" column="0" > 203 <widget row="0" column="0" >
197 <class>QLabel</class> 204 <class>QLabel</class>
198 <property stdset="1"> 205 <property stdset="1">
199 <name>name</name> 206 <name>name</name>
200 <cstring>fromLabel</cstring> 207 <cstring>fromLabel</cstring>
201 </property> 208 </property>
202 <property stdset="1"> 209 <property stdset="1">
203 <name>text</name> 210 <name>text</name>
204 <string>From</string> 211 <string>From</string>
205 </property> 212 </property>
206 </widget> 213 </widget>
207 <widget row="1" column="0" > 214 <widget row="1" column="0" >
208 <class>QPushButton</class> 215 <class>QPushButton</class>
209 <property stdset="1"> 216 <property stdset="1">
210 <name>name</name> 217 <name>name</name>
211 <cstring>toButton</cstring> 218 <cstring>toButton</cstring>
212 </property> 219 </property>
213 <property stdset="1"> 220 <property stdset="1">
214 <name>text</name> 221 <name>text</name>
215 <string>To</string> 222 <string>To</string>
216 </property> 223 </property>
217 </widget> 224 </widget>
218 </grid> 225 </grid>
219 </widget> 226 </widget>
220 <widget> 227 <widget>
221 <class>QMultiLineEdit</class> 228 <class>QMultiLineEdit</class>
222 <property stdset="1"> 229 <property stdset="1">
223 <name>name</name> 230 <name>name</name>
224 <cstring>message</cstring> 231 <cstring>message</cstring>
225 </property> 232 </property>
226 </widget> 233 </widget>
227 </vbox> 234 </vbox>
228 </widget> 235 </widget>
229 <widget> 236 <widget>
230 <class>QWidget</class> 237 <class>QWidget</class>
231 <property stdset="1"> 238 <property stdset="1">
232 <name>name</name> 239 <name>name</name>
233 <cstring>optionsTab</cstring> 240 <cstring>optionsTab</cstring>
234 </property> 241 </property>
235 <attribute> 242 <attribute>
236 <name>title</name> 243 <name>title</name>
237 <string>Options</string> 244 <string>Options</string>
238 </attribute> 245 </attribute>
239 <grid> 246 <grid>
240 <property stdset="1"> 247 <property stdset="1">
241 <name>margin</name> 248 <name>margin</name>
242 <number>4</number> 249 <number>4</number>
243 </property> 250 </property>
244 <property stdset="1"> 251 <property stdset="1">
245 <name>spacing</name> 252 <name>spacing</name>
246 <number>3</number> 253 <number>3</number>
247 </property> 254 </property>
248 <widget row="3" column="0" > 255 <widget row="3" column="0" >
249 <class>QPushButton</class> 256 <class>QPushButton</class>
250 <property stdset="1"> 257 <property stdset="1">
251 <name>name</name> 258 <name>name</name>
252 <cstring>replyButton</cstring> 259 <cstring>replyButton</cstring>
253 </property> 260 </property>
254 <property stdset="1"> 261 <property stdset="1">
255 <name>text</name> 262 <name>text</name>
256 <string>Reply-To</string> 263 <string>Reply-To</string>
257 </property> 264 </property>
258 </widget> 265 </widget>
259 <widget row="2" column="0" > 266 <widget row="2" column="0" >
260 <class>QPushButton</class> 267 <class>QPushButton</class>
261 <property stdset="1"> 268 <property stdset="1">
262 <name>name</name> 269 <name>name</name>
263 <cstring>bccButton</cstring> 270 <cstring>bccButton</cstring>
264 </property> 271 </property>
265 <property stdset="1"> 272 <property stdset="1">
266 <name>text</name> 273 <name>text</name>
267 <string>BCC</string> 274 <string>BCC</string>
268 </property> 275 </property>
269 </widget> 276 </widget>
270 <widget row="1" column="1" > 277 <widget row="1" column="1" >
271 <class>QLineEdit</class> 278 <class>QLineEdit</class>
272 <property stdset="1"> 279 <property stdset="1">
273 <name>name</name> 280 <name>name</name>
274 <cstring>ccLine</cstring> 281 <cstring>ccLine</cstring>
275 </property> 282 </property>
276 </widget> 283 </widget>
277 <widget row="2" column="1" > 284 <widget row="2" column="1" >
278 <class>QLineEdit</class> 285 <class>QLineEdit</class>
279 <property stdset="1"> 286 <property stdset="1">
280 <name>name</name> 287 <name>name</name>
281 <cstring>bccLine</cstring> 288 <cstring>bccLine</cstring>
282 </property> 289 </property>
283 </widget> 290 </widget>
284 <widget row="3" column="1" > 291 <widget row="3" column="1" >
285 <class>QLineEdit</class> 292 <class>QLineEdit</class>
286 <property stdset="1"> 293 <property stdset="1">
287 <name>name</name> 294 <name>name</name>
288 <cstring>replyLine</cstring> 295 <cstring>replyLine</cstring>
289 </property> 296 </property>
290 </widget> 297 </widget>
291 <widget row="6" column="0" rowspan="1" colspan="2" > 298 <widget row="6" column="0" rowspan="1" colspan="2" >
292 <class>QMultiLineEdit</class> 299 <class>QMultiLineEdit</class>
293 <property stdset="1"> 300 <property stdset="1">
294 <name>name</name> 301 <name>name</name>
295 <cstring>sigMultiLine</cstring> 302 <cstring>sigMultiLine</cstring>
296 </property> 303 </property>
297 </widget> 304 </widget>
298 <widget row="5" column="0" > 305 <widget row="5" column="0" >
299 <class>QLabel</class> 306 <class>QLabel</class>
300 <property stdset="1"> 307 <property stdset="1">
301 <name>name</name> 308 <name>name</name>
302 <cstring>sigLabel</cstring> 309 <cstring>sigLabel</cstring>
303 </property> 310 </property>
304 <property stdset="1"> 311 <property stdset="1">
305 <name>text</name> 312 <name>text</name>
306 <string>Signature</string> 313 <string>Signature</string>
307 </property> 314 </property>
308 </widget> 315 </widget>
309 <spacer row="4" column="0" > 316 <spacer row="4" column="0" >
310 <property> 317 <property>
311 <name>name</name> 318 <name>name</name>
312 <cstring>Spacer3</cstring> 319 <cstring>Spacer3</cstring>
313 </property> 320 </property>
314 <property stdset="1"> 321 <property stdset="1">
315 <name>orientation</name> 322 <name>orientation</name>
316 <enum>Vertical</enum> 323 <enum>Vertical</enum>
317 </property> 324 </property>
318 <property stdset="1"> 325 <property stdset="1">
319 <name>sizeType</name> 326 <name>sizeType</name>
320 <enum>Expanding</enum> 327 <enum>Expanding</enum>
321 </property> 328 </property>
322 <property> 329 <property>
323 <name>sizeHint</name> 330 <name>sizeHint</name>
324 <size> 331 <size>
325 <width>20</width> 332 <width>20</width>
326 <height>20</height> 333 <height>20</height>
327 </size> 334 </size>
328 </property> 335 </property>
329 </spacer> 336 </spacer>
330 <widget row="1" column="0" > 337 <widget row="1" column="0" >
331 <class>QPushButton</class> 338 <class>QPushButton</class>
332 <property stdset="1"> 339 <property stdset="1">
333 <name>name</name> 340 <name>name</name>
334 <cstring>ccButton</cstring> 341 <cstring>ccButton</cstring>
335 </property> 342 </property>
336 <property stdset="1"> 343 <property stdset="1">
337 <name>text</name> 344 <name>text</name>
338 <string>CC</string> 345 <string>CC</string>
339 </property> 346 </property>
340 </widget> 347 </widget>
341 </grid> 348 </grid>
342 </widget> 349 </widget>
343 <widget> 350 <widget>
344 <class>QWidget</class> 351 <class>QWidget</class>
345 <property stdset="1"> 352 <property stdset="1">
346 <name>name</name> 353 <name>name</name>
347 <cstring>attachTab</cstring> 354 <cstring>attachTab</cstring>
348 </property> 355 </property>
349 <attribute> 356 <attribute>
350 <name>title</name> 357 <name>title</name>
351 <string>Attachment</string> 358 <string>Attachment</string>
352 </attribute> 359 </attribute>
353 <grid> 360 <grid>
354 <property stdset="1"> 361 <property stdset="1">
355 <name>margin</name> 362 <name>margin</name>
356 <number>4</number> 363 <number>4</number>
357 </property> 364 </property>
358 <property stdset="1"> 365 <property stdset="1">
359 <name>spacing</name> 366 <name>spacing</name>
360 <number>3</number> 367 <number>3</number>
361 </property> 368 </property>
362 <widget row="0" column="0" rowspan="1" colspan="3" > 369 <widget row="0" column="0" rowspan="1" colspan="3" >
363 <class>QListView</class> 370 <class>QListView</class>
364 <property stdset="1"> 371 <property stdset="1">
365 <name>name</name> 372 <name>name</name>
366 <cstring>attList</cstring> 373 <cstring>attList</cstring>
367 </property> 374 </property>
368 <property stdset="1"> 375 <property stdset="1">
369 <name>selectionMode</name> 376 <name>selectionMode</name>
370 <enum>Single</enum> 377 <enum>Single</enum>
371 </property> 378 </property>
372 <property stdset="1"> 379 <property stdset="1">
373 <name>allColumnsShowFocus</name> 380 <name>allColumnsShowFocus</name>
374 <bool>true</bool> 381 <bool>true</bool>
375 </property> 382 </property>
376 <property stdset="1"> 383 <property stdset="1">
377 <name>showSortIndicator</name> 384 <name>showSortIndicator</name>
378 <bool>true</bool> 385 <bool>true</bool>
379 </property> 386 </property>
380 </widget> 387 </widget>
381 <widget row="1" column="2" > 388 <widget row="1" column="2" >
382 <class>QPushButton</class> 389 <class>QPushButton</class>
383 <property stdset="1"> 390 <property stdset="1">
384 <name>name</name> 391 <name>name</name>
385 <cstring>deleteButton</cstring> 392 <cstring>deleteButton</cstring>
386 </property> 393 </property>
387 <property stdset="1"> 394 <property stdset="1">
388 <name>text</name> 395 <name>text</name>
389 <string>Delete File</string> 396 <string>Delete File</string>
390 </property> 397 </property>
391 </widget> 398 </widget>
392 <widget row="1" column="0" > 399 <widget row="1" column="0" >
393 <class>QPushButton</class> 400 <class>QPushButton</class>
394 <property stdset="1"> 401 <property stdset="1">
395 <name>name</name> 402 <name>name</name>
396 <cstring>addButton</cstring> 403 <cstring>addButton</cstring>
397 </property> 404 </property>
398 <property stdset="1"> 405 <property stdset="1">
399 <name>text</name> 406 <name>text</name>
400 <string>Add File</string> 407 <string>Add File</string>
401 </property> 408 </property>
402 </widget> 409 </widget>
403 </grid> 410 </grid>
404 </widget> 411 </widget>
405 </widget> 412 </widget>
406 <widget row="0" column="0" > 413 <widget row="0" column="0" >
407 <class>QCheckBox</class> 414 <class>QCheckBox</class>
408 <property stdset="1"> 415 <property stdset="1">
409 <name>name</name> 416 <name>name</name>
410 <cstring>checkBoxLater</cstring> 417 <cstring>checkBoxLater</cstring>
411 </property> 418 </property>
412 <property stdset="1"> 419 <property stdset="1">
413 <name>text</name> 420 <name>text</name>
414 <string>send later</string> 421 <string>send later</string>
415 </property> 422 </property>
416 </widget> 423 </widget>
417 <widget row="0" column="1" > 424 <widget row="0" column="1" >
418 <class>QLabel</class> 425 <class>QLabel</class>
419 <property stdset="1"> 426 <property stdset="1">
420 <name>name</name> 427 <name>name</name>
421 <cstring>accountLabel</cstring> 428 <cstring>accountLabel</cstring>
422 </property> 429 </property>
423 <property stdset="1"> 430 <property stdset="1">
424 <name>text</name> 431 <name>text</name>
425 <string>use:</string> 432 <string>use:</string>
426 </property> 433 </property>
427 </widget> 434 </widget>
428 <widget row="0" column="2" > 435 <widget row="0" column="2" >
429 <class>QComboBox</class> 436 <class>QComboBox</class>
430 <property stdset="1"> 437 <property stdset="1">
431 <name>name</name> 438 <name>name</name>
432 <cstring>smtpAccountBox</cstring> 439 <cstring>smtpAccountBox</cstring>
433 </property> 440 </property>
434 <property stdset="1"> 441 <property stdset="1">
435 <name>sizePolicy</name> 442 <name>sizePolicy</name>
436 <sizepolicy> 443 <sizepolicy>
437 <hsizetype>3</hsizetype> 444 <hsizetype>3</hsizetype>
438 <vsizetype>0</vsizetype> 445 <vsizetype>0</vsizetype>
439 </sizepolicy> 446 </sizepolicy>
440 </property> 447 </property>
441 </widget> 448 </widget>
442 <widget row="0" column="3" > 449 <widget row="0" column="3" >
443 <class>QPushButton</class> 450 <class>QPushButton</class>
444 <property stdset="1"> 451 <property stdset="1">
445 <name>name</name> 452 <name>name</name>
446 <cstring>SaveButton</cstring> 453 <cstring>SaveButton</cstring>
447 </property> 454 </property>
448 <property stdset="1"> 455 <property stdset="1">
449 <name>text</name> 456 <name>text</name>
450 <string> S</string> 457 <string> S</string>
451 </property> 458 </property>
452 </widget> 459 </widget>
453 </grid> 460 </grid>
454</widget> 461</widget>
455<tabstops> 462<tabstops>
456 <tabstop>fromBox</tabstop> 463 <tabstop>fromBox</tabstop>
457 <tabstop>toButton</tabstop> 464 <tabstop>toButton</tabstop>
458 <tabstop>toLine</tabstop> 465 <tabstop>toLine</tabstop>
459 <tabstop>subjectLine</tabstop> 466 <tabstop>subjectLine</tabstop>
460 <tabstop>message</tabstop> 467 <tabstop>message</tabstop>
461 <tabstop>tabWidget</tabstop> 468 <tabstop>tabWidget</tabstop>
462 <tabstop>ccButton</tabstop> 469 <tabstop>ccButton</tabstop>
463 <tabstop>ccLine</tabstop> 470 <tabstop>ccLine</tabstop>
464 <tabstop>bccButton</tabstop> 471 <tabstop>bccButton</tabstop>
465 <tabstop>bccLine</tabstop> 472 <tabstop>bccLine</tabstop>
466 <tabstop>replyButton</tabstop> 473 <tabstop>replyButton</tabstop>
467 <tabstop>replyLine</tabstop> 474 <tabstop>replyLine</tabstop>
468 <tabstop>sigMultiLine</tabstop> 475 <tabstop>sigMultiLine</tabstop>
469 <tabstop>attList</tabstop> 476 <tabstop>attList</tabstop>
470 <tabstop>addButton</tabstop> 477 <tabstop>addButton</tabstop>
471 <tabstop>deleteButton</tabstop> 478 <tabstop>deleteButton</tabstop>
472</tabstops> 479</tabstops>
473</UI> 480</UI>
diff --git a/kmicromail/libmailwrapper/libmailwrapper.pro b/kmicromail/libmailwrapper/libmailwrapper.pro
index 10d45b1..0919cd2 100644
--- a/kmicromail/libmailwrapper/libmailwrapper.pro
+++ b/kmicromail/libmailwrapper/libmailwrapper.pro
@@ -1,65 +1,65 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3 3
4HEADERS = mailwrapper.h \ 4HEADERS = mailwrapper.h \
5 imapwrapper.h \ 5 imapwrapper.h \
6 mailtypes.h \ 6 mailtypes.h \
7 pop3wrapper.h \ 7 pop3wrapper.h \
8 abstractmail.h \ 8 abstractmail.h \
9 smtpwrapper.h \ 9 smtpwrapper.h \
10 genericwrapper.h \ 10 genericwrapper.h \
11 mboxwrapper.h \ 11 mboxwrapper.h \
12 settings.h \ 12 settings.h \
13 logindialog.h \ 13 logindialog.h \
14 sendmailprogress.h \ 14 sendmailprogress.h \
15 statusmail.h \ 15 statusmail.h \
16 mhwrapper.h \ 16 mhwrapper.h \
17 nntpwrapper.h \ 17 nntpwrapper.h \
18 generatemail.h \ 18 generatemail.h \
19 storemail.h \ 19 storemail.h \
20 ../qpe/global.h 20 ../qpe/global.h
21 21
22SOURCES = imapwrapper.cpp \ 22SOURCES = imapwrapper.cpp \
23 mailwrapper.cpp \ 23 mailwrapper.cpp \
24 mailtypes.cpp \ 24 mailtypes.cpp \
25 pop3wrapper.cpp \ 25 pop3wrapper.cpp \
26 abstractmail.cpp \ 26 abstractmail.cpp \
27 smtpwrapper.cpp \ 27 smtpwrapper.cpp \
28 genericwrapper.cpp \ 28 genericwrapper.cpp \
29 mboxwrapper.cpp \ 29 mboxwrapper.cpp \
30 settings.cpp \ 30 settings.cpp \
31 logindialog.cpp \ 31 logindialog.cpp \
32 sendmailprogress.cpp \ 32 sendmailprogress.cpp \
33 statusmail.cpp \ 33 statusmail.cpp \
34 mhwrapper.cpp \ 34 mhwrapper.cpp \
35 nntpwrapper.cpp \ 35 nntpwrapper.cpp \
36 generatemail.cpp \ 36 generatemail.cpp \
37 storemail.cpp \ 37 storemail.cpp \
38 ./qpe/qdialog_hacked.cpp \ 38 ../qpe/qdialog_hacked.cpp \
39 ../qpe/global.cpp 39 ../qpe/global.cpp
40 40
41INTERFACES = logindialogui.ui \ 41INTERFACES = logindialogui.ui \
42 sendmailprogressui.ui 42 sendmailprogressui.ui
43 43
44INCLUDEPATH += ../qpe .. ../../microkde ../../microkde/kdecore ../libetpan/include 44INCLUDEPATH += ../qpe .. ../../microkde ../../microkde/kdecore ../libetpan/include
45LIBS += -lssl -lcrypto 45LIBS += -lssl -lcrypto
46 46
47#-lqpe -letpan 47#-lqpe -letpan
48 48
49DESTDIR = ../../bin 49DESTDIR = ../../bin
50TARGET = micromailwrapper 50TARGET = micromailwrapper
51 51
52DEFINES += DESKTOP_VERSION 52DEFINES += DESKTOP_VERSION
53unix : { 53unix : {
54OBJECTS_DIR = obj/unix 54OBJECTS_DIR = obj/unix
55MOC_DIR = moc/unix 55MOC_DIR = moc/unix
56} 56}
57win32: { 57win32: {
58DEFINES += _WIN32_ 58DEFINES += _WIN32_
59LIBS += mfc71u.lib 59LIBS += mfc71u.lib
60QMAKE_LINK += /NODEFAULTLIB:LIBC 60QMAKE_LINK += /NODEFAULTLIB:LIBC
61#QMAKE_LINK += /NODEFAULTLIB:MSVCRT 61#QMAKE_LINK += /NODEFAULTLIB:MSVCRT
62#QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib 62#QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib
63OBJECTS_DIR = obj/win 63OBJECTS_DIR = obj/win
64MOC_DIR = moc/win 64MOC_DIR = moc/win
65} 65}
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 7655385..4115276 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,305 +1,308 @@
1 1
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qvbox.h> 4#include <qvbox.h>
5#include <qheader.h> 5#include <qheader.h>
6#include <qtimer.h> 6#include <qtimer.h>
7#include <qlayout.h> 7#include <qlayout.h>
8//#include <kdialog.h> 8//#include <kdialog.h>
9#include <kiconloader.h> 9#include <kiconloader.h>
10#include <kapplication.h> 10#include <kapplication.h>
11 11
12#ifdef DESKTOP_VERSION 12#ifdef DESKTOP_VERSION
13#include <qapplication.h> 13#include <qapplication.h>
14#else 14#else
15#include <qpe/qpeapplication.h> 15#include <qpe/qpeapplication.h>
16#endif 16#endif
17#include "defines.h" 17#include "defines.h"
18#include "mainwindow.h" 18#include "mainwindow.h"
19#include <KDGanttMinimizeSplitter.h> 19#include <KDGanttMinimizeSplitter.h>
20 20
21 21
22#include <kabc/stdaddressbook.h> 22#include <kabc/stdaddressbook.h>
23 23
24MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 24MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
25 : QMainWindow( parent, name ) //, flags ) 25 : QMainWindow( parent, name ) //, flags )
26{ 26{
27 setCaption( i18n( "KOpieMail/Pi" ) ); 27 setCaption( i18n( "KOpieMail/Pi" ) );
28 setToolBarsMovable( false ); 28 setToolBarsMovable( false );
29 //KABC::StdAddressBook::self(); 29 //KABC::StdAddressBook::self();
30 toolBar = new QToolBar( this ); 30 toolBar = new QToolBar( this );
31 menuBar = new QPEMenuBar( toolBar ); 31 menuBar = new QPEMenuBar( toolBar );
32 mailMenu = new QPopupMenu( menuBar ); 32 mailMenu = new QPopupMenu( menuBar );
33 menuBar->insertItem( i18n( "Mail" ), mailMenu ); 33 menuBar->insertItem( i18n( "Mail" ), mailMenu );
34 settingsMenu = new QPopupMenu( menuBar ); 34 settingsMenu = new QPopupMenu( menuBar );
35 menuBar->insertItem( i18n( "Settings" ), settingsMenu ); 35 menuBar->insertItem( i18n( "Settings" ), settingsMenu );
36 36
37 addToolBar( toolBar ); 37 addToolBar( toolBar );
38 toolBar->setHorizontalStretchable( true ); 38 toolBar->setHorizontalStretchable( true );
39 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), 39 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"),
40 0, 0, this ); 40 0, 0, this );
41 connect(getMail, SIGNAL( activated() ), 41 connect(getMail, SIGNAL( activated() ),
42 SLOT( slotGetAllMail() ) ); 42 SLOT( slotGetAllMail() ) );
43 getMail->addTo( mailMenu ); 43 getMail->addTo( mailMenu );
44 44
45 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), 45 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"),
46 0, 0, this ); 46 0, 0, this );
47 getMail->addTo( toolBar ); 47 getMail->addTo( toolBar );
48 getMail->addTo( mailMenu ); 48 getMail->addTo( mailMenu );
49 connect(getMail, SIGNAL( activated() ), 49 connect(getMail, SIGNAL( activated() ),
50 SLOT( slotGetMail() ) ); 50 SLOT( slotGetMail() ) );
51 51
52 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), 52 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"),
53 0, 0, this ); 53 0, 0, this );
54 composeMail->addTo( toolBar ); 54 composeMail->addTo( toolBar );
55 composeMail->addTo( mailMenu ); 55 composeMail->addTo( mailMenu );
56 56
57 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , 57 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") ,
58 0, 0, this ); 58 0, 0, this );
59 sendQueued->addTo( toolBar ); 59 sendQueued->addTo( toolBar );
60 sendQueued->addTo( mailMenu ); 60 sendQueued->addTo( mailMenu );
61 61
62 /* 62 /*
63 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, 63 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC,
64 0, 0, this ); 64 0, 0, this );
65 syncFolders->addTo( toolBar ); 65 syncFolders->addTo( toolBar );
66 syncFolders->addTo( mailMenu ); 66 syncFolders->addTo( mailMenu );
67 */ 67 */
68 68
69 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , 69 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") ,
70 0, 0, this, 0, true ); 70 0, 0, this, 0, true );
71 showFolders->addTo( toolBar ); 71 showFolders->addTo( toolBar );
72 showFolders->addTo( mailMenu ); 72 showFolders->addTo( mailMenu );
73 showFolders->setOn( true ); 73 showFolders->setOn( true );
74 connect(showFolders, SIGNAL( toggled(bool) ), 74 connect(showFolders, SIGNAL( toggled(bool) ),
75 SLOT( slotShowFolders(bool) ) ); 75 SLOT( slotShowFolders(bool) ) );
76 76
77 /* 77 /*
78 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), 78 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ),
79 0, 0, this ); 79 0, 0, this );
80 searchMails->addTo( toolBar ); 80 searchMails->addTo( toolBar );
81 searchMails->addTo( mailMenu ); 81 searchMails->addTo( mailMenu );
82 */ 82 */
83 83
84 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); 84 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this);
85 deleteMails->addTo( toolBar ); 85 deleteMails->addTo( toolBar );
86 deleteMails->addTo( mailMenu ); 86 deleteMails->addTo( mailMenu );
87 connect( deleteMails, SIGNAL( activated() ), 87 connect( deleteMails, SIGNAL( activated() ),
88 SLOT( slotDeleteMail() ) ); 88 SLOT( slotDeleteMail() ) );
89 89
90 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , 90 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") ,
91 0, 0, this ); 91 0, 0, this );
92 editSettings->addTo( settingsMenu ); 92 editSettings->addTo( settingsMenu );
93 connect( editSettings, SIGNAL( activated() ), 93 connect( editSettings, SIGNAL( activated() ),
94 SLOT( slotEditSettings() ) ); 94 SLOT( slotEditSettings() ) );
95 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 95 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
96 0, 0, this ); 96 0, 0, this );
97 editAccounts->addTo( settingsMenu ); 97 editAccounts->addTo( settingsMenu );
98 98
99 //setCentralWidget( view ); 99 //setCentralWidget( view );
100 100
101 QVBox* wrapperBox = new QVBox( this ); 101 QVBox* wrapperBox = new QVBox( this );
102 setCentralWidget( wrapperBox ); 102 setCentralWidget( wrapperBox );
103 103
104 // QWidget *view = new QWidget( wrapperBox ); 104 // QWidget *view = new QWidget( wrapperBox );
105 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); 105 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox);
106 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 106 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
107 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 107 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
108 108
109 folderView = new AccountView( split ); 109 folderView = new AccountView( split );
110 folderView->header()->hide(); 110 folderView->header()->hide();
111 folderView->setRootIsDecorated( false ); 111 folderView->setRootIsDecorated( false );
112 folderView->addColumn( i18n( "Mailbox" ) ); 112 folderView->addColumn( i18n( "Mailbox" ) );
113 113
114 //layout->addWidget( folderView ); 114 //layout->addWidget( folderView );
115 115
116 mailView = new QListView( split ); 116 mailView = new QListView( split );
117 mailView->addColumn( i18n( " " ) ); 117 mailView->addColumn( i18n( " " ) );
118 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 118 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
119 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 119 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
120 mailView->addColumn( i18n( "Size" ),QListView::Manual); 120 mailView->addColumn( i18n( "Size" ),QListView::Manual);
121 mailView->addColumn( i18n( "Date" ),QListView::Manual); 121 mailView->addColumn( i18n( "Date" ),QListView::Manual);
122 mailView->setAllColumnsShowFocus(true); 122 mailView->setAllColumnsShowFocus(true);
123 //mailView->setSorting(-1); 123 //mailView->setSorting(-1);
124 mailView->setRootIsDecorated( false ); 124 mailView->setRootIsDecorated( false );
125 statusWidget = new StatusWidget( wrapperBox ); 125 statusWidget = new StatusWidget( wrapperBox );
126 statusWidget->hide(); 126 statusWidget->hide();
127 127
128 //layout->addWidget( mailView ); 128 //layout->addWidget( mailView );
129 //layout->setStretchFactor( folderView, 1 ); 129 //layout->setStretchFactor( folderView, 1 );
130 //layout->setStretchFactor( mailView, 2 ); 130 //layout->setStretchFactor( mailView, 2 );
131 131
132 slotAdjustLayout(); 132 slotAdjustLayout();
133#ifndef DESKTOP_VERSION 133#ifndef DESKTOP_VERSION
134 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); 134 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
135 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 135 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
136#endif 136#endif
137 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 137 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this,
138 SLOT( mailLeftClicked(QListViewItem*) ) ); 138 SLOT( mailLeftClicked(QListViewItem*) ) );
139 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 139 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this,
140 SLOT( mailLeftClicked(QListViewItem*) ) ); 140 SLOT( mailLeftClicked(QListViewItem*) ) );
141 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 141 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
142 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 142 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
143 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 143 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
144 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 144 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
145 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 145 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
146 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 146 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
147// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 147// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
148 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 148 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
149 //mailView->setMultiSelection ( true ); 149 //mailView->setMultiSelection ( true );
150 mailView->setSelectionMode( QListView::Extended ); 150 mailView->setSelectionMode( QListView::Extended );
151 QValueList<int> list; 151 QValueList<int> list;
152 int fw = 100; 152 int fw = 100;
153 if ( QApplication::desktop()->width() > 320 ) 153 if ( QApplication::desktop()->width() > 320 )
154 fw = 50; 154 fw = 50;
155 list.append( fw ); 155 list.append( fw );
156 list.append( 100 ); 156 list.append( 100 );
157 split->setSizes( list ); 157 split->setSizes( list );
158 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 158 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
159 mailView->setShowSortIndicator ( true ); 159 mailView->setShowSortIndicator ( true );
160 QLabel *spacer = new QLabel( toolBar ); 160 QLabel *spacer = new QLabel( toolBar );
161 spacer->setBackgroundMode( QWidget::PaletteButton ); 161 spacer->setBackgroundMode( QWidget::PaletteButton );
162 toolBar->setStretchableWidget( spacer ); 162 toolBar->setStretchableWidget( spacer );
163 163
164 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 164 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
165 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 165 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
166 if ( QApplication::desktop()->width() > 320 ) 166 if ( QApplication::desktop()->width() > 320 )
167 closeMail->addTo(toolBar); 167 closeMail->addTo(toolBar);
168 closeMail->addTo(mailMenu); 168 closeMail->addTo(mailMenu);
169 169
170 170
171 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 171 QPopupMenu* helpMenu = new QPopupMenu( menuBar );
172 menuBar->insertItem( i18n( "Help" ), helpMenu ); 172 menuBar->insertItem( i18n( "Help" ), helpMenu );
173 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); 173 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this);
174 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 174 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
175 li->addTo(helpMenu); 175 li->addTo(helpMenu);
176 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); 176 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this);
177 connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); 177 connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
178 li->addTo(helpMenu); 178 li->addTo(helpMenu);
179 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); 179 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this);
180 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); 180 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) );
181 li->addTo(helpMenu); 181 li->addTo(helpMenu);
182#ifdef DESKTOP_VERSION
183 resize ( 640, 480 );
184#endif
182} 185}
183 186
184MainWindow::~MainWindow() 187MainWindow::~MainWindow()
185{ 188{
186} 189}
187 190
188void MainWindow::showLicence() 191void MainWindow::showLicence()
189{ 192{
190 KApplication::showLicence(); 193 KApplication::showLicence();
191} 194}
192void MainWindow::showAbout() 195void MainWindow::showAbout()
193{ 196{
194 QString version; 197 QString version;
195#include <../version> 198#include <../version>
196 199
197 QString cap = "About KOpieMail/Pi"; 200 QString cap = "About KOpieMail/Pi";
198 QString text =i18n("KOpieMail/Platform-independent\n") + 201 QString text =i18n("KOpieMail/Platform-independent\n") +
199 "(OM/Pi) " + version + " - " 202 "(OM/Pi) " + version + " - "
200 203
201#ifdef DESKTOP_VERSION 204#ifdef DESKTOP_VERSION
202 "Desktop Edition\n" 205 "Desktop Edition\n"
203#else 206#else
204 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" 207 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n"
205#endif 208#endif
206 "www.pi-sync.net\n\n" 209 "www.pi-sync.net\n\n"
207 210
208 211
209 212
210"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n" 213"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n"
211 "KOpieMail/Pi is based on Opie Mail\n" 214 "KOpieMail/Pi is based on Opie Mail\n"
212 "Copyright (c) Rajko Albrecht and the Opie team\n" 215 "Copyright (c) Rajko Albrecht and the Opie team\n"
213 "KOpieMail/Pi is licensed under the GPL\n" 216 "KOpieMail/Pi is licensed under the GPL\n"
214 "\n" 217 "\n"
215 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" 218 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n"
216 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" 219 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n"
217 "libEtPan has its own licence - see LibEtPan licence\n"; 220 "libEtPan has its own licence - see LibEtPan licence\n";
218 221
219 KApplication::showText( cap, text ); 222 KApplication::showText( cap, text );
220} 223}
221void MainWindow::showEtpanLicence() 224void MainWindow::showEtpanLicence()
222{ 225{
223 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); 226 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" );
224 227
225} 228}
226void MainWindow::appMessage(const QCString &, const QByteArray &) 229void MainWindow::appMessage(const QCString &, const QByteArray &)
227{ 230{
228 qDebug("appMessage implemented by subclass"); 231 qDebug("appMessage implemented by subclass");
229} 232}
230 233
231void MainWindow::slotAdjustLayout() { 234void MainWindow::slotAdjustLayout() {
232 235
233 /* 236 /*
234 QWidget *d = QApplication::desktop(); 237 QWidget *d = QApplication::desktop();
235 238
236 if ( d->width() < d->height() ) { 239 if ( d->width() < d->height() ) {
237 layout->setDirection( QBoxLayout::TopToBottom ); 240 layout->setDirection( QBoxLayout::TopToBottom );
238 } else { 241 } else {
239 layout->setDirection( QBoxLayout::LeftToRight ); 242 layout->setDirection( QBoxLayout::LeftToRight );
240 } 243 }
241 */ 244 */
242} 245}
243 246
244void MainWindow::slotAdjustColumns() 247void MainWindow::slotAdjustColumns()
245{ 248{
246 bool hidden = folderView->isHidden(); 249 bool hidden = folderView->isHidden();
247 if ( hidden ) folderView->show(); 250 if ( hidden ) folderView->show();
248 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 251 folderView->setColumnWidth( 0, folderView->visibleWidth() );
249 if ( hidden ) folderView->hide(); 252 if ( hidden ) folderView->hide();
250 253
251 mailView->setColumnWidth( 0, 10 ); 254 mailView->setColumnWidth( 0, 10 );
252 mailView->setColumnWidth( 1, 100 ); 255 mailView->setColumnWidth( 1, 100 );
253 mailView->setColumnWidth( 2, 100 ); 256 mailView->setColumnWidth( 2, 100 );
254 mailView->setColumnWidth( 3, 50 ); 257 mailView->setColumnWidth( 3, 50 );
255 mailView->setColumnWidth( 4, 120 ); 258 mailView->setColumnWidth( 4, 120 );
256} 259}
257 260
258void MainWindow::slotEditSettings() 261void MainWindow::slotEditSettings()
259{ 262{
260} 263}
261 264
262void MainWindow::slotShowFolders( bool ) 265void MainWindow::slotShowFolders( bool )
263{ 266{
264 qDebug("not implemented: "); 267 qDebug("not implemented: ");
265} 268}
266 269
267void MainWindow::refreshMailView(const QValueList<RecMailP>&) 270void MainWindow::refreshMailView(const QValueList<RecMailP>&)
268{ 271{
269 qDebug("not implemented: "); 272 qDebug("not implemented: ");
270} 273}
271 274
272void MainWindow::mailLeftClicked(QListViewItem * ) 275void MainWindow::mailLeftClicked(QListViewItem * )
273{ 276{
274 qDebug("not implemented: "); 277 qDebug("not implemented: ");
275} 278}
276 279
277void MainWindow::displayMail() 280void MainWindow::displayMail()
278{ 281{
279 qDebug("not implemented: "); 282 qDebug("not implemented: ");
280} 283}
281 284
282void MainWindow::slotDeleteMail() 285void MainWindow::slotDeleteMail()
283{ 286{
284 qDebug("not implemented: "); 287 qDebug("not implemented: ");
285} 288}
286 289
287void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) 290void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int )
288{ 291{
289 qDebug("not implemented: "); 292 qDebug("not implemented: ");
290} 293}
291 294
292void MainWindow::slotSendQueued() 295void MainWindow::slotSendQueued()
293{ 296{
294 qDebug("not implemented: "); 297 qDebug("not implemented: ");
295} 298}
296 299
297void MainWindow::slotEditAccounts() 300void MainWindow::slotEditAccounts()
298{ 301{
299 qDebug("not implemented: "); 302 qDebug("not implemented: ");
300} 303}
301 304
302void MainWindow::slotComposeMail() 305void MainWindow::slotComposeMail()
303{ 306{
304 qDebug("not implemented: "); 307 qDebug("not implemented: ");
305} 308}
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index e088b9e..ca3faaf 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -1,477 +1,483 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3 3
4#include "koprefsdialog.h" 4#include "koprefsdialog.h"
5#include <kapplication.h>
5#include <libkdepim/externalapphandler.h> 6#include <libkdepim/externalapphandler.h>
6#include <libkdepim/kpimglobalprefs.h> 7#include <libkdepim/kpimglobalprefs.h>
7#ifdef MINIKDE_KDIALOG_H 8#ifdef MINIKDE_KDIALOG_H
8#undef MINIKDE_KDIALOG_H 9#undef MINIKDE_KDIALOG_H
9#endif 10#endif
10#include "settingsdialog.h" 11#include "settingsdialog.h"
11#include "opiemail.h" 12#include "opiemail.h"
12#include "editaccounts.h" 13#include "editaccounts.h"
13#include "composemail.h" 14#include "composemail.h"
14#include "mailistviewitem.h" 15#include "mailistviewitem.h"
15#include "viewmail.h" 16#include "viewmail.h"
16#include "selectstore.h" 17#include "selectstore.h"
17#include "selectsmtp.h" 18#include "selectsmtp.h"
18#include "accountitem.h" 19#include "accountitem.h"
19#include "klocale.h" 20#include "klocale.h"
20 21
21#include <qmessagebox.h> 22#include <qmessagebox.h>
22#include <qtimer.h> 23#include <qtimer.h>
23#include <qcursor.h> 24#include <qcursor.h>
24#include <qregexp.h> 25#include <qregexp.h>
25 26
26#ifdef DESKTOP_VERSION 27#ifdef DESKTOP_VERSION
27#include <qapplication.h> 28#include <qapplication.h>
28#else 29#else
29#include <qpe/qpeapplication.h> 30#include <qpe/qpeapplication.h>
30#endif 31#endif
31#include <libmailwrapper/smtpwrapper.h> 32#include <libmailwrapper/smtpwrapper.h>
32#include <libmailwrapper/mailtypes.h> 33#include <libmailwrapper/mailtypes.h>
33#include <libmailwrapper/abstractmail.h> 34#include <libmailwrapper/abstractmail.h>
34/* OPIE */
35//#include <qpe/resource.h>
36//#include <qpe/qpeapplication.h>
37
38/* QT */
39 35
40//using namespace Opie::Core; 36//using namespace Opie::Core;
41 37
42OpieMail::OpieMail( QWidget *parent, const char *name ) 38OpieMail::OpieMail( QWidget *parent, const char *name )
43 : MainWindow( parent, name) //, WStyle_ContextHelp ) 39 : MainWindow( parent, name) //, WStyle_ContextHelp )
44{ 40{
45 settings = new Settings(); 41 settings = new Settings();
46 42
47 folderView->populate( settings->getAccounts() ); 43 folderView->populate( settings->getAccounts() );
48 44
49} 45}
50 46
51OpieMail::~OpieMail() 47OpieMail::~OpieMail()
52{ 48{
53 if (settings) delete settings; 49 if (settings) delete settings;
54} 50}
55 51
56void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 52void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
57{ 53{
58 54
59} 55}
60#include <stdlib.h> 56#include <stdlib.h>
61void OpieMail::message(const QCString &msg, const QByteArray &data) 57void OpieMail::message(const QCString &msg, const QByteArray &data)
62{ 58{
63 // copied from old mail2 59 // copied from old mail2
64 static int ii = 0; 60 static int ii = 0;
65 //qDebug("QCOP CALL ############################# %d ", ii); 61 //qDebug("QCOP CALL ############################# %d ", ii);
66 //QString mess ( msg ); 62 //QString mess ( msg );
67 //qDebug("Message = %s ",mess.latin1()); 63 //qDebug("Message = %s ",mess.latin1());
68 ++ii; 64 ++ii;
69 //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); 65 //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this);
70 66
71 mPendingEmail = QString::null; 67 mPendingEmail = QString::null;
72 mPendingName = QString::null; 68 mPendingName = QString::null;
73 if (msg == "writeMail(QString,QString)") 69 if (msg == "writeMail(QString,QString)")
74 { 70 {
75 //qDebug("writeMail(QString,QString) "); 71 //qDebug("writeMail(QString,QString) ");
76 QDataStream stream(data,IO_ReadOnly); 72 QDataStream stream(data,IO_ReadOnly);
77 stream >> mPendingName >> mPendingEmail; 73 stream >> mPendingName >> mPendingEmail;
78 // removing the whitespaces at beginning and end is needed! 74 // removing the whitespaces at beginning and end is needed!
79 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); 75 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
80 } 76 }
81 else if (msg == "newMail()") 77 else if (msg == "newMail()")
82 { 78 {
83 //qDebug("slotComposeMail() "); 79 //qDebug("slotComposeMail() ");
84 // we cannot call slotComposeMail(); directly, because may be executing a QCOP call 80 // we cannot call slotComposeMail(); directly, because may be executing a QCOP call
85 // and a QCOP call does not like a processevents in his execution 81 // and a QCOP call does not like a processevents in his execution
86 // with the Qtimer we call slotComposeMail() after we reached the main event loop 82 // with the Qtimer we call slotComposeMail() after we reached the main event loop
87 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); 83 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
88 // slotComposeMail(); 84 // slotComposeMail();
89 } 85 }
90 else if (msg == "newMail(QString)") 86 else if (msg == "newMail(QString)")
91 { 87 {
92 //qDebug(" newMail(QString)"); 88 //qDebug(" newMail(QString)");
93 QDataStream stream(data,IO_ReadOnly); 89 QDataStream stream(data,IO_ReadOnly);
94 stream >> mPendingName; 90 stream >> mPendingName;
95 // the format is 91 // the format is
96 // NAME <EMAIL>:SUBJECT 92 // NAME <EMAIL>:SUBJECT
97 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); 93 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
98 } else { 94 } else {
99 mPendingData = data; 95 mPendingData = data;
100 mPendingMessage = msg; 96 mPendingMessage = msg;
101 QTimer::singleShot ( 50, this, SLOT(slotExtAppHandler() ) ); 97 QTimer::singleShot ( 50, this, SLOT(slotExtAppHandler() ) );
102 } 98 }
103 99
104 //qDebug("END OpieMail::message "); 100 //qDebug("END OpieMail::message ");
105} 101}
106void OpieMail::slotExtAppHandler() 102void OpieMail::slotExtAppHandler()
107{ 103{
108 ExternalAppHandler::instance()->appMessage ( mPendingMessage, mPendingData ); 104 ExternalAppHandler::instance()->appMessage ( mPendingMessage, mPendingData );
109} 105}
110void OpieMail::slotwriteMail2(const QString& namemail ) 106void OpieMail::slotwriteMail2(const QString& namemail )
111{ 107{
112 //qDebug("OpieMail::slotwriteMail2 "); 108 //qDebug("OpieMail::slotwriteMail2 ");
113 //qApp->processEvents(); 109 //qApp->processEvents();
114 ComposeMail compose( settings, this, 0, true ); 110 ComposeMail compose( settings, this, 0, true );
115 if ( !namemail.isEmpty() ) { 111 if ( !namemail.isEmpty() ) {
116 QString to = namemail; 112 QString to = namemail;
117 if ( namemail.find( " <") > 1 ) { 113 if ( namemail.find( " <") > 1 ) {
118 to = "\"" +to.replace( QRegExp( " <"), "\" <") ; 114 to = "\"" +to.replace( QRegExp( " <"), "\" <") ;
119 } else 115 } else
120 if ( namemail.find( "<") > 1 ) { 116 if ( namemail.find( "<") > 1 ) {
121 to = "\"" +to.replace( QRegExp( "<"), "\" <") ; 117 to = "\"" +to.replace( QRegExp( "<"), "\" <") ;
122 } 118 }
123 int sub = to.find( ">:"); 119 int sub = to.find( ">:");
124 if ( sub > 0 ) { 120 if ( sub > 0 ) {
125 compose.setTo( to.left(sub+1) ); 121 compose.setTo( to.left(sub+1) );
126 compose.setSubject( to.mid(sub+2) ); 122 compose.setSubject( to.mid(sub+2) );
127 } else 123 } else
128 compose.setTo( to ); 124 compose.setTo( to );
129 } 125 }
130 compose.slotAdjustColumns(); 126 compose.slotAdjustColumns();
131 compose.showMaximized(); 127 compose.showMaximized();
132 compose.exec(); 128 compose.exec();
133 raise(); 129 raise();
134 //qDebug("retttich "); 130 //qDebug("retttich ");
135} 131}
136void OpieMail::slotwriteMail(const QString&name,const QString&email) 132void OpieMail::slotwriteMail(const QString&name,const QString&email)
137{ 133{
138 // qDebug("OpieMail::slotwriteMail "); 134 // qDebug("OpieMail::slotwriteMail ");
139 ComposeMail compose( settings, this, 0, true ); 135 ComposeMail compose( settings, this, 0, true );
140 if (!email.isEmpty()) 136 if (!email.isEmpty())
141 { 137 {
142 if (!name.isEmpty()) 138 if (!name.isEmpty())
143 { 139 {
144 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); 140 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">");
145 } 141 }
146 else 142 else
147 { 143 {
148 compose.setTo(email); 144 compose.setTo(email);
149 } 145 }
150 } 146 }
151 compose.slotAdjustColumns(); 147 compose.slotAdjustColumns();
152 compose.showMaximized(); 148 compose.showMaximized();
153 compose.exec(); 149 compose.exec();
154 raise(); 150 raise();
155} 151}
156 152
157void OpieMail::slotComposeMail() 153void OpieMail::slotComposeMail()
158{ 154{
159 if ( mPendingEmail == QString::null && mPendingName == QString::null) 155 if ( mPendingEmail == QString::null && mPendingName == QString::null)
160 slotwriteMail2( QString () ); 156 slotwriteMail2( QString () );
161 else { 157 else {
162 if ( mPendingEmail == QString::null ) 158 if ( mPendingEmail == QString::null )
163 slotwriteMail2( mPendingName ); 159 slotwriteMail2( mPendingName );
164 else 160 else
165 slotwriteMail( mPendingName, mPendingEmail ); 161 slotwriteMail( mPendingName, mPendingEmail );
166 } 162 }
167 //slotwriteMail(0l,0l); 163 //slotwriteMail(0l,0l);
168} 164}
169 165
170void OpieMail::slotSendQueued() 166void OpieMail::slotSendQueued()
171{ 167{
172 SMTPaccount *smtp = 0; 168 SMTPaccount *smtp = 0;
173 169
174 QList<Account> list = settings->getAccounts(); 170 QList<Account> list = settings->getAccounts();
175 QList<SMTPaccount> smtpList; 171 QList<SMTPaccount> smtpList;
176 smtpList.setAutoDelete(false); 172 smtpList.setAutoDelete(false);
177 Account *it; 173 Account *it;
178 for ( it = list.first(); it; it = list.next() ) 174 for ( it = list.first(); it; it = list.next() )
179 { 175 {
180 if ( it->getType() == MAILLIB::A_SMTP ) 176 if ( it->getType() == MAILLIB::A_SMTP )
181 { 177 {
182 smtp = static_cast<SMTPaccount *>(it); 178 smtp = static_cast<SMTPaccount *>(it);
183 smtpList.append(smtp); 179 smtpList.append(smtp);
184 } 180 }
185 } 181 }
186 if (smtpList.count()==0) 182 if (smtpList.count()==0)
187 { 183 {
188 QMessageBox::information(0,i18n("Info"),i18n("Define a smtp account first!\n")); 184 QMessageBox::information(0,i18n("Info"),i18n("Define a smtp account first!\n"));
189 return; 185 return;
190 } 186 }
191 if (smtpList.count()==1) 187 if (smtpList.count()==1)
192 { 188 {
193 smtp = smtpList.at(0); 189 smtp = smtpList.at(0);
194 } 190 }
195 else 191 else
196 { 192 {
197 smtp = 0; 193 smtp = 0;
198 selectsmtp selsmtp; 194 selectsmtp selsmtp;
199 selsmtp.setSelectionlist(&smtpList); 195 selsmtp.setSelectionlist(&smtpList);
200 selsmtp.showMaximized(); 196 selsmtp.showMaximized();
201 if ( selsmtp.exec() == QDialog::Accepted ) 197 if ( selsmtp.exec() == QDialog::Accepted )
202 { 198 {
203 smtp = selsmtp.selected_smtp(); 199 smtp = selsmtp.selected_smtp();
204 } 200 }
205 } 201 }
206 if (smtp) 202 if (smtp)
207 { 203 {
208 SMTPwrapper * wrap = new SMTPwrapper(smtp); 204 SMTPwrapper * wrap = new SMTPwrapper(smtp);
209 if ( wrap->flushOutbox() ) 205 if ( wrap->flushOutbox() )
210 { 206 {
211 QMessageBox::information(0,i18n("Info"),i18n("Mail queue flushed")); 207 QMessageBox::information(0,i18n("Info"),i18n("Mail queue flushed"));
212 } 208 }
213 delete wrap; 209 delete wrap;
214 } 210 }
215} 211}
216 212
217void OpieMail::slotSearchMails() 213void OpieMail::slotSearchMails()
218{ 214{
219 qDebug("OpieMail::slotSearchMails():not implemented "); 215 qDebug("OpieMail::slotSearchMails():not implemented ");
220} 216}
221 217
222void OpieMail::slotEditSettings() 218void OpieMail::slotEditSettings()
223{ 219{
224#if 0 220
225 SettingsDialog settingsDialog( this, 0, true, WStyle_ContextHelp );
226 settingsDialog.showMaximized();
227 settingsDialog.exec();
228#endif
229 KOPrefsDialog settingsDialog( this, "koprefs", true ); 221 KOPrefsDialog settingsDialog( this, "koprefs", true );
222#ifndef DESKTOP_VERSION
230 settingsDialog.showMaximized(); 223 settingsDialog.showMaximized();
224#endif
231 settingsDialog.exec(); 225 settingsDialog.exec();
226
227 // KApplication::execDialog(settingsDialog);
232} 228}
233 229
234void OpieMail::slotEditAccounts() 230void OpieMail::slotEditAccounts()
235{ 231{
236 EditAccounts eaDialog( settings, this, 0, true ); 232 EditAccounts eaDialog( settings, this, 0, true );
237 eaDialog.slotAdjustColumns(); 233 eaDialog.slotAdjustColumns();
234#ifndef DESKTOP_VERSION
238 eaDialog.showMaximized(); 235 eaDialog.showMaximized();
236#endif
239 eaDialog.exec(); 237 eaDialog.exec();
240 if ( settings ) delete settings; 238 if ( settings ) delete settings;
241 settings = new Settings(); 239 settings = new Settings();
242 240
243 folderView->populate( settings->getAccounts() ); 241 folderView->populate( settings->getAccounts() );
244} 242}
245 243
246void OpieMail::displayMail() 244void OpieMail::displayMail()
247{ 245{
248 QListViewItem*item = mailView->currentItem(); 246 QListViewItem*item = mailView->currentItem();
249 if (!item) return; 247 if (!item) return;
250 RecMailP mail = ((MailListViewItem*)item)->data(); 248 RecMailP mail = ((MailListViewItem*)item)->data();
251 RecBodyP body = folderView->fetchBody(mail); 249 RecBodyP body = folderView->fetchBody(mail);
252 ViewMail readMail( this,"", Qt::WType_Modal ); 250 ViewMail readMail( this,"", Qt::WType_Modal );
253 readMail.setBody( body ); 251 readMail.setBody( body );
254 readMail.setMail( mail ); 252 readMail.setMail( mail );
253#ifndef DESKTOP_VERSION
255 readMail.showMaximized(); 254 readMail.showMaximized();
255#else
256 readMail.resize( 640, 480);
257#endif
256 readMail.exec(); 258 readMail.exec();
257 259
258 if ( readMail.deleted ) 260 if ( readMail.deleted )
259 { 261 {
260 folderView->refreshCurrent(); 262 folderView->refreshCurrent();
261 } 263 }
262 else 264 else
263 { 265 {
264 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); 266 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
265 } 267 }
266} 268}
267void OpieMail::slotGetAllMail() 269void OpieMail::slotGetAllMail()
268{ 270{
269 QListViewItem * item = folderView->firstChild(); 271 QListViewItem * item = folderView->firstChild();
270 while ( item ){ 272 while ( item ){
271 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 273 ((AccountViewItem *)item)->contextMenuSelected( 101 );
272 item = item->nextSibling (); 274 item = item->nextSibling ();
273 } 275 }
274} 276}
275void OpieMail::slotGetMail() 277void OpieMail::slotGetMail()
276{ 278{
277 QListViewItem * item = folderView->currentItem(); 279 QListViewItem * item = folderView->currentItem();
278 if ( ! item ) return; 280 if ( ! item ) return;
279 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 281 ((AccountViewItem *)item)->contextMenuSelected( 101 );
280} 282}
281void OpieMail::slotDeleteMail() 283void OpieMail::slotDeleteMail()
282{ 284{
283 if (!mailView->currentItem()) return; 285 if (!mailView->currentItem()) return;
284 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); 286 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
285 if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 287 if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
286 { 288 {
287 mail->Wrapper()->deleteMail( mail ); 289 mail->Wrapper()->deleteMail( mail );
288 folderView->refreshCurrent(); 290 folderView->refreshCurrent();
289 } 291 }
290} 292}
291void OpieMail::slotDeleteAllMail() 293void OpieMail::slotDeleteAllMail()
292{ 294{
293 295
294 QValueList<RecMailP> t; 296 QValueList<RecMailP> t;
295 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 297 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
296 { 298 {
297 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 299 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
298 while ( item ) { 300 while ( item ) {
299 if ( item->isSelected() ) { 301 if ( item->isSelected() ) {
300 t.append( item->data() ); 302 t.append( item->data() );
301 } 303 }
302 item = (MailListViewItem*)item->nextSibling(); 304 item = (MailListViewItem*)item->nextSibling();
303 } 305 }
304 } 306 }
305 else 307 else
306 return; 308 return;
307 if ( t.count() == 0 ) 309 if ( t.count() == 0 )
308 return; 310 return;
309 RecMailP mail = t.first(); 311 RecMailP mail = t.first();
310 mail->Wrapper()->deleteMailList(t); 312 mail->Wrapper()->deleteMailList(t);
311 folderView->refreshCurrent(); 313 folderView->refreshCurrent();
312 314
313 315
314} 316}
315void OpieMail::clearSelection() 317void OpieMail::clearSelection()
316{ 318{
317 mailView->clearSelection(); 319 mailView->clearSelection();
318 320
319} 321}
320 322
321void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) 323void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
322{ 324{
323 if (!mailView->currentItem()) return; 325 if (!mailView->currentItem()) return;
324 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); 326 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType();
325 /* just the RIGHT button - or hold on pda */ 327 /* just the RIGHT button - or hold on pda */
326 if (button!=2) {return;} 328 if (button!=2) {return;}
327 if (!item) return; 329 if (!item) return;
328 QPopupMenu *m = new QPopupMenu(0); 330 QPopupMenu *m = new QPopupMenu(0);
329 if (m) 331 if (m)
330 { 332 {
331 if (mailtype==MAILLIB::A_NNTP) { 333 if (mailtype==MAILLIB::A_NNTP) {
332 m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); 334 m->insertItem(i18n("Read this posting"),this,SLOT(displayMail()));
333 m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); 335 m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail()));
334 m->insertSeparator(); 336 m->insertSeparator();
335 m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); 337 m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail()));
336 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); 338 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
337 } else { 339 } else {
338 if (folderView->currentisDraft()) { 340 if (folderView->currentisDraft()) {
339 m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); 341 m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail()));
340 } 342 }
341 m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); 343 m->insertItem(i18n("Read this mail"),this,SLOT(displayMail()));
342 m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); 344 m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail()));
343 m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); 345 m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail()));
344 m->insertSeparator(); 346 m->insertSeparator();
345 m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); 347 m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail()));
346 m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); 348 m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail()));
347 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); 349 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
348 } 350 }
349 m->setFocus(); 351 m->setFocus();
350 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); 352 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
351 delete m; 353 delete m;
352 } 354 }
353} 355}
354 356
355void OpieMail::slotShowFolders( bool show ) 357void OpieMail::slotShowFolders( bool show )
356{ 358{
357 if ( show && folderView->isHidden() ) 359 if ( show && folderView->isHidden() )
358 { 360 {
359 folderView->show(); 361 folderView->show();
360 } 362 }
361 else if ( !show && !folderView->isHidden() ) 363 else if ( !show && !folderView->isHidden() )
362 { 364 {
363 folderView->hide(); 365 folderView->hide();
364 } 366 }
365} 367}
366 368
367void OpieMail::refreshMailView(const QValueList<RecMailP>&list) 369void OpieMail::refreshMailView(const QValueList<RecMailP>&list)
368{ 370{
369 MailListViewItem*item = 0; 371 MailListViewItem*item = 0;
370 mailView->clear(); 372 mailView->clear();
371 373
372 QValueList<RecMailP>::ConstIterator it; 374 QValueList<RecMailP>::ConstIterator it;
373 for (it = list.begin(); it != list.end();++it) 375 for (it = list.begin(); it != list.end();++it)
374 { 376 {
375 item = new MailListViewItem(mailView,item); 377 item = new MailListViewItem(mailView,item);
376 item->storeData((*it)); 378 item->storeData((*it));
377 item->showEntry(); 379 item->showEntry();
378 } 380 }
379} 381}
380 382
381void OpieMail::mailLeftClicked( QListViewItem *item ) 383void OpieMail::mailLeftClicked( QListViewItem *item )
382{ 384{
383 mailView->clearSelection(); 385 mailView->clearSelection();
384 /* just LEFT button - or tap with stylus on pda */ 386 /* just LEFT button - or tap with stylus on pda */
385 //if (button!=1) return; 387 //if (button!=1) return;
386 if (!item) return; 388 if (!item) return;
387 if (folderView->currentisDraft()) { 389 if (folderView->currentisDraft()) {
388 reEditMail(); 390 reEditMail();
389 } else { 391 } else {
390 displayMail(); 392 displayMail();
391 } 393 }
392} 394}
393 395
394void OpieMail::slotMoveCopyMail() 396void OpieMail::slotMoveCopyMail()
395{ 397{
396 if (!mailView->currentItem()) return; 398 if (!mailView->currentItem()) return;
397 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); 399 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
398 AbstractMail*targetMail = 0; 400 AbstractMail*targetMail = 0;
399 QString targetFolder = ""; 401 QString targetFolder = "";
400 Selectstore sels; 402 Selectstore sels;
401 folderView->setupFolderselect(&sels); 403 folderView->setupFolderselect(&sels);
402 if (!sels.exec()) return; 404 if (!sels.exec()) return;
403 targetMail = sels.currentMail(); 405 targetMail = sels.currentMail();
404 targetFolder = sels.currentFolder(); 406 targetFolder = sels.currentFolder();
405 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || 407 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
406 targetFolder.isEmpty()) 408 targetFolder.isEmpty())
407 { 409 {
408 return; 410 return;
409 } 411 }
410 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 412 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
411 { 413 {
412 QMessageBox::critical(0,i18n("Error creating new Folder"), 414 QMessageBox::critical(0,i18n("Error creating new Folder"),
413 i18n("<center>Error while creating<br>new folder - breaking.</center>")); 415 i18n("<center>Error while creating<br>new folder - breaking.</center>"));
414 return; 416 return;
415 } 417 }
416 sels.hide(); 418 sels.hide();
417 qApp->processEvents(); 419 qApp->processEvents();
418 // qDebug("hiding sels "); 420 // qDebug("hiding sels ");
419 mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails()); 421 mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails());
420 folderView->refreshCurrent(); 422 folderView->refreshCurrent();
421} 423}
422 424
423void OpieMail::slotMoveCopyAllMail() 425void OpieMail::slotMoveCopyAllMail()
424{ 426{
425 427
426 if (!mailView->currentItem()) return; 428 if (!mailView->currentItem()) return;
427 QValueList<RecMailP> t; 429 QValueList<RecMailP> t;
428 // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 430 // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
429 { 431 {
430 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 432 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
431 while ( item ) { 433 while ( item ) {
432 if ( item->isSelected() ) { 434 if ( item->isSelected() ) {
433 t.append( item->data() ); 435 t.append( item->data() );
434 } 436 }
435 item = (MailListViewItem*)item->nextSibling(); 437 item = (MailListViewItem*)item->nextSibling();
436 } 438 }
437 } 439 }
438 // else 440 // else
439 // return; 441 // return;
440 if ( t.count() == 0 ) 442 if ( t.count() == 0 )
441 return; 443 return;
442 RecMailP mail = t.first(); 444 RecMailP mail = t.first();
443 AbstractMail*targetMail = 0; 445 AbstractMail*targetMail = 0;
444 QString targetFolder = ""; 446 QString targetFolder = "";
445 Selectstore sels; 447 Selectstore sels;
446 folderView->setupFolderselect(&sels); 448 folderView->setupFolderselect(&sels);
447 if (!sels.exec()) return; 449 if (!sels.exec()) return;
448 targetMail = sels.currentMail(); 450 targetMail = sels.currentMail();
449 targetFolder = sels.currentFolder(); 451 targetFolder = sels.currentFolder();
450 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || 452 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
451 targetFolder.isEmpty()) 453 targetFolder.isEmpty())
452 { 454 {
453 return; 455 return;
454 } 456 }
455 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 457 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
456 { 458 {
457 QMessageBox::critical(0,i18n("Error creating new Folder"), 459 QMessageBox::critical(0,i18n("Error creating new Folder"),
458 i18n("<center>Error while creating<br>new folder - breaking.</center>")); 460 i18n("<center>Error while creating<br>new folder - breaking.</center>"));
459 return; 461 return;
460 } 462 }
461 sels.hide(); 463 sels.hide();
462 qApp->processEvents(); 464 qApp->processEvents();
463 //qDebug("hiding sels "); 465 //qDebug("hiding sels ");
464 mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails()); 466 mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails());
465 folderView->refreshCurrent(); 467 folderView->refreshCurrent();
466} 468}
467 469
468void OpieMail::reEditMail() 470void OpieMail::reEditMail()
469{ 471{
470 if (!mailView->currentItem()) return; 472 if (!mailView->currentItem()) return;
471 473
472 ComposeMail compose( settings, this, 0, true ); 474 ComposeMail compose( settings, this, 0, true );
473 compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data()); 475 compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data());
474 compose.slotAdjustColumns(); 476 compose.slotAdjustColumns();
477#ifndef DESKTOP_VERSION
475 compose.showMaximized(); 478 compose.showMaximized();
479#else
480 compose.resize(640,480);
481#endif
476 compose.exec(); 482 compose.exec();
477} 483}
diff --git a/kmicromail/qpe/qdialog.h b/kmicromail/qpe/qdialog.h
index d671e34..aafdf80 100644
--- a/kmicromail/qpe/qdialog.h
+++ b/kmicromail/qpe/qdialog.h
@@ -1,35 +1,33 @@
1 1
2#ifndef MINIKDE_KDIALOG_H 2#ifndef MINIKDE_KDIALOG_H
3 3
4#ifndef DEFINE_QDIALOG_HACK 4#ifndef DEFINE_QDIALOG_HACK
5#define DEFINE_QDIALOG_HACK 5#define DEFINE_QDIALOG_HACK
6#warning call of include <qdialog.h> 6#warning call of include <qdialog.h>
7#warning including /usr/local/qt/include/qdialog.h 7#warning including /usr/local/qt/include/qdialog.h
8#warning if you get an compiling error please adjust your path her 8#warning if you get a compiling error
9#warning please adjust your path here!
9 10
10#include "/usr/local/qt/include/qdialog.h" 11#include "/usr/local/qt/include/qdialog.h"
11class QDialog_hacked : public QDialog 12class QDialog_hacked : public QDialog
12{ 13{
13 //Q__OBJECT 14 //Q__OBJECT
14 15
15 public: 16 public:
16 QDialog_hacked ( QWidget * parent=0, const char * name=0, bool modal=true, WFlags f=0 ); 17 QDialog_hacked ( QWidget * parent=0, const char * name=0, bool modal=true, WFlags f=0 );
17 18
18}; 19};
19 20
20#define QDialog QDialog_hacked 21#define QDialog QDialog_hacked
21 22
22#endif 23#endif
23 24
24#else 25#else
25#warning ****************************************** 26#warning ******************************************
26#warning ****************************************** 27#warning ******************************************
27#warning ****************************************** 28#warning ******************************************
28#warning ****************************************** 29#warning ******************************************
29#warning ****************************************** 30#warning "/usr/local/qt/include/qdialog.h" for KDialog
30#warning ******************************************
31#warning ******************************************
32#warning ******************************************
33#include "/usr/local/qt/include/qdialog.h" 31#include "/usr/local/qt/include/qdialog.h"
34 32
35#endif 33#endif
diff --git a/kmicromail/qpe/qdialog_hacked.cpp b/kmicromail/qpe/qdialog_hacked.cpp
index e2ce21a..3669312 100644
--- a/kmicromail/qpe/qdialog_hacked.cpp
+++ b/kmicromail/qpe/qdialog_hacked.cpp
@@ -1,30 +1,31 @@
1 1
2#include <qdialog.h> 2#include <qdialog.h>
3#include <qhbox.h> 3#include <qhbox.h>
4#include <qpushbutton.h> 4#include <qpushbutton.h>
5#include <klocale.h> 5#include <klocale.h>
6#ifdef QDialog 6#ifdef QDialog
7#undef QDialog 7#undef QDialog
8#endif 8#endif
9 QDialog_hacked::QDialog_hacked ( QWidget * parent, const char * name, bool modal, WFlags f ) 9 QDialog_hacked::QDialog_hacked ( QWidget * parent, const char * name, bool modal, WFlags f )
10 : QDialog( parent,name,modal) 10 : QDialog( parent,name,modal, f)
11 { 11 {
12 qDebug("******************** "); 12 qDebug("******************** ");
13 qDebug("******************** "); 13 qDebug("******************** ");
14 qDebug("******************** "); 14 qDebug("******************** ");
15 qDebug("******************** "); 15 qDebug("******************** ");
16 qDebug("New hacked QDialog == KDialogBase "); 16 qDebug("New hacked QDialog for ompi ");
17 //QTimer::singleShot( 1, this,SLOT(addaddbuttons()) ); 17 //QTimer::singleShot( 1, this,SLOT(addaddbuttons()) );
18 18
19 setOrientation ( Vertical ); 19 setOrientation ( Vertical );
20 QHBox * hb = new QHBox ( this ); 20 QHBox * hb = new QHBox ( this );
21 QPushButton *ok = new QPushButton( i18n("OK"), hb ); 21 QPushButton *ok = new QPushButton( i18n("OK"), hb );
22 QPushButton *cancel = new QPushButton( i18n("Cancel"), hb ); 22 QPushButton *cancel = new QPushButton( i18n("Cancel"), hb );
23 setExtension ( hb ); 23 setExtension ( hb );
24 showExtension ( true ); 24 showExtension ( true );
25 connect ( ok, SIGNAL ( clicked()),this, SLOT (accept() ) ); 25 connect ( ok, SIGNAL ( clicked()),this, SLOT (accept() ) );
26 connect ( cancel, SIGNAL ( clicked()),this, SLOT (reject() ) ); 26 connect ( cancel, SIGNAL ( clicked()),this, SLOT (reject() ) );
27 //setWFlags(WStyle_MinMax );
27 28
28 } 29 }
29 30
30 31