summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt13
-rw-r--r--kmicromail/composemail.cpp21
-rw-r--r--kmicromail/composemail.h1
-rw-r--r--kmicromail/composemailui.ui74
-rw-r--r--kmicromail/editaccounts.cpp19
-rw-r--r--kmicromail/editaccounts.h1
-rw-r--r--kmicromail/libmailwrapper/settings.cpp46
-rw-r--r--kmicromail/libmailwrapper/settings.h6
-rw-r--r--kmicromail/main.cpp2
-rw-r--r--kmicromail/mainwindow.cpp2
-rw-r--r--kmicromail/smtpconfigui.ui97
11 files changed, 191 insertions, 91 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 3dbbbb6..031c7f2 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,875 +1,888 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.2 ************ 3********** VERSION 2.0.2 ************
4 4
5KO/Pi: 5KO/Pi:
6Fixed the layout problem of the day label buttons 6Fixed the layout problem of the day label buttons
7of the agenda view introduced in version 2.0.1. 7of the agenda view introduced in version 2.0.1.
8 8
9Added WhatsThis support for the todo view and the list view. 9Added WhatsThis support for the todo view and the list view.
10 10
11Added a quite useful feature to the montview. 11Added a quite useful feature to the montview.
12Just click on the week numbers on the left. 12Just click on the week numbers on the left.
13And in the top right corner of month view/agenda view 13And in the top right corner of month view/agenda view
14there is now a "week number quick selector". 14there is now a "week number quick selector".
15(Click on the black triangle). 15(Click on the black triangle).
16 16
17Made the quite difficult timezone change in KO/Pi easy. 17Made the quite difficult timezone change in KO/Pi easy.
18 18
19OM/Pi:
20Fixed too small icons on desktop.
21Fixed non visible icons in mainwindow on Z with fastload enabled.
22Added signature file setting to smtp account config.
23And the signature can be edited and saved in the edit mail dialog.
24That does mean:
25Simply edit the signature for the selected smtp account in the
26edit new mail dialog and press the "save signature" button there.
27Then the signature is saved to the file specified in the smtp account settings.
28If there is no file specified, it is saved automatically to the file
29kdepim/apps/kopiemail/<accountname>.sig.
30
31
19 32
20********** VERSION 2.0.1 ************ 33********** VERSION 2.0.1 ************
21 34
22Oooops ... I forgot to test on the Zaurus 5500 ... 35Oooops ... I forgot to test on the Zaurus 5500 ...
23 36
24Fixed many problems of new (english) strings (and german translations) 37Fixed many problems of new (english) strings (and german translations)
25introduced in the latest versions, where the text was not fitting on the 38introduced in the latest versions, where the text was not fitting on the
26240x320 display of the Zaurus 5500. 39240x320 display of the Zaurus 5500.
27 40
28KO/Pi: 41KO/Pi:
29Added a popup menu ( press pen and hold to get popup ) to the agenda view 42Added a popup menu ( press pen and hold to get popup ) to the agenda view
30with many useful items (add event/todo, show next week, two weeks, month, journal). 43with many useful items (add event/todo, show next week, two weeks, month, journal).
31 44
32Added items to the todolist popup menu for: 45Added items to the todolist popup menu for:
33Display all opened, all closed or all todos flat. 46Display all opened, all closed or all todos flat.
34The "flat" view makes is possible to sort all todos after ,e.g., prio or date. 47The "flat" view makes is possible to sort all todos after ,e.g., prio or date.
35Made the reparenting of todos on the desktop possible via Drag&Drop. 48Made the reparenting of todos on the desktop possible via Drag&Drop.
36Fixed several bugs in setting the completed datetime for todos. 49Fixed several bugs in setting the completed datetime for todos.
37Added info about completed datetime of todos to the todo viewer. 50Added info about completed datetime of todos to the todo viewer.
38Now displaying a completed todo (with completed datetime set) in the agenda view 51Now displaying a completed todo (with completed datetime set) in the agenda view
39at the time of the completion. Such that now it is possible to see in the agenda view 52at the time of the completion. Such that now it is possible to see in the agenda view
40when what todo was completed. 53when what todo was completed.
41Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. 54Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos.
42Now the behaviour is: 55Now the behaviour is:
43Setting a parent to complete sets all (sub)childs to complete. 56Setting a parent to complete sets all (sub)childs to complete.
44Setting a parent to uncomplete does not change the childs. 57Setting a parent to uncomplete does not change the childs.
45Setting a child to uncomplete sets all parent to uncomplete. 58Setting a child to uncomplete sets all parent to uncomplete.
46Setting a child to complete does not change the parents. 59Setting a child to complete does not change the parents.
47 60
48Smart updating and double buffering of the daymatrix. 61Smart updating and double buffering of the daymatrix.
49Showing holidays in the day matrix. 62Showing holidays in the day matrix.
50Many other small performance updates. 63Many other small performance updates.
51 64
52Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. 65Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
53 66
54Now the translation file usertranslation.txt is supposed to be in utf8 format. 67Now the translation file usertranslation.txt is supposed to be in utf8 format.
55If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu. 68If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu.
56 69
57 70
58********** VERSION 2.0.0 ************ 71********** VERSION 2.0.0 ************
59 72
60Stable release 2.0.0! 73Stable release 2.0.0!
61 74
62KO/Pi: 75KO/Pi:
63Fixed problem in edit dialog recreation at startup. 76Fixed problem in edit dialog recreation at startup.
64Made "toggle view*" menu items enabled context sensitive. 77Made "toggle view*" menu items enabled context sensitive.
65Changed agenda size menu to items 1-10. 78Changed agenda size menu to items 1-10.
66Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. 79Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
67Usebility enhancements in the KO/Pi menus. 80Usebility enhancements in the KO/Pi menus.
68Birthday import now adds year to summary. 81Birthday import now adds year to summary.
69What's Next view shows age in years for birthday. 82What's Next view shows age in years for birthday.
70 83
71OM/Pi: 84OM/Pi:
72Added three info lines to display subject, from and to of selected mails. 85Added three info lines to display subject, from and to of selected mails.
73 86
74KA/Pi: 87KA/Pi:
75Fixed jump bar behaviour on Zaurus. 88Fixed jump bar behaviour on Zaurus.
76Now KA/Pi search field supports searching for a range of starting characters. 89Now KA/Pi search field supports searching for a range of starting characters.
77E.g. to search for all contact beginning with b to n, type 90E.g. to search for all contact beginning with b to n, type
78b-n 91b-n
79in the search field. 92in the search field.
80 93
81********** VERSION 1.9.20 ************ 94********** VERSION 1.9.20 ************
82 95
83KO/Pi: 96KO/Pi:
84Added for the "dislplay one day" agenda mode 97Added for the "dislplay one day" agenda mode
85info in the caption and in the day lables: 98info in the caption and in the day lables:
86Now it is displayed, if the selected day is from "day before yesterday" 99Now it is displayed, if the selected day is from "day before yesterday"
87to "day after tomorrow". 100to "day after tomorrow".
88Made it possible to delete a Todo, which has sub-todos. 101Made it possible to delete a Todo, which has sub-todos.
89Fixed two small problems in the todo view. 102Fixed two small problems in the todo view.
90Added missing German translation for filter edit and print dialog. 103Added missing German translation for filter edit and print dialog.
91Made search dialog closeable by cancel key. 104Made search dialog closeable by cancel key.
92 105
93Made it possible to select in the date picker the (ligt grey ) 106Made it possible to select in the date picker the (ligt grey )
94dates of the prev./next month with the mouse. 107dates of the prev./next month with the mouse.
95 108
96OM/Pi: 109OM/Pi:
97"Delete mail" icon in main window now deletes all selected mails. 110"Delete mail" icon in main window now deletes all selected mails.
98Fixed the problem, that the state flag of imap mails was ignored. 111Fixed the problem, that the state flag of imap mails was ignored.
99Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 112Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
100to indecate that they are already seen. 113to indecate that they are already seen.
101Fixed the problem that the body of some mails was not displayed in the 114Fixed the problem that the body of some mails was not displayed in the
102mail viewer when fetching them from the imap server directly to read them. 115mail viewer when fetching them from the imap server directly to read them.
103Made it (configurable) possible to show the "To:" field in the list view. 116Made it (configurable) possible to show the "To:" field in the list view.
104Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 117Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
105Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 118Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
106local storage folder (specified in account settings) of the account of the mail. 119local storage folder (specified in account settings) of the account of the mail.
107Removed some memory leaks in OM/Pi. 120Removed some memory leaks in OM/Pi.
108 121
109 122
110********** VERSION 1.9.19 ************ 123********** VERSION 1.9.19 ************
111 124
112Added a lot of missing translations to KA/Pi, 125Added a lot of missing translations to KA/Pi,
113Added some missing translations to KO/Pi and OM/Pi. 126Added some missing translations to KO/Pi and OM/Pi.
114 127
115Fixed some minor problems in KA/Pi + KO/Pi. 128Fixed some minor problems in KA/Pi + KO/Pi.
116 129
117Fixed a crash when closing PwM/Pi. 130Fixed a crash when closing PwM/Pi.
118Added German translation for PwM/Pi. 131Added German translation for PwM/Pi.
119 132
120Made view change and Month View update faster in KO/Pi. 133Made view change and Month View update faster in KO/Pi.
121 134
122 135
123********** VERSION 1.9.18 ************ 136********** VERSION 1.9.18 ************
124 137
125FYI: The VERSION 1.9.17 was a testing release only. 138FYI: The VERSION 1.9.17 was a testing release only.
126Please read the changelog of VERSION 1.9.17 as well. 139Please read the changelog of VERSION 1.9.17 as well.
127 140
128Cleaned up the syncing config dialog. 141Cleaned up the syncing config dialog.
129Added sync config options for date range for events. 142Added sync config options for date range for events.
130Added sync config options for filters on incoming data. 143Added sync config options for filters on incoming data.
131Added sync config options for filters on outgoing data. 144Added sync config options for filters on outgoing data.
132Please read the updated SyncHowTo about the new filter settings. 145Please read the updated SyncHowTo about the new filter settings.
133These filter settings make it now possible to sync with shared 146These filter settings make it now possible to sync with shared
134calendars without writing back private or confidential data 147calendars without writing back private or confidential data
135(via the outgoing filters). 148(via the outgoing filters).
136To sync only with particular parts of a shared calendar, 149To sync only with particular parts of a shared calendar,
137the incoming filter settings can be used. 150the incoming filter settings can be used.
138An example can be found in the SyncHowTo. 151An example can be found in the SyncHowTo.
139Same for shared addressbooks. 152Same for shared addressbooks.
140 153
141Added a setting for the global kdepim data storage. 154Added a setting for the global kdepim data storage.
142Usually the data is stored in (yourhomedir/kdepim). 155Usually the data is stored in (yourhomedir/kdepim).
143Now you can set in the Global config dialog TAB, subTAB "Data storage path" 156Now you can set in the Global config dialog TAB, subTAB "Data storage path"
144a directory where all the kdepim data is stored. 157a directory where all the kdepim data is stored.
145That makes it easy to save all kdepim data on a SD card on the Z, for example. 158That makes it easy to save all kdepim data on a SD card on the Z, for example.
146 159
147KO/Pi: 160KO/Pi:
148The timeedit input has a pulldown list for times. 161The timeedit input has a pulldown list for times.
149If opened, this pulldown list should now has the right time highlighted. 162If opened, this pulldown list should now has the right time highlighted.
150Added the possibility to exclude events/todos/journals in a filter. 163Added the possibility to exclude events/todos/journals in a filter.
151You should exclude journals, if you do not want them to sync with a public calendar. 164You should exclude journals, if you do not want them to sync with a public calendar.
152 165
153KA/Pi: 166KA/Pi:
154Added the possibility to in/exclude public/private/confidential contacts to a filter. 167Added the possibility to in/exclude public/private/confidential contacts to a filter.
155If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... 168If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ...
156Added printing of card view and details view on desktop. 169Added printing of card view and details view on desktop.
157Printing of list view is not working... 170Printing of list view is not working...
158Added button for removing pictures in contact editor. 171Added button for removing pictures in contact editor.
159Parsing data fix of KA/Pi version 1.9.17. 172Parsing data fix of KA/Pi version 1.9.17.
160Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 173Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
161Fixed some syncing merging problems. 174Fixed some syncing merging problems.
162 175
163 176
164********** VERSION 1.9.17 ************ 177********** VERSION 1.9.17 ************
165 178
166KO/Pi: 179KO/Pi:
167Fixed that tooltips were not updated after moving an item in agenda view. 180Fixed that tooltips were not updated after moving an item in agenda view.
168Fixed a bug in sorting start date for recurring events in list view. 181Fixed a bug in sorting start date for recurring events in list view.
169Changed the left button in todo viewer from "Agenda" to "Set completed". 182Changed the left button in todo viewer from "Agenda" to "Set completed".
170This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. 183This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
171Added more info in the todo viewer: Startdate, parent/sub todos. 184Added more info in the todo viewer: Startdate, parent/sub todos.
172 185
173 186
174KA/Pi: 187KA/Pi:
175All fields search does now actually search all the (possible) fields, 188All fields search does now actually search all the (possible) fields,
176not only those listed in the contact list. 189not only those listed in the contact list.
177Made is possible to inline a picture in a vcard on the Z. 190Made is possible to inline a picture in a vcard on the Z.
178This was only possible on the desktop, now is it possible on the Z as well. 191This was only possible on the desktop, now is it possible on the Z as well.
179Fixed of missing save settings after filter configuration. 192Fixed of missing save settings after filter configuration.
180Made saving of addressbook much faster. 193Made saving of addressbook much faster.
181Fixed extension widget layout problem. 194Fixed extension widget layout problem.
182Fixed saving of default formatted name settings. 195Fixed saving of default formatted name settings.
183Fixed formatted name handling in edit dialog. 196Fixed formatted name handling in edit dialog.
184Added an option for changing formatted names of many contacts 197Added an option for changing formatted names of many contacts
185(menu: File - Change - Set formatted name). 198(menu: File - Change - Set formatted name).
186 199
187QWhatsThis was not working on the Z ( only black rectangle was shown). 200QWhatsThis was not working on the Z ( only black rectangle was shown).
188This is Fixed. 201This is Fixed.
189 202
190KDE-Sync: 203KDE-Sync:
191Now readonly KDE resources are synced as well. 204Now readonly KDE resources are synced as well.
192(They are not changed in KDE itself, of course). 205(They are not changed in KDE itself, of course).
193 206
194 207
195 208
196********** VERSION 1.9.16 ************ 209********** VERSION 1.9.16 ************
197 210
198KO/Pi: 211KO/Pi:
199Fixed search dialog size on Z 6000 (480x640 display). 212Fixed search dialog size on Z 6000 (480x640 display).
200Added setting to hide/show time in agenda items. 213Added setting to hide/show time in agenda items.
201Added setting to hide not running todos in todo view. 214Added setting to hide not running todos in todo view.
202Added columns for start date/time in todo view. 215Added columns for start date/time in todo view.
203Replaced the solid half-hour lines in agenda view by dot lines. 216Replaced the solid half-hour lines in agenda view by dot lines.
204Added possibility of printing the What's Next View on the desktop 217Added possibility of printing the What's Next View on the desktop
205(i.e. Windows and Linux). 218(i.e. Windows and Linux).
206Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 219Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
207Added tooltips in month view.(Tooltips only available on desktop) 220Added tooltips in month view.(Tooltips only available on desktop)
208 221
209Fixed a strange problem in KO/Pi alarm applet. 222Fixed a strange problem in KO/Pi alarm applet.
210Did not find the actual problem, 223Did not find the actual problem,
211such that now Qtopia reboots again if deinstalling the alarm applet. 224such that now Qtopia reboots again if deinstalling the alarm applet.
212But the alarm applet should work again. 225But the alarm applet should work again.
213 226
214KA/Pi: 227KA/Pi:
215Fixed the problem, that internal pictures were not saved. 228Fixed the problem, that internal pictures were not saved.
216 229
217Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 230Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
218 231
219Fixed some minor problems. (Like word wrap in help text windows). 232Fixed some minor problems. (Like word wrap in help text windows).
220 233
221Fixed a compiling problem in microkde/kresources. 234Fixed a compiling problem in microkde/kresources.
222 235
223KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 236KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
224This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 237This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
225such that now syncing KO/Pi with Sharp DTM should work on the 238such that now syncing KO/Pi with Sharp DTM should work on the
226Zaurus C 3000 model. 239Zaurus C 3000 model.
227 240
228********** VERSION 1.9.15 ************ 241********** VERSION 1.9.15 ************
229 242
230Usebilty enhancements in KO/Pi: 243Usebilty enhancements in KO/Pi:
231When clicking on the date in a month view cell, the day view is shown. 244When clicking on the date in a month view cell, the day view is shown.
232Old behaviour was, that the "new event" dialog popped up. 245Old behaviour was, that the "new event" dialog popped up.
233 246
234Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 247Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
235That means, you can restore the latest 248That means, you can restore the latest
236event/todo/journal you have deleted. 249event/todo/journal you have deleted.
237A journal is deleted, if you clear all the text of the journal. 250A journal is deleted, if you clear all the text of the journal.
238 251
239Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 252Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
240 253
241KA/Pi starting in 480x640 resolution: 254KA/Pi starting in 480x640 resolution:
242Hide the filter action in toolbar 255Hide the filter action in toolbar
243and added icons for undo/delete/redo in toolbar. 256and added icons for undo/delete/redo in toolbar.
244 257
245Change in OM/Pi ViewMail dialog: 258Change in OM/Pi ViewMail dialog:
246When clicking on the "delete" icon the mail is deleted after confirmation as usual. 259When clicking on the "delete" icon the mail is deleted after confirmation as usual.
247But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 260But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
248 261
249Fixed a crash when deleting mail-accounts in OM/Pi. 262Fixed a crash when deleting mail-accounts in OM/Pi.
250 263
251 264
252********** VERSION 1.9.14 ************ 265********** VERSION 1.9.14 ************
253 266
254Fixed some problems with the dialog sizes when switching 267Fixed some problems with the dialog sizes when switching
255portrait/landscape mode on 640x480 PDA display. 268portrait/landscape mode on 640x480 PDA display.
256 269
257Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 270Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
258 271
259Fixed an ugly bug in KOpieMail: 272Fixed an ugly bug in KOpieMail:
260KOpieMail was not able to write files (mails) to MSDOS file system, 273KOpieMail was not able to write files (mails) to MSDOS file system,
261like on an usual preformatted SD card. That should work now. 274like on an usual preformatted SD card. That should work now.
262To save your mail data on the Sd card do the following: 275To save your mail data on the Sd card do the following:
263Create a dir on the SD card: 276Create a dir on the SD card:
264mkdir /mnt/card/localmail 277mkdir /mnt/card/localmail
265Go to your home dir: 278Go to your home dir:
266cd 279cd
267Go to kopiemail data storage dir: 280Go to kopiemail data storage dir:
268cd kdepim/apps/kopiemail 281cd kdepim/apps/kopiemail
269Create a symlink to the SD card: 282Create a symlink to the SD card:
270ls -s /mnt/card/localmail 283ls -s /mnt/card/localmail
271Now KOpieMail will store all mails on the SD card. 284Now KOpieMail will store all mails on the SD card.
272 285
273KO/Pi Monthview: 286KO/Pi Monthview:
274Now "Go to Today" selects the current month from day 1-end, 287Now "Go to Today" selects the current month from day 1-end,
275not the current date + some days. 288not the current date + some days.
276I.e. "Go to Today" shows now always 289I.e. "Go to Today" shows now always
277the current month with first day of month in the first row. 290the current month with first day of month in the first row.
278 291
279Added missing German translation. 292Added missing German translation.
280 293
281Fixed icons of executeable on Wintendo. 294Fixed icons of executeable on Wintendo.
282 295
283Added a "Show next Mail" button to the OM/Pi 296Added a "Show next Mail" button to the OM/Pi
284mail viewer such that the mail below the current mail 297mail viewer such that the mail below the current mail
285in the mail list view of the current folder 298in the mail list view of the current folder
286can be read with a single click. 299can be read with a single click.
287 300
288 301
289********** VERSION 1.9.13 ************ 302********** VERSION 1.9.13 ************
290 303
291Fixed nasty PwM/Pi file reading bug, when 304Fixed nasty PwM/Pi file reading bug, when
292the used hash algo of file is different then the global 305the used hash algo of file is different then the global
293hash algo. 306hash algo.
294 307
295Added KA/Pi support for opie mailit mailapplication. 308Added KA/Pi support for opie mailit mailapplication.
296 309
297Fixed some bugs in OM/Pi. 310Fixed some bugs in OM/Pi.
298Now character conversion tables are available for the Zaurus 311Now character conversion tables are available for the Zaurus
299to make OM/Pi working properly. 312to make OM/Pi working properly.
300To get the character conversion in OM/Pi working, please download 313To get the character conversion in OM/Pi working, please download
301at the sourceforge project site the package 314at the sourceforge project site the package
302sr-character-conversion_SharpROM_arm.ipk.zip 315sr-character-conversion_SharpROM_arm.ipk.zip
303(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 316(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
304from the section "general files for KDE/Pim" 317from the section "general files for KDE/Pim"
305Instructions how to install this package are in a ReadMe in this file. 318Instructions how to install this package are in a ReadMe in this file.
306 319
307 320
308Fixed the orientation change problem in KA/Pi when switching 321Fixed the orientation change problem in KA/Pi when switching
309portrait/landscape mode. 322portrait/landscape mode.
310 323
311French translation available for KA/Pi and OM/Pi. 324French translation available for KA/Pi and OM/Pi.
312 325
313Fixed some problems with categories in KO/Pi in DTM sync. 326Fixed some problems with categories in KO/Pi in DTM sync.
314 327
315Added selection dialog for export to phone in KA/Pi. 328Added selection dialog for export to phone in KA/Pi.
316 329
317If in KO/Pi is an attendee selected to add to a meeting and this 330If in KO/Pi is an attendee selected to add to a meeting and this
318attendee is already in the list of attendees, this person is not added 331attendee is already in the list of attendees, this person is not added
319again. 332again.
320 333
321Some menu cleanup in KA/Pi. 334Some menu cleanup in KA/Pi.
322 335
323********** VERSION 1.9.12 ************ 336********** VERSION 1.9.12 ************
324 337
325Fix for the bug in KO/Pi What's Next view of version 1.9.11. 338Fix for the bug in KO/Pi What's Next view of version 1.9.11.
326 339
327Bugfix: Licence file is now shown again. 340Bugfix: Licence file is now shown again.
328 341
329OM/Pi now supports Unicode (utf8 charset). 342OM/Pi now supports Unicode (utf8 charset).
330Fixed some bugs in OM/Pi. 343Fixed some bugs in OM/Pi.
331 344
332KA/Pi has more German translation. 345KA/Pi has more German translation.
333 346
334 347
335********** VERSION 1.9.11 ************ 348********** VERSION 1.9.11 ************
336 349
337Fixed several problems in PWM/Pi, like 350Fixed several problems in PWM/Pi, like
338asking the user, if unsaved changed are pending 351asking the user, if unsaved changed are pending
339when closing the app. 352when closing the app.
340And PwM/Pi handles now different texts for the 353And PwM/Pi handles now different texts for the
341fields Description, Username, Password, configurable per category. 354fields Description, Username, Password, configurable per category.
342 355
343Fixed a crash in KO/Pi , when importing/loading vcs files 356Fixed a crash in KO/Pi , when importing/loading vcs files
344which have an entry with an attendee with state: 357which have an entry with an attendee with state:
345NEEDS ACTION 358NEEDS ACTION
346 359
347Fixed some problems in the German translation of OM/Pi, 360Fixed some problems in the German translation of OM/Pi,
348which makes some dialogs not fitting on the screen 361which makes some dialogs not fitting on the screen
349of the Z 5500. 362of the Z 5500.
350 363
351Fixed Qtopia crash, when disabling/deinstalling 364Fixed Qtopia crash, when disabling/deinstalling
352KO/Pi alarm applet. 365KO/Pi alarm applet.
353 366
354Implemented direct KDE<->KA/Pi sync for KA/Pi running 367Implemented direct KDE<->KA/Pi sync for KA/Pi running
355on Linux desktop. 368on Linux desktop.
356 369
357Added feature "remove sync info" to sync menu. 370Added feature "remove sync info" to sync menu.
358 371
359Tweaked the KO/Pi What's next view a bit, added 372Tweaked the KO/Pi What's next view a bit, added
360setting to hide events that are done. 373setting to hide events that are done.
361 374
362Disabled "beam receive enabled" on startup to 375Disabled "beam receive enabled" on startup to
363avoid problems if Fastload is enabled. 376avoid problems if Fastload is enabled.
364Please set "beam receive enabled", 377Please set "beam receive enabled",
365if you want to receive data via IR. 378if you want to receive data via IR.
366 379
367Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 380Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
368on Linux desktop. 381on Linux desktop.
369 382
370Made in KA/Pi scrolling possible, if details view is selected. 383Made in KA/Pi scrolling possible, if details view is selected.
371(The keyboard focus is set automatically to the search line) 384(The keyboard focus is set automatically to the search line)
372 385
373Fixed a bug in DMT sync, that a new entry in DTM was added 386Fixed a bug in DMT sync, that a new entry in DTM was added
374on every sync to Kx/Pi. 387on every sync to Kx/Pi.
375 388
376Fixed missing writing of KA/Pi categories to DMT entries when syncing. 389Fixed missing writing of KA/Pi categories to DMT entries when syncing.
377 390
378Fixed a bug in DMT sync with todos created in KO/Pi containing 391Fixed a bug in DMT sync with todos created in KO/Pi containing
379non-latin1 characters. 392non-latin1 characters.
380 393
381Rearranged package contents of Sharp-ipks and made all 394Rearranged package contents of Sharp-ipks and made all
382packages installable on SD again. 395packages installable on SD again.
383 396
384Fixed the writing of addressbook data in DTM sync. 397Fixed the writing of addressbook data in DTM sync.
385Empty fields in KA/Pi were not removed. 398Empty fields in KA/Pi were not removed.
386 399
387Added better category handling in KA/Pi: 400Added better category handling in KA/Pi:
388Added item 401Added item
389Edit Categories and 402Edit Categories and
390Manage new categories 403Manage new categories
391to the settings menu. 404to the settings menu.
392Possible to configure a view to display categories. 405Possible to configure a view to display categories.
393 406
394Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 407Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
395 408
396Fixed displaying of "free" days and time in KO Monthview and Agendaview. 409Fixed displaying of "free" days and time in KO Monthview and Agendaview.
397 410
398... and many other bugfixes. 411... and many other bugfixes.
399 412
400********** VERSION 1.9.10 ************ 413********** VERSION 1.9.10 ************
401 414
402Many internal small bugfixes. 415Many internal small bugfixes.
403And fix of the "big" bug in KO/Pi, 416And fix of the "big" bug in KO/Pi,
404that after Syncing the appointments had an offset by several hours. 417that after Syncing the appointments had an offset by several hours.
405That was a problem with the internal timezone setting, 418That was a problem with the internal timezone setting,
406introduced by the changed timezone configuration settings. 419introduced by the changed timezone configuration settings.
407 420
408German translation for OM/Pi is now available. 421German translation for OM/Pi is now available.
409 422
410 423
411********** VERSION 1.9.9 ************ 424********** VERSION 1.9.9 ************
412 425
413KDE-Pim/Pi has a new Member! 426KDE-Pim/Pi has a new Member!
414It is called PWM/Pi (Passwordmanager/platform-independent) 427It is called PWM/Pi (Passwordmanager/platform-independent)
415and it is available for the Zaurus. 428and it is available for the Zaurus.
416It is planned, that it will be available later for Windows. 429It is planned, that it will be available later for Windows.
417(And for Linux, of course). 430(And for Linux, of course).
418It is a port of the Passwordmanager of KDE. 431It is a port of the Passwordmanager of KDE.
419It will need the MicroKDElibs to run. 432It will need the MicroKDElibs to run.
420 433
421Made loading of addressbooks in KA/Pi up to 7 times faster! 434Made loading of addressbooks in KA/Pi up to 7 times faster!
422The bigger your addressbook file, the more starting speed 435The bigger your addressbook file, the more starting speed
423will you gain. (relatively) 436will you gain. (relatively)
424 437
425The Qtopia addressbook connector is now platform independend 438The Qtopia addressbook connector is now platform independend
426as well and should work on any platform for importing/exporting 439as well and should work on any platform for importing/exporting
427Qtopia and Opie XML files. 440Qtopia and Opie XML files.
428 441
429Added a +30min feature to the timezone settings to make 442Added a +30min feature to the timezone settings to make
430KDE-Pim/Pi useable in Australia and other parts on the 443KDE-Pim/Pi useable in Australia and other parts on the
431world with strange timezones ;-) 444world with strange timezones ;-)
432 445
433German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 446German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
434 447
435It is now possible to disable the 448It is now possible to disable the
436"receive data via infrared" feature, such that syncing with 449"receive data via infrared" feature, such that syncing with
437Outlook is now possible again with Kx/Pi runing. 450Outlook is now possible again with Kx/Pi runing.
438Please disable it, before syncing Sharp DTM with Outlook. 451Please disable it, before syncing Sharp DTM with Outlook.
439For your convenience, the "receive data via infrared" feature 452For your convenience, the "receive data via infrared" feature
440is disabled automatically, if you sync Kx/Pi with DTM. 453is disabled automatically, if you sync Kx/Pi with DTM.
441You have to enable it again manually after syncing. 454You have to enable it again manually after syncing.
442Enabling this feature makes it impossible to start the 455Enabling this feature makes it impossible to start the
443Sharp DTM apps. If this feature is enabled, you will only get the 456Sharp DTM apps. If this feature is enabled, you will only get the
444alarm notification from KO/Pi and not from the Sharp calendar. 457alarm notification from KO/Pi and not from the Sharp calendar.
445This is very useful if you sync KO/Pi with Sharp DTM, 458This is very useful if you sync KO/Pi with Sharp DTM,
446because after syncing you usually would get notified about 459because after syncing you usually would get notified about
447an alarm by KO/Pi and the Sharp Calendar. 460an alarm by KO/Pi and the Sharp Calendar.
448 461
449Together with the Linux desktop version of KO/Pi 462Together with the Linux desktop version of KO/Pi
450it is now possible to sync KO/Pi on the Zaurus 463it is now possible to sync KO/Pi on the Zaurus
451with the complete KDE-desktop (3.3 or later) 464with the complete KDE-desktop (3.3 or later)
452calendar data easily. 465calendar data easily.
453That makes it possible to sync the Z with one 466That makes it possible to sync the Z with one
454click of a mouse with the KDE-Desktop. 467click of a mouse with the KDE-Desktop.
455This feature it available for all Zaurus platforms KO/Pi 468This feature it available for all Zaurus platforms KO/Pi
456is running on. 469is running on.
457The only thing needed is a running KO/Pi on Linux and 470The only thing needed is a running KO/Pi on Linux and
458a compiled version of the small 471a compiled version of the small
459KDE-Pim/Pi<->KDE-Desktop access command line program, 472KDE-Pim/Pi<->KDE-Desktop access command line program,
460which is in the KDE-Pim/Pi sources available. 473which is in the KDE-Pim/Pi sources available.
461 474
462The "KDE-desktop" syncing feature for KA/Pi will follow 475The "KDE-desktop" syncing feature for KA/Pi will follow
463in the next releases. 476in the next releases.
464 477
465Fixed the vcard export bug, which had the version 1.9.8. 478Fixed the vcard export bug, which had the version 1.9.8.
466 479
467Added missing GERMAN translation to KO/Pi. 480Added missing GERMAN translation to KO/Pi.
468Hi PsionX, could you add the missing french translation?Thx! 481Hi PsionX, could you add the missing french translation?Thx!
469 482
470Translation files for KA/Pi are available as well. 483Translation files for KA/Pi are available as well.
471GERMAN translation will be available in the next release. 484GERMAN translation will be available in the next release.
472PsionX ( yres, you again ;-) ), could you start translating 485PsionX ( yres, you again ;-) ), could you start translating
473KA/Pi? Thx! 486KA/Pi? Thx!
474 487
475You can download the version 1.9.9 at 488You can download the version 1.9.9 at
476 489
477http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 490http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
478 491
479Note: 492Note:
480To run the mail program OM/Pi you need libopenssl. 493To run the mail program OM/Pi you need libopenssl.
481A link to a download loaction is available at 494A link to a download loaction is available at
482ZSI at www.killefiz.de 495ZSI at www.killefiz.de
483 496
484 497
485********** VERSION 1.9.8 ************ 498********** VERSION 1.9.8 ************
486 499
487Fixed character decoding in OM/Pi. 500Fixed character decoding in OM/Pi.
488(e.g. German "Umlaute" were not displayed properly.) 501(e.g. German "Umlaute" were not displayed properly.)
489 502
490Made is possible to reparent todos in KO/Pi. 503Made is possible to reparent todos in KO/Pi.
491Use contextmenu or keys (look at Help-Keys + Colors) for that. 504Use contextmenu or keys (look at Help-Keys + Colors) for that.
492 505
493Added the missing Sync-Howto and WhatsNew to the packages. 506Added the missing Sync-Howto and WhatsNew to the packages.
494 507
495KO/Pi on Linux desktop can now sync with KDE desktop. 508KO/Pi on Linux desktop can now sync with KDE desktop.
496That means: When using KO/Pi on Linux desktop for syncing with 509That means: When using KO/Pi on Linux desktop for syncing with
497KDE desktop and the Zaurus, the Zaurus can be synced now 510KDE desktop and the Zaurus, the Zaurus can be synced now
498with all KDE-Calendar resources, not only with one local file. 511with all KDE-Calendar resources, not only with one local file.
499(That makes it possible to sync the Zaurus with the 512(That makes it possible to sync the Zaurus with the
500calendar data on a Kolab server) 513calendar data on a Kolab server)
501 514
502KA/Pi syncing with KDE desktop will be available in the next version. 515KA/Pi syncing with KDE desktop will be available in the next version.
503 516
504 517
505********** VERSION 1.9.7 ************ 518********** VERSION 1.9.7 ************
506 519
507KO/Pi - KA/Pi on Windows: 520KO/Pi - KA/Pi on Windows:
508Now a directory can be defined by the user, where the 521Now a directory can be defined by the user, where the
509application/config data should be saved. 522application/config data should be saved.
510 Define your desired path in the evironment variable 523 Define your desired path in the evironment variable
511 MICROKDEHOME 524 MICROKDEHOME
512 before starting KO/Pi or KA/Pi. 525 before starting KO/Pi or KA/Pi.
513 526
514An easy Kx/Pi to Kx/Pi syncing is now possible 527An easy Kx/Pi to Kx/Pi syncing is now possible
515(it is called Pi-Sync) via network. 528(it is called Pi-Sync) via network.
516Please look at the Sync Howto. 529Please look at the Sync Howto.
517 530
518Exporting of calendar data and contacts to mobile phones is now possible. 531Exporting of calendar data and contacts to mobile phones is now possible.
519The SyncHowto is updated with information howto 532The SyncHowto is updated with information howto
520access/sync mobile phones. 533access/sync mobile phones.
521Please look at the Sync Howto. 534Please look at the Sync Howto.
522 535
523Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 536Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
524Please disable Fastload for the original contact/calendar applications 537Please disable Fastload for the original contact/calendar applications
525and close them. 538and close them.
526KO/Pi and KA/Pi must be running in order to receive the data. 539KO/Pi and KA/Pi must be running in order to receive the data.
527(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 540(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
528 541
529In the KA/Pi details view are now the preferred tel. numbers displayed on top 542In the KA/Pi details view are now the preferred tel. numbers displayed on top
530of the other data ( emails/tel.numbers/addresses) 543of the other data ( emails/tel.numbers/addresses)
531 544
532Fixed some syncing problems in KA/Pi. 545Fixed some syncing problems in KA/Pi.
533 546
534Added font settings for the KA/Pi details view. 547Added font settings for the KA/Pi details view.
535Added fields "children's name" and "gender" to KA/Pi. 548Added fields "children's name" and "gender" to KA/Pi.
536 549
537Made searching in KA/Pi better: 550Made searching in KA/Pi better:
538Now the first item in a view is selected after a search automatically and 551Now the first item in a view is selected after a search automatically and
539the views can be scrolled up/down when the search input field has the keyboard focus. 552the views can be scrolled up/down when the search input field has the keyboard focus.
540 553
541And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 554And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
542 555
543 556
544********** VERSION 1.9.6 ************ 557********** VERSION 1.9.6 ************
545 558
546Changes in the external application communication on the Zaurus 559Changes in the external application communication on the Zaurus
547in order to use less RAM when the apps are running. 560in order to use less RAM when the apps are running.
548First syncing of addressbooks (KA/Pi) is possible. 561First syncing of addressbooks (KA/Pi) is possible.
549 562
550 563
551********** VERSION 1.9.5a ************ 564********** VERSION 1.9.5a ************
552 565
553Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 566Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
554Fixed some small bugs. 567Fixed some small bugs.
555KA/Pi shows now the birthday in summary view. 568KA/Pi shows now the birthday in summary view.
556Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 569Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
557for displaying dates. 570for displaying dates.
558 571
559 572
560********** VERSION 1.9.5 ************ 573********** VERSION 1.9.5 ************
561 574
562There is still no Addressbook syncing! 575There is still no Addressbook syncing!
563 576
564New in 1.9.5: 577New in 1.9.5:
565 578
566Many bugfixes. 579Many bugfixes.
567Better searching in KA/Pi. 580Better searching in KA/Pi.
568You can configure in KA/Pi if you want to search only after 581You can configure in KA/Pi if you want to search only after
569<return> key pressed. 582<return> key pressed.
570 583
571Better mail downloading in OM/Pi. 584Better mail downloading in OM/Pi.
572 585
573First experimental alpha version of sync of KO/Pi with mobile phones. 586First experimental alpha version of sync of KO/Pi with mobile phones.
574See gammu documentation for supported phones. 587See gammu documentation for supported phones.
575You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp. 588You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp.
576Quick hint how to use: 589Quick hint how to use:
577NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 590NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
578Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 591Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
579Create syncprofile - mobile device 592Create syncprofile - mobile device
580Remove entry for model. (Leave empty ). 593Remove entry for model. (Leave empty ).
581Enable infrared on Zaurus and your Phone. 594Enable infrared on Zaurus and your Phone.
582Sync. 595Sync.
583To get a more detailed log, start kopi from konsole. 596To get a more detailed log, start kopi from konsole.
584 597
585********** VERSION 1.9.4 ************ 598********** VERSION 1.9.4 ************
586 599
587This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 600This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
588 601
589WARNING: 602WARNING:
590PLEASE BACKUP ALL YOUR DATA! 603PLEASE BACKUP ALL YOUR DATA!
591We have changed a lot and maybe there are some unknown problems. 604We have changed a lot and maybe there are some unknown problems.
592 605
593SYNC HANDLING HAS CHANGED! 606SYNC HANDLING HAS CHANGED!
594Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 607Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
595(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 608(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
596 609
597You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 610You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
598If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well. 611If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well.
599 612
600As programs are available: 613As programs are available:
601KO/Pi (korganizer ipk) - a calendar program. 614KO/Pi (korganizer ipk) - a calendar program.
602KA/Pi (kaddressbook ipk ) - an addressbook 615KA/Pi (kaddressbook ipk ) - an addressbook
603OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 616OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
604 617
605An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 618An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
606(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 619(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
607 620
608All the applications are installed in a "Pim" TAB. 621All the applications are installed in a "Pim" TAB.
609If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk 622If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk
610 623
611All the application are integrated. 624All the application are integrated.
612Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail. 625Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail.
613 626
614HINT: 627HINT:
615If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. 628If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number.
616 629
617What's new? 630What's new?
618 631
619SYNC HANDLING HAS CHANGED! 632SYNC HANDLING HAS CHANGED!
620Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 633Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
621(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 634(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
622 635
623New in OM/Pi: 636New in OM/Pi:
624When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails. 637When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails.
625 638
626New in KO/Pi: 639New in KO/Pi:
627French is now available for KO/Pi. 640French is now available for KO/Pi.
628Choose menu:Actions - Configure:TAB locale 641Choose menu:Actions - Configure:TAB locale
629Syncing has changed. 642Syncing has changed.
630Phone sync available soon. 643Phone sync available soon.
631Not much changes, I cannot remember them ... 644Not much changes, I cannot remember them ...
632 645
633New in KA/Pi: 646New in KA/Pi:
634Beaming possible. 647Beaming possible.
635Sharp DTM readonly access possible( create a new DTM resource ); 648Sharp DTM readonly access possible( create a new DTM resource );
636Better searching possible. 649Better searching possible.
637Search is performed only after pressing the return key. 650Search is performed only after pressing the return key.
638Use wildcard * to specify parts of a name. 651Use wildcard * to specify parts of a name.
639 652
640Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * . 653Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * .
641 654
642A big improvement is the new management of the contact access. 655A big improvement is the new management of the contact access.
643In version 1.9.3, every application was using their own addressbook access data. 656In version 1.9.3, every application was using their own addressbook access data.
644That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. 657That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi.
645That was wasting of memory, if you had several hundreds of contacts. 658That was wasting of memory, if you had several hundreds of contacts.
646 659
647Now only KA/Pi accesses the addressbook. 660Now only KA/Pi accesses the addressbook.
648If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them. 661If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them.
649If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. 662If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly.
650That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. 663That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first.
651 664
652New in the KO/Pi alarm applet: 665New in the KO/Pi alarm applet:
653Configure your own timer popup menu! 666Configure your own timer popup menu!
654(Text and minutes for timer countdown) 667(Text and minutes for timer countdown)
655Just edit the file 668Just edit the file
656(yourhomedir)/.kopialarmtimerrc 669(yourhomedir)/.kopialarmtimerrc
657and start/stop a timer to get a new menu with the data of this file. 670and start/stop a timer to get a new menu with the data of this file.
658 671
659********** VERSION 1.9.3 ************ 672********** VERSION 1.9.3 ************
6601) 6731)
661Now KO/Pi on Windows imports directly the calendar data of 674Now KO/Pi on Windows imports directly the calendar data of
662an installed Outlook. Should work with OL version >= 2000. 675an installed Outlook. Should work with OL version >= 2000.
663 676
664********** VERSION 1.9.2 ************ 677********** VERSION 1.9.2 ************
6651) 6781)
666KDE-Pim/Pi has got a new member: 679KDE-Pim/Pi has got a new member:
667KmicroMail (KM/Pi) is a mail program, 680KmicroMail (KM/Pi) is a mail program,
668which can handle IMAP and POP mail access. 681which can handle IMAP and POP mail access.
669It is based on Opie-Mail v3. 682It is based on Opie-Mail v3.
670All dependencies to the Opie libraries ar removed, 683All dependencies to the Opie libraries ar removed,
671such that no additional Opie lib is needed. 684such that no additional Opie lib is needed.
672It is already integrated in KO/Pi and KA/Pi. 685It is already integrated in KO/Pi and KA/Pi.
673It it now available for the Zaurus,probably it 686It it now available for the Zaurus,probably it
674will be available for other platforms later. 687will be available for other platforms later.
675Hint: 688Hint:
676Create your own contact (name + email) 689Create your own contact (name + email)
677in KA/Pi, select this contact and choose menu: 690in KA/Pi, select this contact and choose menu:
678Settings - Set Who Am I. 691Settings - Set Who Am I.
679Now the settings of this contact are used as 692Now the settings of this contact are used as
680the sender data in KM/Pi. 693the sender data in KM/Pi.
6812) 6942)
682KDE-Pim/Pi is split up in five different 695KDE-Pim/Pi is split up in five different
683packages now precompiled for Sharp Zaurus: 696packages now precompiled for Sharp Zaurus:
684--kmicrokdelibs_1.9.2_arm.ipk 697--kmicrokdelibs_1.9.2_arm.ipk
685The libs are needed for any 698The libs are needed for any
686of the following programs: 699of the following programs:
687--kaddressbook_1.9.2_arm.ipk 700--kaddressbook_1.9.2_arm.ipk
688--kmicromail_1.9.2_arm.ipk 701--kmicromail_1.9.2_arm.ipk
689--korganizer_1.9.2_arm.ipk 702--korganizer_1.9.2_arm.ipk
690Independ from that, there is the alarm applet 703Independ from that, there is the alarm applet
691available for KO/Pi, which also offers 704available for KO/Pi, which also offers
692quick access for a new mail or 705quick access for a new mail or
693showing the addressbook.: 706showing the addressbook.:
694--korganizer-alarm_1.9.2_arm.ipk 707--korganizer-alarm_1.9.2_arm.ipk
695Independend means, that the alarm applet 708Independend means, that the alarm applet
696does not need any of the libs or programs above to run. 709does not need any of the libs or programs above to run.
697But it would be quite useless without these programs. 710But it would be quite useless without these programs.
698NOTE: 711NOTE:
699If you get a 712If you get a
700"This application depends on other programs" 713"This application depends on other programs"
701during installation of 714during installation of
702--kmicrokdelibs_1.9.2_arm.ipk 715--kmicrokdelibs_1.9.2_arm.ipk
703you probably do not have to care about that. 716you probably do not have to care about that.
704kmicrokdelibs_1.9.2 will come with some 717kmicrokdelibs_1.9.2 will come with some
705resource plugins, which needs additional libraries. 718resource plugins, which needs additional libraries.
706(E.g. libopie1, if you want to use the 719(E.g. libopie1, if you want to use the
707opie resource connector in KA/Pi). 720opie resource connector in KA/Pi).
708If you do not have this libraries installed, 721If you do not have this libraries installed,
709you simply cannot use the resource. 722you simply cannot use the resource.
710To make it clear: 723To make it clear:
711If the libraries are missing, the applications 724If the libraries are missing, the applications
712using kmicrokdelibs will start, 725using kmicrokdelibs will start,
713because the resources are plugins. 726because the resources are plugins.
7143) 7273)
715KO/Pi and friends are now installable on SD-Card! 728KO/Pi and friends are now installable on SD-Card!
716It is recommended to install all libs and apps 729It is recommended to install all libs and apps
717on the SD card or all in the internal storage. 730on the SD card or all in the internal storage.
718There may be problems, if this is mixed. 731There may be problems, if this is mixed.
7194) 7324)
720Fixed two bugs in the alarm notification on Windows. 733Fixed two bugs in the alarm notification on Windows.
7215) 7345)
722Great improvement! 735Great improvement!
723KO/Pi uses now the latest version of libical. 736KO/Pi uses now the latest version of libical.
724Libical is the library which actually reads 737Libical is the library which actually reads
725the calendar files and extract the data from it. 738the calendar files and extract the data from it.
726With the old version, there were problems 739With the old version, there were problems
727(crashes or program hangs) when licical did read 740(crashes or program hangs) when licical did read
728files, which were not stored from KO/Pi. 741files, which were not stored from KO/Pi.
729I do not know, if the new libical works perfect, 742I do not know, if the new libical works perfect,
730but actually it works much better than 743but actually it works much better than
731the old version. 744the old version.
732There are no problems with compatibility with 745There are no problems with compatibility with
733old calendar files of KO/Pi, of course! 746old calendar files of KO/Pi, of course!
7346) 7476)
735New in KA/Pi: 748New in KA/Pi:
736Opie addressbook resource connector available! 749Opie addressbook resource connector available!
737You will need libopie1 and the opie addressbook, 750You will need libopie1 and the opie addressbook,
738of course. 751of course.
739With the Opie addressbook resource connector, 752With the Opie addressbook resource connector,
740you can access the Opie addressbook readonly in KA/Pi. 753you can access the Opie addressbook readonly in KA/Pi.
741If you want to edit or import the data into KA/Pi, 754If you want to edit or import the data into KA/Pi,
742do this: 755do this:
743a) Create an Opie resource. 756a) Create an Opie resource.
744 (Menu: Settings-Configure Resources). 757 (Menu: Settings-Configure Resources).
745After configuration and restarting KA/Pi you should see 758After configuration and restarting KA/Pi you should see
746the Opie contacts in KA/Pi. 759the Opie contacts in KA/Pi.
747b) Select some or all Opie contacts. 760b) Select some or all Opie contacts.
748(NOTE: +++++ 761(NOTE: +++++
749To know exactly, what contacts are Opie contacts, 762To know exactly, what contacts are Opie contacts,
750do this: Choose menu: 763do this: Choose menu:
751View-Modify View - TAB Fields. 764View-Modify View - TAB Fields.
752Select in the above list "Resource" and click 765Select in the above list "Resource" and click
753down arrow to add it to the "Selected fields". 766down arrow to add it to the "Selected fields".
754Click OK. 767Click OK.
755Now you have a new column "Resource" in your list, 768Now you have a new column "Resource" in your list,
756where you can see, what an Opie resource is. 769where you can see, what an Opie resource is.
757++++ NOTE end.) 770++++ NOTE end.)
758Ok, we do have now some Opie contacts seleted. 771Ok, we do have now some Opie contacts seleted.
759(Use SHIFT or CTRL key in order to multiple select). 772(Use SHIFT or CTRL key in order to multiple select).
760c) Choose menu: Edit-Copy. 773c) Choose menu: Edit-Copy.
761d) Choose menu: Edit-Paste. 774d) Choose menu: Edit-Paste.
762e) Select the resource, you want to add the contacts to. 775e) Select the resource, you want to add the contacts to.
763Congrats! Now you have read/write access to the copied 776Congrats! Now you have read/write access to the copied
764opie contacts as "real" KA/Pi contacts. 777opie contacts as "real" KA/Pi contacts.
765 778
766 779
767********** VERSION 1.9.1 ************ 780********** VERSION 1.9.1 ************
7681) 7811)
769 +++ IMPORTANT 1 +++ 782 +++ IMPORTANT 1 +++
770 783
771The storing place of the default calendar 784The storing place of the default calendar
772file has changed! 785file has changed!
773The default calendar file was 786The default calendar file was
774Applications/korganizer/mycalendar.ics 787Applications/korganizer/mycalendar.ics
775on Zaurus and 788on Zaurus and
776(yourHomeDir)/korganizer/mycalendar.ics 789(yourHomeDir)/korganizer/mycalendar.ics
777on Windows/Linux desktop. Now it is 790on Windows/Linux desktop. Now it is
778(yourHomeDir)/kdepim/korganizer/mycalendar.ics 791(yourHomeDir)/kdepim/korganizer/mycalendar.ics
779on Zaurus, Windows and Linux. 792on Zaurus, Windows and Linux.
780To load the old file, choose menu 793To load the old file, choose menu
781File-Load calendar backup. 794File-Load calendar backup.
782(It should be loaded automatically 795(It should be loaded automatically
783at startup with a warning message displayed). 796at startup with a warning message displayed).
784The place of the configuration file has changed too. 797The place of the configuration file has changed too.
785If you want to use your old KO/Pi config, 798If you want to use your old KO/Pi config,
786copy it to 799copy it to
787(yourHomeDir)/kdepim/config/korganizerrc 800(yourHomeDir)/kdepim/config/korganizerrc
788Please read VERSION 1.9.0 - topic 3) as well! 801Please read VERSION 1.9.0 - topic 3) as well!
789 802
790 +++ IMPORTANT 2 +++ 803 +++ IMPORTANT 2 +++
791 804
792Because of the new paths, you will need 805Because of the new paths, you will need
793a new version of the KO/Pi alarm applet 806a new version of the KO/Pi alarm applet
794for Zaurus. 807for Zaurus.
795Use version >= 1.9.1 808Use version >= 1.9.1
796 809
7972) 8102)
798Now the QWhat'sThis Icon works for items 811Now the QWhat'sThis Icon works for items
799in the month view as well. 812in the month view as well.
800(See VERSION 1.7.8 Topic 1) ). 813(See VERSION 1.7.8 Topic 1) ).
8013) 8143)
802You can import birtsdays/anniversaries 815You can import birtsdays/anniversaries
803from KA/Pi into KO/Pi. 816from KA/Pi into KO/Pi.
804Choose menu File-Import birthdays. 817Choose menu File-Import birthdays.
805If you import twice, already imported items 818If you import twice, already imported items
806will not be imported again, if they 819will not be imported again, if they
807have not been changed in KO/Pi. 820have not been changed in KO/Pi.
8084) 8214)
809When syncing with sharp DTM, now a progress 822When syncing with sharp DTM, now a progress
810is shown, when the data is written back. 823is shown, when the data is written back.
811If there is much data in KO/Pi and no data 824If there is much data in KO/Pi and no data
812in DTM, that can take a long time. 825in DTM, that can take a long time.
813(But only for the first time ). 826(But only for the first time ).
8145) 8275)
815In the search dialog, you can search 828In the search dialog, you can search
816now for the name/email of an attendee 829now for the name/email of an attendee
817of an event/todo. 830of an event/todo.
818To get more space for displaying 831To get more space for displaying
819search results, the buttons 832search results, the buttons
820for "search" and "close" on the 833for "search" and "close" on the
821bottom are removed in the PDA version. 834bottom are removed in the PDA version.
822You have to click OK in the top right 835You have to click OK in the top right
823corner to do a search. 836corner to do a search.
8246) 8376)
825Now it is possible to disable the displaying 838Now it is possible to disable the displaying
826of todo items in the Allday part of the Agenda. 839of todo items in the Allday part of the Agenda.
827Choose Menu Action-Configure, 840Choose Menu Action-Configure,
828TAB Todo View, checkbox 841TAB Todo View, checkbox
829"Allday Agenda view shows todos" 842"Allday Agenda view shows todos"
8307) 8437)
831If FastLoad is enabled, now the settings and the 844If FastLoad is enabled, now the settings and the
832calendar data are saved, when KO/Pi is closed. 845calendar data are saved, when KO/Pi is closed.
833(If no Fastload is enabled, KO/Pi saves 846(If no Fastload is enabled, KO/Pi saves
834the data as well, of course) 847the data as well, of course)
8358) 8488)
836The Agenda View has a minimize-splitter now, 849The Agenda View has a minimize-splitter now,
837such that the height of the allday part can be 850such that the height of the allday part can be
838changed quickly. 851changed quickly.
839 852
840********** VERSION 1.9.0 ************ 853********** VERSION 1.9.0 ************
8411) 8541)
842KO/Pi is now merged with the new microKDE from KA/Pi. 855KO/Pi is now merged with the new microKDE from KA/Pi.
843KO/Pi accesses now KA/Pi as the addressbook. 856KO/Pi accesses now KA/Pi as the addressbook.
844The other ddressbook-plugins are not working any longer. 857The other ddressbook-plugins are not working any longer.
845(It is planned, that later KA/Pi itself uses these plugins) 858(It is planned, that later KA/Pi itself uses these plugins)
846New versions of KO/Pi are only available 859New versions of KO/Pi are only available
847together with KA/Pi as the KDE-Pim/Pi package. 860together with KA/Pi as the KDE-Pim/Pi package.
8482) 8612)
849If you click on an attendee of a meeting in the 862If you click on an attendee of a meeting in the
850event viewer, a detailed summary of the 863event viewer, a detailed summary of the
851attendee is shown. 864attendee is shown.
8523) 8653)
853The place of the configuration file has changed. 866The place of the configuration file has changed.
854If you want to use your old KO/Pi config, copy 867If you want to use your old KO/Pi config, copy
855Applications/korganizer/config_korganizerrc 868Applications/korganizer/config_korganizerrc
856to 869to
857Applications/korganizer/config/korganizerrc 870Applications/korganizer/config/korganizerrc
858 871
859********** VERSION 1.7.8 ************ 872********** VERSION 1.7.8 ************
8601) 8731)
861Now the QWhat'sThis ist working. 874Now the QWhat'sThis ist working.
862Enable the QWhat'sThis icon in the toolbar. 875Enable the QWhat'sThis icon in the toolbar.
863(You have to restart to reload the changed toolbar config). 876(You have to restart to reload the changed toolbar config).
864Now click on the QWhat'sThis Icon 877Now click on the QWhat'sThis Icon
865in the top right corner of KO/Pi. 878in the top right corner of KO/Pi.
866Then click on an item in the Agenda View: 879Then click on an item in the Agenda View:
867You will get a detailed display of the items content. 880You will get a detailed display of the items content.
8682) 8812)
869Some other very minor changes. 882Some other very minor changes.
870But I have forgotten the details ... 883But I have forgotten the details ...
871For that reason I start this log here: 884For that reason I start this log here:
872To document my changes, when I am doing it. 885To document my changes, when I am doing it.
873 886
874********** VERSION 1.7.7 ************ 887********** VERSION 1.7.7 ************
875Stable Version of KO/Pi 888Stable Version of KO/Pi
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 976e309..ed8a2ee 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -1,519 +1,530 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2 2
3 3
4#ifdef DESKTOP_VERSION 4#ifdef DESKTOP_VERSION
5#include <qapplication.h> 5#include <qapplication.h>
6#include <kabc/addresseedialog.h> 6#include <kabc/addresseedialog.h>
7#include <kabc/stdaddressbook.h> 7#include <kabc/stdaddressbook.h>
8#include <kabc/addressee.h> 8#include <kabc/addressee.h>
9#else 9#else
10#include <qpe/qpeapplication.h> 10#include <qpe/qpeapplication.h>
11#endif //DESKTOP_VERSION 11#endif //DESKTOP_VERSION
12#include <libkdepim/externalapphandler.h> 12#include <libkdepim/externalapphandler.h>
13 13
14#include "koprefs.h" 14#include "koprefs.h"
15#include <klocale.h> 15#include <klocale.h>
16#include <kglobal.h> 16#include <kglobal.h>
17 17
18#ifdef MINIKDE_KDIALOG_H 18#ifdef MINIKDE_KDIALOG_H
19#undef MINIKDE_KDIALOG_H 19#undef MINIKDE_KDIALOG_H
20#endif 20#endif
21 21
22 22
23#include "composemail.h" 23#include "composemail.h"
24 24
25#include <libmailwrapper/smtpwrapper.h> 25#include <libmailwrapper/smtpwrapper.h>
26#include <libmailwrapper/storemail.h> 26#include <libmailwrapper/storemail.h>
27#include <libmailwrapper/abstractmail.h> 27#include <libmailwrapper/abstractmail.h>
28#include <libmailwrapper/mailtypes.h> 28#include <libmailwrapper/mailtypes.h>
29 29
30/* OPIE */ 30/* OPIE */
31//#include <opie2/ofiledialog.h> 31//#include <opie2/ofiledialog.h>
32//#include <opie2/odebug.h> 32//#include <opie2/odebug.h>
33#include <kfiledialog.h> 33#include <kfiledialog.h>
34//#include <qpe/resource.h> 34//#include <qpe/resource.h>
35#include <qpe/global.h> 35#include <qpe/global.h>
36//#include <qpe/contact.h> 36//#include <qpe/contact.h>
37 37
38 38
39#include <qcombobox.h> 39#include <qcombobox.h>
40#include <qcheckbox.h> 40#include <qcheckbox.h>
41#include <qiconset.h> 41#include <qiconset.h>
42#include <qtimer.h> 42#include <qtimer.h>
43#include <qmessagebox.h> 43#include <qmessagebox.h>
44#include <qpushbutton.h> 44#include <qpushbutton.h>
45#include <qmultilineedit.h> 45#include <qmultilineedit.h>
46#include <qlabel.h> 46#include <qlabel.h>
47#include <qtabwidget.h> 47#include <qtabwidget.h>
48#include <qlistview.h> 48#include <qlistview.h>
49 49
50//using namespace Opie::Core; 50//using namespace Opie::Core;
51//using namespace Opie::Ui; 51//using namespace Opie::Ui;
52ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, bool modal ) 52ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, bool modal )
53 : ComposeMailUI( parent, name, modal ) 53 : ComposeMailUI( parent, name, modal )
54{ 54{
55 55
56 mPickLineEdit = 0; 56 mPickLineEdit = 0;
57 mEncoding = KOPrefs::instance()->mCurrentCodeName; 57 mEncoding = KOPrefs::instance()->mCurrentCodeName;
58 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), 58 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
59 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); 59 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
60 settings = sett; 60 settings = sett;
61 m_replyid = ""; 61 m_replyid = "";
62 if ( KOPrefs::instance()->mUseKapi) { 62 if ( KOPrefs::instance()->mUseKapi) {
63 KConfig config( locateLocal("config", "kabcrc") ); 63 KConfig config( locateLocal("config", "kabcrc") );
64 config.setGroup( "General" ); 64 config.setGroup( "General" );
65 QString whoami_uid = config.readEntry( "WhoAmI" ); 65 QString whoami_uid = config.readEntry( "WhoAmI" );
66 66
67 if ( whoami_uid.isEmpty() ) { 67 if ( whoami_uid.isEmpty() ) {
68 QMessageBox::information( 0, i18n( "Hint" ), 68 QMessageBox::information( 0, i18n( "Hint" ),
69 i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), 69 i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
70 i18n( "Ok" ) ); 70 i18n( "Ok" ) );
71 71
72 72
73 fillSettings(); 73 fillSettings();
74 } else 74 } else
75 ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid); 75 ExternalAppHandler::instance()->requestDetailsFromKAPI("", "sendbacklist", whoami_uid);
76 76
77 77
78#ifdef DESKTOP_VERSION 78#ifdef DESKTOP_VERSION
79 KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( ); 79 KABC::Addressee con = KABC::StdAddressBook::self()->whoAmI( );
80 QStringList mails = con.emails(); 80 QStringList mails = con.emails();
81 QString defmail = con.preferredEmail(); 81 QString defmail = con.preferredEmail();
82 if ( mails.count() == 0) 82 if ( mails.count() == 0)
83 QMessageBox::information( 0, i18n( "Hint" ), 83 QMessageBox::information( 0, i18n( "Hint" ),
84 i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), 84 i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
85 i18n( "Ok" ) ); 85 i18n( "Ok" ) );
86 if (defmail.length()!=0) { 86 if (defmail.length()!=0) {
87 fromBox->insertItem(defmail); 87 fromBox->insertItem(defmail);
88 } 88 }
89 QStringList::ConstIterator sit = mails.begin(); 89 QStringList::ConstIterator sit = mails.begin();
90 for (;sit!=mails.end();++sit) { 90 for (;sit!=mails.end();++sit) {
91 if ( (*sit)==defmail) 91 if ( (*sit)==defmail)
92 continue; 92 continue;
93 fromBox->insertItem((*sit)); 93 fromBox->insertItem((*sit));
94 } 94 }
95 senderNameEdit->setText(con.formattedName()); 95 senderNameEdit->setText(con.formattedName());
96#endif 96#endif
97 97
98 } else { 98 } else {
99 fillSettings(); 99 fillSettings();
100 } 100 }
101 checkBoxLater->setChecked( KOPrefs::instance()->mSendLater ); 101 checkBoxLater->setChecked( KOPrefs::instance()->mSendLater );
102 102
103 attList->addColumn( i18n( "Name" ) ); 103 attList->addColumn( i18n( "Name" ) );
104 attList->addColumn( i18n( "Size" ) ); 104 attList->addColumn( i18n( "Size" ) );
105 QList<Account> accounts = settings->getAccounts(); 105 QList<Account> accounts = settings->getAccounts();
106 106
107 if ( QApplication::desktop()->width() < 320 ) 107 if ( QApplication::desktop()->width() < 320 )
108 smtpAccountBox->setMaximumWidth( 80 ); 108 smtpAccountBox->setMaximumWidth( 80 );
109 Account *it; 109 Account *it;
110 for ( it = accounts.first(); it; it = accounts.next() ) { 110 for ( it = accounts.first(); it; it = accounts.next() ) {
111 if ( it->getType()==MAILLIB::A_SMTP ) { 111 if ( it->getType()==MAILLIB::A_SMTP ) {
112 SMTPaccount *smtp = static_cast<SMTPaccount *>(it); 112 SMTPaccount *smtp = static_cast<SMTPaccount *>(it);
113 smtpAccountBox->insertItem( smtp->getAccountName() ); 113 smtpAccountBox->insertItem( smtp->getAccountName() );
114 smtpAccounts.append( smtp ); 114 smtpAccounts.append( smtp );
115 } 115 }
116 } 116 }
117 connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); 117 connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) );
118 connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); 118 connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) );
119 connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); 119 connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) );
120 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); 120 connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) );
121 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); 121 connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) );
122 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); 122 connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) );
123 connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); 123 connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) );
124 mMail = 0; 124 mMail = 0;
125 warnAttach = true; 125 warnAttach = true;
126 QIconSet icon; 126 QIconSet icon;
127 //icon = SmallIcon("fileexport"); 127 //icon = SmallIcon("fileexport");
128 icon = SmallIcon("filesave"); 128 icon = SmallIcon("filesave");
129 SaveButton->setIconSet (icon ) ; 129 SaveButton->setIconSet (icon ) ;
130 if ( QApplication::desktop()->width() < 320 ) { 130 if ( QApplication::desktop()->width() < 320 ) {
131 SaveButton->setText ("") ; 131 SaveButton->setText ("") ;
132 SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ; 132 SaveButton->setMaximumSize ( SaveButton->sizeHint().height(),SaveButton->sizeHint().height()) ;
133 } 133 }
134 else 134 else
135 SaveButton->setText (i18n("Save")); 135 SaveButton->setText (i18n("Save"));
136#ifndef DESKTOP_VERSION 136#ifndef DESKTOP_VERSION
137 QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold ); 137 QPEApplication::setStylusOperation( message, QPEApplication::RightOnHold );
138 QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold ); 138 QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold );
139 QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold ); 139 QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold );
140#endif 140#endif
141 message->setFont ( KOPrefs::instance()->mComposeFont ); 141 message->setFont ( KOPrefs::instance()->mComposeFont );
142 message->setWordWrap (QMultiLineEdit::WidgetWidth); 142 message->setWordWrap (QMultiLineEdit::WidgetWidth);
143 if ( smtpAccounts.count() > 0 ) { 143 if ( smtpAccounts.count() > 0 ) {
144 fillValues( smtpAccountBox->currentItem() ); 144 fillValues( smtpAccountBox->currentItem() );
145 } else { 145 } else {
146 QMessageBox::information( 0, i18n( "Problem" ), 146 QMessageBox::information( 0, i18n( "Problem" ),
147 i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ), 147 i18n( "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n" ),
148 i18n( "Ok" ) ); 148 i18n( "Ok" ) );
149 return; 149 return;
150 } 150 }
151 connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); 151 connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) );
152 152 connect( SaveSigButton, SIGNAL( clicked() ), SLOT( saveSig()) );
153 if ( smtpAccountBox->count())
154 fillValues(0);
153 155
154} 156}
155 157
156void ComposeMail::fillSettings() 158void ComposeMail::fillSettings()
157{ 159{
158 if ( QApplication::desktop()->width() < 320 ) 160 if ( QApplication::desktop()->width() < 320 )
159 fromBox->setMaximumWidth( 100 ); 161 fromBox->setMaximumWidth( 100 );
160 QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail); 162 QStringList mailList = QStringList::split(";",KOPrefs::instance()->mEmail);
161 QStringList::ConstIterator sit = mailList.begin(); 163 QStringList::ConstIterator sit = mailList.begin();
162 int pref = 0; 164 int pref = 0;
163 for (;sit!=mailList.end();++sit) { 165 for (;sit!=mailList.end();++sit) {
164 fromBox->insertItem((*sit)); 166 fromBox->insertItem((*sit));
165 } 167 }
166 senderNameEdit->setText(KOPrefs::instance()->mName); 168 senderNameEdit->setText(KOPrefs::instance()->mName);
167} 169}
168 170void ComposeMail::saveSig()
169 171{
172 if ( smtpAccountBox->count()) {
173 int cur = smtpAccountBox->currentItem ();
174 SMTPaccount *smtp = smtpAccounts.at( cur );
175 if ( smtp )
176 smtp->setSignature( sigMultiLine->text());
177 }
178}
170void ComposeMail::saveAsDraft() 179void ComposeMail::saveAsDraft()
171{ 180{
172 181
173 Opie::Core::OSmartPointer<Mail> mail= new Mail(); 182 Opie::Core::OSmartPointer<Mail> mail= new Mail();
174 mail->setMail(fromBox->currentText()); 183 mail->setMail(fromBox->currentText());
175 mail->setTo( toLine->text() ); 184 mail->setTo( toLine->text() );
176 mail->setName(senderNameEdit->text()); 185 mail->setName(senderNameEdit->text());
177 mail->setCC( ccLine->text() ); 186 mail->setCC( ccLine->text() );
178 mail->setBCC( bccLine->text() ); 187 mail->setBCC( bccLine->text() );
179 mail->setReply( replyLine->text() ); 188 mail->setReply( replyLine->text() );
180 mail->setSubject( subjectLine->text() ); 189 mail->setSubject( subjectLine->text() );
181 if (!m_replyid.isEmpty()) { 190 if (!m_replyid.isEmpty()) {
182 QStringList ids; 191 QStringList ids;
183 ids.append(m_replyid); 192 ids.append(m_replyid);
184 mail->setInreply(ids); 193 mail->setInreply(ids);
185 } 194 }
186 QString txt = message->text(); 195 QString txt = message->text();
187 if ( !sigMultiLine->text().isEmpty() ) { 196 if ( !sigMultiLine->text().isEmpty() ) {
188 txt.append( "\n--\n" ); 197 txt.append( "\n--\n" );
189 txt.append( sigMultiLine->text() ); 198 txt.append( sigMultiLine->text() );
190 } 199 }
191 mail->setMessage( txt ); 200 mail->setMessage( txt );
192 mail->setCharset (mEncoding); 201 mail->setCharset (mEncoding);
193 /* only use the default drafts folder name! */ 202 /* only use the default drafts folder name! */
194 Storemail wrapper(AbstractMail::draftFolder()); 203 Storemail wrapper(AbstractMail::draftFolder());
195 wrapper.storeMail(mail); 204 wrapper.storeMail(mail);
196 205
197 AttachViewItem *it = (AttachViewItem *) attList->firstChild(); 206 AttachViewItem *it = (AttachViewItem *) attList->firstChild();
198 /* attachments we will ignore! */ 207 /* attachments we will ignore! */
199 if ( it != 0 ) { 208 if ( it != 0 ) {
200 if ( warnAttach ) 209 if ( warnAttach )
201 QMessageBox::warning(0,i18n("Store message"), 210 QMessageBox::warning(0,i18n("Store message"),
202 i18n("<center>Attachments will not be stored in \"Draft\" folder</center>")); 211 i18n("<center>Attachments will not be stored in \"Draft\" folder</center>"));
203 warnAttach = false; 212 warnAttach = false;
204 } 213 }
205 setStatus( i18n("Mail saved as draft!") ); 214 setStatus( i18n("Mail saved as draft!") );
206} 215}
207void ComposeMail::clearStatus() 216void ComposeMail::clearStatus()
208{ 217{
209 topLevelWidget()->setCaption( i18n("Compose mail") ); 218 topLevelWidget()->setCaption( i18n("Compose mail") );
210} 219}
211void ComposeMail::setStatus( QString status ) 220void ComposeMail::setStatus( QString status )
212{ 221{
213 topLevelWidget()->setCaption( status ); 222 topLevelWidget()->setCaption( status );
214 QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ; 223 QTimer::singleShot ( 10000, this, SLOT( clearStatus() ) ) ;
215} 224}
216void ComposeMail::pickAddress( ) 225void ComposeMail::pickAddress( )
217{ 226{
218 227
219 QLineEdit *line = mPickLineEdit; 228 QLineEdit *line = mPickLineEdit;
220 if ( line == 0 ) 229 if ( line == 0 )
221 return; 230 return;
222#ifdef DESKTOP_VERSION 231#ifdef DESKTOP_VERSION
223 //qDebug(" ComposeMail::pickAddress "); 232 //qDebug(" ComposeMail::pickAddress ");
224 QString names ;//= AddressPicker::getNames(); 233 QString names ;//= AddressPicker::getNames();
225 234
226 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 235 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
227 uint i=0; 236 uint i=0;
228 for (i=0; i < list.count(); i++) { 237 for (i=0; i < list.count(); i++) {
229 if ( !list[i].preferredEmail().isEmpty()) { 238 if ( !list[i].preferredEmail().isEmpty()) {
230 if ( ! names.isEmpty() ) 239 if ( ! names.isEmpty() )
231 names+= ","; 240 names+= ",";
232 names+= "\""+list[i].realName() +"\"<" +list[i].preferredEmail() +">"; 241 names+= "\""+list[i].realName() +"\"<" +list[i].preferredEmail() +">";
233 242
234 } 243 }
235 } 244 }
236 245
237 246
238 if ( line->text().isEmpty() ) { 247 if ( line->text().isEmpty() ) {
239 line->setText( names ); 248 line->setText( names );
240 } else if ( !names.isEmpty() ) { 249 } else if ( !names.isEmpty() ) {
241 line->setText( line->text() + ", " + names ); 250 line->setText( line->text() + ", " + names );
242 } 251 }
243#else 252#else
244 bool res = ExternalAppHandler::instance()->requestNameEmailUidListFromKAPI("QPE/Application/ompi", this->name() /* name is here the unique uid*/); 253 bool res = ExternalAppHandler::instance()->requestNameEmailUidListFromKAPI("QPE/Application/ompi", this->name() /* name is here the unique uid*/);
245 // the result should now arrive through method insertAttendees 254 // the result should now arrive through method insertAttendees
246#endif 255#endif
247} 256}
248//the map includes name/email pairs, that comes from Ka/Pi 257//the map includes name/email pairs, that comes from Ka/Pi
249void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) 258void ComposeMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList)
250{ 259{
251 //qDebug("ComposeMail::insertAttendees "); 260 //qDebug("ComposeMail::insertAttendees ");
252 raise(); 261 raise();
253 262
254 if ( mPickLineEdit == 0 ) { //whoami received 263 if ( mPickLineEdit == 0 ) { //whoami received
255 QString defmail = uidList[0]; 264 QString defmail = uidList[0];
256 if ( emailList.count() == 0 ) 265 if ( emailList.count() == 0 )
257 QMessageBox::information( 0, i18n( "Hint" ), 266 QMessageBox::information( 0, i18n( "Hint" ),
258 i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ), 267 i18n( "Please apply\n\"Set Who Am I\"\nin KA/Pi to get the from\nfield automatically filled out!\n" ),
259 i18n( "Ok" ) ); 268 i18n( "Ok" ) );
260 if (defmail.length()!=0) { 269 if (defmail.length()!=0) {
261 fromBox->insertItem(defmail); 270 fromBox->insertItem(defmail);
262 } 271 }
263 QStringList::ConstIterator sit = emailList.begin(); 272 QStringList::ConstIterator sit = emailList.begin();
264 int pref = 0; 273 int pref = 0;
265 for (;sit!=emailList.end();++sit) { 274 for (;sit!=emailList.end();++sit) {
266 if ( (*sit)==defmail) 275 if ( (*sit)==defmail)
267 continue; 276 continue;
268 fromBox->insertItem((*sit)); 277 fromBox->insertItem((*sit));
269 } 278 }
270 senderNameEdit->setText(nameList[0]); 279 senderNameEdit->setText(nameList[0]);
271 return; 280 return;
272 } 281 }
273 QString names ; 282 QString names ;
274 QLineEdit *line = mPickLineEdit; 283 QLineEdit *line = mPickLineEdit;
275 if (uid == this->name()) 284 if (uid == this->name())
276 { 285 {
277 for ( int i = 0; i < nameList.count(); i++) 286 for ( int i = 0; i < nameList.count(); i++)
278 { 287 {
279 QString _name = nameList[i]; 288 QString _name = nameList[i];
280 QString _email = emailList[i]; 289 QString _email = emailList[i];
281 QString _uid = uidList[i]; 290 QString _uid = uidList[i];
282 if ( ! _email.isEmpty() ) { 291 if ( ! _email.isEmpty() ) {
283 if ( ! names.isEmpty() ) 292 if ( ! names.isEmpty() )
284 names+= ","; 293 names+= ",";
285 names+= "\""+_name +"\"<" +_email +">"; 294 names+= "\""+_name +"\"<" +_email +">";
286 } 295 }
287 } 296 }
288 } 297 }
289 if ( line->text().isEmpty() ) { 298 if ( line->text().isEmpty() ) {
290 line->setText( names ); 299 line->setText( names );
291 } else if ( !names.isEmpty() ) { 300 } else if ( !names.isEmpty() ) {
292 line->setText( line->text() + ", " + names ); 301 line->setText( line->text() + ", " + names );
293 } 302 }
294} 303}
295 304
296void ComposeMail::setTo( const QString & to ) 305void ComposeMail::setTo( const QString & to )
297{ 306{
298 toLine->setText( to ); 307 toLine->setText( to );
299} 308}
300 309
301void ComposeMail::setSubject( const QString & subject ) 310void ComposeMail::setSubject( const QString & subject )
302{ 311{
303 subjectLine->setText( subject ); 312 subjectLine->setText( subject );
304} 313}
305 314
306void ComposeMail::setInReplyTo( const QString & messageId ) 315void ComposeMail::setInReplyTo( const QString & messageId )
307{ 316{
308 m_replyid = messageId; 317 m_replyid = messageId;
309} 318}
310 319
311void ComposeMail::setMessage( const QString & text ) 320void ComposeMail::setMessage( const QString & text )
312{ 321{
313 message->setText( text ); 322 message->setText( text );
314} 323}
315 324
316 325
317void ComposeMail::pickAddressTo() 326void ComposeMail::pickAddressTo()
318{ 327{
319 mPickLineEdit = toLine; 328 mPickLineEdit = toLine;
320 pickAddress( ); 329 pickAddress( );
321} 330}
322 331
323void ComposeMail::pickAddressCC() 332void ComposeMail::pickAddressCC()
324{ 333{
325 mPickLineEdit = ccLine; 334 mPickLineEdit = ccLine;
326 pickAddress( ); 335 pickAddress( );
327} 336}
328 337
329void ComposeMail::pickAddressBCC() 338void ComposeMail::pickAddressBCC()
330{ 339{
331 mPickLineEdit = bccLine; 340 mPickLineEdit = bccLine;
332 pickAddress( ); 341 pickAddress( );
333} 342}
334 343
335void ComposeMail::pickAddressReply() 344void ComposeMail::pickAddressReply()
336{ 345{
337 mPickLineEdit = replyLine; 346 mPickLineEdit = replyLine;
338 pickAddress( ); 347 pickAddress( );
339} 348}
340 349
341void ComposeMail::fillValues( int ) 350void ComposeMail::fillValues( int current )
342{ 351{
343#if 0 352#if 0
344 SMTPaccount *smtp = smtpAccounts.at( current ); 353 SMTPaccount *smtp = smtpAccounts.at( current );
345 ccLine->clear(); 354 ccLine->clear();
346 if ( smtp->getUseCC() ) { 355 if ( smtp->getUseCC() ) {
347 ccLine->setText( smtp->getCC() ); 356 ccLine->setText( smtp->getCC() );
348 } 357 }
349 bccLine->clear(); 358 bccLine->clear();
350 if ( smtp->getUseBCC() ) { 359 if ( smtp->getUseBCC() ) {
351 bccLine->setText( smtp->getBCC() ); 360 bccLine->setText( smtp->getBCC() );
352 } 361 }
353 replyLine->clear(); 362 replyLine->clear();
354 if ( smtp->getUseReply() ) { 363 if ( smtp->getUseReply() ) {
355 replyLine->setText( smtp->getReply() ); 364 replyLine->setText( smtp->getReply() );
356 } 365 }
357 sigMultiLine->setText( smtp->getSignature() );
358#endif 366#endif
367 SMTPaccount *smtp = smtpAccounts.at( current );
368 if ( smtp )
369 sigMultiLine->setText( smtp->getSignature() );
359} 370}
360 371
361void ComposeMail::slotAdjustColumns() 372void ComposeMail::slotAdjustColumns()
362{ 373{
363 int currPage = tabWidget->currentPageIndex(); 374 int currPage = tabWidget->currentPageIndex();
364 375
365 tabWidget->showPage( attachTab ); 376 tabWidget->showPage( attachTab );
366 attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); 377 attList->setColumnWidth( 0, attList->visibleWidth() - 80 );
367 attList->setColumnWidth( 1, 80 ); 378 attList->setColumnWidth( 1, 80 );
368 379
369 tabWidget->setCurrentPage( currPage ); 380 tabWidget->setCurrentPage( currPage );
370} 381}
371 382
372void ComposeMail::addAttachment() 383void ComposeMail::addAttachment()
373{ 384{
374 QString lnk = KFileDialog::getOpenFileName( "", "Add Attachment", this ); 385 QString lnk = KFileDialog::getOpenFileName( "", "Add Attachment", this );
375 if ( !lnk.isEmpty() ) { 386 if ( !lnk.isEmpty() ) {
376 Attachment *att = new Attachment( lnk ); 387 Attachment *att = new Attachment( lnk );
377 (void) new AttachViewItem( attList, att ); 388 (void) new AttachViewItem( attList, att );
378 } 389 }
379} 390}
380 391
381void ComposeMail::removeAttachment() 392void ComposeMail::removeAttachment()
382{ 393{
383 if ( !attList->currentItem() ) { 394 if ( !attList->currentItem() ) {
384 QMessageBox::information( this, i18n( "Error" ), 395 QMessageBox::information( this, i18n( "Error" ),
385 i18n( "<p>Please select a File.</p>" ), 396 i18n( "<p>Please select a File.</p>" ),
386 i18n( "Ok" ) ); 397 i18n( "Ok" ) );
387 } else { 398 } else {
388 attList->takeItem( attList->currentItem() ); 399 attList->takeItem( attList->currentItem() );
389 } 400 }
390} 401}
391 402
392void ComposeMail::accept() 403void ComposeMail::accept()
393{ 404{
394 if ( smtpAccountBox->count() == 0 ) { 405 if ( smtpAccountBox->count() == 0 ) {
395 406
396 reject(); 407 reject();
397 return; 408 return;
398 } 409 }
399 410
400 if (! checkBoxLater->isChecked() ) { 411 if (! checkBoxLater->isChecked() ) {
401 int yesno = QMessageBox::warning(0,i18n("Stop editing message"), 412 int yesno = QMessageBox::warning(0,i18n("Stop editing message"),
402 i18n("Send this message?"), 413 i18n("Send this message?"),
403 i18n("Yes"), 414 i18n("Yes"),
404 i18n("Cancel")); 415 i18n("Cancel"));
405 416
406 if (yesno == 1) { 417 if (yesno == 1) {
407 return; 418 return;
408 } 419 }
409 } 420 }
410#if 0 421#if 0
411 odebug << "Sending Mail with " 422 odebug << "Sending Mail with "
412 << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl; 423 << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl;
413#endif 424#endif
414 Opie::Core::OSmartPointer<Mail> mail=new Mail; 425 Opie::Core::OSmartPointer<Mail> mail=new Mail;
415 426
416 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); 427 SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() );
417 mail->setMail(fromBox->currentText()); 428 mail->setMail(fromBox->currentText());
418 429
419 if ( !toLine->text().isEmpty() ) { 430 if ( !toLine->text().isEmpty() ) {
420 mail->setTo( toLine->text() ); 431 mail->setTo( toLine->text() );
421 } else { 432 } else {
422 QMessageBox::warning(0,i18n("Sending mail"), 433 QMessageBox::warning(0,i18n("Sending mail"),
423 i18n("No Receiver spezified" ) ); 434 i18n("No Receiver spezified" ) );
424 return; 435 return;
425 } 436 }
426 437
427 mail->setName(senderNameEdit->text()); 438 mail->setName(senderNameEdit->text());
428 mail->setCC( ccLine->text() ); 439 mail->setCC( ccLine->text() );
429 mail->setBCC( bccLine->text() ); 440 mail->setBCC( bccLine->text() );
430 mail->setReply( replyLine->text() ); 441 mail->setReply( replyLine->text() );
431 mail->setSubject( subjectLine->text() ); 442 mail->setSubject( subjectLine->text() );
432 if (!m_replyid.isEmpty()) { 443 if (!m_replyid.isEmpty()) {
433 QStringList ids; 444 QStringList ids;
434 ids.append(m_replyid); 445 ids.append(m_replyid);
435 mail->setInreply(ids); 446 mail->setInreply(ids);
436 } 447 }
437 QString txt = message->text(); 448 QString txt = message->text();
438 if ( !sigMultiLine->text().isEmpty() ) { 449 if ( !sigMultiLine->text().isEmpty() ) {
439 txt.append( "\n--\n" ); 450 txt.append( "\n--\n" );
440 txt.append( sigMultiLine->text() ); 451 txt.append( sigMultiLine->text() );
441 } 452 }
442 mail->setMessage( txt ); 453 mail->setMessage( txt );
443 mail->setCharset (mEncoding); 454 mail->setCharset (mEncoding);
444 AttachViewItem *it = (AttachViewItem *) attList->firstChild(); 455 AttachViewItem *it = (AttachViewItem *) attList->firstChild();
445 while ( it != 0 ) { 456 while ( it != 0 ) {
446 mail->addAttachment( it->getAttachment() ); 457 mail->addAttachment( it->getAttachment() );
447 it = (AttachViewItem *) it->nextSibling(); 458 it = (AttachViewItem *) it->nextSibling();
448 } 459 }
449 460
450 SMTPwrapper wrapper( smtp ); 461 SMTPwrapper wrapper( smtp );
451 if ( wrapper.sendMail( mail,checkBoxLater->isChecked() ) ) 462 if ( wrapper.sendMail( mail,checkBoxLater->isChecked() ) )
452 setStatus( tr ("Mail sent")); 463 setStatus( tr ("Mail sent"));
453 else { 464 else {
454 setStatus( tr ("Error: Something went wrong. Nothing sent")); 465 setStatus( tr ("Error: Something went wrong. Nothing sent"));
455 return; 466 return;
456 } 467 }
457 468
458 469
459 QDialog::accept(); 470 QDialog::accept();
460} 471}
461 472
462void ComposeMail::reject() 473void ComposeMail::reject()
463{ 474{
464 //qDebug("ComposeMail::reject() "); 475 //qDebug("ComposeMail::reject() ");
465 int yesno = QMessageBox::warning(0,i18n("Store message?"), 476 int yesno = QMessageBox::warning(0,i18n("Store message?"),
466 i18n("Store message into drafts?\n"), 477 i18n("Store message into drafts?\n"),
467 i18n("Yes"), 478 i18n("Yes"),
468 i18n("No")); 479 i18n("No"));
469 480
470 //qDebug("button %d ", yesno); 481 //qDebug("button %d ", yesno);
471 if (yesno == 0) { 482 if (yesno == 0) {
472 if ( toLine->text().isEmpty() ) { 483 if ( toLine->text().isEmpty() ) {
473 QMessageBox::warning(0,i18n("Sending mail"), 484 QMessageBox::warning(0,i18n("Sending mail"),
474 i18n("No Receiver spezified" ) ); 485 i18n("No Receiver spezified" ) );
475 return; 486 return;
476 } 487 }
477 saveAsDraft(); 488 saveAsDraft();
478 } 489 }
479 if (yesno == 2) { 490 if (yesno == 2) {
480 qDebug("return "); 491 qDebug("return ");
481 return; 492 return;
482 } 493 }
483 QDialog::reject(); 494 QDialog::reject();
484} 495}
485 496
486void ComposeMail::setCharset(const QString& charset) 497void ComposeMail::setCharset(const QString& charset)
487{ 498{
488 if ( !charset.isEmpty() ) 499 if ( !charset.isEmpty() )
489 mEncoding = charset; 500 mEncoding = charset;
490 qDebug("ComposeMail::setCharset %s ", mEncoding.latin1()); 501 qDebug("ComposeMail::setCharset %s ", mEncoding.latin1());
491} 502}
492ComposeMail::~ComposeMail() 503ComposeMail::~ComposeMail()
493{ 504{
494} 505}
495 506
496void ComposeMail::reEditMail(const RecMailP&current) 507void ComposeMail::reEditMail(const RecMailP&current)
497{ 508{
498 RecMailP data = current; 509 RecMailP data = current;
499 RecBodyP body = data->Wrapper()->fetchBody(current); 510 RecBodyP body = data->Wrapper()->fetchBody(current);
500 511
501 message->setText(body->Bodytext()); 512 message->setText(body->Bodytext());
502 subjectLine->setText( data->getSubject()); 513 subjectLine->setText( data->getSubject());
503 toLine->setText(data->To().join(",")); 514 toLine->setText(data->To().join(","));
504 ccLine->setText(data->CC().join(",")); 515 ccLine->setText(data->CC().join(","));
505 bccLine->setText(data->Bcc().join(",")); 516 bccLine->setText(data->Bcc().join(","));
506 replyLine->setText(data->Replyto()); 517 replyLine->setText(data->Replyto());
507 setCharset(body->getCharset()); 518 setCharset(body->getCharset());
508} 519}
509 520
510AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) 521AttachViewItem::AttachViewItem( QListView *parent, Attachment *att )
511 : QListViewItem( parent ) 522 : QListViewItem( parent )
512{ 523{
513 attachment = att; 524 attachment = att;
514 if ( !attachment->getPixmap().isNull() ) 525 if ( !attachment->getPixmap().isNull() )
515 setPixmap( 0,attachment->getPixmap() ); 526 setPixmap( 0,attachment->getPixmap() );
516 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); 527 setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() );
517 setText( 1, QString::number( att->getSize() ) ); 528 setText( 1, QString::number( att->getSize() ) );
518} 529}
519 530
diff --git a/kmicromail/composemail.h b/kmicromail/composemail.h
index a7fa41c..966ac3e 100644
--- a/kmicromail/composemail.h
+++ b/kmicromail/composemail.h
@@ -1,93 +1,94 @@
1#ifndef COMPOSEMAIL_H 1#ifndef COMPOSEMAIL_H
2#define COMPOSEMAIL_H 2#define COMPOSEMAIL_H
3 3
4#include <qlineedit.h> 4#include <qlineedit.h>
5#include <qlistview.h> 5#include <qlistview.h>
6 6
7#include "composemailui.h" 7#include "composemailui.h"
8//#include "addresspickerui.h" 8//#include "addresspickerui.h"
9#include <libmailwrapper/settings.h> 9#include <libmailwrapper/settings.h>
10#include <libmailwrapper/mailwrapper.h> 10#include <libmailwrapper/mailwrapper.h>
11 11
12class RecMail; 12class RecMail;
13 13
14#include <opie2/osmartpointer.h> 14#include <opie2/osmartpointer.h>
15#if 0 15#if 0
16class AddressPicker : public AddressPickerUI 16class AddressPicker : public AddressPickerUI
17{ 17{
18 //Q_OBJECT 18 //Q_OBJECT
19 19
20public: 20public:
21 AddressPicker( QWidget *parent = 0, const char *name = 0, bool modal = false ); 21 AddressPicker( QWidget *parent = 0, const char *name = 0, bool modal = false );
22 static QString getNames(); 22 static QString getNames();
23 23
24protected: 24protected:
25 QString selectedNames; 25 QString selectedNames;
26 void accept(); 26 void accept();
27 27
28}; 28};
29#endif 29#endif
30class RecMail; 30class RecMail;
31 31
32class ComposeMail : public ComposeMailUI 32class ComposeMail : public ComposeMailUI
33{ 33{
34 Q_OBJECT 34 Q_OBJECT
35 35
36public: 36public:
37 37
38 ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false ); 38 ComposeMail( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = false );
39 virtual ~ComposeMail(); 39 virtual ~ComposeMail();
40 40
41 void reEditMail(const Opie::Core::OSmartPointer<RecMail>&current); 41 void reEditMail(const Opie::Core::OSmartPointer<RecMail>&current);
42 42
43public slots: 43public slots:
44 void slotAdjustColumns(); 44 void slotAdjustColumns();
45 45
46 void setTo( const QString & to ); 46 void setTo( const QString & to );
47 void setSubject( const QString & subject ); 47 void setSubject( const QString & subject );
48 void setInReplyTo( const QString & messageId ); 48 void setInReplyTo( const QString & messageId );
49 void setMessage( const QString & text ); 49 void setMessage( const QString & text );
50 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); 50 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist);
51 void setCharset(const QString&); 51 void setCharset(const QString&);
52 52
53 53
54protected slots: 54protected slots:
55 void accept(); 55 void accept();
56 void reject(); 56 void reject();
57 57
58private slots: 58private slots:
59 void fillValues( int current ); 59 void fillValues( int current );
60 void fillSettings(); 60 void fillSettings();
61 void pickAddress(); 61 void pickAddress();
62 void pickAddressTo(); 62 void pickAddressTo();
63 void pickAddressCC(); 63 void pickAddressCC();
64 void pickAddressBCC(); 64 void pickAddressBCC();
65 void pickAddressReply(); 65 void pickAddressReply();
66 void saveAsDraft(); 66 void saveAsDraft();
67 void addAttachment(); 67 void addAttachment();
68 void removeAttachment(); 68 void removeAttachment();
69 void clearStatus(); 69 void clearStatus();
70 void setStatus( QString ); 70 void setStatus( QString );
71 void saveSig();
71 72
72protected: 73protected:
73 QLineEdit* mPickLineEdit; 74 QLineEdit* mPickLineEdit;
74 Opie::Core::OSmartPointer<Mail> mMail; 75 Opie::Core::OSmartPointer<Mail> mMail;
75 Settings *settings; 76 Settings *settings;
76 QList<SMTPaccount> smtpAccounts; 77 QList<SMTPaccount> smtpAccounts;
77 QString m_replyid; 78 QString m_replyid;
78 QString mEncoding; 79 QString mEncoding;
79 bool warnAttach; 80 bool warnAttach;
80}; 81};
81 82
82class AttachViewItem : public QListViewItem 83class AttachViewItem : public QListViewItem
83{ 84{
84public: 85public:
85 AttachViewItem( QListView *parent, Attachment *att ); 86 AttachViewItem( QListView *parent, Attachment *att );
86 Attachment *getAttachment() { return attachment; } 87 Attachment *getAttachment() { return attachment; }
87 88
88private: 89private:
89 Attachment *attachment; 90 Attachment *attachment;
90 91
91}; 92};
92 93
93#endif 94#endif
diff --git a/kmicromail/composemailui.ui b/kmicromail/composemailui.ui
index 610907c..23f47d3 100644
--- a/kmicromail/composemailui.ui
+++ b/kmicromail/composemailui.ui
@@ -1,520 +1,510 @@
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>579</width> 15 <width>275</width>
16 <height>476</height> 16 <height>382</height>
17 </rect> 17 </rect>
18 </property> 18 </property>
19 <property stdset="1"> 19 <property stdset="1">
20 <name>sizePolicy</name> 20 <name>sizePolicy</name>
21 <sizepolicy> 21 <sizepolicy>
22 <hsizetype>7</hsizetype> 22 <hsizetype>7</hsizetype>
23 <vsizetype>7</vsizetype> 23 <vsizetype>7</vsizetype>
24 </sizepolicy> 24 </sizepolicy>
25 </property> 25 </property>
26 <property stdset="1"> 26 <property stdset="1">
27 <name>caption</name> 27 <name>caption</name>
28 <string>Compose Message</string> 28 <string>Compose Message</string>
29 </property> 29 </property>
30 <property> 30 <property>
31 <name>layoutMargin</name> 31 <name>layoutMargin</name>
32 </property> 32 </property>
33 <property> 33 <property>
34 <name>layoutSpacing</name> 34 <name>layoutSpacing</name>
35 </property> 35 </property>
36 <vbox> 36 <vbox>
37 <property stdset="1"> 37 <property stdset="1">
38 <name>margin</name> 38 <name>margin</name>
39 <number>0</number> 39 <number>0</number>
40 </property> 40 </property>
41 <property stdset="1"> 41 <property stdset="1">
42 <name>spacing</name> 42 <name>spacing</name>
43 <number>0</number> 43 <number>0</number>
44 </property> 44 </property>
45 <widget> 45 <widget>
46 <class>QLayoutWidget</class> 46 <class>QLayoutWidget</class>
47 <property stdset="1"> 47 <property stdset="1">
48 <name>name</name> 48 <name>name</name>
49 <cstring>Layout4</cstring> 49 <cstring>Layout4</cstring>
50 </property> 50 </property>
51 <property> 51 <property>
52 <name>layoutSpacing</name> 52 <name>layoutSpacing</name>
53 </property> 53 </property>
54 <vbox> 54 <vbox>
55 <property stdset="1"> 55 <property stdset="1">
56 <name>margin</name> 56 <name>margin</name>
57 <number>0</number> 57 <number>0</number>
58 </property> 58 </property>
59 <property stdset="1"> 59 <property stdset="1">
60 <name>spacing</name> 60 <name>spacing</name>
61 <number>0</number> 61 <number>0</number>
62 </property> 62 </property>
63 <widget> 63 <widget>
64 <class>QLayoutWidget</class> 64 <class>QLayoutWidget</class>
65 <property stdset="1"> 65 <property stdset="1">
66 <name>name</name> 66 <name>name</name>
67 <cstring>Layout3</cstring> 67 <cstring>Layout3</cstring>
68 </property> 68 </property>
69 <property> 69 <property>
70 <name>layoutSpacing</name> 70 <name>layoutSpacing</name>
71 </property> 71 </property>
72 <hbox> 72 <hbox>
73 <property stdset="1"> 73 <property stdset="1">
74 <name>margin</name> 74 <name>margin</name>
75 <number>0</number> 75 <number>0</number>
76 </property> 76 </property>
77 <property stdset="1"> 77 <property stdset="1">
78 <name>spacing</name> 78 <name>spacing</name>
79 <number>0</number> 79 <number>0</number>
80 </property> 80 </property>
81 <widget> 81 <widget>
82 <class>QCheckBox</class> 82 <class>QCheckBox</class>
83 <property stdset="1"> 83 <property stdset="1">
84 <name>name</name> 84 <name>name</name>
85 <cstring>checkBoxLater</cstring> 85 <cstring>checkBoxLater</cstring>
86 </property> 86 </property>
87 <property stdset="1"> 87 <property stdset="1">
88 <name>text</name> 88 <name>text</name>
89 <string>send later</string> 89 <string>send later</string>
90 </property> 90 </property>
91 </widget> 91 </widget>
92 <widget> 92 <widget>
93 <class>QLabel</class> 93 <class>QLabel</class>
94 <property stdset="1"> 94 <property stdset="1">
95 <name>name</name> 95 <name>name</name>
96 <cstring>accountLabel</cstring> 96 <cstring>accountLabel</cstring>
97 </property> 97 </property>
98 <property stdset="1"> 98 <property stdset="1">
99 <name>text</name> 99 <name>text</name>
100 <string>use:</string> 100 <string>use:</string>
101 </property> 101 </property>
102 </widget> 102 </widget>
103 <widget> 103 <widget>
104 <class>QComboBox</class> 104 <class>QComboBox</class>
105 <property stdset="1"> 105 <property stdset="1">
106 <name>name</name> 106 <name>name</name>
107 <cstring>smtpAccountBox</cstring> 107 <cstring>smtpAccountBox</cstring>
108 </property> 108 </property>
109 <property stdset="1"> 109 <property stdset="1">
110 <name>sizePolicy</name> 110 <name>sizePolicy</name>
111 <sizepolicy> 111 <sizepolicy>
112 <hsizetype>3</hsizetype> 112 <hsizetype>3</hsizetype>
113 <vsizetype>0</vsizetype> 113 <vsizetype>0</vsizetype>
114 </sizepolicy> 114 </sizepolicy>
115 </property> 115 </property>
116 </widget> 116 </widget>
117 <widget> 117 <widget>
118 <class>QPushButton</class> 118 <class>QPushButton</class>
119 <property stdset="1"> 119 <property stdset="1">
120 <name>name</name> 120 <name>name</name>
121 <cstring>SaveButton</cstring> 121 <cstring>SaveButton</cstring>
122 </property> 122 </property>
123 <property stdset="1"> 123 <property stdset="1">
124 <name>text</name> 124 <name>text</name>
125 <string> S</string> 125 <string> S</string>
126 </property> 126 </property>
127 </widget> 127 </widget>
128 </hbox> 128 </hbox>
129 </widget> 129 </widget>
130 <widget> 130 <widget>
131 <class>QTabWidget</class> 131 <class>QTabWidget</class>
132 <property stdset="1"> 132 <property stdset="1">
133 <name>name</name> 133 <name>name</name>
134 <cstring>tabWidget</cstring> 134 <cstring>tabWidget</cstring>
135 </property> 135 </property>
136 <property> 136 <property>
137 <name>layoutMargin</name> 137 <name>layoutMargin</name>
138 </property> 138 </property>
139 <property> 139 <property>
140 <name>layoutSpacing</name> 140 <name>layoutSpacing</name>
141 </property> 141 </property>
142 <widget> 142 <widget>
143 <class>QWidget</class> 143 <class>QWidget</class>
144 <property stdset="1"> 144 <property stdset="1">
145 <name>name</name> 145 <name>name</name>
146 <cstring>mailTab</cstring> 146 <cstring>mailTab</cstring>
147 </property> 147 </property>
148 <attribute> 148 <attribute>
149 <name>title</name> 149 <name>title</name>
150 <string>Mail</string> 150 <string>Mail</string>
151 </attribute> 151 </attribute>
152 <vbox> 152 <vbox>
153 <property stdset="1"> 153 <property stdset="1">
154 <name>margin</name> 154 <name>margin</name>
155 <number>0</number> 155 <number>0</number>
156 </property> 156 </property>
157 <property stdset="1"> 157 <property stdset="1">
158 <name>spacing</name> 158 <name>spacing</name>
159 <number>0</number> 159 <number>0</number>
160 </property> 160 </property>
161 <widget> 161 <widget>
162 <class>QLayoutWidget</class> 162 <class>QLayoutWidget</class>
163 <property stdset="1"> 163 <property stdset="1">
164 <name>name</name> 164 <name>name</name>
165 <cstring>Layout10</cstring> 165 <cstring>Layout10</cstring>
166 </property> 166 </property>
167 <property> 167 <property>
168 <name>layoutSpacing</name> 168 <name>layoutSpacing</name>
169 </property> 169 </property>
170 <grid> 170 <grid>
171 <property stdset="1"> 171 <property stdset="1">
172 <name>margin</name> 172 <name>margin</name>
173 <number>0</number> 173 <number>0</number>
174 </property> 174 </property>
175 <property stdset="1"> 175 <property stdset="1">
176 <name>spacing</name> 176 <name>spacing</name>
177 <number>1</number> 177 <number>1</number>
178 </property> 178 </property>
179 <widget row="0" column="1" > 179 <widget row="0" column="1" >
180 <class>QLayoutWidget</class> 180 <class>QLayoutWidget</class>
181 <property stdset="1"> 181 <property stdset="1">
182 <name>name</name> 182 <name>name</name>
183 <cstring>Layout9</cstring> 183 <cstring>Layout9</cstring>
184 </property> 184 </property>
185 <property> 185 <property>
186 <name>layoutSpacing</name> 186 <name>layoutSpacing</name>
187 </property> 187 </property>
188 <grid> 188 <grid>
189 <property stdset="1"> 189 <property stdset="1">
190 <name>margin</name> 190 <name>margin</name>
191 <number>0</number> 191 <number>0</number>
192 </property> 192 </property>
193 <property stdset="1"> 193 <property stdset="1">
194 <name>spacing</name> 194 <name>spacing</name>
195 <number>3</number> 195 <number>3</number>
196 </property> 196 </property>
197 <widget row="0" column="1" > 197 <widget row="0" column="1" >
198 <class>QComboBox</class> 198 <class>QComboBox</class>
199 <property stdset="1"> 199 <property stdset="1">
200 <name>name</name> 200 <name>name</name>
201 <cstring>fromBox</cstring> 201 <cstring>fromBox</cstring>
202 </property> 202 </property>
203 <property stdset="1"> 203 <property stdset="1">
204 <name>sizePolicy</name> 204 <name>sizePolicy</name>
205 <sizepolicy> 205 <sizepolicy>
206 <hsizetype>3</hsizetype> 206 <hsizetype>3</hsizetype>
207 <vsizetype>0</vsizetype> 207 <vsizetype>0</vsizetype>
208 </sizepolicy> 208 </sizepolicy>
209 </property> 209 </property>
210 <property stdset="1"> 210 <property stdset="1">
211 <name>editable</name> 211 <name>editable</name>
212 <bool>true</bool> 212 <bool>true</bool>
213 </property> 213 </property>
214 <property stdset="1"> 214 <property stdset="1">
215 <name>duplicatesEnabled</name> 215 <name>duplicatesEnabled</name>
216 <bool>false</bool> 216 <bool>false</bool>
217 </property> 217 </property>
218 </widget> 218 </widget>
219 <widget row="0" column="0" > 219 <widget row="0" column="0" >
220 <class>QLineEdit</class> 220 <class>QLineEdit</class>
221 <property stdset="1"> 221 <property stdset="1">
222 <name>name</name> 222 <name>name</name>
223 <cstring>senderNameEdit</cstring> 223 <cstring>senderNameEdit</cstring>
224 </property> 224 </property>
225 <property stdset="1"> 225 <property stdset="1">
226 <name>sizePolicy</name> 226 <name>sizePolicy</name>
227 <sizepolicy> 227 <sizepolicy>
228 <hsizetype>0</hsizetype> 228 <hsizetype>0</hsizetype>
229 <vsizetype>0</vsizetype> 229 <vsizetype>0</vsizetype>
230 </sizepolicy> 230 </sizepolicy>
231 </property> 231 </property>
232 <property stdset="1"> 232 <property stdset="1">
233 <name>minimumSize</name> 233 <name>minimumSize</name>
234 <size> 234 <size>
235 <width>70</width> 235 <width>70</width>
236 <height>0</height> 236 <height>0</height>
237 </size> 237 </size>
238 </property> 238 </property>
239 <property stdset="1"> 239 <property stdset="1">
240 <name>maximumSize</name> 240 <name>maximumSize</name>
241 <size> 241 <size>
242 <width>180</width> 242 <width>180</width>
243 <height>32767</height> 243 <height>32767</height>
244 </size> 244 </size>
245 </property> 245 </property>
246 </widget> 246 </widget>
247 </grid> 247 </grid>
248 </widget> 248 </widget>
249 <widget row="2" column="1" > 249 <widget row="2" column="1" >
250 <class>QLineEdit</class> 250 <class>QLineEdit</class>
251 <property stdset="1"> 251 <property stdset="1">
252 <name>name</name> 252 <name>name</name>
253 <cstring>subjectLine</cstring> 253 <cstring>subjectLine</cstring>
254 </property> 254 </property>
255 <property stdset="1"> 255 <property stdset="1">
256 <name>sizePolicy</name> 256 <name>sizePolicy</name>
257 <sizepolicy> 257 <sizepolicy>
258 <hsizetype>3</hsizetype> 258 <hsizetype>3</hsizetype>
259 <vsizetype>0</vsizetype> 259 <vsizetype>0</vsizetype>
260 </sizepolicy> 260 </sizepolicy>
261 </property> 261 </property>
262 </widget> 262 </widget>
263 <widget row="1" column="1" > 263 <widget row="1" column="1" >
264 <class>QLineEdit</class> 264 <class>QLineEdit</class>
265 <property stdset="1"> 265 <property stdset="1">
266 <name>name</name> 266 <name>name</name>
267 <cstring>toLine</cstring> 267 <cstring>toLine</cstring>
268 </property> 268 </property>
269 <property stdset="1"> 269 <property stdset="1">
270 <name>sizePolicy</name> 270 <name>sizePolicy</name>
271 <sizepolicy> 271 <sizepolicy>
272 <hsizetype>3</hsizetype> 272 <hsizetype>3</hsizetype>
273 <vsizetype>0</vsizetype> 273 <vsizetype>0</vsizetype>
274 </sizepolicy> 274 </sizepolicy>
275 </property> 275 </property>
276 </widget> 276 </widget>
277 <widget row="2" column="0" > 277 <widget row="2" column="0" >
278 <class>QLabel</class> 278 <class>QLabel</class>
279 <property stdset="1"> 279 <property stdset="1">
280 <name>name</name> 280 <name>name</name>
281 <cstring>subjectLabel</cstring> 281 <cstring>subjectLabel</cstring>
282 </property> 282 </property>
283 <property stdset="1"> 283 <property stdset="1">
284 <name>text</name> 284 <name>text</name>
285 <string>Subject</string> 285 <string>Subject</string>
286 </property> 286 </property>
287 </widget> 287 </widget>
288 <widget row="0" column="0" > 288 <widget row="0" column="0" >
289 <class>QLabel</class> 289 <class>QLabel</class>
290 <property stdset="1"> 290 <property stdset="1">
291 <name>name</name> 291 <name>name</name>
292 <cstring>fromLabel</cstring> 292 <cstring>fromLabel</cstring>
293 </property> 293 </property>
294 <property stdset="1"> 294 <property stdset="1">
295 <name>text</name> 295 <name>text</name>
296 <string>From</string> 296 <string>From</string>
297 </property> 297 </property>
298 </widget> 298 </widget>
299 <widget row="1" column="0" > 299 <widget row="1" column="0" >
300 <class>QPushButton</class> 300 <class>QPushButton</class>
301 <property stdset="1"> 301 <property stdset="1">
302 <name>name</name> 302 <name>name</name>
303 <cstring>toButton</cstring> 303 <cstring>toButton</cstring>
304 </property> 304 </property>
305 <property stdset="1"> 305 <property stdset="1">
306 <name>text</name> 306 <name>text</name>
307 <string>To</string> 307 <string>To</string>
308 </property> 308 </property>
309 </widget> 309 </widget>
310 </grid> 310 </grid>
311 </widget> 311 </widget>
312 <widget> 312 <widget>
313 <class>QMultiLineEdit</class> 313 <class>QMultiLineEdit</class>
314 <property stdset="1"> 314 <property stdset="1">
315 <name>name</name> 315 <name>name</name>
316 <cstring>message</cstring> 316 <cstring>message</cstring>
317 </property> 317 </property>
318 </widget> 318 </widget>
319 </vbox> 319 </vbox>
320 </widget> 320 </widget>
321 <widget> 321 <widget>
322 <class>QWidget</class> 322 <class>QWidget</class>
323 <property stdset="1"> 323 <property stdset="1">
324 <name>name</name> 324 <name>name</name>
325 <cstring>optionsTab</cstring> 325 <cstring>optionsTab</cstring>
326 </property> 326 </property>
327 <attribute> 327 <attribute>
328 <name>title</name> 328 <name>title</name>
329 <string>Options</string> 329 <string>Options</string>
330 </attribute> 330 </attribute>
331 <grid> 331 <grid>
332 <property stdset="1"> 332 <property stdset="1">
333 <name>margin</name> 333 <name>margin</name>
334 <number>3</number> 334 <number>2</number>
335 </property> 335 </property>
336 <property stdset="1"> 336 <property stdset="1">
337 <name>spacing</name> 337 <name>spacing</name>
338 <number>3</number> 338 <number>2</number>
339 </property> 339 </property>
340 <widget row="3" column="0" > 340 <widget row="1" column="0" >
341 <class>QPushButton</class>
342 <property stdset="1">
343 <name>name</name>
344 <cstring>replyButton</cstring>
345 </property>
346 <property stdset="1">
347 <name>text</name>
348 <string>Reply-To</string>
349 </property>
350 </widget>
351 <widget row="2" column="0" >
352 <class>QPushButton</class> 341 <class>QPushButton</class>
353 <property stdset="1"> 342 <property stdset="1">
354 <name>name</name> 343 <name>name</name>
355 <cstring>bccButton</cstring> 344 <cstring>bccButton</cstring>
356 </property> 345 </property>
357 <property stdset="1"> 346 <property stdset="1">
358 <name>text</name> 347 <name>text</name>
359 <string>BCC</string> 348 <string>BCC</string>
360 </property> 349 </property>
361 </widget> 350 </widget>
362 <widget row="1" column="1" > 351 <widget row="0" column="1" >
363 <class>QLineEdit</class> 352 <class>QLineEdit</class>
364 <property stdset="1"> 353 <property stdset="1">
365 <name>name</name> 354 <name>name</name>
366 <cstring>ccLine</cstring> 355 <cstring>ccLine</cstring>
367 </property> 356 </property>
368 </widget> 357 </widget>
369 <widget row="2" column="1" > 358 <widget row="1" column="1" >
370 <class>QLineEdit</class> 359 <class>QLineEdit</class>
371 <property stdset="1"> 360 <property stdset="1">
372 <name>name</name> 361 <name>name</name>
373 <cstring>bccLine</cstring> 362 <cstring>bccLine</cstring>
374 </property> 363 </property>
375 </widget> 364 </widget>
376 <widget row="3" column="1" > 365 <widget row="2" column="1" >
377 <class>QLineEdit</class> 366 <class>QLineEdit</class>
378 <property stdset="1"> 367 <property stdset="1">
379 <name>name</name> 368 <name>name</name>
380 <cstring>replyLine</cstring> 369 <cstring>replyLine</cstring>
381 </property> 370 </property>
382 </widget> 371 </widget>
383 <widget row="6" column="0" rowspan="1" colspan="2" > 372 <widget row="4" column="0" rowspan="1" colspan="2" >
384 <class>QMultiLineEdit</class> 373 <class>QMultiLineEdit</class>
385 <property stdset="1"> 374 <property stdset="1">
386 <name>name</name> 375 <name>name</name>
387 <cstring>sigMultiLine</cstring> 376 <cstring>sigMultiLine</cstring>
388 </property> 377 </property>
389 </widget> 378 </widget>
390 <widget row="5" column="0" > 379 <widget row="0" column="0" >
391 <class>QLabel</class> 380 <class>QPushButton</class>
392 <property stdset="1"> 381 <property stdset="1">
393 <name>name</name> 382 <name>name</name>
394 <cstring>sigLabel</cstring> 383 <cstring>ccButton</cstring>
395 </property> 384 </property>
396 <property stdset="1"> 385 <property stdset="1">
397 <name>text</name> 386 <name>text</name>
398 <string>Signature</string> 387 <string>CC</string>
399 </property> 388 </property>
400 </widget> 389 </widget>
401 <spacer row="4" column="0" > 390 <widget row="3" column="1" >
402 <property> 391 <class>QPushButton</class>
392 <property stdset="1">
403 <name>name</name> 393 <name>name</name>
404 <cstring>Spacer3</cstring> 394 <cstring>SaveSigButton</cstring>
405 </property> 395 </property>
406 <property stdset="1"> 396 <property stdset="1">
407 <name>orientation</name> 397 <name>text</name>
408 <enum>Vertical</enum> 398 <string>Save signature</string>
409 </property> 399 </property>
400 </widget>
401 <widget row="2" column="0" >
402 <class>QPushButton</class>
410 <property stdset="1"> 403 <property stdset="1">
411 <name>sizeType</name> 404 <name>name</name>
412 <enum>Expanding</enum> 405 <cstring>replyButton</cstring>
413 </property> 406 </property>
414 <property> 407 <property stdset="1">
415 <name>sizeHint</name> 408 <name>text</name>
416 <size> 409 <string>Reply-To</string>
417 <width>20</width>
418 <height>20</height>
419 </size>
420 </property> 410 </property>
421 </spacer> 411 </widget>
422 <widget row="1" column="0" > 412 <widget row="3" column="0" >
423 <class>QPushButton</class> 413 <class>QLabel</class>
424 <property stdset="1"> 414 <property stdset="1">
425 <name>name</name> 415 <name>name</name>
426 <cstring>ccButton</cstring> 416 <cstring>sigLabel</cstring>
427 </property> 417 </property>
428 <property stdset="1"> 418 <property stdset="1">
429 <name>text</name> 419 <name>text</name>
430 <string>CC</string> 420 <string>Signature</string>
431 </property> 421 </property>
432 </widget> 422 </widget>
433 </grid> 423 </grid>
434 </widget> 424 </widget>
435 <widget> 425 <widget>
436 <class>QWidget</class> 426 <class>QWidget</class>
437 <property stdset="1"> 427 <property stdset="1">
438 <name>name</name> 428 <name>name</name>
439 <cstring>attachTab</cstring> 429 <cstring>attachTab</cstring>
440 </property> 430 </property>
441 <attribute> 431 <attribute>
442 <name>title</name> 432 <name>title</name>
443 <string>Attachment</string> 433 <string>Attachment</string>
444 </attribute> 434 </attribute>
445 <grid> 435 <grid>
446 <property stdset="1"> 436 <property stdset="1">
447 <name>margin</name> 437 <name>margin</name>
448 <number>3</number> 438 <number>3</number>
449 </property> 439 </property>
450 <property stdset="1"> 440 <property stdset="1">
451 <name>spacing</name> 441 <name>spacing</name>
452 <number>3</number> 442 <number>3</number>
453 </property> 443 </property>
454 <widget row="0" column="0" rowspan="1" colspan="3" > 444 <widget row="0" column="0" rowspan="1" colspan="3" >
455 <class>QListView</class> 445 <class>QListView</class>
456 <property stdset="1"> 446 <property stdset="1">
457 <name>name</name> 447 <name>name</name>
458 <cstring>attList</cstring> 448 <cstring>attList</cstring>
459 </property> 449 </property>
460 <property stdset="1"> 450 <property stdset="1">
461 <name>selectionMode</name> 451 <name>selectionMode</name>
462 <enum>Single</enum> 452 <enum>Single</enum>
463 </property> 453 </property>
464 <property stdset="1"> 454 <property stdset="1">
465 <name>allColumnsShowFocus</name> 455 <name>allColumnsShowFocus</name>
466 <bool>true</bool> 456 <bool>true</bool>
467 </property> 457 </property>
468 <property stdset="1"> 458 <property stdset="1">
469 <name>showSortIndicator</name> 459 <name>showSortIndicator</name>
470 <bool>true</bool> 460 <bool>true</bool>
471 </property> 461 </property>
472 </widget> 462 </widget>
473 <widget row="1" column="2" > 463 <widget row="1" column="2" >
474 <class>QPushButton</class> 464 <class>QPushButton</class>
475 <property stdset="1"> 465 <property stdset="1">
476 <name>name</name> 466 <name>name</name>
477 <cstring>deleteButton</cstring> 467 <cstring>deleteButton</cstring>
478 </property> 468 </property>
479 <property stdset="1"> 469 <property stdset="1">
480 <name>text</name> 470 <name>text</name>
481 <string>Delete File</string> 471 <string>Delete File</string>
482 </property> 472 </property>
483 </widget> 473 </widget>
484 <widget row="1" column="0" > 474 <widget row="1" column="0" >
485 <class>QPushButton</class> 475 <class>QPushButton</class>
486 <property stdset="1"> 476 <property stdset="1">
487 <name>name</name> 477 <name>name</name>
488 <cstring>addButton</cstring> 478 <cstring>addButton</cstring>
489 </property> 479 </property>
490 <property stdset="1"> 480 <property stdset="1">
491 <name>text</name> 481 <name>text</name>
492 <string>Add File</string> 482 <string>Add File</string>
493 </property> 483 </property>
494 </widget> 484 </widget>
495 </grid> 485 </grid>
496 </widget> 486 </widget>
497 </widget> 487 </widget>
498 </vbox> 488 </vbox>
499 </widget> 489 </widget>
500 </vbox> 490 </vbox>
501</widget> 491</widget>
502<tabstops> 492<tabstops>
503 <tabstop>fromBox</tabstop> 493 <tabstop>fromBox</tabstop>
504 <tabstop>toButton</tabstop> 494 <tabstop>toButton</tabstop>
505 <tabstop>toLine</tabstop> 495 <tabstop>toLine</tabstop>
506 <tabstop>subjectLine</tabstop> 496 <tabstop>subjectLine</tabstop>
507 <tabstop>message</tabstop> 497 <tabstop>message</tabstop>
508 <tabstop>tabWidget</tabstop> 498 <tabstop>tabWidget</tabstop>
509 <tabstop>ccButton</tabstop> 499 <tabstop>ccButton</tabstop>
510 <tabstop>ccLine</tabstop> 500 <tabstop>ccLine</tabstop>
511 <tabstop>bccButton</tabstop> 501 <tabstop>bccButton</tabstop>
512 <tabstop>bccLine</tabstop> 502 <tabstop>bccLine</tabstop>
513 <tabstop>replyButton</tabstop> 503 <tabstop>replyButton</tabstop>
514 <tabstop>replyLine</tabstop> 504 <tabstop>replyLine</tabstop>
515 <tabstop>sigMultiLine</tabstop> 505 <tabstop>sigMultiLine</tabstop>
516 <tabstop>attList</tabstop> 506 <tabstop>attList</tabstop>
517 <tabstop>addButton</tabstop> 507 <tabstop>addButton</tabstop>
518 <tabstop>deleteButton</tabstop> 508 <tabstop>deleteButton</tabstop>
519</tabstops> 509</tabstops>
520</UI> 510</UI>
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 48c3963..8253c91 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -1,666 +1,681 @@
1 1
2#include <qdialog.h> 2#include <qdialog.h>
3#include "kapplication.h" 3#include "kapplication.h"
4#include "defines.h" 4#include "defines.h"
5#include "editaccounts.h" 5#include "editaccounts.h"
6/* OPIE */ 6/* OPIE */
7#include <qpe/qpeapplication.h> 7#include <qpe/qpeapplication.h>
8 8
9/* QT */ 9/* QT */
10#include <qstringlist.h> 10#include <qstringlist.h>
11 11
12#include <qcombobox.h> 12#include <qcombobox.h>
13#include <qcheckbox.h> 13#include <qcheckbox.h>
14#include <qmessagebox.h> 14#include <qmessagebox.h>
15#include <qpushbutton.h> 15#include <qpushbutton.h>
16#include <qlineedit.h> 16#include <qlineedit.h>
17#include <qlabel.h> 17#include <qlabel.h>
18#include <qtabwidget.h> 18#include <qtabwidget.h>
19#include <qlistview.h> 19#include <qlistview.h>
20#include <qspinbox.h> 20#include <qspinbox.h>
21#include <klocale.h> 21#include <klocale.h>
22#include <kfiledialog.h>
22 23
23#include <libmailwrapper/nntpwrapper.h> 24#include <libmailwrapper/nntpwrapper.h>
24 25
25using namespace Opie::Core; 26using namespace Opie::Core;
26 27
27AccountListItem::AccountListItem( QListView *parent, Account *a) 28AccountListItem::AccountListItem( QListView *parent, Account *a)
28 : QListViewItem( parent ) 29 : QListViewItem( parent )
29{ 30{
30 account = a; 31 account = a;
31 setText( 0, account->getAccountName() ); 32 setText( 0, account->getAccountName() );
32 QString ttext = ""; 33 QString ttext = "";
33 switch (account->getType()) { 34 switch (account->getType()) {
34 case MAILLIB::A_NNTP: 35 case MAILLIB::A_NNTP:
35 ttext="NNTP"; 36 ttext="NNTP";
36 break; 37 break;
37 case MAILLIB::A_POP3: 38 case MAILLIB::A_POP3:
38 ttext = "POP3"; 39 ttext = "POP3";
39 break; 40 break;
40 case MAILLIB::A_IMAP: 41 case MAILLIB::A_IMAP:
41 ttext = "IMAP"; 42 ttext = "IMAP";
42 break; 43 break;
43 case MAILLIB::A_SMTP: 44 case MAILLIB::A_SMTP:
44 ttext = "SMTP"; 45 ttext = "SMTP";
45 break; 46 break;
46 default: 47 default:
47 ttext = "UNKNOWN"; 48 ttext = "UNKNOWN";
48 break; 49 break;
49 } 50 }
50 setText( 1, ttext); 51 setText( 1, ttext);
51} 52}
52 53
53EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 54EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags )
54 : EditAccountsUI( parent, name, modal, flags ) 55 : EditAccountsUI( parent, name, modal, flags )
55{ 56{
56 settings = s; 57 settings = s;
57 58
58 mailList->addColumn( i18n( "Account" ) ); 59 mailList->addColumn( i18n( "Account" ) );
59 mailList->addColumn( i18n( "Type" ) ); 60 mailList->addColumn( i18n( "Type" ) );
60 61
61 newsList->addColumn( i18n( "Account" ) ); 62 newsList->addColumn( i18n( "Account" ) );
62 63
63 connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); 64 connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) );
64 connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); 65 connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) );
65 connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); 66 connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) );
66 connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) ); 67 connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) );
67 connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) ); 68 connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) );
68 connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) ); 69 connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) );
69 70
70 slotFillLists(); 71 slotFillLists();
71} 72}
72 73
73void EditAccounts::slotFillLists() 74void EditAccounts::slotFillLists()
74{ 75{
75 mailList->clear(); 76 mailList->clear();
76 newsList->clear(); 77 newsList->clear();
77 78
78 QList<Account> accounts = settings->getAccounts(); 79 QList<Account> accounts = settings->getAccounts();
79 Account *it; 80 Account *it;
80 for ( it = accounts.first(); it; it = accounts.next() ) 81 for ( it = accounts.first(); it; it = accounts.next() )
81 { 82 {
82 if ( it->getType()==MAILLIB::A_NNTP ) 83 if ( it->getType()==MAILLIB::A_NNTP )
83 { 84 {
84 (void) new AccountListItem( newsList, it ); 85 (void) new AccountListItem( newsList, it );
85 } 86 }
86 else 87 else
87 { 88 {
88 (void) new AccountListItem( mailList, it ); 89 (void) new AccountListItem( mailList, it );
89 } 90 }
90 } 91 }
91} 92}
92 93
93void EditAccounts::slotNewMail() 94void EditAccounts::slotNewMail()
94{ 95{
95 QString *selection = new QString(); 96 QString *selection = new QString();
96 SelectMailType selType( selection, this, 0, true ); 97 SelectMailType selType( selection, this, 0, true );
97 selType.show(); 98 selType.show();
98 if ( QDialog::Accepted == selType.exec() ) 99 if ( QDialog::Accepted == selType.exec() )
99 { 100 {
100 slotNewAccount( *selection ); 101 slotNewAccount( *selection );
101 } 102 }
102} 103}
103 104
104void EditAccounts::slotNewAccount( const QString &type ) 105void EditAccounts::slotNewAccount( const QString &type )
105{ 106{
106 if ( type.compare( i18n("IMAP") ) == 0 ) 107 if ( type.compare( i18n("IMAP") ) == 0 )
107 { 108 {
108 IMAPaccount *account = new IMAPaccount(); 109 IMAPaccount *account = new IMAPaccount();
109 IMAPconfig imap( account, this, 0, true ); 110 IMAPconfig imap( account, this, 0, true );
110 111
111#ifndef DESKTOP_VERSION 112#ifndef DESKTOP_VERSION
112 imap.showMaximized(); 113 imap.showMaximized();
113#endif 114#endif
114 if ( QDialog::Accepted == imap.exec() ) 115 if ( QDialog::Accepted == imap.exec() )
115 { 116 {
116 settings->addAccount( account ); 117 settings->addAccount( account );
117 account->save(); 118 account->save();
118 slotFillLists(); 119 slotFillLists();
119 } 120 }
120 else 121 else
121 { 122 {
122 account->remove(); 123 account->remove();
123 } 124 }
124 } 125 }
125 else if ( type.compare( i18n("POP3") ) == 0 ) 126 else if ( type.compare( i18n("POP3") ) == 0 )
126 { 127 {
127 POP3account *account = new POP3account(); 128 POP3account *account = new POP3account();
128 POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); 129 POP3config pop3( account, this, 0, true, WStyle_ContextHelp );
129 if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) 130 if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) )
130 { 131 {
131 settings->addAccount( account ); 132 settings->addAccount( account );
132 account->save(); 133 account->save();
133 slotFillLists(); 134 slotFillLists();
134 } 135 }
135 else 136 else
136 { 137 {
137 account->remove(); 138 account->remove();
138 } 139 }
139 } 140 }
140 else if ( type.compare( i18n("SMTP") ) == 0 ) 141 else if ( type.compare( i18n("SMTP") ) == 0 )
141 { 142 {
142 SMTPaccount *account = new SMTPaccount(); 143 SMTPaccount *account = new SMTPaccount();
143 SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); 144 SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp );
144 if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) 145 if ( QDialog::Accepted == KApplication::execDialog( &smtp ) )
145 { 146 {
146 settings->addAccount( account ); 147 settings->addAccount( account );
147 account->save(); 148 account->save();
148 slotFillLists(); 149 slotFillLists();
149 150
150 } 151 }
151 else 152 else
152 { 153 {
153 account->remove(); 154 account->remove();
154 } 155 }
155 } 156 }
156 else if ( type.compare( i18n("NNTP") ) == 0 ) 157 else if ( type.compare( i18n("NNTP") ) == 0 )
157 { 158 {
158 NNTPaccount *account = new NNTPaccount(); 159 NNTPaccount *account = new NNTPaccount();
159 NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); 160 NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp );
160 if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) 161 if ( QDialog::Accepted == KApplication::execDialog( &nntp ) )
161 { 162 {
162 settings->addAccount( account ); 163 settings->addAccount( account );
163 account->save(); 164 account->save();
164 slotFillLists(); 165 slotFillLists();
165 } 166 }
166 else 167 else
167 { 168 {
168 account->remove(); 169 account->remove();
169 } 170 }
170 } 171 }
171} 172}
172 173
173void EditAccounts::slotEditAccount( Account *account ) 174void EditAccounts::slotEditAccount( Account *account )
174{ 175{
175 if ( account->getType() == MAILLIB::A_IMAP ) 176 if ( account->getType() == MAILLIB::A_IMAP )
176 { 177 {
177 IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); 178 IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account);
178 IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp ); 179 IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp );
179 if ( QDialog::Accepted == KApplication::execDialog( &imap ) ) 180 if ( QDialog::Accepted == KApplication::execDialog( &imap ) )
180 { 181 {
181 slotFillLists(); 182 slotFillLists();
182 } 183 }
183 } 184 }
184 else if ( account->getType()==MAILLIB::A_POP3 ) 185 else if ( account->getType()==MAILLIB::A_POP3 )
185 { 186 {
186 POP3account *pop3Acc = static_cast<POP3account *>(account); 187 POP3account *pop3Acc = static_cast<POP3account *>(account);
187 POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp ); 188 POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp );
188 if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) 189 if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) )
189 { 190 {
190 slotFillLists(); 191 slotFillLists();
191 } 192 }
192 } 193 }
193 else if ( account->getType()==MAILLIB::A_SMTP ) 194 else if ( account->getType()==MAILLIB::A_SMTP )
194 { 195 {
195 SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); 196 SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account);
196 SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp ); 197 SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp );
197 if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) 198 if ( QDialog::Accepted == KApplication::execDialog( &smtp ) )
198 { 199 {
199 slotFillLists(); 200 slotFillLists();
200 } 201 }
201 } 202 }
202 else if ( account->getType()==MAILLIB::A_NNTP) 203 else if ( account->getType()==MAILLIB::A_NNTP)
203 { 204 {
204 NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account); 205 NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account);
205 NNTPconfig nntp( nntpAcc, this, 0, true, WStyle_ContextHelp ); 206 NNTPconfig nntp( nntpAcc, this, 0, true, WStyle_ContextHelp );
206 if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) 207 if ( QDialog::Accepted == KApplication::execDialog( &nntp ) )
207 { 208 {
208 slotFillLists(); 209 slotFillLists();
209 } 210 }
210 } 211 }
211} 212}
212 213
213void EditAccounts::slotDeleteAccount( Account *account ) 214void EditAccounts::slotDeleteAccount( Account *account )
214{ 215{
215 if ( QMessageBox::information( this, i18n( "Question" ), 216 if ( QMessageBox::information( this, i18n( "Question" ),
216 i18n( "<p>Do you really want to delete the selected Account?</p>" ), 217 i18n( "<p>Do you really want to delete the selected Account?</p>" ),
217 i18n( "Yes" ), i18n( "No" ) ) == 0 ) 218 i18n( "Yes" ), i18n( "No" ) ) == 0 )
218 { 219 {
219 settings->delAccount( account ); 220 settings->delAccount( account );
220 slotFillLists(); 221 slotFillLists();
221 } 222 }
222} 223}
223 224
224void EditAccounts::slotEditMail() 225void EditAccounts::slotEditMail()
225{ 226{
226 if ( !mailList->currentItem() ) 227 if ( !mailList->currentItem() )
227 { 228 {
228 QMessageBox::information( this, i18n( "Error" ), 229 QMessageBox::information( this, i18n( "Error" ),
229 i18n( "<p>Please select an account.</p>" ), 230 i18n( "<p>Please select an account.</p>" ),
230 i18n( "Ok" ) ); 231 i18n( "Ok" ) );
231 return; 232 return;
232 } 233 }
233 234
234 Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); 235 Account *a = ((AccountListItem *) mailList->currentItem())->getAccount();
235 slotEditAccount( a ); 236 slotEditAccount( a );
236} 237}
237 238
238void EditAccounts::slotDeleteMail() 239void EditAccounts::slotDeleteMail()
239{ 240{
240 if ( !mailList->currentItem() ) 241 if ( !mailList->currentItem() )
241 { 242 {
242 QMessageBox::information( this, i18n( "Error" ), 243 QMessageBox::information( this, i18n( "Error" ),
243 i18n( "<p>Please select an account.</p>" ), 244 i18n( "<p>Please select an account.</p>" ),
244 i18n( "Ok" ) ); 245 i18n( "Ok" ) );
245 return; 246 return;
246 } 247 }
247 248
248 Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); 249 Account *a = ((AccountListItem *) mailList->currentItem())->getAccount();
249 slotDeleteAccount( a ); 250 slotDeleteAccount( a );
250} 251}
251 252
252void EditAccounts::slotNewNews() 253void EditAccounts::slotNewNews()
253{ 254{
254 slotNewAccount( "NNTP" ); 255 slotNewAccount( "NNTP" );
255} 256}
256 257
257void EditAccounts::slotEditNews() 258void EditAccounts::slotEditNews()
258{ 259{
259 if ( !newsList->currentItem() ) 260 if ( !newsList->currentItem() )
260 { 261 {
261 QMessageBox::information( this, i18n( "Error" ), 262 QMessageBox::information( this, i18n( "Error" ),
262 i18n( "<p>Please select an account.</p>" ), 263 i18n( "<p>Please select an account.</p>" ),
263 i18n( "Ok" ) ); 264 i18n( "Ok" ) );
264 return; 265 return;
265 } 266 }
266 267
267 Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); 268 Account *a = ((AccountListItem *) newsList->currentItem())->getAccount();
268 slotEditAccount( a ); 269 slotEditAccount( a );
269} 270}
270 271
271void EditAccounts::slotDeleteNews() 272void EditAccounts::slotDeleteNews()
272{ 273{
273 if ( !newsList->currentItem() ) 274 if ( !newsList->currentItem() )
274 { 275 {
275 QMessageBox::information( this, i18n( "Error" ), 276 QMessageBox::information( this, i18n( "Error" ),
276 i18n( "<p>Please select an account.</p>" ), 277 i18n( "<p>Please select an account.</p>" ),
277 i18n( "Ok" ) ); 278 i18n( "Ok" ) );
278 return; 279 return;
279 } 280 }
280 281
281 Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); 282 Account *a = ((AccountListItem *) newsList->currentItem())->getAccount();
282 slotDeleteAccount( a ); 283 slotDeleteAccount( a );
283} 284}
284 285
285void EditAccounts::slotAdjustColumns() 286void EditAccounts::slotAdjustColumns()
286{ 287{
287 int currPage = configTab->currentPageIndex(); 288 int currPage = configTab->currentPageIndex();
288 289
289 configTab->showPage( mailTab ); 290 configTab->showPage( mailTab );
290 mailList->setColumnWidth( 0, mailList->visibleWidth() - 50 ); 291 mailList->setColumnWidth( 0, mailList->visibleWidth() - 50 );
291 mailList->setColumnWidth( 1, 50 ); 292 mailList->setColumnWidth( 1, 50 );
292 293
293 configTab->showPage( newsTab ); 294 configTab->showPage( newsTab );
294 newsList->setColumnWidth( 0, newsList->visibleWidth() ); 295 newsList->setColumnWidth( 0, newsList->visibleWidth() );
295 296
296 configTab->setCurrentPage( currPage ); 297 configTab->setCurrentPage( currPage );
297} 298}
298 299
299void EditAccounts::accept() 300void EditAccounts::accept()
300{ 301{
301 settings->saveAccounts(); 302 settings->saveAccounts();
302 303
303 QDialog::accept(); 304 QDialog::accept();
304} 305}
305 306
306/** 307/**
307 * SelectMailType 308 * SelectMailType
308 */ 309 */
309 310
310SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) 311SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags )
311 : SelectMailTypeUI( parent, name, modal, flags ) 312 : SelectMailTypeUI( parent, name, modal, flags )
312{ 313{
313 selected = selection; 314 selected = selection;
314 selected->replace( 0, selected->length(), typeBox->currentText() ); 315 selected->replace( 0, selected->length(), typeBox->currentText() );
315 connect( typeBox, SIGNAL( activated(const QString&) ), SLOT( slotSelection(const QString&) ) ); 316 connect( typeBox, SIGNAL( activated(const QString&) ), SLOT( slotSelection(const QString&) ) );
316} 317}
317 318
318void SelectMailType::slotSelection( const QString &sel ) 319void SelectMailType::slotSelection( const QString &sel )
319{ 320{
320 selected->replace( 0, selected->length(), sel ); 321 selected->replace( 0, selected->length(), sel );
321} 322}
322 323
323/** 324/**
324 * IMAPconfig 325 * IMAPconfig
325 */ 326 */
326 327
327IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 328IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
328 : IMAPconfigUI( parent, name, modal, flags ) 329 : IMAPconfigUI( parent, name, modal, flags )
329{ 330{
330 data = account; 331 data = account;
331 332
332 fillValues(); 333 fillValues();
333 334
334 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); 335 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
335 ComboBox1->insertItem( "Only if available", 0 ); 336 ComboBox1->insertItem( "Only if available", 0 );
336 ComboBox1->insertItem( "Always, Negotiated", 1 ); 337 ComboBox1->insertItem( "Always, Negotiated", 1 );
337 ComboBox1->insertItem( "Connect on secure port", 2 ); 338 ComboBox1->insertItem( "Connect on secure port", 2 );
338 ComboBox1->insertItem( "Run command instead", 3 ); 339 ComboBox1->insertItem( "Run command instead", 3 );
339 CommandEdit->hide(); 340 CommandEdit->hide();
340 ComboBox1->setCurrentItem( data->ConnectionType() ); 341 ComboBox1->setCurrentItem( data->ConnectionType() );
341} 342}
342 343
343void IMAPconfig::slotConnectionToggle( int index ) 344void IMAPconfig::slotConnectionToggle( int index )
344{ 345{
345 if ( index == 2 ) 346 if ( index == 2 )
346 { 347 {
347 portLine->setText( IMAP_SSL_PORT ); 348 portLine->setText( IMAP_SSL_PORT );
348 } 349 }
349 else if ( index == 3 ) 350 else if ( index == 3 )
350 { 351 {
351 portLine->setText( IMAP_PORT ); 352 portLine->setText( IMAP_PORT );
352 CommandEdit->show(); 353 CommandEdit->show();
353 } 354 }
354 else 355 else
355 { 356 {
356 portLine->setText( IMAP_PORT ); 357 portLine->setText( IMAP_PORT );
357 } 358 }
358} 359}
359 360
360void IMAPconfig::fillValues() 361void IMAPconfig::fillValues()
361{ 362{
362 accountLine->setText( data->getAccountName() ); 363 accountLine->setText( data->getAccountName() );
363 serverLine->setText( data->getServer() ); 364 serverLine->setText( data->getServer() );
364 portLine->setText( data->getPort() ); 365 portLine->setText( data->getPort() );
365 ComboBox1->setCurrentItem( data->ConnectionType() ); 366 ComboBox1->setCurrentItem( data->ConnectionType() );
366 userLine->setText( data->getUser() ); 367 userLine->setText( data->getUser() );
367 passLine->setText( data->getPassword() ); 368 passLine->setText( data->getPassword() );
368 prefixLine->setText(data->getPrefix()); 369 prefixLine->setText(data->getPrefix());
369 localFolder->setText( data->getLocalFolder() ); 370 localFolder->setText( data->getLocalFolder() );
370 int max = data->getMaxMailSize() ; 371 int max = data->getMaxMailSize() ;
371 if ( max ) { 372 if ( max ) {
372 CheckBoxDown->setChecked( true ); 373 CheckBoxDown->setChecked( true );
373 SpinBoxDown->setValue ( max ); 374 SpinBoxDown->setValue ( max );
374 } else { 375 } else {
375 CheckBoxDown->setChecked( false ); 376 CheckBoxDown->setChecked( false );
376 SpinBoxDown->setValue ( 5 ); 377 SpinBoxDown->setValue ( 5 );
377 } 378 }
378 CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); 379 CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() );
379} 380}
380 381
381void IMAPconfig::accept() 382void IMAPconfig::accept()
382{ 383{
383 data->setAccountName( accountLine->text() ); 384 data->setAccountName( accountLine->text() );
384 data->setServer( serverLine->text() ); 385 data->setServer( serverLine->text() );
385 data->setPort( portLine->text() ); 386 data->setPort( portLine->text() );
386 data->setConnectionType( ComboBox1->currentItem() ); 387 data->setConnectionType( ComboBox1->currentItem() );
387 data->setUser( userLine->text() ); 388 data->setUser( userLine->text() );
388 data->setPassword( passLine->text() ); 389 data->setPassword( passLine->text() );
389 data->setPrefix(prefixLine->text()); 390 data->setPrefix(prefixLine->text());
390 data->setLocalFolder( localFolder->text() ); 391 data->setLocalFolder( localFolder->text() );
391 data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; 392 data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ;
392 data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); 393 data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() );
393 394
394 QDialog::accept(); 395 QDialog::accept();
395} 396}
396 397
397/** 398/**
398 * POP3config 399 * POP3config
399 */ 400 */
400 401
401POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 402POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags )
402 : POP3configUI( parent, name, modal, flags ) 403 : POP3configUI( parent, name, modal, flags )
403{ 404{
404 data = account; 405 data = account;
405 fillValues(); 406 fillValues();
406 407
407 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); 408 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
408 ComboBox1->insertItem( "Only if available", 0 ); 409 ComboBox1->insertItem( "Only if available", 0 );
409 ComboBox1->insertItem( "Always, Negotiated", 1 ); 410 ComboBox1->insertItem( "Always, Negotiated", 1 );
410 ComboBox1->insertItem( "Connect on secure port", 2 ); 411 ComboBox1->insertItem( "Connect on secure port", 2 );
411 ComboBox1->insertItem( "Run command instead", 3 ); 412 ComboBox1->insertItem( "Run command instead", 3 );
412 CommandEdit->hide(); 413 CommandEdit->hide();
413 ComboBox1->setCurrentItem( data->ConnectionType() ); 414 ComboBox1->setCurrentItem( data->ConnectionType() );
414} 415}
415 416
416void POP3config::slotConnectionToggle( int index ) 417void POP3config::slotConnectionToggle( int index )
417{ 418{
418 // 2 is ssl connection 419 // 2 is ssl connection
419 if ( index == 2 ) 420 if ( index == 2 )
420 { 421 {
421 portLine->setText( POP3_SSL_PORT ); 422 portLine->setText( POP3_SSL_PORT );
422 } 423 }
423 else if ( index == 3 ) 424 else if ( index == 3 )
424 { 425 {
425 portLine->setText( POP3_PORT ); 426 portLine->setText( POP3_PORT );
426 CommandEdit->show(); 427 CommandEdit->show();
427 } 428 }
428 else 429 else
429 { 430 {
430 portLine->setText( POP3_PORT ); 431 portLine->setText( POP3_PORT );
431 } 432 }
432} 433}
433 434
434void POP3config::fillValues() 435void POP3config::fillValues()
435{ 436{
436 accountLine->setText( data->getAccountName() ); 437 accountLine->setText( data->getAccountName() );
437 serverLine->setText( data->getServer() ); 438 serverLine->setText( data->getServer() );
438 portLine->setText( data->getPort() ); 439 portLine->setText( data->getPort() );
439 ComboBox1->setCurrentItem( data->ConnectionType() ); 440 ComboBox1->setCurrentItem( data->ConnectionType() );
440 userLine->setText( data->getUser() ); 441 userLine->setText( data->getUser() );
441 passLine->setText( data->getPassword() ); 442 passLine->setText( data->getPassword() );
442 localFolder->setText( data->getLocalFolder() ); 443 localFolder->setText( data->getLocalFolder() );
443 int max = data->getMaxMailSize() ; 444 int max = data->getMaxMailSize() ;
444 if ( max ) { 445 if ( max ) {
445 CheckBoxDown->setChecked( true ); 446 CheckBoxDown->setChecked( true );
446 SpinBoxDown->setValue ( max ); 447 SpinBoxDown->setValue ( max );
447 } else { 448 } else {
448 CheckBoxDown->setChecked( false ); 449 CheckBoxDown->setChecked( false );
449 SpinBoxDown->setValue ( 5 ); 450 SpinBoxDown->setValue ( 5 );
450 } 451 }
451 CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() ); 452 CheckBoxLeaveOn->setChecked( data->getLeaveOnServer() );
452} 453}
453 454
454void POP3config::accept() 455void POP3config::accept()
455{ 456{
456 data->setAccountName( accountLine->text() ); 457 data->setAccountName( accountLine->text() );
457 data->setServer( serverLine->text() ); 458 data->setServer( serverLine->text() );
458 data->setPort( portLine->text() ); 459 data->setPort( portLine->text() );
459 data->setConnectionType( ComboBox1->currentItem() ); 460 data->setConnectionType( ComboBox1->currentItem() );
460 data->setUser( userLine->text() ); 461 data->setUser( userLine->text() );
461 data->setPassword( passLine->text() ); 462 data->setPassword( passLine->text() );
462 data->setLocalFolder( localFolder->text() ); 463 data->setLocalFolder( localFolder->text() );
463 data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; 464 data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ;
464 data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() ); 465 data->setLeaveOnServer( CheckBoxLeaveOn->isChecked() );
465 466
466 QDialog::accept(); 467 QDialog::accept();
467} 468}
468 469
469/** 470/**
470 * SMTPconfig 471 * SMTPconfig
471 */ 472 */
472 473
473SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 474SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
474 : SMTPconfigUI( parent, name, modal, flags ) 475 : SMTPconfigUI( parent, name, modal, flags )
475{ 476{
476 data = account; 477 data = account;
477 478
478 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); 479 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) );
479 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); 480 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
480 481
481 fillValues(); 482 fillValues();
482 483 QIconSet icon;
484 //icon = SmallIcon("fileexport");
485 icon = SmallIcon("fileopen");
486 SignaturButton->setText("");
487 SignaturButton->setIconSet (icon ) ;
488 SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ;
489 connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) );
483 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); 490 connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
484 ComboBox1->insertItem( "Only if available", 0 ); 491 ComboBox1->insertItem( "Only if available", 0 );
485 ComboBox1->insertItem( "Always, Negotiated", 1 ); 492 ComboBox1->insertItem( "Always, Negotiated", 1 );
486 ComboBox1->insertItem( "Connect on secure port", 2 ); 493 ComboBox1->insertItem( "Connect on secure port", 2 );
487 ComboBox1->insertItem( "Run command instead", 3 ); 494 ComboBox1->insertItem( "Run command instead", 3 );
488 CommandEdit->hide(); 495 CommandEdit->hide();
489 ComboBox1->setCurrentItem( data->ConnectionType() ); 496 ComboBox1->setCurrentItem( data->ConnectionType() );
490} 497}
491 498void SMTPconfig::chooseSig()
499{
500 QString lnk = KFileDialog::getOpenFileName( "", "Choose Signatur File", this );
501 if ( !lnk.isEmpty() ) {
502 SignaturEdit->setText( lnk );
503 }
504}
492void SMTPconfig::slotConnectionToggle( int index ) 505void SMTPconfig::slotConnectionToggle( int index )
493{ 506{
494 // 2 is ssl connection 507 // 2 is ssl connection
495 if ( index == 2 ) 508 if ( index == 2 )
496 { 509 {
497 portLine->setText( SMTP_SSL_PORT ); 510 portLine->setText( SMTP_SSL_PORT );
498 } 511 }
499 else if ( index == 3 ) 512 else if ( index == 3 )
500 { 513 {
501 portLine->setText( SMTP_PORT ); 514 portLine->setText( SMTP_PORT );
502 CommandEdit->show(); 515 CommandEdit->show();
503 } 516 }
504 else 517 else
505 { 518 {
506 portLine->setText( SMTP_PORT ); 519 portLine->setText( SMTP_PORT );
507 } 520 }
508} 521}
509 522
510void SMTPconfig::fillValues() 523void SMTPconfig::fillValues()
511{ 524{
512 accountLine->setText( data->getAccountName() ); 525 accountLine->setText( data->getAccountName() );
513 serverLine->setText( data->getServer() ); 526 serverLine->setText( data->getServer() );
514 portLine->setText( data->getPort() ); 527 portLine->setText( data->getPort() );
515 ComboBox1->setCurrentItem( data->ConnectionType() ); 528 ComboBox1->setCurrentItem( data->ConnectionType() );
516 loginBox->setChecked( data->getLogin() ); 529 loginBox->setChecked( data->getLogin() );
517 userLine->setText( data->getUser() ); 530 userLine->setText( data->getUser() );
518 passLine->setText( data->getPassword() ); 531 passLine->setText( data->getPassword() );
532 SignaturEdit->setText( data->getSigFile() );
519} 533}
520 534
521void SMTPconfig::accept() 535void SMTPconfig::accept()
522{ 536{
523 data->setAccountName( accountLine->text() ); 537 data->setAccountName( accountLine->text() );
524 data->setServer( serverLine->text() ); 538 data->setServer( serverLine->text() );
525 data->setPort( portLine->text() ); 539 data->setPort( portLine->text() );
526 data->setConnectionType( ComboBox1->currentItem() ); 540 data->setConnectionType( ComboBox1->currentItem() );
527 data->setLogin( loginBox->isChecked() ); 541 data->setLogin( loginBox->isChecked() );
528 data->setUser( userLine->text() ); 542 data->setUser( userLine->text() );
529 data->setPassword( passLine->text() ); 543 data->setPassword( passLine->text() );
544 data->setSigFile( SignaturEdit->text() );
530 545
531 QDialog::accept(); 546 QDialog::accept();
532} 547}
533 548
534/** 549/**
535 * NNTPconfig 550 * NNTPconfig
536 */ 551 */
537 552
538NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 553NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags )
539 : NNTPconfigUI( parent, name, modal, flags ) 554 : NNTPconfigUI( parent, name, modal, flags )
540{ 555{
541 data = account; 556 data = account;
542 557
543 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); 558 connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) );
544 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); 559 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
545 connect( GetNGButton, SIGNAL( clicked() ), this, SLOT( slotGetNG() ) ); 560 connect( GetNGButton, SIGNAL( clicked() ), this, SLOT( slotGetNG() ) );
546 connect( ShowSubcribed, SIGNAL( clicked() ), this, SLOT( slotShowSub() ) ); 561 connect( ShowSubcribed, SIGNAL( clicked() ), this, SLOT( slotShowSub() ) );
547 connect( FilterButton, SIGNAL( clicked() ), this, SLOT( slotShowFilter() ) ); 562 connect( FilterButton, SIGNAL( clicked() ), this, SLOT( slotShowFilter() ) );
548 fillValues(); 563 fillValues();
549 564
550 connect( sslBox, SIGNAL( toggled(bool) ), SLOT( slotSSL(bool) ) ); 565 connect( sslBox, SIGNAL( toggled(bool) ), SLOT( slotSSL(bool) ) );
551} 566}
552 567
553void NNTPconfig::slotShowSub() 568void NNTPconfig::slotShowSub()
554{ 569{
555 save(); 570 save();
556 data->save(); 571 data->save();
557 ListViewGroups->clear(); 572 ListViewGroups->clear();
558 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { 573 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) {
559 QCheckListItem *item; 574 QCheckListItem *item;
560 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); 575 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox );
561 item->setOn( true ); 576 item->setOn( true );
562 } 577 }
563 topLevelWidget()->setCaption( i18n("%1 groups subscribed").arg( subscribedGroups.count())); 578 topLevelWidget()->setCaption( i18n("%1 groups subscribed").arg( subscribedGroups.count()));
564} 579}
565void NNTPconfig::slotShowFilter() 580void NNTPconfig::slotShowFilter()
566{ 581{
567 save(); 582 save();
568 data->save(); 583 data->save();
569 ListViewGroups->clear(); 584 ListViewGroups->clear();
570 int count = 0; 585 int count = 0;
571 for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { 586 for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) {
572 QCheckListItem *item; 587 QCheckListItem *item;
573 if ( GroupFilter->text().isEmpty() || (*it).find( GroupFilter->text() ) >= 0 ) { 588 if ( GroupFilter->text().isEmpty() || (*it).find( GroupFilter->text() ) >= 0 ) {
574 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); 589 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox );
575 ++count; 590 ++count;
576 if ( subscribedGroups.contains( (*it) ) >= 1 ) { 591 if ( subscribedGroups.contains( (*it) ) >= 1 ) {
577 item->setOn( true ); 592 item->setOn( true );
578 } 593 }
579 } 594 }
580 } 595 }
581 topLevelWidget()->setCaption( i18n("Filter found %1 groups").arg( count)); 596 topLevelWidget()->setCaption( i18n("Filter found %1 groups").arg( count));
582} 597}
583void NNTPconfig::slotGetNG() { 598void NNTPconfig::slotGetNG() {
584 save(); 599 save();
585 data->save(); 600 data->save();
586 topLevelWidget()->setCaption( i18n("Fetching group list...")); 601 topLevelWidget()->setCaption( i18n("Fetching group list..."));
587 qApp->processEvents(); 602 qApp->processEvents();
588 NNTPwrapper* tmp = new NNTPwrapper( data ); 603 NNTPwrapper* tmp = new NNTPwrapper( data );
589 allGroups = tmp->listAllNewsgroups(); 604 allGroups = tmp->listAllNewsgroups();
590 topLevelWidget()->setCaption( i18n("Downloaded %1 group names").arg( allGroups.count())); 605 topLevelWidget()->setCaption( i18n("Downloaded %1 group names").arg( allGroups.count()));
591 606
592 ListViewGroups->clear(); 607 ListViewGroups->clear();
593 608
594 for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { 609 for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) {
595 QCheckListItem *item; 610 QCheckListItem *item;
596 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); 611 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox );
597 if ( subscribedGroups.contains( (*it) ) >= 1 ) { 612 if ( subscribedGroups.contains( (*it) ) >= 1 ) {
598 item->setOn( true ); 613 item->setOn( true );
599 614
600 } 615 }
601 } 616 }
602 delete tmp; 617 delete tmp;
603} 618}
604 619
605void NNTPconfig::slotSSL( bool enabled ) 620void NNTPconfig::slotSSL( bool enabled )
606{ 621{
607 if ( enabled ) 622 if ( enabled )
608 { 623 {
609 portLine->setText( NNTP_SSL_PORT ); 624 portLine->setText( NNTP_SSL_PORT );
610 } 625 }
611 else 626 else
612 { 627 {
613 portLine->setText( NNTP_PORT ); 628 portLine->setText( NNTP_PORT );
614 } 629 }
615} 630}
616 631
617void NNTPconfig::fillValues() 632void NNTPconfig::fillValues()
618{ 633{
619 accountLine->setText( data->getAccountName() ); 634 accountLine->setText( data->getAccountName() );
620 serverLine->setText( data->getServer() ); 635 serverLine->setText( data->getServer() );
621 portLine->setText( data->getPort() ); 636 portLine->setText( data->getPort() );
622 sslBox->setChecked( data->getSSL() ); 637 sslBox->setChecked( data->getSSL() );
623 loginBox->setChecked( data->getLogin() ); 638 loginBox->setChecked( data->getLogin() );
624 userLine->setText( data->getUser() ); 639 userLine->setText( data->getUser() );
625 passLine->setText( data->getPassword() ); 640 passLine->setText( data->getPassword() );
626 subscribedGroups = data->getGroups(); 641 subscribedGroups = data->getGroups();
627 /* don't forget that - you will overwrite values if user clicks cancel! */ 642 /* don't forget that - you will overwrite values if user clicks cancel! */
628 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { 643 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) {
629 QCheckListItem *item; 644 QCheckListItem *item;
630 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); 645 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox );
631 item->setOn( true ); 646 item->setOn( true );
632 } 647 }
633} 648}
634 649
635void NNTPconfig::save() 650void NNTPconfig::save()
636{ 651{
637 data->setAccountName( accountLine->text() ); 652 data->setAccountName( accountLine->text() );
638 data->setServer( serverLine->text() ); 653 data->setServer( serverLine->text() );
639 data->setPort( portLine->text() ); 654 data->setPort( portLine->text() );
640 data->setSSL( sslBox->isChecked() ); 655 data->setSSL( sslBox->isChecked() );
641 data->setLogin( loginBox->isChecked() ); 656 data->setLogin( loginBox->isChecked() );
642 data->setUser( userLine->text() ); 657 data->setUser( userLine->text() );
643 data->setPassword( passLine->text() ); 658 data->setPassword( passLine->text() );
644 659
645 QListViewItemIterator list_it( ListViewGroups ); 660 QListViewItemIterator list_it( ListViewGroups );
646 661
647 for ( ; list_it.current(); ++list_it ) { 662 for ( ; list_it.current(); ++list_it ) {
648 663
649 if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { 664 if ( ( (QCheckListItem*)list_it.current() )->isOn() ) {
650 if ( subscribedGroups.contains( list_it.current()->text(0) ) < 1 ) 665 if ( subscribedGroups.contains( list_it.current()->text(0) ) < 1 )
651 subscribedGroups.append( list_it.current()->text(0) ); 666 subscribedGroups.append( list_it.current()->text(0) );
652 } else { 667 } else {
653 if ( subscribedGroups.contains( list_it.current()->text(0) ) >= 1 ) 668 if ( subscribedGroups.contains( list_it.current()->text(0) ) >= 1 )
654 subscribedGroups.remove( list_it.current()->text(0) ); 669 subscribedGroups.remove( list_it.current()->text(0) );
655 } 670 }
656 671
657 } 672 }
658 data->setGroups( subscribedGroups ); 673 data->setGroups( subscribedGroups );
659} 674}
660 675
661void NNTPconfig::accept() 676void NNTPconfig::accept()
662{ 677{
663 save(); 678 save();
664 QDialog::accept(); 679 QDialog::accept();
665} 680}
666 681
diff --git a/kmicromail/editaccounts.h b/kmicromail/editaccounts.h
index 6cf842e..465780c 100644
--- a/kmicromail/editaccounts.h
+++ b/kmicromail/editaccounts.h
@@ -1,156 +1,157 @@
1#ifndef EDITACCOUNTS_H 1#ifndef EDITACCOUNTS_H
2#define EDITACCOUNTS_H 2#define EDITACCOUNTS_H
3 3
4#include <qstring.h> 4#include <qstring.h>
5#include <qlistview.h> 5#include <qlistview.h>
6 6
7#include "editaccountsui.h" 7#include "editaccountsui.h"
8#include "selectmailtypeui.h" 8#include "selectmailtypeui.h"
9#include "imapconfigui.h" 9#include "imapconfigui.h"
10#include "pop3configui.h" 10#include "pop3configui.h"
11#include "smtpconfigui.h" 11#include "smtpconfigui.h"
12#include "nntpconfigui.h" 12#include "nntpconfigui.h"
13 13
14#include <libetpan/clist.h> 14#include <libetpan/clist.h>
15#include <libmailwrapper/settings.h> 15#include <libmailwrapper/settings.h>
16 16
17 17
18class AccountListItem : public QListViewItem 18class AccountListItem : public QListViewItem
19{ 19{
20 20
21public: 21public:
22 AccountListItem( QListView *parent, Account *a); 22 AccountListItem( QListView *parent, Account *a);
23 Account *getAccount() { return account; } 23 Account *getAccount() { return account; }
24 24
25private: 25private:
26 Account *account; 26 Account *account;
27 27
28}; 28};
29 29
30class EditAccounts : public EditAccountsUI 30class EditAccounts : public EditAccountsUI
31{ 31{
32 Q_OBJECT 32 Q_OBJECT
33 33
34public: 34public:
35 EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 35 EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
36 36
37public slots: 37public slots:
38 void slotNewAccount( const QString &type ); 38 void slotNewAccount( const QString &type );
39 void slotEditAccount( Account *account ); 39 void slotEditAccount( Account *account );
40 void slotDeleteAccount( Account * account ); 40 void slotDeleteAccount( Account * account );
41 void slotAdjustColumns(); 41 void slotAdjustColumns();
42 42
43protected slots: 43protected slots:
44 void slotFillLists(); 44 void slotFillLists();
45 void slotNewMail(); 45 void slotNewMail();
46 void slotEditMail(); 46 void slotEditMail();
47 void slotDeleteMail(); 47 void slotDeleteMail();
48 void slotNewNews(); 48 void slotNewNews();
49 void slotEditNews(); 49 void slotEditNews();
50 void slotDeleteNews(); 50 void slotDeleteNews();
51 void accept(); 51 void accept();
52 52
53private: 53private:
54 Settings *settings; 54 Settings *settings;
55 55
56}; 56};
57 57
58class SelectMailType : public SelectMailTypeUI 58class SelectMailType : public SelectMailTypeUI
59{ 59{
60 Q_OBJECT 60 Q_OBJECT
61 61
62public: 62public:
63 SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 63 SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
64 64
65private slots: 65private slots:
66 void slotSelection( const QString &sel ); 66 void slotSelection( const QString &sel );
67 67
68private: 68private:
69 QString *selected; 69 QString *selected;
70 70
71}; 71};
72 72
73class IMAPconfig : public IMAPconfigUI 73class IMAPconfig : public IMAPconfigUI
74{ 74{
75 Q_OBJECT 75 Q_OBJECT
76 76
77public: 77public:
78 IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 78 IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
79 79
80public slots: 80public slots:
81 void fillValues(); 81 void fillValues();
82 82
83protected slots: 83protected slots:
84 void slotConnectionToggle( int index ); 84 void slotConnectionToggle( int index );
85 void accept(); 85 void accept();
86 86
87private: 87private:
88 IMAPaccount *data; 88 IMAPaccount *data;
89 89
90}; 90};
91 91
92class POP3config : public POP3configUI 92class POP3config : public POP3configUI
93{ 93{
94 Q_OBJECT 94 Q_OBJECT
95 95
96public: 96public:
97 POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 97 POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
98 98
99public slots: 99public slots:
100 void fillValues(); 100 void fillValues();
101 101
102protected slots: 102protected slots:
103 void slotConnectionToggle( int index ); 103 void slotConnectionToggle( int index );
104 void accept(); 104 void accept();
105 105
106private: 106private:
107 POP3account *data; 107 POP3account *data;
108 108
109}; 109};
110 110
111class SMTPconfig : public SMTPconfigUI 111class SMTPconfig : public SMTPconfigUI
112{ 112{
113 Q_OBJECT 113 Q_OBJECT
114 114
115public: 115public:
116 SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 116 SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
117 117
118public slots: 118public slots:
119 void fillValues(); 119 void fillValues();
120 120
121protected slots: 121protected slots:
122 void slotConnectionToggle( int index ); 122 void slotConnectionToggle( int index );
123 void accept(); 123 void accept();
124 void chooseSig();
124 125
125private: 126private:
126 SMTPaccount *data; 127 SMTPaccount *data;
127 128
128}; 129};
129 130
130class NNTPconfig : public NNTPconfigUI 131class NNTPconfig : public NNTPconfigUI
131{ 132{
132 Q_OBJECT 133 Q_OBJECT
133 134
134public: 135public:
135 NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 136 NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 );
136 137
137public slots: 138public slots:
138 void fillValues(); 139 void fillValues();
139 140
140protected slots: 141protected slots:
141 void slotSSL( bool enabled ); 142 void slotSSL( bool enabled );
142 void accept(); 143 void accept();
143 void slotGetNG(); 144 void slotGetNG();
144 void slotShowSub(); 145 void slotShowSub();
145 void slotShowFilter(); 146 void slotShowFilter();
146 147
147private: 148private:
148 QStringList subscribedGroups; 149 QStringList subscribedGroups;
149 QStringList allGroups; 150 QStringList allGroups;
150 void save(); 151 void save();
151 NNTPaccount *data; 152 NNTPaccount *data;
152 clist* list; 153 clist* list;
153 154
154}; 155};
155 156
156#endif 157#endif
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp
index 19093b1..8f909f9 100644
--- a/kmicromail/libmailwrapper/settings.cpp
+++ b/kmicromail/libmailwrapper/settings.cpp
@@ -1,501 +1,545 @@
1#include <stdlib.h> 1#include <stdlib.h>
2#include <qdir.h> 2#include <qdir.h>
3 3
4#include <qtextcodec.h>
5#include <qtextstream.h>
6#include <qfile.h>
7
4//#include <opie2/odebug.h> 8//#include <opie2/odebug.h>
5#include <kconfig.h> 9#include <kconfig.h>
6 10
7#include <kstandarddirs.h> 11#include <kstandarddirs.h>
8#include "settings.h" 12#include "settings.h"
9//#include "defines.h" 13//#include "defines.h"
10 14
11#define IMAP_PORT "143" 15#define IMAP_PORT "143"
12#define IMAP_SSL_PORT "993" 16#define IMAP_SSL_PORT "993"
13#define SMTP_PORT "25" 17#define SMTP_PORT "25"
14#define SMTP_SSL_PORT "465" 18#define SMTP_SSL_PORT "465"
15#define POP3_PORT "110" 19#define POP3_PORT "110"
16#define POP3_SSL_PORT "995" 20#define POP3_SSL_PORT "995"
17#define NNTP_PORT "119" 21#define NNTP_PORT "119"
18#define NNTP_SSL_PORT "563" 22#define NNTP_SSL_PORT "563"
19 23
20 24
21Settings::Settings() 25Settings::Settings()
22 : QObject() 26 : QObject()
23{ 27{
24 accounts.setAutoDelete( true ); ; 28 accounts.setAutoDelete( true ); ;
25 updateAccounts(); 29 updateAccounts();
26 //qDebug("++++++++++++++++++new settings "); 30 //qDebug("++++++++++++++++++new settings ");
27} 31}
28 32
29void Settings::checkDirectory() 33void Settings::checkDirectory()
30{ 34{
31 return; 35 return;
32 locateLocal("data", "kopiemail" ); 36 locateLocal("data", "kopiemail" );
33 /* 37 /*
34 if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) { 38 if ( !QDir( (QString) getenv( "HOME" ) + "/Applications/opiemail/" ).exists() ) {
35 system( "mkdir -p $HOME/Applications/opiemail" ); 39 system( "mkdir -p $HOME/Applications/opiemail" );
36 qDebug("$HOME/Applications/opiemail created "); 40 qDebug("$HOME/Applications/opiemail created ");
37 } 41 }
38 */ 42 */
39} 43}
40 44
41QList<Account> Settings::getAccounts() 45QList<Account> Settings::getAccounts()
42{ 46{
43 return accounts; 47 return accounts;
44} 48}
45 49
46void Settings::addAccount( Account *account ) 50void Settings::addAccount( Account *account )
47{ 51{
48 accounts.append( account ); 52 accounts.append( account );
49} 53}
50 54
51void Settings::delAccount( Account *account ) 55void Settings::delAccount( Account *account )
52{ 56{
53 account->remove(); 57 account->remove();
54 accounts.remove( account ); 58 accounts.remove( account );
55} 59}
56 60
57void Settings::updateAccounts() 61void Settings::updateAccounts()
58{ 62{
59 accounts.clear(); 63 accounts.clear();
60 QDir dir( locateLocal("data", "kopiemail" ) ); 64 QDir dir( locateLocal("data", "kopiemail" ) );
61 QStringList::Iterator it; 65 QStringList::Iterator it;
62 66
63 QStringList imap = dir.entryList( "imap-*" ); 67 QStringList imap = dir.entryList( "imap-*" );
64 for ( it = imap.begin(); it != imap.end(); it++ ) { 68 for ( it = imap.begin(); it != imap.end(); it++ ) {
65 IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") ); 69 IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") );
66 accounts.append( account ); 70 accounts.append( account );
67 } 71 }
68 72
69 QStringList pop3 = dir.entryList( "pop3-*" ); 73 QStringList pop3 = dir.entryList( "pop3-*" );
70 for ( it = pop3.begin(); it != pop3.end(); it++ ) { 74 for ( it = pop3.begin(); it != pop3.end(); it++ ) {
71 POP3account *account = new POP3account( (*it).replace(0, 5, "") ); 75 POP3account *account = new POP3account( (*it).replace(0, 5, "") );
72 accounts.append( account ); 76 accounts.append( account );
73 } 77 }
74 78
75 QStringList smtp = dir.entryList( "smtp-*" ); 79 QStringList smtp = dir.entryList( "smtp-*" );
76 for ( it = smtp.begin(); it != smtp.end(); it++ ) { 80 for ( it = smtp.begin(); it != smtp.end(); it++ ) {
77 SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") ); 81 SMTPaccount *account = new SMTPaccount( (*it).replace(0, 5, "") );
78 accounts.append( account ); 82 accounts.append( account );
79 } 83 }
80 84
81 QStringList nntp = dir.entryList( "nntp-*" ); 85 QStringList nntp = dir.entryList( "nntp-*" );
82 for ( it = nntp.begin(); it != nntp.end(); it++ ) { 86 for ( it = nntp.begin(); it != nntp.end(); it++ ) {
83 NNTPaccount *account = new NNTPaccount( (*it).replace(0, 5, "") ); 87 NNTPaccount *account = new NNTPaccount( (*it).replace(0, 5, "") );
84 accounts.append( account ); 88 accounts.append( account );
85 } 89 }
86 90
87 readAccounts(); 91 readAccounts();
88} 92}
89 93
90void Settings::saveAccounts() 94void Settings::saveAccounts()
91{ 95{
92 checkDirectory(); 96 checkDirectory();
93 Account *it; 97 Account *it;
94 98
95 for ( it = accounts.first(); it; it = accounts.next() ) { 99 for ( it = accounts.first(); it; it = accounts.next() ) {
96 it->save(); 100 it->save();
97 } 101 }
98} 102}
99 103
100void Settings::readAccounts() 104void Settings::readAccounts()
101{ 105{
102 checkDirectory(); 106 checkDirectory();
103 Account *it; 107 Account *it;
104 108
105 for ( it = accounts.first(); it; it = accounts.next() ) { 109 for ( it = accounts.first(); it; it = accounts.next() ) {
106 it->read(); 110 it->read();
107 } 111 }
108} 112}
109 113
110Account::Account() 114Account::Account()
111{ 115{
112 accountName = "changeMe"; 116 accountName = "changeMe";
113 type = MAILLIB::A_UNDEFINED; 117 type = MAILLIB::A_UNDEFINED;
114 ssl = false; 118 ssl = false;
115 connectionType = 1; 119 connectionType = 1;
116 offline = false; 120 offline = false;
117 maxMailSize = 0; 121 maxMailSize = 0;
118 lastFetch; 122 lastFetch;
119 leaveOnServer = false; 123 leaveOnServer = false;
120} 124}
121 125
122void Account::remove() 126void Account::remove()
123{ 127{
124 QFile file( getFileName() ); 128 QFile file( getFileName() );
125 file.remove(); 129 file.remove();
126} 130}
127 131
128void Account::setPasswordList(const QStringList &str) 132void Account::setPasswordList(const QStringList &str)
129{ 133{
130 password = ""; 134 password = "";
131 int i; 135 int i;
132 for ( i = 0; i < str.count() ; ++i ) { 136 for ( i = 0; i < str.count() ; ++i ) {
133 QChar c ( (str[i].toUInt()-131)/(str.count()- (i%3))); 137 QChar c ( (str[i].toUInt()-131)/(str.count()- (i%3)));
134 password.append( c ); 138 password.append( c );
135 } 139 }
136 //qDebug("password %s ", password.latin1()); 140 //qDebug("password %s ", password.latin1());
137} 141}
138QStringList Account::getPasswordList() 142QStringList Account::getPasswordList()
139{ 143{
140 int i; 144 int i;
141 int len = password.length(); 145 int len = password.length();
142 QStringList str; 146 QStringList str;
143 147
144 for ( i = 0; i < len ; ++i ) { 148 for ( i = 0; i < len ; ++i ) {
145 int val = password.at(i).unicode()*(len-(i%3))+131; 149 int val = password.at(i).unicode()*(len-(i%3))+131;
146 str.append( QString::number( val ) ); 150 str.append( QString::number( val ) );
147 // qDebug("append %s ", str[i].latin1()); 151 // qDebug("append %s ", str[i].latin1());
148 } 152 }
149 return str; 153 return str;
150} 154}
151 155
152IMAPaccount::IMAPaccount() 156IMAPaccount::IMAPaccount()
153 : Account() 157 : Account()
154{ 158{
155 file = IMAPaccount::getUniqueFileName(); 159 file = IMAPaccount::getUniqueFileName();
156 accountName = "New IMAP Account"; 160 accountName = "New IMAP Account";
157 ssl = false; 161 ssl = false;
158 connectionType = 1; 162 connectionType = 1;
159 type = MAILLIB::A_IMAP; 163 type = MAILLIB::A_IMAP;
160 port = IMAP_PORT; 164 port = IMAP_PORT;
161} 165}
162 166
163IMAPaccount::IMAPaccount( QString filename ) 167IMAPaccount::IMAPaccount( QString filename )
164 : Account() 168 : Account()
165{ 169{
166 file = filename; 170 file = filename;
167 accountName = "New IMAP Account"; 171 accountName = "New IMAP Account";
168 ssl = false; 172 ssl = false;
169 connectionType = 1; 173 connectionType = 1;
170 type = MAILLIB::A_IMAP; 174 type = MAILLIB::A_IMAP;
171 port = IMAP_PORT; 175 port = IMAP_PORT;
172} 176}
173 177
174QString IMAPaccount::getUniqueFileName() 178QString IMAPaccount::getUniqueFileName()
175{ 179{
176 int num = 0; 180 int num = 0;
177 QString unique; 181 QString unique;
178 182
179 QDir dir( locateLocal("data", "kopiemail" ) ); 183 QDir dir( locateLocal("data", "kopiemail" ) );
180 184
181 QStringList imap = dir.entryList( "imap-*" ); 185 QStringList imap = dir.entryList( "imap-*" );
182 do { 186 do {
183 unique.setNum( num++ ); 187 unique.setNum( num++ );
184 } while ( imap.contains( "imap-" + unique ) > 0 ); 188 } while ( imap.contains( "imap-" + unique ) > 0 );
185 189
186 return unique; 190 return unique;
187} 191}
188 192
189void IMAPaccount::read() 193void IMAPaccount::read()
190{ 194{
191 KConfig *conf = new KConfig( getFileName() ); 195 KConfig *conf = new KConfig( getFileName() );
192 conf->setGroup( "IMAP Account" ); 196 conf->setGroup( "IMAP Account" );
193 accountName = conf->readEntry( "Account","" ); 197 accountName = conf->readEntry( "Account","" );
194 if (accountName.isNull()) accountName = ""; 198 if (accountName.isNull()) accountName = "";
195 server = conf->readEntry( "Server","" ); 199 server = conf->readEntry( "Server","" );
196 if (server.isNull()) server=""; 200 if (server.isNull()) server="";
197 port = conf->readEntry( "Port","" ); 201 port = conf->readEntry( "Port","" );
198 if (port.isNull()) port="143"; 202 if (port.isNull()) port="143";
199 connectionType = conf->readNumEntry( "ConnectionType" ); 203 connectionType = conf->readNumEntry( "ConnectionType" );
200 ssl = conf->readBoolEntry( "SSL",false ); 204 ssl = conf->readBoolEntry( "SSL",false );
201 user = conf->readEntry( "User","" ); 205 user = conf->readEntry( "User","" );
202 if (user.isNull()) user = ""; 206 if (user.isNull()) user = "";
203 //password = conf->readEntryCrypt( "Password","" ); 207 //password = conf->readEntryCrypt( "Password","" );
204 setPasswordList( conf->readListEntry( "FolderHistory")); 208 setPasswordList( conf->readListEntry( "FolderHistory"));
205 if (password.isNull()) password = ""; 209 if (password.isNull()) password = "";
206 prefix = conf->readEntry("MailPrefix",""); 210 prefix = conf->readEntry("MailPrefix","");
207 if (prefix.isNull()) prefix = ""; 211 if (prefix.isNull()) prefix = "";
208 offline = conf->readBoolEntry("Offline",false); 212 offline = conf->readBoolEntry("Offline",false);
209 localFolder = conf->readEntry( "LocalFolder" ); 213 localFolder = conf->readEntry( "LocalFolder" );
210 maxMailSize = conf->readNumEntry( "MaxSize",0 ); 214 maxMailSize = conf->readNumEntry( "MaxSize",0 );
211 int lf = conf->readNumEntry( "LastFetch",0 ); 215 int lf = conf->readNumEntry( "LastFetch",0 );
212 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); 216 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
213 leaveOnServer = conf->readBoolEntry("LeaveOnServer",false); 217 leaveOnServer = conf->readBoolEntry("LeaveOnServer",false);
214 if ( lf < 0 ) lf = 0; 218 if ( lf < 0 ) lf = 0;
215 lastFetch = dt.addSecs( lf ); 219 lastFetch = dt.addSecs( lf );
216 delete conf; 220 delete conf;
217} 221}
218 222
219void IMAPaccount::save() 223void IMAPaccount::save()
220{ 224{
221 225
222 Settings::checkDirectory(); 226 Settings::checkDirectory();
223 227
224 KConfig *conf = new KConfig( getFileName() ); 228 KConfig *conf = new KConfig( getFileName() );
225 conf->setGroup( "IMAP Account" ); 229 conf->setGroup( "IMAP Account" );
226 conf->writeEntry( "Account", accountName ); 230 conf->writeEntry( "Account", accountName );
227 conf->writeEntry( "Server", server ); 231 conf->writeEntry( "Server", server );
228 conf->writeEntry( "Port", port ); 232 conf->writeEntry( "Port", port );
229 conf->writeEntry( "SSL", ssl ); 233 conf->writeEntry( "SSL", ssl );
230 conf->writeEntry( "ConnectionType", connectionType ); 234 conf->writeEntry( "ConnectionType", connectionType );
231 conf->writeEntry( "User", user ); 235 conf->writeEntry( "User", user );
232 //conf->writeEntryCrypt( "Password", password ); 236 //conf->writeEntryCrypt( "Password", password );
233 conf->writeEntry( "FolderHistory",getPasswordList() ); 237 conf->writeEntry( "FolderHistory",getPasswordList() );
234 conf->writeEntry( "MailPrefix",prefix); 238 conf->writeEntry( "MailPrefix",prefix);
235 conf->writeEntry( "Offline",offline); 239 conf->writeEntry( "Offline",offline);
236 conf->writeEntry( "LocalFolder", localFolder ); 240 conf->writeEntry( "LocalFolder", localFolder );
237 conf->writeEntry( "MaxSize", maxMailSize ); 241 conf->writeEntry( "MaxSize", maxMailSize );
238 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); 242 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
239 int lf = dt.secsTo ( lastFetch ); 243 int lf = dt.secsTo ( lastFetch );
240 conf->writeEntry( "LastFetch", lf ); 244 conf->writeEntry( "LastFetch", lf );
241 conf->writeEntry( "LeaveOnServer", leaveOnServer); 245 conf->writeEntry( "LeaveOnServer", leaveOnServer);
242 conf->sync(); 246 conf->sync();
243 delete conf; 247 delete conf;
244} 248}
245 249
246 250
247QString IMAPaccount::getFileName() 251QString IMAPaccount::getFileName()
248{ 252{
249 return locateLocal("data", "kopiemail" ) +"/imap-" + file; 253 return locateLocal("data", "kopiemail" ) +"/imap-" + file;
250} 254}
251 255
252POP3account::POP3account() 256POP3account::POP3account()
253 : Account() 257 : Account()
254{ 258{
255 file = POP3account::getUniqueFileName(); 259 file = POP3account::getUniqueFileName();
256 accountName = "New POP3 Account"; 260 accountName = "New POP3 Account";
257 ssl = false; 261 ssl = false;
258 connectionType = 1; 262 connectionType = 1;
259 type = MAILLIB::A_POP3; 263 type = MAILLIB::A_POP3;
260 port = POP3_PORT; 264 port = POP3_PORT;
261} 265}
262 266
263POP3account::POP3account( QString filename ) 267POP3account::POP3account( QString filename )
264 : Account() 268 : Account()
265{ 269{
266 file = filename; 270 file = filename;
267 accountName = "New POP3 Account"; 271 accountName = "New POP3 Account";
268 ssl = false; 272 ssl = false;
269 connectionType = 1; 273 connectionType = 1;
270 type = MAILLIB::A_POP3; 274 type = MAILLIB::A_POP3;
271 port = POP3_PORT; 275 port = POP3_PORT;
272} 276}
273 277
274QString POP3account::getUniqueFileName() 278QString POP3account::getUniqueFileName()
275{ 279{
276 int num = 0; 280 int num = 0;
277 QString unique; 281 QString unique;
278 282
279 QDir dir( locateLocal("data", "kopiemail" ) ); 283 QDir dir( locateLocal("data", "kopiemail" ) );
280 284
281 QStringList imap = dir.entryList( "pop3-*" ); 285 QStringList imap = dir.entryList( "pop3-*" );
282 do { 286 do {
283 unique.setNum( num++ ); 287 unique.setNum( num++ );
284 } while ( imap.contains( "pop3-" + unique ) > 0 ); 288 } while ( imap.contains( "pop3-" + unique ) > 0 );
285 289
286 return unique; 290 return unique;
287} 291}
288 292
289void POP3account::read() 293void POP3account::read()
290{ 294{
291 KConfig *conf = new KConfig( getFileName()); 295 KConfig *conf = new KConfig( getFileName());
292 conf->setGroup( "POP3 Account" ); 296 conf->setGroup( "POP3 Account" );
293 accountName = conf->readEntry( "Account" ); 297 accountName = conf->readEntry( "Account" );
294 server = conf->readEntry( "Server" ); 298 server = conf->readEntry( "Server" );
295 port = conf->readEntry( "Port" ); 299 port = conf->readEntry( "Port" );
296 ssl = conf->readBoolEntry( "SSL" ); 300 ssl = conf->readBoolEntry( "SSL" );
297 connectionType = conf->readNumEntry( "ConnectionType" ); 301 connectionType = conf->readNumEntry( "ConnectionType" );
298 user = conf->readEntry( "User" ); 302 user = conf->readEntry( "User" );
299 //password = conf->readEntryCrypt( "Password" ); 303 //password = conf->readEntryCrypt( "Password" );
300 setPasswordList( conf->readListEntry( "FolderHistory")); 304 setPasswordList( conf->readListEntry( "FolderHistory"));
301 offline = conf->readBoolEntry("Offline",false); 305 offline = conf->readBoolEntry("Offline",false);
302 localFolder = conf->readEntry( "LocalFolder" ); 306 localFolder = conf->readEntry( "LocalFolder" );
303 maxMailSize = conf->readNumEntry( "MaxSize",0 ); 307 maxMailSize = conf->readNumEntry( "MaxSize",0 );
304 int lf = conf->readNumEntry( "LastFetch",0 ); 308 int lf = conf->readNumEntry( "LastFetch",0 );
305 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); 309 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
306 leaveOnServer = conf->readBoolEntry("LeaveOnServer",false); 310 leaveOnServer = conf->readBoolEntry("LeaveOnServer",false);
307 lastFetch = dt.addSecs( lf ); 311 lastFetch = dt.addSecs( lf );
308 delete conf; 312 delete conf;
309} 313}
310 314
311void POP3account::save() 315void POP3account::save()
312{ 316{
313 Settings::checkDirectory(); 317 Settings::checkDirectory();
314 318
315 KConfig *conf = new KConfig( getFileName() ); 319 KConfig *conf = new KConfig( getFileName() );
316 conf->setGroup( "POP3 Account" ); 320 conf->setGroup( "POP3 Account" );
317 conf->writeEntry( "Account", accountName ); 321 conf->writeEntry( "Account", accountName );
318 conf->writeEntry( "Server", server ); 322 conf->writeEntry( "Server", server );
319 conf->writeEntry( "Port", port ); 323 conf->writeEntry( "Port", port );
320 conf->writeEntry( "SSL", ssl ); 324 conf->writeEntry( "SSL", ssl );
321 conf->writeEntry( "ConnectionType", connectionType ); 325 conf->writeEntry( "ConnectionType", connectionType );
322 conf->writeEntry( "User", user ); 326 conf->writeEntry( "User", user );
323 //conf->writeEntryCrypt( "Password", password ); 327 //conf->writeEntryCrypt( "Password", password );
324 conf->writeEntry( "FolderHistory",getPasswordList() ); 328 conf->writeEntry( "FolderHistory",getPasswordList() );
325 conf->writeEntry( "Offline",offline); 329 conf->writeEntry( "Offline",offline);
326 conf->writeEntry( "LocalFolder", localFolder ); 330 conf->writeEntry( "LocalFolder", localFolder );
327 conf->writeEntry( "MaxSize", maxMailSize ); 331 conf->writeEntry( "MaxSize", maxMailSize );
328 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) ); 332 QDateTime dt ( QDate ( 2004, 1, 1 ), QTime( 0,0,0) );
329 int lf = dt.secsTo ( lastFetch ); 333 int lf = dt.secsTo ( lastFetch );
330 conf->writeEntry( "LastFetch", lf ); 334 conf->writeEntry( "LastFetch", lf );
331 conf->writeEntry( "LeaveOnServer", leaveOnServer); 335 conf->writeEntry( "LeaveOnServer", leaveOnServer);
332 conf->sync(); 336 conf->sync();
333 delete conf; 337 delete conf;
334} 338}
335 339
336 340
337QString POP3account::getFileName() 341QString POP3account::getFileName()
338{ 342{
339 return locateLocal("data", "kopiemail" ) +"/pop3-" + file; 343 return locateLocal("data", "kopiemail" ) +"/pop3-" + file;
340} 344}
341 345
342SMTPaccount::SMTPaccount() 346SMTPaccount::SMTPaccount()
343 : Account() 347 : Account()
344{ 348{
345 file = SMTPaccount::getUniqueFileName(); 349 file = SMTPaccount::getUniqueFileName();
346 accountName = "New SMTP Account"; 350 accountName = "New SMTP Account";
347 ssl = false; 351 ssl = false;
348 connectionType = 1; 352 connectionType = 1;
349 login = false; 353 login = false;
350 useCC = false; 354 useCC = false;
351 useBCC = false; 355 useBCC = false;
352 useReply = false; 356 useReply = false;
353 type = MAILLIB::A_SMTP; 357 type = MAILLIB::A_SMTP;
354 port = SMTP_PORT; 358 port = SMTP_PORT;
355} 359}
356 360
357SMTPaccount::SMTPaccount( QString filename ) 361SMTPaccount::SMTPaccount( QString filename )
358 : Account() 362 : Account()
359{ 363{
360 file = filename; 364 file = filename;
361 accountName = "New SMTP Account"; 365 accountName = "New SMTP Account";
362 ssl = false; 366 ssl = false;
363 connectionType = 1; 367 connectionType = 1;
364 login = false; 368 login = false;
365 type = MAILLIB::A_SMTP; 369 type = MAILLIB::A_SMTP;
366 port = SMTP_PORT; 370 port = SMTP_PORT;
367} 371}
368 372
373QString SMTPaccount::getSignature()
374{
375 QFileInfo fi ( signature );
376 if ( ! fi.exists() )
377 return QString();
378
379 QFile file( signature );
380 if (!file.open( IO_ReadOnly ) ) {
381 return QString();
382
383 }
384 QTextStream ts( &file );
385 ts.setCodec( QTextCodec::codecForName("utf8") );
386 QString text = ts.read();
387 file.close();
388
389 return text;
390
391}
392void SMTPaccount::setSignature( QString b )
393{
394
395 QFileInfo fi ( signature );
396 if ( ! fi.exists() ) {
397 QString filedir( locateLocal("data", "kopiemail" ) );
398 signature = filedir+ "/" + getAccountName() +".sig";
399 qDebug("new sig %s ", signature.latin1());
400 save();
401 }
402 QFile fileIn( signature );
403 if (!fileIn.open( IO_WriteOnly ) ) {
404 qDebug("OM: Cannot write signature file %s ", signature.latin1() );
405 return ;
406 }
407 QTextStream tsIn( &fileIn );
408 tsIn.setCodec( QTextCodec::codecForName("utf8") );
409 tsIn << b ;
410 fileIn.close();
411}
369QString SMTPaccount::getUniqueFileName() 412QString SMTPaccount::getUniqueFileName()
370{ 413{
371 int num = 0; 414 int num = 0;
372 QString unique; 415 QString unique;
373 416
374 QDir dir( locateLocal("data", "kopiemail" ) ); 417 QDir dir( locateLocal("data", "kopiemail" ) );
375 418
376 QStringList imap = dir.entryList( "smtp-*" ); 419 QStringList imap = dir.entryList( "smtp-*" );
377 do { 420 do {
378 unique.setNum( num++ ); 421 unique.setNum( num++ );
379 } while ( imap.contains( "smtp-" + unique ) > 0 ); 422 } while ( imap.contains( "smtp-" + unique ) > 0 );
380 423
381 return unique; 424 return unique;
382} 425}
383 426
384void SMTPaccount::read() 427void SMTPaccount::read()
385{ 428{
386 KConfig *conf = new KConfig( getFileName() ); 429 KConfig *conf = new KConfig( getFileName() );
387 conf->setGroup( "SMTP Account" ); 430 conf->setGroup( "SMTP Account" );
388 accountName = conf->readEntry( "Account" ); 431 accountName = conf->readEntry( "Account" );
389 server = conf->readEntry( "Server" ); 432 server = conf->readEntry( "Server" );
390 port = conf->readEntry( "Port" ); 433 port = conf->readEntry( "Port" );
391 ssl = conf->readBoolEntry( "SSL" ); 434 ssl = conf->readBoolEntry( "SSL" );
392 connectionType = conf->readNumEntry( "ConnectionType" ); 435 connectionType = conf->readNumEntry( "ConnectionType" );
393 login = conf->readBoolEntry( "Login" ); 436 login = conf->readBoolEntry( "Login" );
394 user = conf->readEntry( "User" ); 437 user = conf->readEntry( "User" );
395 //password = conf->readEntryCrypt( "Password" ); 438 signature = conf->readEntry( "SigFile" );
396 setPasswordList( conf->readListEntry( "FolderHistory")); 439 setPasswordList( conf->readListEntry( "FolderHistory"));
397 delete conf; 440 delete conf;
398} 441}
399 442
400void SMTPaccount::save() 443void SMTPaccount::save()
401{ 444{
402 Settings::checkDirectory(); 445 Settings::checkDirectory();
403 446
404 KConfig *conf = new KConfig( getFileName() ); 447 KConfig *conf = new KConfig( getFileName() );
405 conf->setGroup( "SMTP Account" ); 448 conf->setGroup( "SMTP Account" );
406 conf->writeEntry( "Account", accountName ); 449 conf->writeEntry( "Account", accountName );
407 conf->writeEntry( "Server", server ); 450 conf->writeEntry( "Server", server );
408 conf->writeEntry( "Port", port ); 451 conf->writeEntry( "Port", port );
409 conf->writeEntry( "SSL", ssl ); 452 conf->writeEntry( "SSL", ssl );
410 conf->writeEntry( "ConnectionType", connectionType ); 453 conf->writeEntry( "ConnectionType", connectionType );
411 conf->writeEntry( "Login", login ); 454 conf->writeEntry( "Login", login );
412 conf->writeEntry( "User", user ); 455 conf->writeEntry( "User", user );
456 conf->writeEntry( "SigFile", signature );
413 //conf->writeEntryCrypt( "Password", password ); 457 //conf->writeEntryCrypt( "Password", password );
414 conf->writeEntry( "FolderHistory",getPasswordList() ); 458 conf->writeEntry( "FolderHistory",getPasswordList() );
415 conf->sync(); 459 conf->sync();
416 delete conf; 460 delete conf;
417} 461}
418 462
419 463
420QString SMTPaccount::getFileName() 464QString SMTPaccount::getFileName()
421{ 465{
422 return locateLocal("data", "kopiemail" ) +"/smtp-" + file; 466 return locateLocal("data", "kopiemail" ) +"/smtp-" + file;
423} 467}
424 468
425NNTPaccount::NNTPaccount() 469NNTPaccount::NNTPaccount()
426 : Account() 470 : Account()
427{ 471{
428 file = NNTPaccount::getUniqueFileName(); 472 file = NNTPaccount::getUniqueFileName();
429 accountName = "New NNTP Account"; 473 accountName = "New NNTP Account";
430 ssl = false; 474 ssl = false;
431 login = false; 475 login = false;
432 type = MAILLIB::A_NNTP; 476 type = MAILLIB::A_NNTP;
433 port = NNTP_PORT; 477 port = NNTP_PORT;
434} 478}
435 479
436NNTPaccount::NNTPaccount( QString filename ) 480NNTPaccount::NNTPaccount( QString filename )
437 : Account() 481 : Account()
438{ 482{
439 file = filename; 483 file = filename;
440 accountName = "New NNTP Account"; 484 accountName = "New NNTP Account";
441 ssl = false; 485 ssl = false;
442 login = false; 486 login = false;
443 type = MAILLIB::A_NNTP; 487 type = MAILLIB::A_NNTP;
444 port = NNTP_PORT; 488 port = NNTP_PORT;
445} 489}
446 490
447QString NNTPaccount::getUniqueFileName() 491QString NNTPaccount::getUniqueFileName()
448{ 492{
449 int num = 0; 493 int num = 0;
450 QString unique; 494 QString unique;
451 495
452 QDir dir( locateLocal("data", "kopiemail" ) ); 496 QDir dir( locateLocal("data", "kopiemail" ) );
453 497
454 QStringList imap = dir.entryList( "nntp-*" ); 498 QStringList imap = dir.entryList( "nntp-*" );
455 do { 499 do {
456 unique.setNum( num++ ); 500 unique.setNum( num++ );
457 } while ( imap.contains( "nntp-" + unique ) > 0 ); 501 } while ( imap.contains( "nntp-" + unique ) > 0 );
458 502
459 return unique; 503 return unique;
460} 504}
461 505
462void NNTPaccount::read() 506void NNTPaccount::read()
463{ 507{
464 KConfig *conf = new KConfig( getFileName() ); 508 KConfig *conf = new KConfig( getFileName() );
465 conf->setGroup( "NNTP Account" ); 509 conf->setGroup( "NNTP Account" );
466 accountName = conf->readEntry( "Account" ); 510 accountName = conf->readEntry( "Account" );
467 server = conf->readEntry( "Server" ); 511 server = conf->readEntry( "Server" );
468 port = conf->readEntry( "Port" ); 512 port = conf->readEntry( "Port" );
469 ssl = conf->readBoolEntry( "SSL" ); 513 ssl = conf->readBoolEntry( "SSL" );
470 login = conf->readBoolEntry( "Login" ); 514 login = conf->readBoolEntry( "Login" );
471 user = conf->readEntry( "User" ); 515 user = conf->readEntry( "User" );
472 //password = conf->readEntryCrypt( "Password" ); 516 //password = conf->readEntryCrypt( "Password" );
473 setPasswordList( conf->readListEntry( "FolderHistory")); 517 setPasswordList( conf->readListEntry( "FolderHistory"));
474 subscribedGroups = conf->readListEntry( "Subscribed"); 518 subscribedGroups = conf->readListEntry( "Subscribed");
475 delete conf; 519 delete conf;
476} 520}
477 521
478void NNTPaccount::save() 522void NNTPaccount::save()
479{ 523{
480 Settings::checkDirectory(); 524 Settings::checkDirectory();
481 525
482 KConfig *conf = new KConfig( getFileName() ); 526 KConfig *conf = new KConfig( getFileName() );
483 conf->setGroup( "NNTP Account" ); 527 conf->setGroup( "NNTP Account" );
484 conf->writeEntry( "Account", accountName ); 528 conf->writeEntry( "Account", accountName );
485 conf->writeEntry( "Server", server ); 529 conf->writeEntry( "Server", server );
486 conf->writeEntry( "Port", port ); 530 conf->writeEntry( "Port", port );
487 conf->writeEntry( "SSL", ssl ); 531 conf->writeEntry( "SSL", ssl );
488 conf->writeEntry( "Login", login ); 532 conf->writeEntry( "Login", login );
489 conf->writeEntry( "User", user ); 533 conf->writeEntry( "User", user );
490 //conf->writeEntryCrypt( "Password", password ); 534 //conf->writeEntryCrypt( "Password", password );
491 conf->writeEntry( "FolderHistory",getPasswordList() ); 535 conf->writeEntry( "FolderHistory",getPasswordList() );
492 conf->writeEntry( "Subscribed" , subscribedGroups ); 536 conf->writeEntry( "Subscribed" , subscribedGroups );
493 conf->sync(); 537 conf->sync();
494 delete conf; 538 delete conf;
495} 539}
496 540
497 541
498QString NNTPaccount::getFileName() 542QString NNTPaccount::getFileName()
499{ 543{
500 return locateLocal("data", "kopiemail" ) +"/nntp-" + file; 544 return locateLocal("data", "kopiemail" ) +"/nntp-" + file;
501} 545}
diff --git a/kmicromail/libmailwrapper/settings.h b/kmicromail/libmailwrapper/settings.h
index c996fe0..a6e95fe 100644
--- a/kmicromail/libmailwrapper/settings.h
+++ b/kmicromail/libmailwrapper/settings.h
@@ -1,182 +1,188 @@
1#ifndef SETTINGS_H 1#ifndef SETTINGS_H
2#define SETTINGS_H 2#define SETTINGS_H
3 3
4#include "maildefines.h" 4#include "maildefines.h"
5 5
6/* OPIE */ 6/* OPIE */
7 7
8/* QT */ 8/* QT */
9#include <qobject.h> 9#include <qobject.h>
10#include <qlist.h> 10#include <qlist.h>
11#include <qstringlist.h> 11#include <qstringlist.h>
12#include <qdatetime.h> 12#include <qdatetime.h>
13 13
14class Account 14class Account
15{ 15{
16 16
17public: 17public:
18 Account(); 18 Account();
19 virtual ~Account() {} 19 virtual ~Account() {}
20 20
21 void remove(); 21 void remove();
22 void setAccountName( QString name ) { accountName = name; } 22 void setAccountName( QString name ) { accountName = name; }
23 const QString&getAccountName()const{ return accountName; } 23 const QString&getAccountName()const{ return accountName; }
24 MAILLIB::ATYPE getType()const{ return type; } 24 MAILLIB::ATYPE getType()const{ return type; }
25 25
26 void setServer(const QString&str){ server = str; } 26 void setServer(const QString&str){ server = str; }
27 const QString&getServer()const{ return server; } 27 const QString&getServer()const{ return server; }
28 28
29 void setLocalFolder( QString name ) { localFolder = name; } 29 void setLocalFolder( QString name ) { localFolder = name; }
30 const QString& getLocalFolder()const{ return localFolder; } 30 const QString& getLocalFolder()const{ return localFolder; }
31 31
32 void setPort(const QString&str) { port = str; } 32 void setPort(const QString&str) { port = str; }
33 const QString&getPort()const{ return port; } 33 const QString&getPort()const{ return port; }
34 34
35 void setUser(const QString&str){ user = str; } 35 void setUser(const QString&str){ user = str; }
36 const QString&getUser()const{ return user; } 36 const QString&getUser()const{ return user; }
37 37
38 void setPassword(const QString&str) { password = str; } 38 void setPassword(const QString&str) { password = str; }
39 const QString&getPassword()const { return password; } 39 const QString&getPassword()const { return password; }
40 40
41 void setPasswordList(const QStringList &str); 41 void setPasswordList(const QStringList &str);
42 QStringList getPasswordList(); 42 QStringList getPasswordList();
43 43
44 void setSSL( bool b ) { ssl = b; } 44 void setSSL( bool b ) { ssl = b; }
45 bool getSSL() { return ssl; } 45 bool getSSL() { return ssl; }
46 46
47 void setConnectionType( int x ) { connectionType = x; } 47 void setConnectionType( int x ) { connectionType = x; }
48 int ConnectionType() { return connectionType; } 48 int ConnectionType() { return connectionType; }
49 49
50 void setMaxMailSize( int x ) { maxMailSize = x; } 50 void setMaxMailSize( int x ) { maxMailSize = x; }
51 int getMaxMailSize() { return maxMailSize; } 51 int getMaxMailSize() { return maxMailSize; }
52 52
53 void setOffline(bool b) {offline = b;} 53 void setOffline(bool b) {offline = b;}
54 bool getOffline()const{return offline;} 54 bool getOffline()const{return offline;}
55 55
56 bool getLeaveOnServer(){ return leaveOnServer;} 56 bool getLeaveOnServer(){ return leaveOnServer;}
57 void setLeaveOnServer(bool b){ leaveOnServer = b;} 57 void setLeaveOnServer(bool b){ leaveOnServer = b;}
58 58
59 virtual QString getFileName() { return accountName; } 59 virtual QString getFileName() { return accountName; }
60 virtual void read() { ; } 60 virtual void read() { ; }
61 virtual void save() { ; } 61 virtual void save() { ; }
62 62
63protected: 63protected:
64 QString accountName, server, port, user, password; 64 QString accountName, server, port, user, password;
65 bool ssl; 65 bool ssl;
66 int connectionType; 66 int connectionType;
67 bool offline; 67 bool offline;
68 MAILLIB::ATYPE type; 68 MAILLIB::ATYPE type;
69 QString localFolder; 69 QString localFolder;
70 int maxMailSize; 70 int maxMailSize;
71 QDateTime lastFetch; 71 QDateTime lastFetch;
72 bool leaveOnServer; 72 bool leaveOnServer;
73}; 73};
74 74
75class IMAPaccount : public Account 75class IMAPaccount : public Account
76{ 76{
77 77
78public: 78public:
79 IMAPaccount(); 79 IMAPaccount();
80 IMAPaccount( QString filename ); 80 IMAPaccount( QString filename );
81 81
82 static QString getUniqueFileName(); 82 static QString getUniqueFileName();
83 83
84 virtual void read(); 84 virtual void read();
85 virtual void save(); 85 virtual void save();
86 virtual QString getFileName(); 86 virtual QString getFileName();
87 87
88 void setPrefix(const QString&str) {prefix=str;} 88 void setPrefix(const QString&str) {prefix=str;}
89 const QString&getPrefix()const{return prefix;} 89 const QString&getPrefix()const{return prefix;}
90 90
91private: 91private:
92 QString file,prefix; 92 QString file,prefix;
93 93
94}; 94};
95 95
96class POP3account : public Account 96class POP3account : public Account
97{ 97{
98 98
99public: 99public:
100 POP3account(); 100 POP3account();
101 POP3account( QString filename ); 101 POP3account( QString filename );
102 102
103 static QString getUniqueFileName(); 103 static QString getUniqueFileName();
104 104
105 virtual void read(); 105 virtual void read();
106 virtual void save(); 106 virtual void save();
107 virtual QString getFileName(); 107 virtual QString getFileName();
108 108
109private: 109private:
110 QString file; 110 QString file;
111 111
112}; 112};
113 113
114class SMTPaccount : public Account 114class SMTPaccount : public Account
115{ 115{
116 116
117public: 117public:
118 SMTPaccount(); 118 SMTPaccount();
119 SMTPaccount( QString filename ); 119 SMTPaccount( QString filename );
120 120
121 static QString getUniqueFileName(); 121 static QString getUniqueFileName();
122 122
123 virtual void read(); 123 virtual void read();
124 virtual void save(); 124 virtual void save();
125 virtual QString getFileName(); 125 virtual QString getFileName();
126 126
127 void setLogin( bool b ) { login = b; } 127 void setLogin( bool b ) { login = b; }
128 bool getLogin() { return login; } 128 bool getLogin() { return login; }
129 129
130 void setSigFile( QString b ) { signature = b; }
131 QString getSigFile() { return signature; }
132
133 QString getSignature();
134 void setSignature( QString b );
135
130private: 136private:
131 QString file, name, mail, org, cc, bcc, reply, signature; 137 QString file, name, mail, org, cc, bcc, reply, signature;
132 bool useCC, useBCC, useReply, login; 138 bool useCC, useBCC, useReply, login;
133 139
134}; 140};
135 141
136class NNTPaccount : public Account 142class NNTPaccount : public Account
137{ 143{
138 144
139public: 145public:
140 NNTPaccount(); 146 NNTPaccount();
141 NNTPaccount( QString filename ); 147 NNTPaccount( QString filename );
142 148
143 static QString getUniqueFileName(); 149 static QString getUniqueFileName();
144 150
145 virtual void read(); 151 virtual void read();
146 virtual void save(); 152 virtual void save();
147 virtual QString getFileName(); 153 virtual QString getFileName();
148 154
149 void setLogin( bool b ) { login = b; } 155 void setLogin( bool b ) { login = b; }
150 bool getLogin() { return login; } 156 bool getLogin() { return login; }
151 157
152 void setGroups( QStringList list ) { subscribedGroups = list; } 158 void setGroups( QStringList list ) { subscribedGroups = list; }
153 QStringList getGroups() { return subscribedGroups; } 159 QStringList getGroups() { return subscribedGroups; }
154 160
155private: 161private:
156 QString file; 162 QString file;
157 bool login; 163 bool login;
158 QStringList subscribedGroups; 164 QStringList subscribedGroups;
159 165
160}; 166};
161 167
162class Settings : public QObject 168class Settings : public QObject
163{ 169{
164 Q_OBJECT 170 Q_OBJECT
165 171
166public: 172public:
167 Settings(); 173 Settings();
168 //~Settings(){qDebug("-------------------settings "); }; 174 //~Settings(){qDebug("-------------------settings "); };
169 QList<Account> getAccounts(); 175 QList<Account> getAccounts();
170 void addAccount(Account *account); 176 void addAccount(Account *account);
171 void delAccount(Account *account); 177 void delAccount(Account *account);
172 void saveAccounts(); 178 void saveAccounts();
173 void readAccounts(); 179 void readAccounts();
174 static void checkDirectory(); 180 static void checkDirectory();
175 181
176private: 182private:
177 void updateAccounts(); 183 void updateAccounts();
178 QList<Account> accounts; 184 QList<Account> accounts;
179 185
180}; 186};
181 187
182#endif 188#endif
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index 006390c..1789da0 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -1,67 +1,67 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2 2
3 3
4#ifndef DESKTOP_VERSION 4#ifndef DESKTOP_VERSION
5#include <qpe/qpeapplication.h> 5#include <qpe/qpeapplication.h>
6#include <libkdepim/externalapphandler.h> 6#include <libkdepim/externalapphandler.h>
7#include <stdlib.h> 7#include <stdlib.h>
8#else 8#else
9#include <qapplication.h> 9#include <qapplication.h>
10#include <qstring.h> 10#include <qstring.h>
11#include <qwindowsstyle.h> 11#include <qwindowsstyle.h>
12#include <qplatinumstyle.h> 12#include <qplatinumstyle.h>
13#include <qsgistyle.h> 13#include <qsgistyle.h>
14#endif 14#endif
15#include "opiemail.h" 15#include "opiemail.h"
16#include <qdir.h> 16#include <qdir.h>
17#include <kstandarddirs.h> 17#include <kstandarddirs.h>
18#include <kglobal.h> 18#include <kglobal.h>
19#include <stdio.h> 19#include <stdio.h>
20#include "mainwindow.h" 20#include "mainwindow.h"
21#include "koprefs.h" 21#include "koprefs.h"
22#include <libkdepim/kpimglobalprefs.h> 22#include <libkdepim/kpimglobalprefs.h>
23void dumpMissing(); 23void dumpMissing();
24//using namespace Opie::Core; 24//using namespace Opie::Core;
25int main( int argc, char **argv ) { 25int main( int argc, char **argv ) {
26 26
27#ifndef DESKTOP_VERSION 27#ifndef DESKTOP_VERSION
28 QPEApplication a( argc, argv ); 28 QPEApplication a( argc, argv );
29 a.setKeepRunning (); 29 a.setKeepRunning ();
30#else 30#else
31 QApplication a( argc, argv ); 31 QApplication a( argc, argv );
32 QApplication::setStyle( new QPlatinumStyle ()); 32 QApplication::setStyle( new QPlatinumStyle ());
33#endif 33#endif
34 a.setFont( KOPrefs::instance()->mAppFont ); 34 a.setFont( KOPrefs::instance()->mAppFont );
35 KGlobal::setAppName( "kopiemail" ); 35 KGlobal::setAppName( "kopiemail" );
36 QString fileName ; 36 QString fileName ;
37#ifndef DESKTOP_VERSION 37#ifndef DESKTOP_VERSION
38 fileName = getenv("QPEDIR"); 38 fileName = getenv("QPEDIR");
39 if ( QApplication::desktop()->width() > 320 ) 39 if ( QApplication::desktop()->width() > 320 )
40 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/"); 40 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/icons22/");
41 else 41 else
42 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/"); 42 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kopiemail/");
43#else 43#else
44 fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/"; 44 fileName = qApp->applicationDirPath () + "/kdepim/kopiemail/icons22/";
45 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 45 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
46#endif 46#endif
47 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail"))); 47 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kopiemail")));
48 KPimGlobalPrefs::instance()->setGlobalConfig(); 48 KPimGlobalPrefs::instance()->setGlobalConfig();
49 OpieMail mw; 49 OpieMail mw;
50#ifndef DESKTOP_VERSION 50#ifndef DESKTOP_VERSION
51 //qDebug("CONNECT "); 51 //qDebug("CONNECT ");
52 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); 52 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& )));
53 // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 53 // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
54 a.showMainWidget(&mw ); 54 a.showMainWidget(&mw );
55#else 55#else
56 a.setMainWidget(&mw ); 56 a.setMainWidget(&mw );
57 mw.show(); 57 mw.show();
58 //m.resize( 800, 600 ); 58 //m.resize( 800, 600 );
59 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 59 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
60#endif 60#endif
61 int rv = a.exec(); 61 int rv = a.exec();
62 dumpMissing(); 62 dumpMissing();
63 63
64 KPimGlobalPrefs::instance()->writeConfig(); 64 KPimGlobalPrefs::instance()->writeConfig();
65 return rv; 65 return rv;
66 66
67} 67}
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 0794e00..4c58909 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,414 +1,416 @@
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#include <qstatusbar.h> 14#include <qstatusbar.h>
15#include <kabc/stdaddressbook.h> 15#include <kabc/stdaddressbook.h>
16extern QStatusBar* globalSstatusBarMainWindow; 16extern QStatusBar* globalSstatusBarMainWindow;
17#else 17#else
18#include <qpe/qpeapplication.h> 18#include <qpe/qpeapplication.h>
19#include <klocale.h> 19#include <klocale.h>
20#endif 20#endif
21#include "defines.h" 21#include "defines.h"
22#include "koprefs.h" 22#include "koprefs.h"
23#include "mainwindow.h" 23#include "mainwindow.h"
24#include "mailistviewitem.h" 24#include "mailistviewitem.h"
25#include <KDGanttMinimizeSplitter.h> 25#include <KDGanttMinimizeSplitter.h>
26 26
27#include "koprefs.h" 27#include "koprefs.h"
28 28
29MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 29MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
30 : QMainWindow( parent, name ) //, flags ) 30 : QMainWindow( parent, name ) //, flags )
31{ 31{
32#ifdef DESKTOP_VERSION 32#ifdef DESKTOP_VERSION
33 globalSstatusBarMainWindow = statusBar(); 33 globalSstatusBarMainWindow = statusBar();
34#endif 34#endif
35 setCaption( i18n( "KOpieMail/Pi" ) ); 35 setCaption( i18n( "KOpieMail/Pi" ) );
36 setToolBarsMovable( false ); 36 setToolBarsMovable( false );
37 //KABC::StdAddressBook::self(); 37 //KABC::StdAddressBook::self();
38 toolBar = new QToolBar( this ); 38 toolBar = new QToolBar( this );
39 menuBar = new QPEMenuBar( toolBar ); 39 menuBar = new QPEMenuBar( toolBar );
40 mailMenu = new QPopupMenu( menuBar ); 40 mailMenu = new QPopupMenu( menuBar );
41 menuBar->insertItem( i18n( "Mail" ), mailMenu ); 41 menuBar->insertItem( i18n( "Mail" ), mailMenu );
42 settingsMenu = new QPopupMenu( menuBar ); 42 settingsMenu = new QPopupMenu( menuBar );
43 menuBar->insertItem( i18n( "Settings" ), settingsMenu ); 43 menuBar->insertItem( i18n( "Settings" ), settingsMenu );
44 44
45 addToolBar( toolBar ); 45 addToolBar( toolBar );
46 toolBar->setHorizontalStretchable( true ); 46 toolBar->setHorizontalStretchable( true );
47 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), 47 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"),
48 0, 0, this ); 48 0, 0, this );
49 connect(getMail, SIGNAL( activated() ), 49 connect(getMail, SIGNAL( activated() ),
50 SLOT( slotGetAllMail() ) ); 50 SLOT( slotGetAllMail() ) );
51 getMail->addTo( mailMenu ); 51 getMail->addTo( mailMenu );
52 52
53 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), 53 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"),
54 0, 0, this ); 54 0, 0, this );
55 getMail->addTo( toolBar ); 55 getMail->addTo( toolBar );
56 getMail->addTo( mailMenu ); 56 getMail->addTo( mailMenu );
57 connect(getMail, SIGNAL( activated() ), 57 connect(getMail, SIGNAL( activated() ),
58 SLOT( slotGetMail() ) ); 58 SLOT( slotGetMail() ) );
59 59
60 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), 60 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"),
61 0, 0, this ); 61 0, 0, this );
62 composeMail->addTo( toolBar ); 62 composeMail->addTo( toolBar );
63 composeMail->addTo( mailMenu ); 63 composeMail->addTo( mailMenu );
64 64
65 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , 65 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") ,
66 0, 0, this ); 66 0, 0, this );
67 sendQueued->addTo( toolBar ); 67 sendQueued->addTo( toolBar );
68 sendQueued->addTo( mailMenu ); 68 sendQueued->addTo( mailMenu );
69 69
70 /* 70 /*
71 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, 71 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC,
72 0, 0, this ); 72 0, 0, this );
73 syncFolders->addTo( toolBar ); 73 syncFolders->addTo( toolBar );
74 syncFolders->addTo( mailMenu ); 74 syncFolders->addTo( mailMenu );
75 */ 75 */
76 76
77 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , 77 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") ,
78 0, 0, this, 0, true ); 78 0, 0, this, 0, true );
79 showFolders->addTo( toolBar ); 79 showFolders->addTo( toolBar );
80 showFolders->addTo( mailMenu ); 80 showFolders->addTo( mailMenu );
81 showFolders->setOn( true ); 81 showFolders->setOn( true );
82 connect(showFolders, SIGNAL( toggled(bool) ), 82 connect(showFolders, SIGNAL( toggled(bool) ),
83 SLOT( slotShowFolders(bool) ) ); 83 SLOT( slotShowFolders(bool) ) );
84 84
85 /* 85 /*
86 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), 86 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ),
87 0, 0, this ); 87 0, 0, this );
88 searchMails->kopddTo( toolBar ); 88 searchMails->kopddTo( toolBar );
89 searchMails->addTo( mailMenu ); 89 searchMails->addTo( mailMenu );
90 */ 90 */
91 91
92 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); 92 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this);
93 deleteMails->addTo( toolBar ); 93 deleteMails->addTo( toolBar );
94 deleteMails->addTo( mailMenu ); 94 deleteMails->addTo( mailMenu );
95 connect( deleteMails, SIGNAL( activated() ), 95 connect( deleteMails, SIGNAL( activated() ),
96 SLOT( slotDeleteAllMail() ) ); 96 SLOT( slotDeleteAllMail() ) );
97 97
98 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , 98 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") ,
99 0, 0, this ); 99 0, 0, this );
100 editSettings->addTo( settingsMenu ); 100 editSettings->addTo( settingsMenu );
101 connect( editSettings, SIGNAL( activated() ), 101 connect( editSettings, SIGNAL( activated() ),
102 SLOT( slotEditSettings() ) ); 102 SLOT( slotEditSettings() ) );
103 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 103 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
104 0, 0, this ); 104 0, 0, this );
105 editAccounts->addTo( settingsMenu ); 105 editAccounts->addTo( settingsMenu );
106 codecMenu = new QPopupMenu( menuBar ); 106 codecMenu = new QPopupMenu( menuBar );
107 codecMenu->insertItem( "Western (iso-8859-1)",0,0); 107 codecMenu->insertItem( "Western (iso-8859-1)",0,0);
108 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); 108 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1);
109 codecMenu->insertItem( "Western (iso-8859-15)",2,2); 109 codecMenu->insertItem( "Western (iso-8859-15)",2,2);
110 codecMenu->insertItem( "Chinese (big-5)",3,3); 110 codecMenu->insertItem( "Chinese (big-5)",3,3);
111 codecMenu->insertItem( "Unicode (utf-8)",4,4); 111 codecMenu->insertItem( "Unicode (utf-8)",4,4);
112 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); 112 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
113 //disabled 113 //disabled
114 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); 114 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
115 //setCentralWidget( view ); 115 //setCentralWidget( view );
116 116
117 QVBox* wrapperBox = new QVBox( this ); 117 QVBox* wrapperBox = new QVBox( this );
118 setCentralWidget( wrapperBox ); 118 setCentralWidget( wrapperBox );
119 119
120 // QWidget *view = new QWidget( wrapperBox ); 120 // QWidget *view = new QWidget( wrapperBox );
121 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); 121 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox);
122 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down); 122 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down);
123 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor); 123 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor);
124 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 124 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
125 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 125 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
126 subLE = 0; 126 subLE = 0;
127 fromLE = 0; 127 fromLE = 0;
128 toLE = 0; 128 toLE = 0;
129 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { 129 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) {
130 QWidget* infoBox = new QWidget( splithor ); 130 QWidget* infoBox = new QWidget( splithor );
131 QGridLayout *griLay = new QGridLayout( infoBox, 2,2); 131 QGridLayout *griLay = new QGridLayout( infoBox, 2,2);
132 if ( KOPrefs::instance()->mShowInfoSub ) { 132 if ( KOPrefs::instance()->mShowInfoSub ) {
133 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); 133 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 );
134 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; 134 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ;
135 } 135 }
136 if ( KOPrefs::instance()->mShowInfoFrom ) { 136 if ( KOPrefs::instance()->mShowInfoFrom ) {
137 griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 ); 137 griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 );
138 griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ; 138 griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ;
139 } 139 }
140 if ( KOPrefs::instance()->mShowInfoTo ) { 140 if ( KOPrefs::instance()->mShowInfoTo ) {
141 griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 ); 141 griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 );
142 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ; 142 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ;
143 } 143 }
144 infoBox->setMaximumHeight( infoBox->sizeHint().height() ); 144 infoBox->setMaximumHeight( infoBox->sizeHint().height() );
145 if ( !KOPrefs::instance()->mShowInfoStart ) { 145 if ( !KOPrefs::instance()->mShowInfoStart ) {
146 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) ); 146 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) );
147 } 147 }
148 } 148 }
149 149
150 150
151 folderView = new AccountView( split ); 151 folderView = new AccountView( split );
152 folderView->header()->hide(); 152 folderView->header()->hide();
153 folderView->setRootIsDecorated( false ); 153 folderView->setRootIsDecorated( false );
154 folderView->addColumn( i18n( "Mailbox" ) ); 154 folderView->addColumn( i18n( "Mailbox" ) );
155 155
156 //layout->addWidget( folderView ); 156 //layout->addWidget( folderView );
157 157
158 mailView = new QListView( split ); 158 mailView = new QListView( split );
159 mailView->addColumn( i18n( " " ) ); 159 mailView->addColumn( i18n( " " ) );
160 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 160 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
161 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 161 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
162 mailView->addColumn( i18n( "Size" ),QListView::Manual); 162 mailView->addColumn( i18n( "Size" ),QListView::Manual);
163 mailView->addColumn( i18n( "Date" ),QListView::Manual); 163 mailView->addColumn( i18n( "Date" ),QListView::Manual);
164 if ( KOPrefs::instance()->mShowToField ) 164 if ( KOPrefs::instance()->mShowToField )
165 mailView->addColumn( i18n( "To" ),QListView::Manual); 165 mailView->addColumn( i18n( "To" ),QListView::Manual);
166 mailView->setAllColumnsShowFocus(true); 166 mailView->setAllColumnsShowFocus(true);
167 //mailView->setSorting(-1); 167 //mailView->setSorting(-1);
168 mailView->setRootIsDecorated( false ); 168 mailView->setRootIsDecorated( false );
169 statusWidget = new StatusWidget( wrapperBox ); 169 statusWidget = new StatusWidget( wrapperBox );
170 statusWidget->hide(); 170 statusWidget->hide();
171 171
172 //layout->addWidget( mailView ); 172 //layout->addWidget( mailView );
173 //layout->setStretchFactor( folderView, 1 ); 173 //layout->setStretchFactor( folderView, 1 );
174 //layout->setStretchFactor( mailView, 2 ); 174 //layout->setStretchFactor( mailView, 2 );
175 175
176 slotAdjustLayout(); 176 slotAdjustLayout();
177#ifndef DESKTOP_VERSION 177#ifndef DESKTOP_VERSION
178 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); 178 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
179 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 179 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
180 if ( subLE ) 180 if ( subLE )
181 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); 181 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold);
182 if ( fromLE ) 182 if ( fromLE )
183 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); 183 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold);
184 if ( toLE ) 184 if ( toLE )
185 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); 185 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold);
186#endif 186#endif
187 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 187 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this,
188 SLOT( mailLeftClicked(QListViewItem*) ) ); 188 SLOT( mailLeftClicked(QListViewItem*) ) );
189 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 189 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this,
190 SLOT( mailLeftClicked(QListViewItem*) ) ); 190 SLOT( mailLeftClicked(QListViewItem*) ) );
191 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 191 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
192 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 192 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
193 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 193 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
194 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 194 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
195 195
196 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, 196 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this,
197 SLOT( setInfoFields(QListViewItem*) ) ); 197 SLOT( setInfoFields(QListViewItem*) ) );
198 198
199 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 199 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
200 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 200 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
201// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 201// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
202 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 202 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
203 //mailView->setMultiSelection ( true ); 203 //mailView->setMultiSelection ( true );
204 mailView->setSelectionMode( QListView::Extended ); 204 mailView->setSelectionMode( QListView::Extended );
205 QValueList<int> list; 205 QValueList<int> list;
206 int fw = 100; 206 int fw = 100;
207 if ( QApplication::desktop()->width() > 320 ) 207 if ( QApplication::desktop()->width() > 320 )
208 fw = 50; 208 fw = 50;
209 list.append( fw ); 209 list.append( fw );
210 list.append( 100 ); 210 list.append( 100 );
211 split->setSizes( list ); 211 split->setSizes( list );
212 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 212 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
213 mailView->setShowSortIndicator ( true ); 213 mailView->setShowSortIndicator ( true );
214 QLabel *spacer = new QLabel( toolBar ); 214 QLabel *spacer = new QLabel( toolBar );
215 spacer->setBackgroundMode( QWidget::PaletteButton ); 215 spacer->setBackgroundMode( QWidget::PaletteButton );
216 toolBar->setStretchableWidget( spacer ); 216 toolBar->setStretchableWidget( spacer );
217 217
218 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 218 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
219 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 219 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
220 if ( QApplication::desktop()->width() > 320 ) 220 if ( QApplication::desktop()->width() > 320 )
221 closeMail->addTo(toolBar); 221 closeMail->addTo(toolBar);
222 closeMail->addTo(mailMenu); 222 closeMail->addTo(mailMenu);
223 223
224 224
225 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 225 QPopupMenu* helpMenu = new QPopupMenu( menuBar );
226 menuBar->insertItem( i18n( "Help" ), helpMenu ); 226 menuBar->insertItem( i18n( "Help" ), helpMenu );
227 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); 227 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this);
228 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 228 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
229 li->addTo(helpMenu); 229 li->addTo(helpMenu);
230 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); 230 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this);
231 connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); 231 connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
232 li->addTo(helpMenu); 232 li->addTo(helpMenu);
233 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); 233 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this);
234 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); 234 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) );
235 li->addTo(helpMenu); 235 li->addTo(helpMenu);
236 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); 236 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) );
237 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 237 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
238 menuBar->setMaximumWidth( menuBar->sizeHint().width());
239 //menuBar->setMaximumSize( menuBar->sizeHint());
238#ifdef DESKTOP_VERSION 240#ifdef DESKTOP_VERSION
239 resize ( 640, 480 ); 241 resize ( 640, 480 );
240#endif 242#endif
241} 243}
242 244
243MainWindow::~MainWindow() 245MainWindow::~MainWindow()
244{ 246{
245} 247}
246 248
247void MainWindow::setInfoFields(QListViewItem* item ) 249void MainWindow::setInfoFields(QListViewItem* item )
248{ 250{
249 if ( item == 0) { 251 if ( item == 0) {
250 if ( subLE ) subLE->setText(""); 252 if ( subLE ) subLE->setText("");
251 if ( fromLE ) fromLE->setText(""); 253 if ( fromLE ) fromLE->setText("");
252 if ( toLE ) toLE->setText(""); 254 if ( toLE ) toLE->setText("");
253 return; 255 return;
254 } 256 }
255 RecMailP mail = ((MailListViewItem*)item)->data(); 257 RecMailP mail = ((MailListViewItem*)item)->data();
256 if ( subLE ) subLE->setText(mail->getSubject()); 258 if ( subLE ) subLE->setText(mail->getSubject());
257 if ( fromLE ) fromLE->setText(mail->getFrom()); 259 if ( fromLE ) fromLE->setText(mail->getFrom());
258 if ( toLE ) toLE->setText(mail->To().join(";" )); 260 if ( toLE ) toLE->setText(mail->To().join(";" ));
259 if ( subLE ) subLE->setCursorPosition(0); 261 if ( subLE ) subLE->setCursorPosition(0);
260 if ( fromLE ) fromLE->setCursorPosition(0); 262 if ( fromLE ) fromLE->setCursorPosition(0);
261 if ( toLE ) toLE->setCursorPosition(0); 263 if ( toLE ) toLE->setCursorPosition(0);
262 264
263} 265}
264void MainWindow::slotSetCodec( int codec ) 266void MainWindow::slotSetCodec( int codec )
265{ 267{
266 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); 268 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false );
267 //qDebug("codec %d ", codec); 269 //qDebug("codec %d ", codec);
268 KOPrefs::instance()->mCurrentCodec = codec; 270 KOPrefs::instance()->mCurrentCodec = codec;
269 KOPrefs::instance()->isDirty = true; 271 KOPrefs::instance()->isDirty = true;
270 QString name; 272 QString name;
271 switch ( codec ) { 273 switch ( codec ) {
272 case 0: 274 case 0:
273 name = "iso-8859-1"; 275 name = "iso-8859-1";
274 break; 276 break;
275 case 1: 277 case 1:
276 name = "iso-8859-5"; 278 name = "iso-8859-5";
277 break; 279 break;
278 case 2: 280 case 2:
279 name = "iso-8859-15"; 281 name = "iso-8859-15";
280 break; 282 break;
281 case 3: 283 case 3:
282 name = "big-5"; 284 name = "big-5";
283 break; 285 break;
284 case 4: 286 case 4:
285 name = "utf-8"; 287 name = "utf-8";
286 break; 288 break;
287 case 5: 289 case 5:
288 name = KOPrefs::instance()->mSendCodec.lower(); 290 name = KOPrefs::instance()->mSendCodec.lower();
289 break; 291 break;
290 } 292 }
291 KOPrefs::instance()->mCurrentCodeName = name ; 293 KOPrefs::instance()->mCurrentCodeName = name ;
292 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); 294 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")");
293 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); 295 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true );
294} 296}
295void MainWindow::showLicence() 297void MainWindow::showLicence()
296{ 298{
297 KApplication::showLicence(); 299 KApplication::showLicence();
298} 300}
299void MainWindow::showAbout() 301void MainWindow::showAbout()
300{ 302{
301 QString version; 303 QString version;
302#include <../version> 304#include <../version>
303 305
304 QString cap = "About KOpieMail/Pi"; 306 QString cap = "About KOpieMail/Pi";
305 QString text =i18n("KOpieMail/Platform-independent\n") + 307 QString text =i18n("KOpieMail/Platform-independent\n") +
306 "(OM/Pi) " + version + " - " 308 "(OM/Pi) " + version + " - "
307 309
308#ifdef DESKTOP_VERSION 310#ifdef DESKTOP_VERSION
309 "Desktop Edition\n" 311 "Desktop Edition\n"
310#else 312#else
311 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" 313 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n"
312#endif 314#endif
313 "www.pi-sync.net\n\n" 315 "www.pi-sync.net\n\n"
314 316
315 317
316 318
317"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n" 319"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n"
318 "KOpieMail/Pi is based on Opie Mail\n" 320 "KOpieMail/Pi is based on Opie Mail\n"
319 "Copyright (c) Rajko Albrecht and the Opie team\n" 321 "Copyright (c) Rajko Albrecht and the Opie team\n"
320 "KOpieMail/Pi is licensed under the GPL\n" 322 "KOpieMail/Pi is licensed under the GPL\n"
321 "\n" 323 "\n"
322 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" 324 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n"
323 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" 325 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n"
324 "libEtPan has its own licence - see LibEtPan licence\n"; 326 "libEtPan has its own licence - see LibEtPan licence\n";
325 327
326 KApplication::showText( cap, text ); 328 KApplication::showText( cap, text );
327} 329}
328void MainWindow::showEtpanLicence() 330void MainWindow::showEtpanLicence()
329{ 331{
330 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); 332 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" );
331 333
332} 334}
333void MainWindow::appMessage(const QCString &, const QByteArray &) 335void MainWindow::appMessage(const QCString &, const QByteArray &)
334{ 336{
335 qDebug("appMessage implemented by subclass"); 337 qDebug("appMessage implemented by subclass");
336} 338}
337 339
338void MainWindow::slotAdjustLayout() { 340void MainWindow::slotAdjustLayout() {
339 341
340 /* 342 /*
341 QWidget *d = QApplication::desktop(); 343 QWidget *d = QApplication::desktop();
342 344
343 if ( d->width() < d->height() ) { 345 if ( d->width() < d->height() ) {
344 layout->setDirection( QBoxLayout::TopToBottom ); 346 layout->setDirection( QBoxLayout::TopToBottom );
345 } else { 347 } else {
346 layout->setDirection( QBoxLayout::LeftToRight ); 348 layout->setDirection( QBoxLayout::LeftToRight );
347 } 349 }
348 */ 350 */
349} 351}
350 352
351void MainWindow::slotAdjustColumns() 353void MainWindow::slotAdjustColumns()
352{ 354{
353 bool hidden = folderView->isHidden(); 355 bool hidden = folderView->isHidden();
354 if ( hidden ) folderView->show(); 356 if ( hidden ) folderView->show();
355 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 357 folderView->setColumnWidth( 0, folderView->visibleWidth() );
356 if ( hidden ) folderView->hide(); 358 if ( hidden ) folderView->hide();
357 359
358 mailView->setColumnWidth( 0, 10 ); 360 mailView->setColumnWidth( 0, 10 );
359 mailView->setColumnWidth( 1, 100 ); 361 mailView->setColumnWidth( 1, 100 );
360 mailView->setColumnWidth( 2, 100 ); 362 mailView->setColumnWidth( 2, 100 );
361 mailView->setColumnWidth( 3, 50 ); 363 mailView->setColumnWidth( 3, 50 );
362 mailView->setColumnWidth( 4, 120 ); 364 mailView->setColumnWidth( 4, 120 );
363 if ( KOPrefs::instance()->mShowToField ) 365 if ( KOPrefs::instance()->mShowToField )
364 mailView->setColumnWidth( 5, 100 ); 366 mailView->setColumnWidth( 5, 100 );
365} 367}
366 368
367void MainWindow::slotEditSettings() 369void MainWindow::slotEditSettings()
368{ 370{
369} 371}
370 372
371void MainWindow::slotShowFolders( bool ) 373void MainWindow::slotShowFolders( bool )
372{ 374{
373 qDebug("not implemented: "); 375 qDebug("not implemented: ");
374} 376}
375 377
376void MainWindow::refreshMailView(const QValueList<RecMailP>&) 378void MainWindow::refreshMailView(const QValueList<RecMailP>&)
377{ 379{
378 qDebug("not implemented: "); 380 qDebug("not implemented: ");
379} 381}
380 382
381void MainWindow::mailLeftClicked(QListViewItem * ) 383void MainWindow::mailLeftClicked(QListViewItem * )
382{ 384{
383 qDebug("not implemented: "); 385 qDebug("not implemented: ");
384} 386}
385 387
386void MainWindow::displayMail() 388void MainWindow::displayMail()
387{ 389{
388 qDebug("not implemented: "); 390 qDebug("not implemented: ");
389} 391}
390 392
391void MainWindow::slotDeleteMail() 393void MainWindow::slotDeleteMail()
392{ 394{
393 qDebug("not implemented: "); 395 qDebug("not implemented: ");
394} 396}
395 397
396void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) 398void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int )
397{ 399{
398 qDebug("not implemented: "); 400 qDebug("not implemented: ");
399} 401}
400 402
401void MainWindow::slotSendQueued() 403void MainWindow::slotSendQueued()
402{ 404{
403 qDebug("not implemented: "); 405 qDebug("not implemented: ");
404} 406}
405 407
406void MainWindow::slotEditAccounts() 408void MainWindow::slotEditAccounts()
407{ 409{
408 qDebug("not implemented: "); 410 qDebug("not implemented: ");
409} 411}
410 412
411void MainWindow::slotComposeMail() 413void MainWindow::slotComposeMail()
412{ 414{
413 qDebug("not implemented: "); 415 qDebug("not implemented: ");
414} 416}
diff --git a/kmicromail/smtpconfigui.ui b/kmicromail/smtpconfigui.ui
index ae0a49a..aae6f12 100644
--- a/kmicromail/smtpconfigui.ui
+++ b/kmicromail/smtpconfigui.ui
@@ -1,361 +1,378 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>SMTPconfigUI</class> 2<class>SMTPconfigUI</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>SMTPconfigUI</cstring> 8 <cstring>SMTPconfigUI</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>331</width> 15 <width>266</width>
16 <height>426</height> 16 <height>365</height>
17 </rect> 17 </rect>
18 </property> 18 </property>
19 <property stdset="1"> 19 <property stdset="1">
20 <name>caption</name> 20 <name>caption</name>
21 <string>Configure SMTP</string> 21 <string>Configure SMTP</string>
22 </property> 22 </property>
23 <property> 23 <property>
24 <name>layoutMargin</name> 24 <name>layoutMargin</name>
25 </property> 25 </property>
26 <property> 26 <property>
27 <name>layoutSpacing</name> 27 <name>layoutSpacing</name>
28 </property> 28 </property>
29 <vbox> 29 <vbox>
30 <property stdset="1"> 30 <property stdset="1">
31 <name>margin</name> 31 <name>margin</name>
32 <number>3</number> 32 <number>5</number>
33 </property> 33 </property>
34 <property stdset="1"> 34 <property stdset="1">
35 <name>spacing</name> 35 <name>spacing</name>
36 <number>3</number> 36 <number>2</number>
37 </property> 37 </property>
38 <widget> 38 <widget>
39 <class>QLabel</class> 39 <class>QLabel</class>
40 <property stdset="1"> 40 <property stdset="1">
41 <name>name</name> 41 <name>name</name>
42 <cstring>accountLabel</cstring> 42 <cstring>accountLabel</cstring>
43 </property> 43 </property>
44 <property stdset="1"> 44 <property stdset="1">
45 <name>text</name> 45 <name>text</name>
46 <string>Account</string> 46 <string>Account</string>
47 </property> 47 </property>
48 </widget> 48 </widget>
49 <widget> 49 <widget>
50 <class>QLineEdit</class> 50 <class>QLineEdit</class>
51 <property stdset="1"> 51 <property stdset="1">
52 <name>name</name> 52 <name>name</name>
53 <cstring>accountLine</cstring> 53 <cstring>accountLine</cstring>
54 </property> 54 </property>
55 <property> 55 <property>
56 <name>toolTip</name> 56 <name>toolTip</name>
57 <string>Name of the Account</string> 57 <string>Name of the Account</string>
58 </property> 58 </property>
59 </widget> 59 </widget>
60 <widget> 60 <widget>
61 <class>Line</class>
62 <property stdset="1">
63 <name>name</name>
64 <cstring>line1</cstring>
65 </property>
66 <property stdset="1">
67 <name>sizePolicy</name>
68 <sizepolicy>
69 <hsizetype>1</hsizetype>
70 <vsizetype>0</vsizetype>
71 </sizepolicy>
72 </property>
73 <property stdset="1">
74 <name>orientation</name>
75 <enum>Horizontal</enum>
76 </property>
77 </widget>
78 <widget>
79 <class>QLayoutWidget</class> 61 <class>QLayoutWidget</class>
80 <property stdset="1"> 62 <property stdset="1">
81 <name>name</name> 63 <name>name</name>
82 <cstring>Layout20</cstring> 64 <cstring>Layout20</cstring>
83 </property> 65 </property>
84 <hbox> 66 <hbox>
85 <property stdset="1"> 67 <property stdset="1">
86 <name>margin</name> 68 <name>margin</name>
87 <number>0</number> 69 <number>0</number>
88 </property> 70 </property>
89 <property stdset="1"> 71 <property stdset="1">
90 <name>spacing</name> 72 <name>spacing</name>
91 <number>6</number> 73 <number>6</number>
92 </property> 74 </property>
93 <widget> 75 <widget>
94 <class>QLayoutWidget</class> 76 <class>QLayoutWidget</class>
95 <property stdset="1"> 77 <property stdset="1">
96 <name>name</name> 78 <name>name</name>
97 <cstring>Layout18</cstring> 79 <cstring>Layout18</cstring>
98 </property> 80 </property>
99 <vbox> 81 <vbox>
100 <property stdset="1"> 82 <property stdset="1">
101 <name>margin</name> 83 <name>margin</name>
102 <number>0</number> 84 <number>0</number>
103 </property> 85 </property>
104 <property stdset="1"> 86 <property stdset="1">
105 <name>spacing</name> 87 <name>spacing</name>
106 <number>6</number> 88 <number>6</number>
107 </property> 89 </property>
108 <widget> 90 <widget>
109 <class>QLabel</class> 91 <class>QLabel</class>
110 <property stdset="1"> 92 <property stdset="1">
111 <name>name</name> 93 <name>name</name>
112 <cstring>serverLabel</cstring> 94 <cstring>serverLabel</cstring>
113 </property> 95 </property>
114 <property stdset="1"> 96 <property stdset="1">
115 <name>text</name> 97 <name>text</name>
116 <string>Server</string> 98 <string>Server</string>
117 </property> 99 </property>
118 </widget> 100 </widget>
119 <widget> 101 <widget>
120 <class>QLabel</class> 102 <class>QLabel</class>
121 <property stdset="1"> 103 <property stdset="1">
122 <name>name</name> 104 <name>name</name>
123 <cstring>portLabel</cstring> 105 <cstring>portLabel</cstring>
124 </property> 106 </property>
125 <property stdset="1"> 107 <property stdset="1">
126 <name>text</name> 108 <name>text</name>
127 <string>Port</string> 109 <string>Port</string>
128 </property> 110 </property>
129 </widget> 111 </widget>
130 </vbox> 112 </vbox>
131 </widget> 113 </widget>
132 <widget> 114 <widget>
133 <class>QLayoutWidget</class> 115 <class>QLayoutWidget</class>
134 <property stdset="1"> 116 <property stdset="1">
135 <name>name</name> 117 <name>name</name>
136 <cstring>Layout19</cstring> 118 <cstring>Layout19</cstring>
137 </property> 119 </property>
138 <vbox> 120 <vbox>
139 <property stdset="1"> 121 <property stdset="1">
140 <name>margin</name> 122 <name>margin</name>
141 <number>0</number> 123 <number>0</number>
142 </property> 124 </property>
143 <property stdset="1"> 125 <property stdset="1">
144 <name>spacing</name> 126 <name>spacing</name>
145 <number>6</number> 127 <number>6</number>
146 </property> 128 </property>
147 <widget> 129 <widget>
148 <class>QLineEdit</class> 130 <class>QLineEdit</class>
149 <property stdset="1"> 131 <property stdset="1">
150 <name>name</name> 132 <name>name</name>
151 <cstring>serverLine</cstring> 133 <cstring>serverLine</cstring>
152 </property> 134 </property>
153 <property> 135 <property>
154 <name>toolTip</name> 136 <name>toolTip</name>
155 <string>Name of the SMTP Server</string> 137 <string>Name of the SMTP Server</string>
156 </property> 138 </property>
157 </widget> 139 </widget>
158 <widget> 140 <widget>
159 <class>QLineEdit</class> 141 <class>QLineEdit</class>
160 <property stdset="1"> 142 <property stdset="1">
161 <name>name</name> 143 <name>name</name>
162 <cstring>portLine</cstring> 144 <cstring>portLine</cstring>
163 </property> 145 </property>
164 <property> 146 <property>
165 <name>toolTip</name> 147 <name>toolTip</name>
166 <string>Port of the SMTP Server</string> 148 <string>Port of the SMTP Server</string>
167 </property> 149 </property>
168 </widget> 150 </widget>
169 </vbox> 151 </vbox>
170 </widget> 152 </widget>
171 </hbox> 153 </hbox>
172 </widget> 154 </widget>
173 <widget> 155 <widget>
174 <class>QLabel</class> 156 <class>QLabel</class>
175 <property stdset="1"> 157 <property stdset="1">
176 <name>name</name> 158 <name>name</name>
177 <cstring>TextLabel1</cstring> 159 <cstring>TextLabel1</cstring>
178 </property> 160 </property>
179 <property stdset="1"> 161 <property stdset="1">
180 <name>text</name> 162 <name>text</name>
181 <string>Use secure sockets:</string> 163 <string>Use secure sockets:</string>
182 </property> 164 </property>
183 </widget> 165 </widget>
184 <widget> 166 <widget>
185 <class>QComboBox</class> 167 <class>QComboBox</class>
186 <property stdset="1"> 168 <property stdset="1">
187 <name>name</name> 169 <name>name</name>
188 <cstring>ComboBox1</cstring> 170 <cstring>ComboBox1</cstring>
189 </property> 171 </property>
190 </widget> 172 </widget>
191 <widget> 173 <widget>
192 <class>QLineEdit</class> 174 <class>QLineEdit</class>
193 <property stdset="1"> 175 <property stdset="1">
194 <name>name</name> 176 <name>name</name>
195 <cstring>CommandEdit</cstring> 177 <cstring>CommandEdit</cstring>
196 </property> 178 </property>
197 <property stdset="1"> 179 <property stdset="1">
198 <name>text</name> 180 <name>text</name>
199 <string>ssh $SERVER exec</string> 181 <string>ssh $SERVER exec</string>
200 </property> 182 </property>
201 </widget> 183 </widget>
202 <widget> 184 <widget>
203 <class>Line</class>
204 <property stdset="1">
205 <name>name</name>
206 <cstring>line2</cstring>
207 </property>
208 <property stdset="1">
209 <name>sizePolicy</name>
210 <sizepolicy>
211 <hsizetype>1</hsizetype>
212 <vsizetype>0</vsizetype>
213 </sizepolicy>
214 </property>
215 <property stdset="1">
216 <name>orientation</name>
217 <enum>Horizontal</enum>
218 </property>
219 </widget>
220 <widget>
221 <class>QCheckBox</class> 185 <class>QCheckBox</class>
222 <property stdset="1"> 186 <property stdset="1">
223 <name>name</name> 187 <name>name</name>
224 <cstring>loginBox</cstring> 188 <cstring>loginBox</cstring>
225 </property> 189 </property>
226 <property stdset="1"> 190 <property stdset="1">
227 <name>text</name> 191 <name>text</name>
228 <string>Use Login</string> 192 <string>Use Login</string>
229 </property> 193 </property>
230 </widget> 194 </widget>
231 <widget> 195 <widget>
232 <class>QLayoutWidget</class> 196 <class>QLayoutWidget</class>
233 <property stdset="1"> 197 <property stdset="1">
234 <name>name</name> 198 <name>name</name>
235 <cstring>Layout17</cstring> 199 <cstring>Layout17</cstring>
236 </property> 200 </property>
237 <hbox> 201 <hbox>
238 <property stdset="1"> 202 <property stdset="1">
239 <name>margin</name> 203 <name>margin</name>
240 <number>0</number> 204 <number>0</number>
241 </property> 205 </property>
242 <property stdset="1"> 206 <property stdset="1">
243 <name>spacing</name> 207 <name>spacing</name>
244 <number>6</number> 208 <number>6</number>
245 </property> 209 </property>
246 <widget> 210 <widget>
247 <class>QLayoutWidget</class> 211 <class>QLayoutWidget</class>
248 <property stdset="1"> 212 <property stdset="1">
249 <name>name</name> 213 <name>name</name>
250 <cstring>Layout15</cstring> 214 <cstring>Layout15</cstring>
251 </property> 215 </property>
252 <vbox> 216 <vbox>
253 <property stdset="1"> 217 <property stdset="1">
254 <name>margin</name> 218 <name>margin</name>
255 <number>0</number> 219 <number>0</number>
256 </property> 220 </property>
257 <property stdset="1"> 221 <property stdset="1">
258 <name>spacing</name> 222 <name>spacing</name>
259 <number>6</number> 223 <number>6</number>
260 </property> 224 </property>
261 <widget> 225 <widget>
262 <class>QLabel</class> 226 <class>QLabel</class>
263 <property stdset="1"> 227 <property stdset="1">
264 <name>name</name> 228 <name>name</name>
265 <cstring>userLabel</cstring> 229 <cstring>userLabel</cstring>
266 </property> 230 </property>
267 <property stdset="1"> 231 <property stdset="1">
268 <name>text</name> 232 <name>text</name>
269 <string>User</string> 233 <string>User</string>
270 </property> 234 </property>
271 </widget> 235 </widget>
272 <widget> 236 <widget>
273 <class>QLabel</class> 237 <class>QLabel</class>
274 <property stdset="1"> 238 <property stdset="1">
275 <name>name</name> 239 <name>name</name>
276 <cstring>passLabel</cstring> 240 <cstring>passLabel</cstring>
277 </property> 241 </property>
278 <property stdset="1"> 242 <property stdset="1">
279 <name>text</name> 243 <name>text</name>
280 <string>Password</string> 244 <string>Password</string>
281 </property> 245 </property>
282 </widget> 246 </widget>
283 </vbox> 247 </vbox>
284 </widget> 248 </widget>
285 <widget> 249 <widget>
286 <class>QLayoutWidget</class> 250 <class>QLayoutWidget</class>
287 <property stdset="1"> 251 <property stdset="1">
288 <name>name</name> 252 <name>name</name>
289 <cstring>Layout16</cstring> 253 <cstring>Layout16</cstring>
290 </property> 254 </property>
291 <vbox> 255 <vbox>
292 <property stdset="1"> 256 <property stdset="1">
293 <name>margin</name> 257 <name>margin</name>
294 <number>0</number> 258 <number>0</number>
295 </property> 259 </property>
296 <property stdset="1"> 260 <property stdset="1">
297 <name>spacing</name> 261 <name>spacing</name>
298 <number>6</number> 262 <number>6</number>
299 </property> 263 </property>
300 <widget> 264 <widget>
301 <class>QLineEdit</class> 265 <class>QLineEdit</class>
302 <property stdset="1"> 266 <property stdset="1">
303 <name>name</name> 267 <name>name</name>
304 <cstring>userLine</cstring> 268 <cstring>userLine</cstring>
305 </property> 269 </property>
306 <property stdset="1"> 270 <property stdset="1">
307 <name>enabled</name> 271 <name>enabled</name>
308 <bool>false</bool> 272 <bool>false</bool>
309 </property> 273 </property>
310 </widget> 274 </widget>
311 <widget> 275 <widget>
312 <class>QLineEdit</class> 276 <class>QLineEdit</class>
313 <property stdset="1"> 277 <property stdset="1">
314 <name>name</name> 278 <name>name</name>
315 <cstring>passLine</cstring> 279 <cstring>passLine</cstring>
316 </property> 280 </property>
317 <property stdset="1"> 281 <property stdset="1">
318 <name>enabled</name> 282 <name>enabled</name>
319 <bool>false</bool> 283 <bool>false</bool>
320 </property> 284 </property>
321 <property stdset="1"> 285 <property stdset="1">
322 <name>echoMode</name> 286 <name>echoMode</name>
323 <enum>Password</enum> 287 <enum>Password</enum>
324 </property> 288 </property>
325 </widget> 289 </widget>
326 </vbox> 290 </vbox>
327 </widget> 291 </widget>
328 </hbox> 292 </hbox>
329 </widget> 293 </widget>
294 <widget>
295 <class>QLayoutWidget</class>
296 <property stdset="1">
297 <name>name</name>
298 <cstring>Layout7</cstring>
299 </property>
300 <hbox>
301 <property stdset="1">
302 <name>margin</name>
303 <number>0</number>
304 </property>
305 <property stdset="1">
306 <name>spacing</name>
307 <number>6</number>
308 </property>
309 <widget>
310 <class>QLabel</class>
311 <property stdset="1">
312 <name>name</name>
313 <cstring>TextLabel1_2</cstring>
314 </property>
315 <property stdset="1">
316 <name>text</name>
317 <string>Signatur File</string>
318 </property>
319 </widget>
320 <widget>
321 <class>QLineEdit</class>
322 <property stdset="1">
323 <name>name</name>
324 <cstring>SignaturEdit</cstring>
325 </property>
326 </widget>
327 <widget>
328 <class>QPushButton</class>
329 <property stdset="1">
330 <name>name</name>
331 <cstring>SignaturButton</cstring>
332 </property>
333 <property stdset="1">
334 <name>sizePolicy</name>
335 <sizepolicy>
336 <hsizetype>1</hsizetype>
337 <vsizetype>1</vsizetype>
338 </sizepolicy>
339 </property>
340 <property stdset="1">
341 <name>text</name>
342 <string>F</string>
343 </property>
344 </widget>
345 </hbox>
346 </widget>
330 <spacer> 347 <spacer>
331 <property> 348 <property>
332 <name>name</name> 349 <name>name</name>
333 <cstring>spacer</cstring> 350 <cstring>spacer</cstring>
334 </property> 351 </property>
335 <property stdset="1"> 352 <property stdset="1">
336 <name>orientation</name> 353 <name>orientation</name>
337 <enum>Vertical</enum> 354 <enum>Vertical</enum>
338 </property> 355 </property>
339 <property stdset="1"> 356 <property stdset="1">
340 <name>sizeType</name> 357 <name>sizeType</name>
341 <enum>Expanding</enum> 358 <enum>Expanding</enum>
342 </property> 359 </property>
343 <property> 360 <property>
344 <name>sizeHint</name> 361 <name>sizeHint</name>
345 <size> 362 <size>
346 <width>20</width> 363 <width>20</width>
347 <height>20</height> 364 <height>20</height>
348 </size> 365 </size>
349 </property> 366 </property>
350 </spacer> 367 </spacer>
351 </vbox> 368 </vbox>
352</widget> 369</widget>
353<tabstops> 370<tabstops>
354 <tabstop>accountLine</tabstop> 371 <tabstop>accountLine</tabstop>
355 <tabstop>serverLine</tabstop> 372 <tabstop>serverLine</tabstop>
356 <tabstop>portLine</tabstop> 373 <tabstop>portLine</tabstop>
357 <tabstop>loginBox</tabstop> 374 <tabstop>loginBox</tabstop>
358 <tabstop>userLine</tabstop> 375 <tabstop>userLine</tabstop>
359 <tabstop>passLine</tabstop> 376 <tabstop>passLine</tabstop>
360</tabstops> 377</tabstops>
361</UI> 378</UI>