summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp2
2 files changed, 6 insertions, 0 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 4fff7e1..6be5222 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,541 +1,545 @@
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 1.9.14 ************ 3********** VERSION 1.9.14 ************
4 4
5Fixed some problems with the dialog sizes when switching 5Fixed some problems with the dialog sizes when switching
6portrait/landscape mode on 640x480 PDA display. 6portrait/landscape mode on 640x480 PDA display.
7 7
8Fixed some other small bugs. 8Fixed some other small bugs.
9 9
10Fixed an ugly bug in KOpieMail: 10Fixed an ugly bug in KOpieMail:
11KOpieMail was not able to write files (mails) to MSDOS file system, 11KOpieMail was not able to write files (mails) to MSDOS file system,
12like on an usual preformatted SD card. That should work now. 12like on an usual preformatted SD card. That should work now.
13To save your mail data on the Sd card do the following: 13To save your mail data on the Sd card do the following:
14Create a dir on the SD card: 14Create a dir on the SD card:
15mkdir /mnt/card/localmail 15mkdir /mnt/card/localmail
16Go to your home dir: 16Go to your home dir:
17cd 17cd
18Go to kopiemail data storage dir: 18Go to kopiemail data storage dir:
19cd kdepim/apps/kopiemail 19cd kdepim/apps/kopiemail
20Create a symlink to the SD card: 20Create a symlink to the SD card:
21ls -s /mnt/card/localmail 21ls -s /mnt/card/localmail
22Now KOpieMail will store all mails on the SD card. 22Now KOpieMail will store all mails on the SD card.
23 23
24KO/Pi Monthview: 24KO/Pi Monthview:
25Now "Go to Today" selects the current month from day 1-end, 25Now "Go to Today" selects the current month from day 1-end,
26not the current date + some days. 26not the current date + some days.
27I.e. "Go to Today" shows now always 27I.e. "Go to Today" shows now always
28the current month with first day of month in the first row. 28the current month with first day of month in the first row.
29 29
30Added missing German translation.
31
32Fixed icons of executeable on Wintendo.
33
30 34
31********** VERSION 1.9.13 ************ 35********** VERSION 1.9.13 ************
32 36
33Fixed nasty PwM/Pi file reading bug, when 37Fixed nasty PwM/Pi file reading bug, when
34the used hash algo of file is different then the global 38the used hash algo of file is different then the global
35hash algo. 39hash algo.
36 40
37Added KA/Pi support for opie mailit mailapplication. 41Added KA/Pi support for opie mailit mailapplication.
38 42
39Fixed some bugs in OM/Pi. 43Fixed some bugs in OM/Pi.
40Now character conversion tables are available for the Zaurus 44Now character conversion tables are available for the Zaurus
41to make OM/Pi working properly. 45to make OM/Pi working properly.
42To get the character conversion in OM/Pi working, please download 46To get the character conversion in OM/Pi working, please download
43at the sourceforge project site the package 47at the sourceforge project site the package
44sr-character-conversion_SharpROM_arm.ipk.zip 48sr-character-conversion_SharpROM_arm.ipk.zip
45(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 49(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
46from the section "general files for KDE/Pim" 50from the section "general files for KDE/Pim"
47Instructions how to install this package are in a ReadMe in this file. 51Instructions how to install this package are in a ReadMe in this file.
48 52
49 53
50Fixed the orientation change problem in KA/Pi when switching 54Fixed the orientation change problem in KA/Pi when switching
51portrait/landscape mode. 55portrait/landscape mode.
52 56
53French translation available for KA/Pi and OM/Pi. 57French translation available for KA/Pi and OM/Pi.
54 58
55Fixed some problems with categories in KO/Pi in DTM sync. 59Fixed some problems with categories in KO/Pi in DTM sync.
56 60
57Added selection dialog for export to phone in KA/Pi. 61Added selection dialog for export to phone in KA/Pi.
58 62
59If in KO/Pi is an attendee selected to add to a meeting and this 63If in KO/Pi is an attendee selected to add to a meeting and this
60attendee is already in the list of attendees, this person is not added 64attendee is already in the list of attendees, this person is not added
61again. 65again.
62 66
63Some menu cleanup in KA/Pi. 67Some menu cleanup in KA/Pi.
64 68
65********** VERSION 1.9.12 ************ 69********** VERSION 1.9.12 ************
66 70
67Fix for the bug in KO/Pi What's Next view of version 1.9.11. 71Fix for the bug in KO/Pi What's Next view of version 1.9.11.
68 72
69Bugfix: Licence file is now shown again. 73Bugfix: Licence file is now shown again.
70 74
71OM/Pi now supports Unicode (utf8 charset). 75OM/Pi now supports Unicode (utf8 charset).
72Fixed some bugs in OM/Pi. 76Fixed some bugs in OM/Pi.
73 77
74KA/Pi has more German translation. 78KA/Pi has more German translation.
75 79
76 80
77********** VERSION 1.9.11 ************ 81********** VERSION 1.9.11 ************
78 82
79Fixed several problems in PWM/Pi, like 83Fixed several problems in PWM/Pi, like
80asking the user, if unsaved changed are pending 84asking the user, if unsaved changed are pending
81when closing the app. 85when closing the app.
82And PwM/Pi handles now different texts for the 86And PwM/Pi handles now different texts for the
83fields Description, Username, Password, configurable per category. 87fields Description, Username, Password, configurable per category.
84 88
85Fixed a crash in KO/Pi , when importing/loading vcs files 89Fixed a crash in KO/Pi , when importing/loading vcs files
86which have an entry with an attendee with state: 90which have an entry with an attendee with state:
87NEEDS ACTION 91NEEDS ACTION
88 92
89Fixed some problems in the German translation of OM/Pi, 93Fixed some problems in the German translation of OM/Pi,
90which makes some dialogs not fitting on the screen 94which makes some dialogs not fitting on the screen
91of the Z 5500. 95of the Z 5500.
92 96
93Fixed Qtopia crash, when disabling/deinstalling 97Fixed Qtopia crash, when disabling/deinstalling
94KO/Pi alarm applet. 98KO/Pi alarm applet.
95 99
96Implemented direct KDE<->KA/Pi sync for KA/Pi running 100Implemented direct KDE<->KA/Pi sync for KA/Pi running
97on Linux desktop. 101on Linux desktop.
98 102
99Added feature "remove sync info" to sync menu. 103Added feature "remove sync info" to sync menu.
100 104
101Tweaked the KO/Pi What's next view a bit, added 105Tweaked the KO/Pi What's next view a bit, added
102setting to hide events that are done. 106setting to hide events that are done.
103 107
104Disabled "beam receive enabled" on startup to 108Disabled "beam receive enabled" on startup to
105avoid problems if Fastload is enabled. 109avoid problems if Fastload is enabled.
106Please set "beam receive enabled", 110Please set "beam receive enabled",
107if you want to receive data via IR. 111if you want to receive data via IR.
108 112
109Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 113Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
110on Linux desktop. 114on Linux desktop.
111 115
112Made in KA/Pi scrolling possible, if details view is selected. 116Made in KA/Pi scrolling possible, if details view is selected.
113(The keyboard focus is set automatically to the search line) 117(The keyboard focus is set automatically to the search line)
114 118
115Fixed a bug in DMT sync, that a new entry in DTM was added 119Fixed a bug in DMT sync, that a new entry in DTM was added
116on every sync to Kx/Pi. 120on every sync to Kx/Pi.
117 121
118Fixed missing writing of KA/Pi categories to DMT entries when syncing. 122Fixed missing writing of KA/Pi categories to DMT entries when syncing.
119 123
120Fixed a bug in DMT sync with todos created in KO/Pi containing 124Fixed a bug in DMT sync with todos created in KO/Pi containing
121non-latin1 characters. 125non-latin1 characters.
122 126
123Rearranged package contents of Sharp-ipks and made all 127Rearranged package contents of Sharp-ipks and made all
124packages installable on SD again. 128packages installable on SD again.
125 129
126Fixed the writing of addressbook data in DTM sync. 130Fixed the writing of addressbook data in DTM sync.
127Empty fields in KA/Pi were not removed. 131Empty fields in KA/Pi were not removed.
128 132
129Added better category handling in KA/Pi: 133Added better category handling in KA/Pi:
130Added item 134Added item
131Edit Categories and 135Edit Categories and
132Manage new categories 136Manage new categories
133to the settings menu. 137to the settings menu.
134Possible to configure a view to display categories. 138Possible to configure a view to display categories.
135 139
136Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 140Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
137 141
138Fixed displaying of "free" days and time in KO Monthview and Agendaview. 142Fixed displaying of "free" days and time in KO Monthview and Agendaview.
139 143
140... and many other bugfixes. 144... and many other bugfixes.
141 145
142********** VERSION 1.9.10 ************ 146********** VERSION 1.9.10 ************
143 147
144Many internal small bugfixes. 148Many internal small bugfixes.
145And fix of the "big" bug in KO/Pi, 149And fix of the "big" bug in KO/Pi,
146that after Syncing the appointments had an offset by several hours. 150that after Syncing the appointments had an offset by several hours.
147That was a problem with the internal timezone setting, 151That was a problem with the internal timezone setting,
148introduced by the changed timezone configuration settings. 152introduced by the changed timezone configuration settings.
149 153
150German translation for OM/Pi is now available. 154German translation for OM/Pi is now available.
151 155
152 156
153********** VERSION 1.9.9 ************ 157********** VERSION 1.9.9 ************
154 158
155KDE-Pim/Pi has a new Member! 159KDE-Pim/Pi has a new Member!
156It is called PWM/Pi (Passwordmanager/platform-independent) 160It is called PWM/Pi (Passwordmanager/platform-independent)
157and it is available for the Zaurus. 161and it is available for the Zaurus.
158It is planned, that it will be available later for Windows. 162It is planned, that it will be available later for Windows.
159(And for Linux, of course). 163(And for Linux, of course).
160It is a port of the Passwordmanager of KDE. 164It is a port of the Passwordmanager of KDE.
161It will need the MicroKDElibs to run. 165It will need the MicroKDElibs to run.
162 166
163Made loading of addressbooks in KA/Pi up to 7 times faster! 167Made loading of addressbooks in KA/Pi up to 7 times faster!
164The bigger your addressbook file, the more starting speed 168The bigger your addressbook file, the more starting speed
165will you gain. (relatively) 169will you gain. (relatively)
166 170
167The Qtopia addressbook connector is now platform independend 171The Qtopia addressbook connector is now platform independend
168as well and should work on any platform for importing/exporting 172as well and should work on any platform for importing/exporting
169Qtopia and Opie XML files. 173Qtopia and Opie XML files.
170 174
171Added a +30min feature to the timezone settings to make 175Added a +30min feature to the timezone settings to make
172KDE-Pim/Pi useable in Australia and other parts on the 176KDE-Pim/Pi useable in Australia and other parts on the
173world with strange timezones ;-) 177world with strange timezones ;-)
174 178
175German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 179German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
176 180
177It is now possible to disable the 181It is now possible to disable the
178"receive data via infrared" feature, such that syncing with 182"receive data via infrared" feature, such that syncing with
179Outlook is now possible again with Kx/Pi runing. 183Outlook is now possible again with Kx/Pi runing.
180Please disable it, before syncing Sharp DTM with Outlook. 184Please disable it, before syncing Sharp DTM with Outlook.
181For your convenience, the "receive data via infrared" feature 185For your convenience, the "receive data via infrared" feature
182is disabled automatically, if you sync Kx/Pi with DTM. 186is disabled automatically, if you sync Kx/Pi with DTM.
183You have to enable it again manually after syncing. 187You have to enable it again manually after syncing.
184Enabling this feature makes it impossible to start the 188Enabling this feature makes it impossible to start the
185Sharp DTM apps. If this feature is enabled, you will only get the 189Sharp DTM apps. If this feature is enabled, you will only get the
186alarm notification from KO/Pi and not from the Sharp calendar. 190alarm notification from KO/Pi and not from the Sharp calendar.
187This is very useful if you sync KO/Pi with Sharp DTM, 191This is very useful if you sync KO/Pi with Sharp DTM,
188because after syncing you usually would get notified about 192because after syncing you usually would get notified about
189an alarm by KO/Pi and the Sharp Calendar. 193an alarm by KO/Pi and the Sharp Calendar.
190 194
191Together with the Linux desktop version of KO/Pi 195Together with the Linux desktop version of KO/Pi
192it is now possible to sync KO/Pi on the Zaurus 196it is now possible to sync KO/Pi on the Zaurus
193with the complete KDE-desktop (3.3 or later) 197with the complete KDE-desktop (3.3 or later)
194calendar data easily. 198calendar data easily.
195That makes it possible to sync the Z with one 199That makes it possible to sync the Z with one
196click of a mouse with the KDE-Desktop. 200click of a mouse with the KDE-Desktop.
197This feature it available for all Zaurus platforms KO/Pi 201This feature it available for all Zaurus platforms KO/Pi
198is running on. 202is running on.
199The only thing needed is a running KO/Pi on Linux and 203The only thing needed is a running KO/Pi on Linux and
200a compiled version of the small 204a compiled version of the small
201KDE-Pim/Pi<->KDE-Desktop access command line program, 205KDE-Pim/Pi<->KDE-Desktop access command line program,
202which is in the KDE-Pim/Pi sources available. 206which is in the KDE-Pim/Pi sources available.
203 207
204The "KDE-desktop" syncing feature for KA/Pi will follow 208The "KDE-desktop" syncing feature for KA/Pi will follow
205in the next releases. 209in the next releases.
206 210
207Fixed the vcard export bug, which had the version 1.9.8. 211Fixed the vcard export bug, which had the version 1.9.8.
208 212
209Added missing GERMAN translation to KO/Pi. 213Added missing GERMAN translation to KO/Pi.
210Hi PsionX, could you add the missing french translation?Thx! 214Hi PsionX, could you add the missing french translation?Thx!
211 215
212Translation files for KA/Pi are available as well. 216Translation files for KA/Pi are available as well.
213GERMAN translation will be available in the next release. 217GERMAN translation will be available in the next release.
214PsionX ( yres, you again ;-) ), could you start translating 218PsionX ( yres, you again ;-) ), could you start translating
215KA/Pi? Thx! 219KA/Pi? Thx!
216 220
217You can download the version 1.9.9 at 221You can download the version 1.9.9 at
218 222
219http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 223http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
220 224
221Note: 225Note:
222To run the mail program OM/Pi you need libopenssl. 226To run the mail program OM/Pi you need libopenssl.
223A link to a download loaction is available at 227A link to a download loaction is available at
224ZSI at www.killefiz.de 228ZSI at www.killefiz.de
225 229
226 230
227********** VERSION 1.9.8 ************ 231********** VERSION 1.9.8 ************
228 232
229Fixed character decoding in OM/Pi. 233Fixed character decoding in OM/Pi.
230(e.g. German "Umlaute" were not displayed properly.) 234(e.g. German "Umlaute" were not displayed properly.)
231 235
232Made is possible to reparent todos in KO/Pi. 236Made is possible to reparent todos in KO/Pi.
233Use contextmenu or keys (look at Help-Keys + Colors) for that. 237Use contextmenu or keys (look at Help-Keys + Colors) for that.
234 238
235Added the missing Sync-Howto and WhatsNew to the packages. 239Added the missing Sync-Howto and WhatsNew to the packages.
236 240
237KO/Pi on Linux desktop can now sync with KDE desktop. 241KO/Pi on Linux desktop can now sync with KDE desktop.
238That means: When using KO/Pi on Linux desktop for syncing with 242That means: When using KO/Pi on Linux desktop for syncing with
239KDE desktop and the Zaurus, the Zaurus can be synced now 243KDE desktop and the Zaurus, the Zaurus can be synced now
240with all KDE-Calendar resources, not only with one local file. 244with all KDE-Calendar resources, not only with one local file.
241(That makes it possible to sync the Zaurus with the 245(That makes it possible to sync the Zaurus with the
242calendar data on a Kolab server) 246calendar data on a Kolab server)
243 247
244KA/Pi syncing with KDE desktop will be available in the next version. 248KA/Pi syncing with KDE desktop will be available in the next version.
245 249
246 250
247********** VERSION 1.9.7 ************ 251********** VERSION 1.9.7 ************
248 252
249KO/Pi - KA/Pi on Windows: 253KO/Pi - KA/Pi on Windows:
250Now a directory can be defined by the user, where the 254Now a directory can be defined by the user, where the
251application/config data should be saved. 255application/config data should be saved.
252 Define your desired path in the evironment variable 256 Define your desired path in the evironment variable
253 MICROKDEHOME 257 MICROKDEHOME
254 before starting KO/Pi or KA/Pi. 258 before starting KO/Pi or KA/Pi.
255 259
256An easy Kx/Pi to Kx/Pi syncing is now possible 260An easy Kx/Pi to Kx/Pi syncing is now possible
257(it is called Pi-Sync) via network. 261(it is called Pi-Sync) via network.
258Please look at the Sync Howto. 262Please look at the Sync Howto.
259 263
260Exporting of calendar data and contacts to mobile phones is now possible. 264Exporting of calendar data and contacts to mobile phones is now possible.
261The SyncHowto is updated with information howto 265The SyncHowto is updated with information howto
262access/sync mobile phones. 266access/sync mobile phones.
263Please look at the Sync Howto. 267Please look at the Sync Howto.
264 268
265Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 269Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
266Please disable Fastload for the original contact/calendar applications 270Please disable Fastload for the original contact/calendar applications
267and close them. 271and close them.
268KO/Pi and KA/Pi must be running in order to receive the data. 272KO/Pi and KA/Pi must be running in order to receive the data.
269(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 273(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
270 274
271In the KA/Pi details view are now the preferred tel. numbers displayed on top 275In the KA/Pi details view are now the preferred tel. numbers displayed on top
272of the other data ( emails/tel.numbers/addresses) 276of the other data ( emails/tel.numbers/addresses)
273 277
274Fixed some syncing problems in KA/Pi. 278Fixed some syncing problems in KA/Pi.
275 279
276Added font settings for the KA/Pi details view. 280Added font settings for the KA/Pi details view.
277Added fields "children's name" and "gender" to KA/Pi. 281Added fields "children's name" and "gender" to KA/Pi.
278 282
279Made searching in KA/Pi better: 283Made searching in KA/Pi better:
280Now the first item in a view is selected after a search automatically and 284Now the first item in a view is selected after a search automatically and
281the views can be scrolled up/down when the search input field has the keyboard focus. 285the views can be scrolled up/down when the search input field has the keyboard focus.
282 286
283And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 287And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
284 288
285 289
286********** VERSION 1.9.6 ************ 290********** VERSION 1.9.6 ************
287 291
288Changes in the external application communication on the Zaurus 292Changes in the external application communication on the Zaurus
289in order to use less RAM when the apps are running. 293in order to use less RAM when the apps are running.
290First syncing of addressbooks (KA/Pi) is possible. 294First syncing of addressbooks (KA/Pi) is possible.
291 295
292 296
293********** VERSION 1.9.5a ************ 297********** VERSION 1.9.5a ************
294 298
295Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 299Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
296Fixed some small bugs. 300Fixed some small bugs.
297KA/Pi shows now the birthday in summary view. 301KA/Pi shows now the birthday in summary view.
298Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 302Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
299for displaying dates. 303for displaying dates.
300 304
301 305
302********** VERSION 1.9.5 ************ 306********** VERSION 1.9.5 ************
303 307
304There is still no Addressbook syncing! 308There is still no Addressbook syncing!
305 309
306New in 1.9.5: 310New in 1.9.5:
307 311
308Many bugfixes. 312Many bugfixes.
309Better searching in KA/Pi. 313Better searching in KA/Pi.
310You can configure in KA/Pi if you want to search only after 314You can configure in KA/Pi if you want to search only after
311<return> key pressed. 315<return> key pressed.
312 316
313Better mail downloading in OM/Pi. 317Better mail downloading in OM/Pi.
314 318
315First experimental alpha version of sync of KO/Pi with mobile phones. 319First experimental alpha version of sync of KO/Pi with mobile phones.
316See gammu documentation for supported phones. 320See gammu documentation for supported phones.
317You 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. 321You 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.
318Quick hint how to use: 322Quick hint how to use:
319NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 323NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
320Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 324Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
321Create syncprofile - mobile device 325Create syncprofile - mobile device
322Remove entry for model. (Leave empty ). 326Remove entry for model. (Leave empty ).
323Enable infrared on Zaurus and your Phone. 327Enable infrared on Zaurus and your Phone.
324Sync. 328Sync.
325To get a more detailed log, start kopi from konsole. 329To get a more detailed log, start kopi from konsole.
326 330
327********** VERSION 1.9.4 ************ 331********** VERSION 1.9.4 ************
328 332
329This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 333This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
330 334
331WARNING: 335WARNING:
332PLEASE BACKUP ALL YOUR DATA! 336PLEASE BACKUP ALL YOUR DATA!
333We have changed a lot and maybe there are some unknown problems. 337We have changed a lot and maybe there are some unknown problems.
334 338
335SYNC HANDLING HAS CHANGED! 339SYNC HANDLING HAS CHANGED!
336Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 340Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
337(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 341(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
338 342
339You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 343You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
340If 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. 344If 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.
341 345
342As programs are available: 346As programs are available:
343KO/Pi (korganizer ipk) - a calendar program. 347KO/Pi (korganizer ipk) - a calendar program.
344KA/Pi (kaddressbook ipk ) - an addressbook 348KA/Pi (kaddressbook ipk ) - an addressbook
345OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 349OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
346 350
347An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 351An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
348(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 352(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
349 353
350All the applications are installed in a "Pim" TAB. 354All the applications are installed in a "Pim" TAB.
351If 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 355If 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
352 356
353All the application are integrated. 357All the application are integrated.
354Such 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. 358Such 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.
355 359
356HINT: 360HINT:
357If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. 361If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number.
358 362
359What's new? 363What's new?
360 364
361SYNC HANDLING HAS CHANGED! 365SYNC HANDLING HAS CHANGED!
362Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 366Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
363(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 367(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
364 368
365New in OM/Pi: 369New in OM/Pi:
366When 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. 370When 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.
367 371
368New in KO/Pi: 372New in KO/Pi:
369French is now available for KO/Pi. 373French is now available for KO/Pi.
370Choose menu:Actions - Configure:TAB locale 374Choose menu:Actions - Configure:TAB locale
371Syncing has changed. 375Syncing has changed.
372Phone sync available soon. 376Phone sync available soon.
373Not much changes, I cannot remember them ... 377Not much changes, I cannot remember them ...
374 378
375New in KA/Pi: 379New in KA/Pi:
376Beaming possible. 380Beaming possible.
377Sharp DTM readonly access possible( create a new DTM resource ); 381Sharp DTM readonly access possible( create a new DTM resource );
378Better searching possible. 382Better searching possible.
379Search is performed only after pressing the return key. 383Search is performed only after pressing the return key.
380Use wildcard * to specify parts of a name. 384Use wildcard * to specify parts of a name.
381 385
382Better 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 * . 386Better 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 * .
383 387
384A big improvement is the new management of the contact access. 388A big improvement is the new management of the contact access.
385In version 1.9.3, every application was using their own addressbook access data. 389In version 1.9.3, every application was using their own addressbook access data.
386That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. 390That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi.
387That was wasting of memory, if you had several hundreds of contacts. 391That was wasting of memory, if you had several hundreds of contacts.
388 392
389Now only KA/Pi accesses the addressbook. 393Now only KA/Pi accesses the addressbook.
390If 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. 394If 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.
391If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. 395If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly.
392That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. 396That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first.
393 397
394New in the KO/Pi alarm applet: 398New in the KO/Pi alarm applet:
395Configure your own timer popup menu! 399Configure your own timer popup menu!
396(Text and minutes for timer countdown) 400(Text and minutes for timer countdown)
397Just edit the file 401Just edit the file
398(yourhomedir)/.kopialarmtimerrc 402(yourhomedir)/.kopialarmtimerrc
399and start/stop a timer to get a new menu with the data of this file. 403and start/stop a timer to get a new menu with the data of this file.
400 404
401********** VERSION 1.9.3 ************ 405********** VERSION 1.9.3 ************
4021) 4061)
403Now KO/Pi on Windows imports directly the calendar data of 407Now KO/Pi on Windows imports directly the calendar data of
404an installed Outlook. Should work with OL version >= 2000. 408an installed Outlook. Should work with OL version >= 2000.
405 409
406********** VERSION 1.9.2 ************ 410********** VERSION 1.9.2 ************
4071) 4111)
408KDE-Pim/Pi has got a new member: 412KDE-Pim/Pi has got a new member:
409KmicroMail (KM/Pi) is a mail program, 413KmicroMail (KM/Pi) is a mail program,
410which can handle IMAP and POP mail access. 414which can handle IMAP and POP mail access.
411It is based on Opie-Mail v3. 415It is based on Opie-Mail v3.
412All dependencies to the Opie libraries ar removed, 416All dependencies to the Opie libraries ar removed,
413such that no additional Opie lib is needed. 417such that no additional Opie lib is needed.
414It is already integrated in KO/Pi and KA/Pi. 418It is already integrated in KO/Pi and KA/Pi.
415It it now available for the Zaurus,probably it 419It it now available for the Zaurus,probably it
416will be available for other platforms later. 420will be available for other platforms later.
417Hint: 421Hint:
418Create your own contact (name + email) 422Create your own contact (name + email)
419in KA/Pi, select this contact and choose menu: 423in KA/Pi, select this contact and choose menu:
420Settings - Set Who Am I. 424Settings - Set Who Am I.
421Now the settings of this contact are used as 425Now the settings of this contact are used as
422the sender data in KM/Pi. 426the sender data in KM/Pi.
4232) 4272)
424KDE-Pim/Pi is split up in five different 428KDE-Pim/Pi is split up in five different
425packages now precompiled for Sharp Zaurus: 429packages now precompiled for Sharp Zaurus:
426--kmicrokdelibs_1.9.2_arm.ipk 430--kmicrokdelibs_1.9.2_arm.ipk
427The libs are needed for any 431The libs are needed for any
428of the following programs: 432of the following programs:
429--kaddressbook_1.9.2_arm.ipk 433--kaddressbook_1.9.2_arm.ipk
430--kmicromail_1.9.2_arm.ipk 434--kmicromail_1.9.2_arm.ipk
431--korganizer_1.9.2_arm.ipk 435--korganizer_1.9.2_arm.ipk
432Independ from that, there is the alarm applet 436Independ from that, there is the alarm applet
433available for KO/Pi, which also offers 437available for KO/Pi, which also offers
434quick access for a new mail or 438quick access for a new mail or
435showing the addressbook.: 439showing the addressbook.:
436--korganizer-alarm_1.9.2_arm.ipk 440--korganizer-alarm_1.9.2_arm.ipk
437Independend means, that the alarm applet 441Independend means, that the alarm applet
438does not need any of the libs or programs above to run. 442does not need any of the libs or programs above to run.
439But it would be quite useless without these programs. 443But it would be quite useless without these programs.
440NOTE: 444NOTE:
441If you get a 445If you get a
442"This application depends on other programs" 446"This application depends on other programs"
443during installation of 447during installation of
444--kmicrokdelibs_1.9.2_arm.ipk 448--kmicrokdelibs_1.9.2_arm.ipk
445you probably do not have to care about that. 449you probably do not have to care about that.
446kmicrokdelibs_1.9.2 will come with some 450kmicrokdelibs_1.9.2 will come with some
447resource plugins, which needs additional libraries. 451resource plugins, which needs additional libraries.
448(E.g. libopie1, if you want to use the 452(E.g. libopie1, if you want to use the
449opie resource connector in KA/Pi). 453opie resource connector in KA/Pi).
450If you do not have this libraries installed, 454If you do not have this libraries installed,
451you simply cannot use the resource. 455you simply cannot use the resource.
452To make it clear: 456To make it clear:
453If the libraries are missing, the applications 457If the libraries are missing, the applications
454using kmicrokdelibs will start, 458using kmicrokdelibs will start,
455because the resources are plugins. 459because the resources are plugins.
4563) 4603)
457KO/Pi and friends are now installable on SD-Card! 461KO/Pi and friends are now installable on SD-Card!
458It is recommended to install all libs and apps 462It is recommended to install all libs and apps
459on the SD card or all in the internal storage. 463on the SD card or all in the internal storage.
460There may be problems, if this is mixed. 464There may be problems, if this is mixed.
4614) 4654)
462Fixed two bugs in the alarm notification on Windows. 466Fixed two bugs in the alarm notification on Windows.
4635) 4675)
464Great improvement! 468Great improvement!
465KO/Pi uses now the latest version of libical. 469KO/Pi uses now the latest version of libical.
466Libical is the library which actually reads 470Libical is the library which actually reads
467the calendar files and extract the data from it. 471the calendar files and extract the data from it.
468With the old version, there were problems 472With the old version, there were problems
469(crashes or program hangs) when licical did read 473(crashes or program hangs) when licical did read
470files, which were not stored from KO/Pi. 474files, which were not stored from KO/Pi.
471I do not know, if the new libical works perfect, 475I do not know, if the new libical works perfect,
472but actually it works much better than 476but actually it works much better than
473the old version. 477the old version.
474There are no problems with compatibility with 478There are no problems with compatibility with
475old calendar files of KO/Pi, of course! 479old calendar files of KO/Pi, of course!
4766) 4806)
477New in KA/Pi: 481New in KA/Pi:
478Opie addressbook resource connector available! 482Opie addressbook resource connector available!
479You will need libopie1 and the opie addressbook, 483You will need libopie1 and the opie addressbook,
480of course. 484of course.
481With the Opie addressbook resource connector, 485With the Opie addressbook resource connector,
482you can access the Opie addressbook readonly in KA/Pi. 486you can access the Opie addressbook readonly in KA/Pi.
483If you want to edit or import the data into KA/Pi, 487If you want to edit or import the data into KA/Pi,
484do this: 488do this:
485a) Create an Opie resource. 489a) Create an Opie resource.
486 (Menu: Settings-Configure Resources). 490 (Menu: Settings-Configure Resources).
487After configuration and restarting KA/Pi you should see 491After configuration and restarting KA/Pi you should see
488the Opie contacts in KA/Pi. 492the Opie contacts in KA/Pi.
489b) Select some or all Opie contacts. 493b) Select some or all Opie contacts.
490(NOTE: +++++ 494(NOTE: +++++
491To know exactly, what contacts are Opie contacts, 495To know exactly, what contacts are Opie contacts,
492do this: Choose menu: 496do this: Choose menu:
493View-Modify View - TAB Fields. 497View-Modify View - TAB Fields.
494Select in the above list "Resource" and click 498Select in the above list "Resource" and click
495down arrow to add it to the "Selected fields". 499down arrow to add it to the "Selected fields".
496Click OK. 500Click OK.
497Now you have a new column "Resource" in your list, 501Now you have a new column "Resource" in your list,
498where you can see, what an Opie resource is. 502where you can see, what an Opie resource is.
499++++ NOTE end.) 503++++ NOTE end.)
500Ok, we do have now some Opie contacts seleted. 504Ok, we do have now some Opie contacts seleted.
501(Use SHIFT or CTRL key in order to multiple select). 505(Use SHIFT or CTRL key in order to multiple select).
502c) Choose menu: Edit-Copy. 506c) Choose menu: Edit-Copy.
503d) Choose menu: Edit-Paste. 507d) Choose menu: Edit-Paste.
504e) Select the resource, you want to add the contacts to. 508e) Select the resource, you want to add the contacts to.
505Congrats! Now you have read/write access to the copied 509Congrats! Now you have read/write access to the copied
506opie contacts as "real" KA/Pi contacts. 510opie contacts as "real" KA/Pi contacts.
507 511
508 512
509********** VERSION 1.9.1 ************ 513********** VERSION 1.9.1 ************
5101) 5141)
511 +++ IMPORTANT 1 +++ 515 +++ IMPORTANT 1 +++
512 516
513The storing place of the default calendar 517The storing place of the default calendar
514file has changed! 518file has changed!
515The default calendar file was 519The default calendar file was
516Applications/korganizer/mycalendar.ics 520Applications/korganizer/mycalendar.ics
517on Zaurus and 521on Zaurus and
518(yourHomeDir)/korganizer/mycalendar.ics 522(yourHomeDir)/korganizer/mycalendar.ics
519on Windows/Linux desktop. Now it is 523on Windows/Linux desktop. Now it is
520(yourHomeDir)/kdepim/korganizer/mycalendar.ics 524(yourHomeDir)/kdepim/korganizer/mycalendar.ics
521on Zaurus, Windows and Linux. 525on Zaurus, Windows and Linux.
522To load the old file, choose menu 526To load the old file, choose menu
523File-Load calendar backup. 527File-Load calendar backup.
524(It should be loaded automatically 528(It should be loaded automatically
525at startup with a warning message displayed). 529at startup with a warning message displayed).
526The place of the configuration file has changed too. 530The place of the configuration file has changed too.
527If you want to use your old KO/Pi config, 531If you want to use your old KO/Pi config,
528copy it to 532copy it to
529(yourHomeDir)/kdepim/config/korganizerrc 533(yourHomeDir)/kdepim/config/korganizerrc
530Please read VERSION 1.9.0 - topic 3) as well! 534Please read VERSION 1.9.0 - topic 3) as well!
531 535
532 +++ IMPORTANT 2 +++ 536 +++ IMPORTANT 2 +++
533 537
534Because of the new paths, you will need 538Because of the new paths, you will need
535a new version of the KO/Pi alarm applet 539a new version of the KO/Pi alarm applet
536for Zaurus. 540for Zaurus.
537Use version >= 1.9.1 541Use version >= 1.9.1
538 542
5392) 5432)
540Now the QWhat'sThis Icon works for items 544Now the QWhat'sThis Icon works for items
541in the month view as well. 545in the month view as well.
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index da7065f..b890725 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -1,561 +1,563 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2#include <stdlib.h> 2#include <stdlib.h>
3#include <libetpan/libetpan.h> 3#include <libetpan/libetpan.h>
4#include <qpe/global.h> 4#include <qpe/global.h>
5#include <qapplication.h> 5#include <qapplication.h>
6#include "imapwrapper.h" 6#include "imapwrapper.h"
7#include "mailtypes.h" 7#include "mailtypes.h"
8#include "logindialog.h" 8#include "logindialog.h"
9#include <qprogressbar.h> 9#include <qprogressbar.h>
10#include "genericwrapper.h" 10#include "genericwrapper.h"
11#include <kglobal.h> 11#include <kglobal.h>
12 12
13using namespace Opie::Core; 13using namespace Opie::Core;
14int IMAPwrapper::mMax = 0; 14int IMAPwrapper::mMax = 0;
15int IMAPwrapper::mCurrent = 0; 15int IMAPwrapper::mCurrent = 0;
16 16
17IMAPwrapper::IMAPwrapper( IMAPaccount *a ) 17IMAPwrapper::IMAPwrapper( IMAPaccount *a )
18 : AbstractMail() 18 : AbstractMail()
19{ 19{
20 account = a; 20 account = a;
21 m_imap = 0; 21 m_imap = 0;
22 m_Lastmbox = ""; 22 m_Lastmbox = "";
23 mCurrent = 0; 23 mCurrent = 0;
24 mMax = 0; 24 mMax = 0;
25} 25}
26 26
27IMAPwrapper::~IMAPwrapper() 27IMAPwrapper::~IMAPwrapper()
28{ 28{
29 logout(); 29 logout();
30} 30}
31 31
32/* to avoid to often select statements in loops etc. 32/* to avoid to often select statements in loops etc.
33 we trust that we are logged in and connection is established!*/ 33 we trust that we are logged in and connection is established!*/
34int IMAPwrapper::selectMbox(const QString&mbox) 34int IMAPwrapper::selectMbox(const QString&mbox)
35{ 35{
36 if (mbox == m_Lastmbox) { 36 if (mbox == m_Lastmbox) {
37 return MAILIMAP_NO_ERROR; 37 return MAILIMAP_NO_ERROR;
38 } 38 }
39 int err = mailimap_select( m_imap, (char*)mbox.latin1()); 39 int err = mailimap_select( m_imap, (char*)mbox.latin1());
40 if ( err != MAILIMAP_NO_ERROR ) { 40 if ( err != MAILIMAP_NO_ERROR ) {
41 m_Lastmbox = ""; 41 m_Lastmbox = "";
42 return err; 42 return err;
43 } 43 }
44 m_Lastmbox = mbox; 44 m_Lastmbox = mbox;
45 return err; 45 return err;
46} 46}
47 47
48void IMAPwrapper::imap_progress( size_t current, size_t maximum ) 48void IMAPwrapper::imap_progress( size_t current, size_t maximum )
49{ 49{
50 qApp->processEvents();
51 return;
50 //qDebug("imap progress %d of %d ",current,maximum ); 52 //qDebug("imap progress %d of %d ",current,maximum );
51 //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum)); 53 //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum));
52 //qApp->processEvents() 54 //qApp->processEvents()
53 static unsigned int last = 0; 55 static unsigned int last = 0;
54 if ( last != current ) 56 if ( last != current )
55 IMAPwrapper::progress(); 57 IMAPwrapper::progress();
56 last = current; 58 last = current;
57} 59}
58void IMAPwrapper::progress( QString m ) 60void IMAPwrapper::progress( QString m )
59{ 61{
60 62
61 static QString mProgrMess; 63 static QString mProgrMess;
62 if ( m != QString::null ) { 64 if ( m != QString::null ) {
63 mProgrMess = m; 65 mProgrMess = m;
64 mCurrent = 1; 66 mCurrent = 1;
65 return; 67 return;
66 } 68 }
67 QString mess; 69 QString mess;
68 //qDebug("progress "); 70 //qDebug("progress ");
69 if ( mMax ) mess = mProgrMess +i18n(" message %1 of %2").arg( mCurrent++).arg(mMax); 71 if ( mMax ) mess = mProgrMess +i18n(" message %1 of %2").arg( mCurrent++).arg(mMax);
70 else mess = mProgrMess +i18n(" message %1").arg( mCurrent++); 72 else mess = mProgrMess +i18n(" message %1").arg( mCurrent++);
71 Global::statusMessage(mess); 73 Global::statusMessage(mess);
72 //qDebug("Progress %s %s", mess.latin1(), m.latin1()); 74 //qDebug("Progress %s %s", mess.latin1(), m.latin1());
73 qApp->processEvents(); 75 qApp->processEvents();
74} 76}
75bool IMAPwrapper::start_tls(bool force_tls) 77bool IMAPwrapper::start_tls(bool force_tls)
76{ 78{
77 int err; 79 int err;
78 bool try_tls = force_tls; 80 bool try_tls = force_tls;
79 mailimap_capability_data * cap_data = 0; 81 mailimap_capability_data * cap_data = 0;
80 82
81 err = mailimap_capability(m_imap,&cap_data); 83 err = mailimap_capability(m_imap,&cap_data);
82 if (err != MAILIMAP_NO_ERROR) { 84 if (err != MAILIMAP_NO_ERROR) {
83 Global::statusMessage("error getting capabilities!"); 85 Global::statusMessage("error getting capabilities!");
84 return false; 86 return false;
85 } 87 }
86 clistiter * cur; 88 clistiter * cur;
87 for(cur = clist_begin(cap_data->cap_list) ; cur != NULL;cur = clist_next(cur)) { 89 for(cur = clist_begin(cap_data->cap_list) ; cur != NULL;cur = clist_next(cur)) {
88 struct mailimap_capability * cap; 90 struct mailimap_capability * cap;
89 cap = (struct mailimap_capability *)clist_content(cur); 91 cap = (struct mailimap_capability *)clist_content(cur);
90 if (cap->cap_type == MAILIMAP_CAPABILITY_NAME) { 92 if (cap->cap_type == MAILIMAP_CAPABILITY_NAME) {
91 if (strcasecmp(cap->cap_data.cap_name, "STARTTLS") == 0) { 93 if (strcasecmp(cap->cap_data.cap_name, "STARTTLS") == 0) {
92 try_tls = true; 94 try_tls = true;
93 break; 95 break;
94 } 96 }
95 } 97 }
96 } 98 }
97 if (cap_data) { 99 if (cap_data) {
98 mailimap_capability_data_free(cap_data); 100 mailimap_capability_data_free(cap_data);
99 } 101 }
100 if (try_tls) { 102 if (try_tls) {
101 err = mailimap_starttls(m_imap); 103 err = mailimap_starttls(m_imap);
102 if (err != MAILIMAP_NO_ERROR && force_tls) { 104 if (err != MAILIMAP_NO_ERROR && force_tls) {
103 Global::statusMessage(i18n("Server has no TLS support!")); 105 Global::statusMessage(i18n("Server has no TLS support!"));
104 try_tls = false; 106 try_tls = false;
105 } else { 107 } else {
106 mailstream_low * low; 108 mailstream_low * low;
107 mailstream_low * new_low; 109 mailstream_low * new_low;
108 low = mailstream_get_low(m_imap->imap_stream); 110 low = mailstream_get_low(m_imap->imap_stream);
109 if (!low) { 111 if (!low) {
110 try_tls = false; 112 try_tls = false;
111 } else { 113 } else {
112 int fd = mailstream_low_get_fd(low); 114 int fd = mailstream_low_get_fd(low);
113 if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) { 115 if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) {
114 mailstream_low_free(low); 116 mailstream_low_free(low);
115 mailstream_set_low(m_imap->imap_stream, new_low); 117 mailstream_set_low(m_imap->imap_stream, new_low);
116 } else { 118 } else {
117 try_tls = false; 119 try_tls = false;
118 } 120 }
119 } 121 }
120 } 122 }
121 } 123 }
122 return try_tls; 124 return try_tls;
123} 125}
124 126
125void IMAPwrapper::login() 127void IMAPwrapper::login()
126{ 128{
127 QString server, user, pass; 129 QString server, user, pass;
128 uint16_t port; 130 uint16_t port;
129 int err = MAILIMAP_NO_ERROR; 131 int err = MAILIMAP_NO_ERROR;
130 132
131 if (account->getOffline()) return; 133 if (account->getOffline()) return;
132 /* we are connected this moment */ 134 /* we are connected this moment */
133 /* TODO: setup a timer holding the line or if connection closed - delete the value */ 135 /* TODO: setup a timer holding the line or if connection closed - delete the value */
134 if (m_imap) { 136 if (m_imap) {
135 err = mailimap_noop(m_imap); 137 err = mailimap_noop(m_imap);
136 if (err!=MAILIMAP_NO_ERROR) { 138 if (err!=MAILIMAP_NO_ERROR) {
137 logout(); 139 logout();
138 } else { 140 } else {
139 mailstream_flush(m_imap->imap_stream); 141 mailstream_flush(m_imap->imap_stream);
140 return; 142 return;
141 } 143 }
142 } 144 }
143 server = account->getServer(); 145 server = account->getServer();
144 port = account->getPort().toUInt(); 146 port = account->getPort().toUInt();
145 if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { 147 if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) {
146 LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); 148 LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true );
147 login.show(); 149 login.show();
148 if ( QDialog::Accepted == login.exec() ) { 150 if ( QDialog::Accepted == login.exec() ) {
149 // ok 151 // ok
150 user = login.getUser(); 152 user = login.getUser();
151 pass = login.getPassword(); 153 pass = login.getPassword();
152 } else { 154 } else {
153 // cancel 155 // cancel
154 return; 156 return;
155 } 157 }
156 } else { 158 } else {
157 user = account->getUser(); 159 user = account->getUser();
158 pass = account->getPassword(); 160 pass = account->getPassword();
159 } 161 }
160 162
161 m_imap = mailimap_new( 20, &imap_progress ); 163 m_imap = mailimap_new( 20, &imap_progress );
162 164
163 /* connect */ 165 /* connect */
164 bool ssl = false; 166 bool ssl = false;
165 bool try_tls = false; 167 bool try_tls = false;
166 bool force_tls = false; 168 bool force_tls = false;
167 169
168 if ( account->ConnectionType() == 2 ) { 170 if ( account->ConnectionType() == 2 ) {
169 ssl = true; 171 ssl = true;
170 } 172 }
171 if (account->ConnectionType()==1) { 173 if (account->ConnectionType()==1) {
172 force_tls = true; 174 force_tls = true;
173 } 175 }
174 176
175 if ( ssl ) { 177 if ( ssl ) {
176 qDebug("using ssl "); 178 qDebug("using ssl ");
177 err = mailimap_ssl_connect( m_imap, (char*)server.latin1(), port ); 179 err = mailimap_ssl_connect( m_imap, (char*)server.latin1(), port );
178 qDebug("back "); 180 qDebug("back ");
179 } else { 181 } else {
180 err = mailimap_socket_connect( m_imap, (char*)server.latin1(), port ); 182 err = mailimap_socket_connect( m_imap, (char*)server.latin1(), port );
181 } 183 }
182 184
183 if ( err != MAILIMAP_NO_ERROR && 185 if ( err != MAILIMAP_NO_ERROR &&
184 err != MAILIMAP_NO_ERROR_AUTHENTICATED && 186 err != MAILIMAP_NO_ERROR_AUTHENTICATED &&
185 err != MAILIMAP_NO_ERROR_NON_AUTHENTICATED ) { 187 err != MAILIMAP_NO_ERROR_NON_AUTHENTICATED ) {
186 QString failure = ""; 188 QString failure = "";
187 if (err == MAILIMAP_ERROR_CONNECTION_REFUSED) { 189 if (err == MAILIMAP_ERROR_CONNECTION_REFUSED) {
188 failure="Connection refused"; 190 failure="Connection refused";
189 } else { 191 } else {
190 failure="Unknown failure"; 192 failure="Unknown failure";
191 } 193 }
192 Global::statusMessage(i18n("error connecting imap server: %1").arg(failure)); 194 Global::statusMessage(i18n("error connecting imap server: %1").arg(failure));
193 mailimap_free( m_imap ); 195 mailimap_free( m_imap );
194 m_imap = 0; 196 m_imap = 0;
195 return; 197 return;
196 } 198 }
197 199
198 if (!ssl) { 200 if (!ssl) {
199 try_tls = start_tls(force_tls); 201 try_tls = start_tls(force_tls);
200 } 202 }
201 203
202 bool ok = true; 204 bool ok = true;
203 if (force_tls && !try_tls) { 205 if (force_tls && !try_tls) {
204 Global::statusMessage(i18n("Server has no TLS support!")); 206 Global::statusMessage(i18n("Server has no TLS support!"));
205 ok = false; 207 ok = false;
206 } 208 }
207 209
208 210
209 /* login */ 211 /* login */
210 212
211 if (ok) { 213 if (ok) {
212 err = mailimap_login_simple( m_imap, (char*)user.latin1(), (char*)pass.latin1() ); 214 err = mailimap_login_simple( m_imap, (char*)user.latin1(), (char*)pass.latin1() );
213 if ( err != MAILIMAP_NO_ERROR ) { 215 if ( err != MAILIMAP_NO_ERROR ) {
214 Global::statusMessage(i18n("error logging in imap server: %1").arg(m_imap->imap_response)); 216 Global::statusMessage(i18n("error logging in imap server: %1").arg(m_imap->imap_response));
215 ok = false; 217 ok = false;
216 } 218 }
217 } 219 }
218 if (!ok) { 220 if (!ok) {
219 err = mailimap_close( m_imap ); 221 err = mailimap_close( m_imap );
220 mailimap_free( m_imap ); 222 mailimap_free( m_imap );
221 m_imap = 0; 223 m_imap = 0;
222 } 224 }
223} 225}
224 226
225void IMAPwrapper::logout() 227void IMAPwrapper::logout()
226{ 228{
227 int err = MAILIMAP_NO_ERROR; 229 int err = MAILIMAP_NO_ERROR;
228 if (!m_imap) return; 230 if (!m_imap) return;
229 err = mailimap_logout( m_imap ); 231 err = mailimap_logout( m_imap );
230 err = mailimap_close( m_imap ); 232 err = mailimap_close( m_imap );
231 mailimap_free( m_imap ); 233 mailimap_free( m_imap );
232 m_imap = 0; 234 m_imap = 0;
233 m_Lastmbox = ""; 235 m_Lastmbox = "";
234} 236}
235 237
236void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb) 238void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb)
237{ 239{
238 240
239 int tryAgain = 1; 241 int tryAgain = 1;
240 while ( tryAgain >= 0 ) { 242 while ( tryAgain >= 0 ) {
241 int err = MAILIMAP_NO_ERROR; 243 int err = MAILIMAP_NO_ERROR;
242 clist *result = 0; 244 clist *result = 0;
243 clistcell *current; 245 clistcell *current;
244 mailimap_fetch_type *fetchType = 0; 246 mailimap_fetch_type *fetchType = 0;
245 mailimap_set *set = 0; 247 mailimap_set *set = 0;
246 248
247 login(); 249 login();
248 if (!m_imap) { 250 if (!m_imap) {
249 return; 251 return;
250 } 252 }
251 /* select mailbox READONLY for operations */ 253 /* select mailbox READONLY for operations */
252 err = selectMbox(mailbox); 254 err = selectMbox(mailbox);
253 if ( err != MAILIMAP_NO_ERROR ) { 255 if ( err != MAILIMAP_NO_ERROR ) {
254 return; 256 return;
255 } 257 }
256 258
257 int last = m_imap->imap_selection_info->sel_exists; 259 int last = m_imap->imap_selection_info->sel_exists;
258 260
259 if (last == 0) { 261 if (last == 0) {
260 Global::statusMessage(i18n("Mailbox has no mails")); 262 Global::statusMessage(i18n("Mailbox has no mails"));
261 return; 263 return;
262 } else { 264 } else {
263 } 265 }
264 progress( i18n("Fetch ")); 266 progress( i18n("Fetch "));
265 mMax = last; 267 mMax = last;
266 //qDebug("last %d ", last); 268 //qDebug("last %d ", last);
267 Global::statusMessage(i18n("Fetching header list")); 269 Global::statusMessage(i18n("Fetching header list"));
268 qApp->processEvents(); 270 qApp->processEvents();
269 /* the range has to start at 1!!! not with 0!!!! */ 271 /* the range has to start at 1!!! not with 0!!!! */
270 //LR the access to web.de imap server is no working with value 1 272 //LR the access to web.de imap server is no working with value 1
271 //qDebug("interval %d - %d ", tryAgain, last-1+tryAgain ); 273 //qDebug("interval %d - %d ", tryAgain, last-1+tryAgain );
272 set = mailimap_set_new_interval( tryAgain, last ); 274 set = mailimap_set_new_interval( tryAgain, last );
273 fetchType = mailimap_fetch_type_new_fetch_att_list_empty(); 275 fetchType = mailimap_fetch_type_new_fetch_att_list_empty();
274 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_envelope()); 276 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_envelope());
275 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_flags()); 277 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_flags());
276 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_internaldate()); 278 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_internaldate());
277 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_rfc822_size()); 279 mailimap_fetch_type_new_fetch_att_list_add(fetchType,mailimap_fetch_att_new_rfc822_size());
278 280
279 err = mailimap_fetch( m_imap, set, fetchType, &result ); 281 err = mailimap_fetch( m_imap, set, fetchType, &result );
280 mailimap_set_free( set ); 282 mailimap_set_free( set );
281 mailimap_fetch_type_free( fetchType ); 283 mailimap_fetch_type_free( fetchType );
282 284
283 QString date,subject,from; 285 QString date,subject,from;
284 286
285 if ( err == MAILIMAP_NO_ERROR ) { 287 if ( err == MAILIMAP_NO_ERROR ) {
286 tryAgain = -1; 288 tryAgain = -1;
287 mailimap_msg_att * msg_att; 289 mailimap_msg_att * msg_att;
288 int i = 0; 290 int i = 0;
289 for (current = clist_begin(result); current != 0; current=clist_next(current)) { 291 for (current = clist_begin(result); current != 0; current=clist_next(current)) {
290 ++i; 292 ++i;
291 //qDebug("iii %d ",i); 293 //qDebug("iii %d ",i);
292 msg_att = (mailimap_msg_att*)current->data; 294 msg_att = (mailimap_msg_att*)current->data;
293 RecMail*m = parse_list_result(msg_att); 295 RecMail*m = parse_list_result(msg_att);
294 if (m) { 296 if (m) {
295 if ( maxSizeInKb == 0 || m->Msgsize()<=(unsigned int ) maxSizeInKb*1024 ) { 297 if ( maxSizeInKb == 0 || m->Msgsize()<=(unsigned int ) maxSizeInKb*1024 ) {
296 m->setNumber(i); 298 m->setNumber(i);
297 m->setMbox(mailbox); 299 m->setMbox(mailbox);
298 m->setWrapper(this); 300 m->setWrapper(this);
299 target.append(m); 301 target.append(m);
300 } 302 }
301 } 303 }
302 } 304 }
303 Global::statusMessage(i18n("Mailbox has %1 mails").arg(target.count())); 305 Global::statusMessage(i18n("Mailbox has %1 mails").arg(target.count()));
304 } else { 306 } else {
305 --tryAgain; 307 --tryAgain;
306 --tryAgain;//disabled tryagain by adding this line 308 --tryAgain;//disabled tryagain by adding this line
307 if ( tryAgain < 0 ) 309 if ( tryAgain < 0 )
308 Global::statusMessage(i18n("Error fetching headers: %1").arg(m_imap->imap_response)); 310 Global::statusMessage(i18n("Error fetching headers: %1").arg(m_imap->imap_response));
309 else 311 else
310 qDebug("try again... "); 312 qDebug("try again... ");
311 } 313 }
312 314
313 if (result) mailimap_fetch_list_free(result); 315 if (result) mailimap_fetch_list_free(result);
314 } 316 }
315} 317}
316 318
317QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() 319QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders()
318{ 320{
319 const char *path, *mask; 321 const char *path, *mask;
320 int err = MAILIMAP_NO_ERROR; 322 int err = MAILIMAP_NO_ERROR;
321 clist *result = 0; 323 clist *result = 0;
322 clistcell *current = 0; 324 clistcell *current = 0;
323 clistcell*cur_flag = 0; 325 clistcell*cur_flag = 0;
324 mailimap_mbx_list_flags*bflags = 0; 326 mailimap_mbx_list_flags*bflags = 0;
325 327
326 QValueList<FolderP>* folders = new QValueList<FolderP>(); 328 QValueList<FolderP>* folders = new QValueList<FolderP>();
327 login(); 329 login();
328 if (!m_imap) { 330 if (!m_imap) {
329 return folders; 331 return folders;
330 } 332 }
331 333
332/* 334/*
333 * First we have to check for INBOX 'cause it sometimes it's not inside the path. 335 * First we have to check for INBOX 'cause it sometimes it's not inside the path.
334 * We must not forget to filter them out in next loop! 336 * We must not forget to filter them out in next loop!
335 * it seems like ugly code. and yes - it is ugly code. but the best way. 337 * it seems like ugly code. and yes - it is ugly code. but the best way.
336 */ 338 */
337 Global::statusMessage(i18n("Fetching folder list")); 339 Global::statusMessage(i18n("Fetching folder list"));
338 qApp->processEvents(); 340 qApp->processEvents();
339 QString temp; 341 QString temp;
340 mask = "INBOX" ; 342 mask = "INBOX" ;
341 mailimap_mailbox_list *list; 343 mailimap_mailbox_list *list;
342 err = mailimap_list( m_imap, (char*)"", (char*)mask, &result ); 344 err = mailimap_list( m_imap, (char*)"", (char*)mask, &result );
343 QString del; 345 QString del;
344 bool selectable = true; 346 bool selectable = true;
345 bool no_inferiors = false; 347 bool no_inferiors = false;
346 if ( err == MAILIMAP_NO_ERROR ) { 348 if ( err == MAILIMAP_NO_ERROR ) {
347 current = result->first; 349 current = result->first;
348 for ( int i = result->count; i > 0; i-- ) { 350 for ( int i = result->count; i > 0; i-- ) {
349 list = (mailimap_mailbox_list *) current->data; 351 list = (mailimap_mailbox_list *) current->data;
350 // it is better use the deep copy mechanism of qt itself 352 // it is better use the deep copy mechanism of qt itself
351 // instead of using strdup! 353 // instead of using strdup!
352 temp = list->mb_name; 354 temp = list->mb_name;
353 del = list->mb_delimiter; 355 del = list->mb_delimiter;
354 current = current->next; 356 current = current->next;
355 if ( (bflags = list->mb_flag) ) { 357 if ( (bflags = list->mb_flag) ) {
356 selectable = !(bflags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG&& 358 selectable = !(bflags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG&&
357 bflags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT); 359 bflags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT);
358 for(cur_flag=clist_begin(bflags->mbf_oflags);cur_flag;cur_flag=clist_next(cur_flag)) { 360 for(cur_flag=clist_begin(bflags->mbf_oflags);cur_flag;cur_flag=clist_next(cur_flag)) {
359 if ( ((mailimap_mbx_list_oflag*)cur_flag->data)->of_type==MAILIMAP_MBX_LIST_OFLAG_NOINFERIORS) { 361 if ( ((mailimap_mbx_list_oflag*)cur_flag->data)->of_type==MAILIMAP_MBX_LIST_OFLAG_NOINFERIORS) {
360 no_inferiors = true; 362 no_inferiors = true;
361 } 363 }
362 } 364 }
363 } 365 }
364 folders->append( new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); 366 folders->append( new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix()));
365 } 367 }
366 } else { 368 } else {
367 qDebug("error fetching folders: "); 369 qDebug("error fetching folders: ");
368 370
369 } 371 }
370 mailimap_list_result_free( result ); 372 mailimap_list_result_free( result );
371 373
372/* 374/*
373 * second stage - get the other then inbox folders 375 * second stage - get the other then inbox folders
374 */ 376 */
375 mask = "*" ; 377 mask = "*" ;
376 path = account->getPrefix().latin1(); 378 path = account->getPrefix().latin1();
377 if (!path) path = ""; 379 if (!path) path = "";
378 err = mailimap_list( m_imap, (char*)path, (char*)mask, &result ); 380 err = mailimap_list( m_imap, (char*)path, (char*)mask, &result );
379 if ( err == MAILIMAP_NO_ERROR ) { 381 if ( err == MAILIMAP_NO_ERROR ) {
380 current = result->first; 382 current = result->first;
381 for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) { 383 for ( current=clist_begin(result);current!=NULL;current=clist_next(current)) {
382 no_inferiors = false; 384 no_inferiors = false;
383 list = (mailimap_mailbox_list *) current->data; 385 list = (mailimap_mailbox_list *) current->data;
384 // it is better use the deep copy mechanism of qt itself 386 // it is better use the deep copy mechanism of qt itself
385 // instead of using strdup! 387 // instead of using strdup!
386 temp = list->mb_name; 388 temp = list->mb_name;
387 if (temp.lower()=="inbox") 389 if (temp.lower()=="inbox")
388 continue; 390 continue;
389 if (temp.lower()==account->getPrefix().lower()) 391 if (temp.lower()==account->getPrefix().lower())
390 continue; 392 continue;
391 if ( (bflags = list->mb_flag) ) { 393 if ( (bflags = list->mb_flag) ) {
392 selectable = !(bflags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG&& 394 selectable = !(bflags->mbf_type==MAILIMAP_MBX_LIST_FLAGS_SFLAG&&
393 bflags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT); 395 bflags->mbf_sflag==MAILIMAP_MBX_LIST_SFLAG_NOSELECT);
394 for(cur_flag=clist_begin(bflags->mbf_oflags);cur_flag;cur_flag=clist_next(cur_flag)) { 396 for(cur_flag=clist_begin(bflags->mbf_oflags);cur_flag;cur_flag=clist_next(cur_flag)) {
395 if ( ((mailimap_mbx_list_oflag*)cur_flag->data)->of_type==MAILIMAP_MBX_LIST_OFLAG_NOINFERIORS) { 397 if ( ((mailimap_mbx_list_oflag*)cur_flag->data)->of_type==MAILIMAP_MBX_LIST_OFLAG_NOINFERIORS) {
396 no_inferiors = true; 398 no_inferiors = true;
397 } 399 }
398 } 400 }
399 } 401 }
400 del = list->mb_delimiter; 402 del = list->mb_delimiter;
401 folders->append(new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix())); 403 folders->append(new IMAPFolder(temp,del,selectable,no_inferiors,account->getPrefix()));
402 } 404 }
403 } else { 405 } else {
404 qDebug("error fetching folders "); 406 qDebug("error fetching folders ");
405 407
406 } 408 }
407 if (result) mailimap_list_result_free( result ); 409 if (result) mailimap_list_result_free( result );
408 return folders; 410 return folders;
409} 411}
410 412
411RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att) 413RecMail*IMAPwrapper::parse_list_result(mailimap_msg_att* m_att)
412{ 414{
413 RecMail * m = 0; 415 RecMail * m = 0;
414 mailimap_msg_att_item *item=0; 416 mailimap_msg_att_item *item=0;
415 clistcell *current,*c,*cf; 417 clistcell *current,*c,*cf;
416 mailimap_msg_att_dynamic*flist; 418 mailimap_msg_att_dynamic*flist;
417 mailimap_flag_fetch*cflag; 419 mailimap_flag_fetch*cflag;
418 int size = 0; 420 int size = 0;
419 QBitArray mFlags(7); 421 QBitArray mFlags(7);
420 QStringList addresslist; 422 QStringList addresslist;
421 423
422 if (!m_att) { 424 if (!m_att) {
423 return m; 425 return m;
424 } 426 }
425 m = new RecMail(); 427 m = new RecMail();
426 for (c = clist_begin(m_att->att_list); c!=NULL;c=clist_next(c) ) { 428 for (c = clist_begin(m_att->att_list); c!=NULL;c=clist_next(c) ) {
427 current = c; 429 current = c;
428 size = 0; 430 size = 0;
429 item = (mailimap_msg_att_item*)current->data; 431 item = (mailimap_msg_att_item*)current->data;
430 if ( !item ) 432 if ( !item )
431 continue; 433 continue;
432 if (item->att_type!=MAILIMAP_MSG_ATT_ITEM_STATIC) { 434 if (item->att_type!=MAILIMAP_MSG_ATT_ITEM_STATIC) {
433 flist = (mailimap_msg_att_dynamic*)item->att_data.att_dyn; 435 flist = (mailimap_msg_att_dynamic*)item->att_data.att_dyn;
434 if (!flist || !flist->att_list) { 436 if (!flist || !flist->att_list) {
435 continue; 437 continue;
436 } 438 }
437 cf = flist->att_list->first; 439 cf = flist->att_list->first;
438 if( ! cf ) 440 if( ! cf )
439 for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) { 441 for (cf = clist_begin(flist->att_list); cf!=NULL; cf = clist_next(cf)) {
440 cflag = (mailimap_flag_fetch*)cf->data; 442 cflag = (mailimap_flag_fetch*)cf->data;
441 if( ! cflag ) 443 if( ! cflag )
442 qDebug("imap:not cflag "); 444 qDebug("imap:not cflag ");
443 if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) { 445 if (cflag->fl_type==MAILIMAP_FLAG_FETCH_OTHER && cflag->fl_flag!=0) {
444 switch (cflag->fl_flag->fl_type) { 446 switch (cflag->fl_flag->fl_type) {
445 case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */ 447 case MAILIMAP_FLAG_ANSWERED: /* \Answered flag */
446 mFlags.setBit(FLAG_ANSWERED); 448 mFlags.setBit(FLAG_ANSWERED);
447 break; 449 break;
448 case MAILIMAP_FLAG_FLAGGED: /* \Flagged flag */ 450 case MAILIMAP_FLAG_FLAGGED: /* \Flagged flag */
449 mFlags.setBit(FLAG_FLAGGED); 451 mFlags.setBit(FLAG_FLAGGED);
450 break; 452 break;
451 case MAILIMAP_FLAG_DELETED: /* \Deleted flag */ 453 case MAILIMAP_FLAG_DELETED: /* \Deleted flag */
452 mFlags.setBit(FLAG_DELETED); 454 mFlags.setBit(FLAG_DELETED);
453 break; 455 break;
454 case MAILIMAP_FLAG_SEEN: /* \Seen flag */ 456 case MAILIMAP_FLAG_SEEN: /* \Seen flag */
455 mFlags.setBit(FLAG_SEEN); 457 mFlags.setBit(FLAG_SEEN);
456 break; 458 break;
457 case MAILIMAP_FLAG_DRAFT: /* \Draft flag */ 459 case MAILIMAP_FLAG_DRAFT: /* \Draft flag */
458 mFlags.setBit(FLAG_DRAFT); 460 mFlags.setBit(FLAG_DRAFT);
459 break; 461 break;
460 case MAILIMAP_FLAG_KEYWORD: /* keyword flag */ 462 case MAILIMAP_FLAG_KEYWORD: /* keyword flag */
461 break; 463 break;
462 case MAILIMAP_FLAG_EXTENSION: /* \extension flag */ 464 case MAILIMAP_FLAG_EXTENSION: /* \extension flag */
463 break; 465 break;
464 default: 466 default:
465 break; 467 break;
466 } 468 }
467 } else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) { 469 } else if (cflag->fl_type==MAILIMAP_FLAG_FETCH_RECENT) {
468 mFlags.setBit(FLAG_RECENT); 470 mFlags.setBit(FLAG_RECENT);
469 } 471 }
470 } 472 }
471 continue; 473 continue;
472 } 474 }
473 if ( item->att_data.att_static == NULL ) 475 if ( item->att_data.att_static == NULL )
474 continue; 476 continue;
475 if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) { 477 if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_ENVELOPE) {
476 mailimap_envelope * head = item->att_data.att_static->att_data.att_env; 478 mailimap_envelope * head = item->att_data.att_static->att_data.att_env;
477 if ( head == NULL ) 479 if ( head == NULL )
478 continue; 480 continue;
479 if ( head->env_date != NULL ) { 481 if ( head->env_date != NULL ) {
480 m->setDate(head->env_date); 482 m->setDate(head->env_date);
481 //struct mailimf_date_time result; 483 //struct mailimf_date_time result;
482 struct mailimf_date_time* date;// = &result; 484 struct mailimf_date_time* date;// = &result;
483 struct mailimf_date_time **re = &date; 485 struct mailimf_date_time **re = &date;
484 size_t length = m->getDate().length(); 486 size_t length = m->getDate().length();
485 size_t index = 0; 487 size_t index = 0;
486 if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) { 488 if ( mailimf_date_time_parse(head->env_date, length,&index, re ) == MAILIMF_NO_ERROR ) {
487 QDateTime dt = Genericwrapper::parseDateTime( date ); 489 QDateTime dt = Genericwrapper::parseDateTime( date );
488 QString ret; 490 QString ret;
489 if ( dt.date() == QDate::currentDate () ) 491 if ( dt.date() == QDate::currentDate () )
490 ret = KGlobal::locale()->formatTime( dt.time(),true); 492 ret = KGlobal::locale()->formatTime( dt.time(),true);
491 else { 493 else {
492 ret = KGlobal::locale()->formatDateTime( dt,true,true); 494 ret = KGlobal::locale()->formatDateTime( dt,true,true);
493 } 495 }
494 m->setDate( ret ); 496 m->setDate( ret );
495 char tmp[20]; 497 char tmp[20];
496 snprintf( tmp, 20, "%04i-%02i-%02i %02i:%02i:%02i", 498 snprintf( tmp, 20, "%04i-%02i-%02i %02i:%02i:%02i",
497 dt.date().year(),dt.date().month(), dt.date().day(), dt.time().hour(), dt.time().minute(), dt.time().second() ); 499 dt.date().year(),dt.date().month(), dt.date().day(), dt.time().hour(), dt.time().minute(), dt.time().second() );
498 //qDebug("%d iso %s %s ", date->dt_zone, tmp, head->env_date); 500 //qDebug("%d iso %s %s ", date->dt_zone, tmp, head->env_date);
499 m->setIsoDate( QString( tmp ) ); 501 m->setIsoDate( QString( tmp ) );
500 mailimf_date_time_free ( date ); 502 mailimf_date_time_free ( date );
501 } else { 503 } else {
502 m->setIsoDate(head->env_date); 504 m->setIsoDate(head->env_date);
503 } 505 }
504 } 506 }
505 if ( head->env_subject != NULL ) 507 if ( head->env_subject != NULL )
506 m->setSubject(convert_String((const char*)head->env_subject)); 508 m->setSubject(convert_String((const char*)head->env_subject));
507 //m->setSubject(head->env_subject); 509 //m->setSubject(head->env_subject);
508 if (head->env_from!=NULL) { 510 if (head->env_from!=NULL) {
509 addresslist = address_list_to_stringlist(head->env_from->frm_list); 511 addresslist = address_list_to_stringlist(head->env_from->frm_list);
510 if (addresslist.count()) { 512 if (addresslist.count()) {
511 m->setFrom(addresslist.first()); 513 m->setFrom(addresslist.first());
512 } 514 }
513 } 515 }
514 if (head->env_to!=NULL) { 516 if (head->env_to!=NULL) {
515 addresslist = address_list_to_stringlist(head->env_to->to_list); 517 addresslist = address_list_to_stringlist(head->env_to->to_list);
516 m->setTo(addresslist); 518 m->setTo(addresslist);
517 } 519 }
518 if (head->env_cc!=NULL) { 520 if (head->env_cc!=NULL) {
519 addresslist = address_list_to_stringlist(head->env_cc->cc_list); 521 addresslist = address_list_to_stringlist(head->env_cc->cc_list);
520 m->setCC(addresslist); 522 m->setCC(addresslist);
521 } 523 }
522 if (head->env_bcc!=NULL) { 524 if (head->env_bcc!=NULL) {
523 addresslist = address_list_to_stringlist(head->env_bcc->bcc_list); 525 addresslist = address_list_to_stringlist(head->env_bcc->bcc_list);
524 m->setBcc(addresslist); 526 m->setBcc(addresslist);
525 } 527 }
526 /* reply to address, eg. email. */ 528 /* reply to address, eg. email. */
527 if (head->env_reply_to!=NULL) { 529 if (head->env_reply_to!=NULL) {
528 addresslist = address_list_to_stringlist(head->env_reply_to->rt_list); 530 addresslist = address_list_to_stringlist(head->env_reply_to->rt_list);
529 if (addresslist.count()) { 531 if (addresslist.count()) {
530 m->setReplyto(addresslist.first()); 532 m->setReplyto(addresslist.first());
531 } 533 }
532 } 534 }
533 if (head->env_in_reply_to!=NULL) { 535 if (head->env_in_reply_to!=NULL) {
534 QString h(head->env_in_reply_to); 536 QString h(head->env_in_reply_to);
535 while (h.length()>0 && h[0]=='<') { 537 while (h.length()>0 && h[0]=='<') {
536 h.remove(0,1); 538 h.remove(0,1);
537 } 539 }
538 while (h.length()>0 && h[h.length()-1]=='>') { 540 while (h.length()>0 && h[h.length()-1]=='>') {
539 h.remove(h.length()-1,1); 541 h.remove(h.length()-1,1);
540 } 542 }
541 if (h.length()>0) { 543 if (h.length()>0) {
542 m->setInreply(QStringList(h)); 544 m->setInreply(QStringList(h));
543 } 545 }
544 } 546 }
545 if (head->env_message_id != NULL) { 547 if (head->env_message_id != NULL) {
546 m->setMsgid(QString(head->env_message_id)); 548 m->setMsgid(QString(head->env_message_id));
547 } 549 }
548 } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) { 550 } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_INTERNALDATE) {
549#if 0 551#if 0
550 mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date; 552 mailimap_date_time*d = item->att_data.att_static->att_data.att_internal_date;
551 QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec)); 553 QDateTime da(QDate(d->dt_year,d->dt_month,d->dt_day),QTime(d->dt_hour,d->dt_min,d->dt_sec));
552 qDebug("time %s ",da.toString().latin1() ); 554 qDebug("time %s ",da.toString().latin1() );
553#endif 555#endif
554 } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) { 556 } else if (item->att_data.att_static->att_type==MAILIMAP_MSG_ATT_RFC822_SIZE) {
555 size = item->att_data.att_static->att_data.att_rfc822_size; 557 size = item->att_data.att_static->att_data.att_rfc822_size;
556 } 558 }
557 } 559 }
558 /* msg is already deleted */ 560 /* msg is already deleted */
559 if (mFlags.testBit(FLAG_DELETED) && m) { 561 if (mFlags.testBit(FLAG_DELETED) && m) {
560 delete m; 562 delete m;
561 m = 0; 563 m = 0;