-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 41b3e45..c61a322 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,516 +1,520 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 1.9.11 ************ | 3 | ********** VERSION 1.9.11 ************ |
4 | 4 | ||
5 | Fixed several problems in PWM/Pi, like | 5 | Fixed several problems in PWM/Pi, like |
6 | asking the user, if unsaved changed are pending | 6 | asking the user, if unsaved changed are pending |
7 | when closing the app. | 7 | when closing the app. |
8 | 8 | ||
9 | Fixed a crash in KO/Pi , when importing/loading vcs files | 9 | Fixed a crash in KO/Pi , when importing/loading vcs files |
10 | which have an entry with an attendee with state: | 10 | which have an entry with an attendee with state: |
11 | NEEDS ACTION | 11 | NEEDS ACTION |
12 | 12 | ||
13 | Fixed some problems in the German translation of OM/Pi, | 13 | Fixed some problems in the German translation of OM/Pi, |
14 | which makes some dialogs not fitting on the screen | 14 | which makes some dialogs not fitting on the screen |
15 | of the Z 5500. | 15 | of the Z 5500. |
16 | 16 | ||
17 | Fixed Qtopia crash, when disabling/deinstalling | 17 | Fixed Qtopia crash, when disabling/deinstalling |
18 | KO/Pi alarm applet. | 18 | KO/Pi alarm applet. |
19 | 19 | ||
20 | Implemented direct KDE<->KA/Pi sync for KA/Pi running | 20 | Implemented direct KDE<->KA/Pi sync for KA/Pi running |
21 | on Linux desktop. | 21 | on Linux desktop. |
22 | 22 | ||
23 | Added "remove sync info" to sync menu. | 23 | Added "remove sync info" to sync menu. |
24 | 24 | ||
25 | Tweaked the KO/Pi What's next view a bit, added | 25 | Tweaked the KO/Pi What's next view a bit, added |
26 | setting to hide events that are done. | 26 | setting to hide events that are done. |
27 | 27 | ||
28 | Disabled "beam receive enabled" on startup to | 28 | Disabled "beam receive enabled" on startup to |
29 | avoid problems if Fastload is enabled. | 29 | avoid problems if Fastload is enabled. |
30 | Please set "beam receive enabled", | 30 | Please set "beam receive enabled", |
31 | if you want to receive data via IR. | 31 | if you want to receive data via IR. |
32 | 32 | ||
33 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running | 33 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running |
34 | on Linux desktop. | 34 | on Linux desktop. |
35 | 35 | ||
36 | Made in KA/Pi scrolling possible, if details view is selected. | 36 | Made in KA/Pi scrolling possible, if details view is selected. |
37 | (The keyboard focus is set automatically to the search line) | ||
38 | |||
39 | Fixed a bug in DMT sync, that a new entry in DTM was added | ||
40 | on every sync to Kx/Pi. | ||
37 | 41 | ||
38 | 42 | ||
39 | 43 | ||
40 | 44 | ||
41 | ********** VERSION 1.9.10 ************ | 45 | ********** VERSION 1.9.10 ************ |
42 | 46 | ||
43 | Many internal small bugfixes. | 47 | Many internal small bugfixes. |
44 | And fix of the "big" bug in KO/Pi, | 48 | And fix of the "big" bug in KO/Pi, |
45 | that after Syncing the appointments had an offset by several hours. | 49 | that after Syncing the appointments had an offset by several hours. |
46 | That was a problem with the internal timezone setting, | 50 | That was a problem with the internal timezone setting, |
47 | introduced by the changed timezone configuration settings. | 51 | introduced by the changed timezone configuration settings. |
48 | 52 | ||
49 | German translation for OM/Pi is now available. | 53 | German translation for OM/Pi is now available. |
50 | 54 | ||
51 | 55 | ||
52 | ********** VERSION 1.9.9 ************ | 56 | ********** VERSION 1.9.9 ************ |
53 | 57 | ||
54 | KDE-Pim/Pi has a new Member! | 58 | KDE-Pim/Pi has a new Member! |
55 | It is called PWM/Pi (Passwordmanager/platform-independent) | 59 | It is called PWM/Pi (Passwordmanager/platform-independent) |
56 | and it is available for the Zaurus. | 60 | and it is available for the Zaurus. |
57 | It is planned, that it will be available later for Windows. | 61 | It is planned, that it will be available later for Windows. |
58 | (And for Linux, of course). | 62 | (And for Linux, of course). |
59 | It is a port of the Passwordmanager of KDE. | 63 | It is a port of the Passwordmanager of KDE. |
60 | It will need the MicroKDElibs to run. | 64 | It will need the MicroKDElibs to run. |
61 | 65 | ||
62 | Made loading of addressbooks in KA/Pi up to 7 times faster! | 66 | Made loading of addressbooks in KA/Pi up to 7 times faster! |
63 | The bigger your addressbook file, the more starting speed | 67 | The bigger your addressbook file, the more starting speed |
64 | will you gain. (relatively) | 68 | will you gain. (relatively) |
65 | 69 | ||
66 | The Qtopia addressbook connector is now platform independend | 70 | The Qtopia addressbook connector is now platform independend |
67 | as well and should work on any platform for importing/exporting | 71 | as well and should work on any platform for importing/exporting |
68 | Qtopia and Opie XML files. | 72 | Qtopia and Opie XML files. |
69 | 73 | ||
70 | Added a +30min feature to the timezone settings to make | 74 | Added a +30min feature to the timezone settings to make |
71 | KDE-Pim/Pi useable in Australia and other parts on the | 75 | KDE-Pim/Pi useable in Australia and other parts on the |
72 | world with strange timezones ;-) | 76 | world with strange timezones ;-) |
73 | 77 | ||
74 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. | 78 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. |
75 | 79 | ||
76 | It is now possible to disable the | 80 | It is now possible to disable the |
77 | "receive data via infrared" feature, such that syncing with | 81 | "receive data via infrared" feature, such that syncing with |
78 | Outlook is now possible again with Kx/Pi runing. | 82 | Outlook is now possible again with Kx/Pi runing. |
79 | Please disable it, before syncing Sharp DTM with Outlook. | 83 | Please disable it, before syncing Sharp DTM with Outlook. |
80 | For your convenience, the "receive data via infrared" feature | 84 | For your convenience, the "receive data via infrared" feature |
81 | is disabled automatically, if you sync Kx/Pi with DTM. | 85 | is disabled automatically, if you sync Kx/Pi with DTM. |
82 | You have to enable it again manually after syncing. | 86 | You have to enable it again manually after syncing. |
83 | Enabling this feature makes it impossible to start the | 87 | Enabling this feature makes it impossible to start the |
84 | Sharp DTM apps. If this feature is enabled, you will only get the | 88 | Sharp DTM apps. If this feature is enabled, you will only get the |
85 | alarm notification from KO/Pi and not from the Sharp calendar. | 89 | alarm notification from KO/Pi and not from the Sharp calendar. |
86 | This is very useful if you sync KO/Pi with Sharp DTM, | 90 | This is very useful if you sync KO/Pi with Sharp DTM, |
87 | because after syncing you usually would get notified about | 91 | because after syncing you usually would get notified about |
88 | an alarm by KO/Pi and the Sharp Calendar. | 92 | an alarm by KO/Pi and the Sharp Calendar. |
89 | 93 | ||
90 | Together with the Linux desktop version of KO/Pi | 94 | Together with the Linux desktop version of KO/Pi |
91 | it is now possible to sync KO/Pi on the Zaurus | 95 | it is now possible to sync KO/Pi on the Zaurus |
92 | with the complete KDE-desktop (3.3 or later) | 96 | with the complete KDE-desktop (3.3 or later) |
93 | calendar data easily. | 97 | calendar data easily. |
94 | That makes it possible to sync the Z with one | 98 | That makes it possible to sync the Z with one |
95 | click of a mouse with the KDE-Desktop. | 99 | click of a mouse with the KDE-Desktop. |
96 | This feature it available for all Zaurus platforms KO/Pi | 100 | This feature it available for all Zaurus platforms KO/Pi |
97 | is running on. | 101 | is running on. |
98 | The only thing needed is a running KO/Pi on Linux and | 102 | The only thing needed is a running KO/Pi on Linux and |
99 | a compiled version of the small | 103 | a compiled version of the small |
100 | KDE-Pim/Pi<->KDE-Desktop access command line program, | 104 | KDE-Pim/Pi<->KDE-Desktop access command line program, |
101 | which is in the KDE-Pim/Pi sources available. | 105 | which is in the KDE-Pim/Pi sources available. |
102 | 106 | ||
103 | The "KDE-desktop" syncing feature for KA/Pi will follow | 107 | The "KDE-desktop" syncing feature for KA/Pi will follow |
104 | in the next releases. | 108 | in the next releases. |
105 | 109 | ||
106 | Fixed the vcard export bug, which had the version 1.9.8. | 110 | Fixed the vcard export bug, which had the version 1.9.8. |
107 | 111 | ||
108 | Added missing GERMAN translation to KO/Pi. | 112 | Added missing GERMAN translation to KO/Pi. |
109 | Hi PsionX, could you add the missing french translation?Thx! | 113 | Hi PsionX, could you add the missing french translation?Thx! |
110 | 114 | ||
111 | Translation files for KA/Pi are available as well. | 115 | Translation files for KA/Pi are available as well. |
112 | GERMAN translation will be available in the next release. | 116 | GERMAN translation will be available in the next release. |
113 | PsionX ( yres, you again ;-) ), could you start translating | 117 | PsionX ( yres, you again ;-) ), could you start translating |
114 | KA/Pi? Thx! | 118 | KA/Pi? Thx! |
115 | 119 | ||
116 | You can download the version 1.9.9 at | 120 | You can download the version 1.9.9 at |
117 | 121 | ||
118 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 | 122 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 |
119 | 123 | ||
120 | Note: | 124 | Note: |
121 | To run the mail program OM/Pi you need libopenssl. | 125 | To run the mail program OM/Pi you need libopenssl. |
122 | A link to a download loaction is available at | 126 | A link to a download loaction is available at |
123 | ZSI at www.killefiz.de | 127 | ZSI at www.killefiz.de |
124 | 128 | ||
125 | 129 | ||
126 | ********** VERSION 1.9.8 ************ | 130 | ********** VERSION 1.9.8 ************ |
127 | 131 | ||
128 | Fixed character decoding in OM/Pi. | 132 | Fixed character decoding in OM/Pi. |
129 | (e.g. German "Umlaute" were not displayed properly.) | 133 | (e.g. German "Umlaute" were not displayed properly.) |
130 | 134 | ||
131 | Made is possible to reparent todos in KO/Pi. | 135 | Made is possible to reparent todos in KO/Pi. |
132 | Use contextmenu or keys (look at Help-Keys + Colors) for that. | 136 | Use contextmenu or keys (look at Help-Keys + Colors) for that. |
133 | 137 | ||
134 | Added the missing Sync-Howto and WhatsNew to the packages. | 138 | Added the missing Sync-Howto and WhatsNew to the packages. |
135 | 139 | ||
136 | KO/Pi on Linux desktop can now sync with KDE desktop. | 140 | KO/Pi on Linux desktop can now sync with KDE desktop. |
137 | That means: When using KO/Pi on Linux desktop for syncing with | 141 | That means: When using KO/Pi on Linux desktop for syncing with |
138 | KDE desktop and the Zaurus, the Zaurus can be synced now | 142 | KDE desktop and the Zaurus, the Zaurus can be synced now |
139 | with all KDE-Calendar resources, not only with one local file. | 143 | with all KDE-Calendar resources, not only with one local file. |
140 | (That makes it possible to sync the Zaurus with the | 144 | (That makes it possible to sync the Zaurus with the |
141 | calendar data on a Kolab server) | 145 | calendar data on a Kolab server) |
142 | 146 | ||
143 | KA/Pi syncing with KDE desktop will be available in the next version. | 147 | KA/Pi syncing with KDE desktop will be available in the next version. |
144 | 148 | ||
145 | 149 | ||
146 | ********** VERSION 1.9.7 ************ | 150 | ********** VERSION 1.9.7 ************ |
147 | 151 | ||
148 | KO/Pi - KA/Pi on Windows: | 152 | KO/Pi - KA/Pi on Windows: |
149 | Now a directory can be defined by the user, where the | 153 | Now a directory can be defined by the user, where the |
150 | application/config data should be saved. | 154 | application/config data should be saved. |
151 | Define your desired path in the evironment variable | 155 | Define your desired path in the evironment variable |
152 | MICROKDEHOME | 156 | MICROKDEHOME |
153 | before starting KO/Pi or KA/Pi. | 157 | before starting KO/Pi or KA/Pi. |
154 | 158 | ||
155 | An easy Kx/Pi to Kx/Pi syncing is now possible | 159 | An easy Kx/Pi to Kx/Pi syncing is now possible |
156 | (it is called Pi-Sync) via network. | 160 | (it is called Pi-Sync) via network. |
157 | Please look at the Sync Howto. | 161 | Please look at the Sync Howto. |
158 | 162 | ||
159 | Exporting of calendar data and contacts to mobile phones is now possible. | 163 | Exporting of calendar data and contacts to mobile phones is now possible. |
160 | The SyncHowto is updated with information howto | 164 | The SyncHowto is updated with information howto |
161 | access/sync mobile phones. | 165 | access/sync mobile phones. |
162 | Please look at the Sync Howto. | 166 | Please look at the Sync Howto. |
163 | 167 | ||
164 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. | 168 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. |
165 | Please disable Fastload for the original contact/calendar applications | 169 | Please disable Fastload for the original contact/calendar applications |
166 | and close them. | 170 | and close them. |
167 | KO/Pi and KA/Pi must be running in order to receive the data. | 171 | KO/Pi and KA/Pi must be running in order to receive the data. |
168 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) | 172 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) |
169 | 173 | ||
170 | In the KA/Pi details view are now the preferred tel. numbers displayed on top | 174 | In the KA/Pi details view are now the preferred tel. numbers displayed on top |
171 | of the other data ( emails/tel.numbers/addresses) | 175 | of the other data ( emails/tel.numbers/addresses) |
172 | 176 | ||
173 | Fixed some syncing problems in KA/Pi. | 177 | Fixed some syncing problems in KA/Pi. |
174 | 178 | ||
175 | Added font settings for the KA/Pi details view. | 179 | Added font settings for the KA/Pi details view. |
176 | Added fields "children's name" and "gender" to KA/Pi. | 180 | Added fields "children's name" and "gender" to KA/Pi. |
177 | 181 | ||
178 | Made searching in KA/Pi better: | 182 | Made searching in KA/Pi better: |
179 | Now the first item in a view is selected after a search automatically and | 183 | Now the first item in a view is selected after a search automatically and |
180 | the views can be scrolled up/down when the search input field has the keyboard focus. | 184 | the views can be scrolled up/down when the search input field has the keyboard focus. |
181 | 185 | ||
182 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. | 186 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. |
183 | 187 | ||
184 | 188 | ||
185 | ********** VERSION 1.9.6 ************ | 189 | ********** VERSION 1.9.6 ************ |
186 | 190 | ||
187 | Changes in the external application communication on the Zaurus | 191 | Changes in the external application communication on the Zaurus |
188 | in order to use less RAM when the apps are running. | 192 | in order to use less RAM when the apps are running. |
189 | First syncing of addressbooks (KA/Pi) is possible. | 193 | First syncing of addressbooks (KA/Pi) is possible. |
190 | 194 | ||
191 | 195 | ||
192 | ********** VERSION 1.9.5a ************ | 196 | ********** VERSION 1.9.5a ************ |
193 | 197 | ||
194 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. | 198 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. |
195 | Fixed some small bugs. | 199 | Fixed some small bugs. |
196 | KA/Pi shows now the birthday in summary view. | 200 | KA/Pi shows now the birthday in summary view. |
197 | Now OM/Pi and KA/Pi are using the date format defined in KO/Pi | 201 | Now OM/Pi and KA/Pi are using the date format defined in KO/Pi |
198 | for displaying dates. | 202 | for displaying dates. |
199 | 203 | ||
200 | 204 | ||
201 | ********** VERSION 1.9.5 ************ | 205 | ********** VERSION 1.9.5 ************ |
202 | 206 | ||
203 | There is still no Addressbook syncing! | 207 | There is still no Addressbook syncing! |
204 | 208 | ||
205 | New in 1.9.5: | 209 | New in 1.9.5: |
206 | 210 | ||
207 | Many bugfixes. | 211 | Many bugfixes. |
208 | Better searching in KA/Pi. | 212 | Better searching in KA/Pi. |
209 | You can configure in KA/Pi if you want to search only after | 213 | You can configure in KA/Pi if you want to search only after |
210 | <return> key pressed. | 214 | <return> key pressed. |
211 | 215 | ||
212 | Better mail downloading in OM/Pi. | 216 | Better mail downloading in OM/Pi. |
213 | 217 | ||
214 | First experimental alpha version of sync of KO/Pi with mobile phones. | 218 | First experimental alpha version of sync of KO/Pi with mobile phones. |
215 | See gammu documentation for supported phones. | 219 | See gammu documentation for supported phones. |
216 | You 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. | 220 | You 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. |
217 | Quick hint how to use: | 221 | Quick hint how to use: |
218 | NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! | 222 | NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! |
219 | Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. | 223 | Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. |
220 | Create syncprofile - mobile device | 224 | Create syncprofile - mobile device |
221 | Remove entry for model. (Leave empty ). | 225 | Remove entry for model. (Leave empty ). |
222 | Enable infrared on Zaurus and your Phone. | 226 | Enable infrared on Zaurus and your Phone. |
223 | Sync. | 227 | Sync. |
224 | To get a more detailed log, start kopi from konsole. | 228 | To get a more detailed log, start kopi from konsole. |
225 | 229 | ||
226 | ********** VERSION 1.9.4 ************ | 230 | ********** VERSION 1.9.4 ************ |
227 | 231 | ||
228 | This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. | 232 | This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. |
229 | 233 | ||
230 | WARNING: | 234 | WARNING: |
231 | PLEASE BACKUP ALL YOUR DATA! | 235 | PLEASE BACKUP ALL YOUR DATA! |
232 | We have changed a lot and maybe there are some unknown problems. | 236 | We have changed a lot and maybe there are some unknown problems. |
233 | 237 | ||
234 | SYNC HANDLING HAS CHANGED! | 238 | SYNC HANDLING HAS CHANGED! |
235 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. | 239 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. |
236 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). | 240 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). |
237 | 241 | ||
238 | You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. | 242 | You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. |
239 | If 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. | 243 | If 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. |
240 | 244 | ||
241 | As programs are available: | 245 | As programs are available: |
242 | KO/Pi (korganizer ipk) - a calendar program. | 246 | KO/Pi (korganizer ipk) - a calendar program. |
243 | KA/Pi (kaddressbook ipk ) - an addressbook | 247 | KA/Pi (kaddressbook ipk ) - an addressbook |
244 | OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. | 248 | OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. |
245 | 249 | ||
246 | An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. | 250 | An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. |
247 | (If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) | 251 | (If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) |
248 | 252 | ||
249 | All the applications are installed in a "Pim" TAB. | 253 | All the applications are installed in a "Pim" TAB. |
250 | If 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 | 254 | If 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 |
251 | 255 | ||
252 | All the application are integrated. | 256 | All the application are integrated. |
253 | Such 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. | 257 | Such 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. |
254 | 258 | ||
255 | HINT: | 259 | HINT: |
256 | If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. | 260 | If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. |
257 | 261 | ||
258 | What's new? | 262 | What's new? |
259 | 263 | ||
260 | SYNC HANDLING HAS CHANGED! | 264 | SYNC HANDLING HAS CHANGED! |
261 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. | 265 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. |
262 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). | 266 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). |
263 | 267 | ||
264 | New in OM/Pi: | 268 | New in OM/Pi: |
265 | When 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. | 269 | When 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. |
266 | 270 | ||
267 | New in KO/Pi: | 271 | New in KO/Pi: |
268 | French is now available for KO/Pi. | 272 | French is now available for KO/Pi. |
269 | Choose menu:Actions - Configure:TAB locale | 273 | Choose menu:Actions - Configure:TAB locale |
270 | Syncing has changed. | 274 | Syncing has changed. |
271 | Phone sync available soon. | 275 | Phone sync available soon. |
272 | Not much changes, I cannot remember them ... | 276 | Not much changes, I cannot remember them ... |
273 | 277 | ||
274 | New in KA/Pi: | 278 | New in KA/Pi: |
275 | Beaming possible. | 279 | Beaming possible. |
276 | Sharp DTM readonly access possible( create a new DTM resource ); | 280 | Sharp DTM readonly access possible( create a new DTM resource ); |
277 | Better searching possible. | 281 | Better searching possible. |
278 | Search is performed only after pressing the return key. | 282 | Search is performed only after pressing the return key. |
279 | Use wildcard * to specify parts of a name. | 283 | Use wildcard * to specify parts of a name. |
280 | 284 | ||
281 | Better 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 * . | 285 | Better 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 * . |
282 | 286 | ||
283 | A big improvement is the new management of the contact access. | 287 | A big improvement is the new management of the contact access. |
284 | In version 1.9.3, every application was using their own addressbook access data. | 288 | In version 1.9.3, every application was using their own addressbook access data. |
285 | That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. | 289 | That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. |
286 | That was wasting of memory, if you had several hundreds of contacts. | 290 | That was wasting of memory, if you had several hundreds of contacts. |
287 | 291 | ||
288 | Now only KA/Pi accesses the addressbook. | 292 | Now only KA/Pi accesses the addressbook. |
289 | If 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. | 293 | If 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. |
290 | If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. | 294 | If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. |
291 | That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. | 295 | That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. |
292 | 296 | ||
293 | New in the KO/Pi alarm applet: | 297 | New in the KO/Pi alarm applet: |
294 | Configure your own timer popup menu! | 298 | Configure your own timer popup menu! |
295 | (Text and minutes for timer countdown) | 299 | (Text and minutes for timer countdown) |
296 | Just edit the file | 300 | Just edit the file |
297 | (yourhomedir)/.kopialarmtimerrc | 301 | (yourhomedir)/.kopialarmtimerrc |
298 | and start/stop a timer to get a new menu with the data of this file. | 302 | and start/stop a timer to get a new menu with the data of this file. |
299 | 303 | ||
300 | ********** VERSION 1.9.3 ************ | 304 | ********** VERSION 1.9.3 ************ |
301 | 1) | 305 | 1) |
302 | Now KO/Pi on Windows imports directly the calendar data of | 306 | Now KO/Pi on Windows imports directly the calendar data of |
303 | an installed Outlook. Should work with OL version >= 2000. | 307 | an installed Outlook. Should work with OL version >= 2000. |
304 | 308 | ||
305 | ********** VERSION 1.9.2 ************ | 309 | ********** VERSION 1.9.2 ************ |
306 | 1) | 310 | 1) |
307 | KDE-Pim/Pi has got a new member: | 311 | KDE-Pim/Pi has got a new member: |
308 | KmicroMail (KM/Pi) is a mail program, | 312 | KmicroMail (KM/Pi) is a mail program, |
309 | which can handle IMAP and POP mail access. | 313 | which can handle IMAP and POP mail access. |
310 | It is based on Opie-Mail v3. | 314 | It is based on Opie-Mail v3. |
311 | All dependencies to the Opie libraries ar removed, | 315 | All dependencies to the Opie libraries ar removed, |
312 | such that no additional Opie lib is needed. | 316 | such that no additional Opie lib is needed. |
313 | It is already integrated in KO/Pi and KA/Pi. | 317 | It is already integrated in KO/Pi and KA/Pi. |
314 | It it now available for the Zaurus,probably it | 318 | It it now available for the Zaurus,probably it |
315 | will be available for other platforms later. | 319 | will be available for other platforms later. |
316 | Hint: | 320 | Hint: |
317 | Create your own contact (name + email) | 321 | Create your own contact (name + email) |
318 | in KA/Pi, select this contact and choose menu: | 322 | in KA/Pi, select this contact and choose menu: |
319 | Settings - Set Who Am I. | 323 | Settings - Set Who Am I. |
320 | Now the settings of this contact are used as | 324 | Now the settings of this contact are used as |
321 | the sender data in KM/Pi. | 325 | the sender data in KM/Pi. |
322 | 2) | 326 | 2) |
323 | KDE-Pim/Pi is split up in five different | 327 | KDE-Pim/Pi is split up in five different |
324 | packages now precompiled for Sharp Zaurus: | 328 | packages now precompiled for Sharp Zaurus: |
325 | --kmicrokdelibs_1.9.2_arm.ipk | 329 | --kmicrokdelibs_1.9.2_arm.ipk |
326 | The libs are needed for any | 330 | The libs are needed for any |
327 | of the following programs: | 331 | of the following programs: |
328 | --kaddressbook_1.9.2_arm.ipk | 332 | --kaddressbook_1.9.2_arm.ipk |
329 | --kmicromail_1.9.2_arm.ipk | 333 | --kmicromail_1.9.2_arm.ipk |
330 | --korganizer_1.9.2_arm.ipk | 334 | --korganizer_1.9.2_arm.ipk |
331 | Independ from that, there is the alarm applet | 335 | Independ from that, there is the alarm applet |
332 | available for KO/Pi, which also offers | 336 | available for KO/Pi, which also offers |
333 | quick access for a new mail or | 337 | quick access for a new mail or |
334 | showing the addressbook.: | 338 | showing the addressbook.: |
335 | --korganizer-alarm_1.9.2_arm.ipk | 339 | --korganizer-alarm_1.9.2_arm.ipk |
336 | Independend means, that the alarm applet | 340 | Independend means, that the alarm applet |
337 | does not need any of the libs or programs above to run. | 341 | does not need any of the libs or programs above to run. |
338 | But it would be quite useless without these programs. | 342 | But it would be quite useless without these programs. |
339 | NOTE: | 343 | NOTE: |
340 | If you get a | 344 | If you get a |
341 | "This application depends on other programs" | 345 | "This application depends on other programs" |
342 | during installation of | 346 | during installation of |
343 | --kmicrokdelibs_1.9.2_arm.ipk | 347 | --kmicrokdelibs_1.9.2_arm.ipk |
344 | you probably do not have to care about that. | 348 | you probably do not have to care about that. |
345 | kmicrokdelibs_1.9.2 will come with some | 349 | kmicrokdelibs_1.9.2 will come with some |
346 | resource plugins, which needs additional libraries. | 350 | resource plugins, which needs additional libraries. |
347 | (E.g. libopie1, if you want to use the | 351 | (E.g. libopie1, if you want to use the |
348 | opie resource connector in KA/Pi). | 352 | opie resource connector in KA/Pi). |
349 | If you do not have this libraries installed, | 353 | If you do not have this libraries installed, |
350 | you simply cannot use the resource. | 354 | you simply cannot use the resource. |
351 | To make it clear: | 355 | To make it clear: |
352 | If the libraries are missing, the applications | 356 | If the libraries are missing, the applications |
353 | using kmicrokdelibs will start, | 357 | using kmicrokdelibs will start, |
354 | because the resources are plugins. | 358 | because the resources are plugins. |
355 | 3) | 359 | 3) |
356 | KO/Pi and friends are now installable on SD-Card! | 360 | KO/Pi and friends are now installable on SD-Card! |
357 | It is recommended to install all libs and apps | 361 | It is recommended to install all libs and apps |
358 | on the SD card or all in the internal storage. | 362 | on the SD card or all in the internal storage. |
359 | There may be problems, if this is mixed. | 363 | There may be problems, if this is mixed. |
360 | 4) | 364 | 4) |
361 | Fixed two bugs in the alarm notification on Windows. | 365 | Fixed two bugs in the alarm notification on Windows. |
362 | 5) | 366 | 5) |
363 | Great improvement! | 367 | Great improvement! |
364 | KO/Pi uses now the latest version of libical. | 368 | KO/Pi uses now the latest version of libical. |
365 | Libical is the library which actually reads | 369 | Libical is the library which actually reads |
366 | the calendar files and extract the data from it. | 370 | the calendar files and extract the data from it. |
367 | With the old version, there were problems | 371 | With the old version, there were problems |
368 | (crashes or program hangs) when licical did read | 372 | (crashes or program hangs) when licical did read |
369 | files, which were not stored from KO/Pi. | 373 | files, which were not stored from KO/Pi. |
370 | I do not know, if the new libical works perfect, | 374 | I do not know, if the new libical works perfect, |
371 | but actually it works much better than | 375 | but actually it works much better than |
372 | the old version. | 376 | the old version. |
373 | There are no problems with compatibility with | 377 | There are no problems with compatibility with |
374 | old calendar files of KO/Pi, of course! | 378 | old calendar files of KO/Pi, of course! |
375 | 6) | 379 | 6) |
376 | New in KA/Pi: | 380 | New in KA/Pi: |
377 | Opie addressbook resource connector available! | 381 | Opie addressbook resource connector available! |
378 | You will need libopie1 and the opie addressbook, | 382 | You will need libopie1 and the opie addressbook, |
379 | of course. | 383 | of course. |
380 | With the Opie addressbook resource connector, | 384 | With the Opie addressbook resource connector, |
381 | you can access the Opie addressbook readonly in KA/Pi. | 385 | you can access the Opie addressbook readonly in KA/Pi. |
382 | If you want to edit or import the data into KA/Pi, | 386 | If you want to edit or import the data into KA/Pi, |
383 | do this: | 387 | do this: |
384 | a) Create an Opie resource. | 388 | a) Create an Opie resource. |
385 | (Menu: Settings-Configure Resources). | 389 | (Menu: Settings-Configure Resources). |
386 | After configuration and restarting KA/Pi you should see | 390 | After configuration and restarting KA/Pi you should see |
387 | the Opie contacts in KA/Pi. | 391 | the Opie contacts in KA/Pi. |
388 | b) Select some or all Opie contacts. | 392 | b) Select some or all Opie contacts. |
389 | (NOTE: +++++ | 393 | (NOTE: +++++ |
390 | To know exactly, what contacts are Opie contacts, | 394 | To know exactly, what contacts are Opie contacts, |
391 | do this: Choose menu: | 395 | do this: Choose menu: |
392 | View-Modify View - TAB Fields. | 396 | View-Modify View - TAB Fields. |
393 | Select in the above list "Resource" and click | 397 | Select in the above list "Resource" and click |
394 | down arrow to add it to the "Selected fields". | 398 | down arrow to add it to the "Selected fields". |
395 | Click OK. | 399 | Click OK. |
396 | Now you have a new column "Resource" in your list, | 400 | Now you have a new column "Resource" in your list, |
397 | where you can see, what an Opie resource is. | 401 | where you can see, what an Opie resource is. |
398 | ++++ NOTE end.) | 402 | ++++ NOTE end.) |
399 | Ok, we do have now some Opie contacts seleted. | 403 | Ok, we do have now some Opie contacts seleted. |
400 | (Use SHIFT or CTRL key in order to multiple select). | 404 | (Use SHIFT or CTRL key in order to multiple select). |
401 | c) Choose menu: Edit-Copy. | 405 | c) Choose menu: Edit-Copy. |
402 | d) Choose menu: Edit-Paste. | 406 | d) Choose menu: Edit-Paste. |
403 | e) Select the resource, you want to add the contacts to. | 407 | e) Select the resource, you want to add the contacts to. |
404 | Congrats! Now you have read/write access to the copied | 408 | Congrats! Now you have read/write access to the copied |
405 | opie contacts as "real" KA/Pi contacts. | 409 | opie contacts as "real" KA/Pi contacts. |
406 | 410 | ||
407 | 411 | ||
408 | ********** VERSION 1.9.1 ************ | 412 | ********** VERSION 1.9.1 ************ |
409 | 1) | 413 | 1) |
410 | +++ IMPORTANT 1 +++ | 414 | +++ IMPORTANT 1 +++ |
411 | 415 | ||
412 | The storing place of the default calendar | 416 | The storing place of the default calendar |
413 | file has changed! | 417 | file has changed! |
414 | The default calendar file was | 418 | The default calendar file was |
415 | Applications/korganizer/mycalendar.ics | 419 | Applications/korganizer/mycalendar.ics |
416 | on Zaurus and | 420 | on Zaurus and |
417 | (yourHomeDir)/korganizer/mycalendar.ics | 421 | (yourHomeDir)/korganizer/mycalendar.ics |
418 | on Windows/Linux desktop. Now it is | 422 | on Windows/Linux desktop. Now it is |
419 | (yourHomeDir)/kdepim/korganizer/mycalendar.ics | 423 | (yourHomeDir)/kdepim/korganizer/mycalendar.ics |
420 | on Zaurus, Windows and Linux. | 424 | on Zaurus, Windows and Linux. |
421 | To load the old file, choose menu | 425 | To load the old file, choose menu |
422 | File-Load calendar backup. | 426 | File-Load calendar backup. |
423 | (It should be loaded automatically | 427 | (It should be loaded automatically |
424 | at startup with a warning message displayed). | 428 | at startup with a warning message displayed). |
425 | The place of the configuration file has changed too. | 429 | The place of the configuration file has changed too. |
426 | If you want to use your old KO/Pi config, | 430 | If you want to use your old KO/Pi config, |
427 | copy it to | 431 | copy it to |
428 | (yourHomeDir)/kdepim/config/korganizerrc | 432 | (yourHomeDir)/kdepim/config/korganizerrc |
429 | Please read VERSION 1.9.0 - topic 3) as well! | 433 | Please read VERSION 1.9.0 - topic 3) as well! |
430 | 434 | ||
431 | +++ IMPORTANT 2 +++ | 435 | +++ IMPORTANT 2 +++ |
432 | 436 | ||
433 | Because of the new paths, you will need | 437 | Because of the new paths, you will need |
434 | a new version of the KO/Pi alarm applet | 438 | a new version of the KO/Pi alarm applet |
435 | for Zaurus. | 439 | for Zaurus. |
436 | Use version >= 1.9.1 | 440 | Use version >= 1.9.1 |
437 | 441 | ||
438 | 2) | 442 | 2) |
439 | Now the QWhat'sThis Icon works for items | 443 | Now the QWhat'sThis Icon works for items |
440 | in the month view as well. | 444 | in the month view as well. |
441 | (See VERSION 1.7.8 Topic 1) ). | 445 | (See VERSION 1.7.8 Topic 1) ). |
442 | 3) | 446 | 3) |
443 | You can import birtsdays/anniversaries | 447 | You can import birtsdays/anniversaries |
444 | from KA/Pi into KO/Pi. | 448 | from KA/Pi into KO/Pi. |
445 | Choose menu File-Import birthdays. | 449 | Choose menu File-Import birthdays. |
446 | If you import twice, already imported items | 450 | If you import twice, already imported items |
447 | will not be imported again, if they | 451 | will not be imported again, if they |
448 | have not been changed in KO/Pi. | 452 | have not been changed in KO/Pi. |
449 | 4) | 453 | 4) |
450 | When syncing with sharp DTM, now a progress | 454 | When syncing with sharp DTM, now a progress |
451 | is shown, when the data is written back. | 455 | is shown, when the data is written back. |
452 | If there is much data in KO/Pi and no data | 456 | If there is much data in KO/Pi and no data |
453 | in DTM, that can take a long time. | 457 | in DTM, that can take a long time. |
454 | (But only for the first time ). | 458 | (But only for the first time ). |
455 | 5) | 459 | 5) |
456 | In the search dialog, you can search | 460 | In the search dialog, you can search |
457 | now for the name/email of an attendee | 461 | now for the name/email of an attendee |
458 | of an event/todo. | 462 | of an event/todo. |
459 | To get more space for displaying | 463 | To get more space for displaying |
460 | search results, the buttons | 464 | search results, the buttons |
461 | for "search" and "close" on the | 465 | for "search" and "close" on the |
462 | bottom are removed in the PDA version. | 466 | bottom are removed in the PDA version. |
463 | You have to click OK in the top right | 467 | You have to click OK in the top right |
464 | corner to do a search. | 468 | corner to do a search. |
465 | 6) | 469 | 6) |
466 | Now it is possible to disable the displaying | 470 | Now it is possible to disable the displaying |
467 | of todo items in the Allday part of the Agenda. | 471 | of todo items in the Allday part of the Agenda. |
468 | Choose Menu Action-Configure, | 472 | Choose Menu Action-Configure, |
469 | TAB Todo View, checkbox | 473 | TAB Todo View, checkbox |
470 | "Allday Agenda view shows todos" | 474 | "Allday Agenda view shows todos" |
471 | 7) | 475 | 7) |
472 | If FastLoad is enabled, now the settings and the | 476 | If FastLoad is enabled, now the settings and the |
473 | calendar data are saved, when KO/Pi is closed. | 477 | calendar data are saved, when KO/Pi is closed. |
474 | (If no Fastload is enabled, KO/Pi saves | 478 | (If no Fastload is enabled, KO/Pi saves |
475 | the data as well, of course) | 479 | the data as well, of course) |
476 | 8) | 480 | 8) |
477 | The Agenda View has a minimize-splitter now, | 481 | The Agenda View has a minimize-splitter now, |
478 | such that the height of the allday part can be | 482 | such that the height of the allday part can be |
479 | changed quickly. | 483 | changed quickly. |
480 | 484 | ||
481 | ********** VERSION 1.9.0 ************ | 485 | ********** VERSION 1.9.0 ************ |
482 | 1) | 486 | 1) |
483 | KO/Pi is now merged with the new microKDE from KA/Pi. | 487 | KO/Pi is now merged with the new microKDE from KA/Pi. |
484 | KO/Pi accesses now KA/Pi as the addressbook. | 488 | KO/Pi accesses now KA/Pi as the addressbook. |
485 | The other ddressbook-plugins are not working any longer. | 489 | The other ddressbook-plugins are not working any longer. |
486 | (It is planned, that later KA/Pi itself uses these plugins) | 490 | (It is planned, that later KA/Pi itself uses these plugins) |
487 | New versions of KO/Pi are only available | 491 | New versions of KO/Pi are only available |
488 | together with KA/Pi as the KDE-Pim/Pi package. | 492 | together with KA/Pi as the KDE-Pim/Pi package. |
489 | 2) | 493 | 2) |
490 | If you click on an attendee of a meeting in the | 494 | If you click on an attendee of a meeting in the |
491 | event viewer, a detailed summary of the | 495 | event viewer, a detailed summary of the |
492 | attendee is shown. | 496 | attendee is shown. |
493 | 3) | 497 | 3) |
494 | The place of the configuration file has changed. | 498 | The place of the configuration file has changed. |
495 | If you want to use your old KO/Pi config, copy | 499 | If you want to use your old KO/Pi config, copy |
496 | Applications/korganizer/config_korganizerrc | 500 | Applications/korganizer/config_korganizerrc |
497 | to | 501 | to |
498 | Applications/korganizer/config/korganizerrc | 502 | Applications/korganizer/config/korganizerrc |
499 | 503 | ||
500 | ********** VERSION 1.7.8 ************ | 504 | ********** VERSION 1.7.8 ************ |
501 | 1) | 505 | 1) |
502 | Now the QWhat'sThis ist working. | 506 | Now the QWhat'sThis ist working. |
503 | Enable the QWhat'sThis icon in the toolbar. | 507 | Enable the QWhat'sThis icon in the toolbar. |
504 | (You have to restart to reload the changed toolbar config). | 508 | (You have to restart to reload the changed toolbar config). |
505 | Now click on the QWhat'sThis Icon | 509 | Now click on the QWhat'sThis Icon |
506 | in the top right corner of KO/Pi. | 510 | in the top right corner of KO/Pi. |
507 | Then click on an item in the Agenda View: | 511 | Then click on an item in the Agenda View: |
508 | You will get a detailed display of the items content. | 512 | You will get a detailed display of the items content. |
509 | 2) | 513 | 2) |
510 | Some other very minor changes. | 514 | Some other very minor changes. |
511 | But I have forgotten the details ... | 515 | But I have forgotten the details ... |
512 | For that reason I start this log here: | 516 | For that reason I start this log here: |
513 | To document my changes, when I am doing it. | 517 | To document my changes, when I am doing it. |
514 | 518 | ||
515 | ********** VERSION 1.7.7 ************ | 519 | ********** VERSION 1.7.7 ************ |
516 | Stable Version of KO/Pi \ No newline at end of file | 520 | Stable Version of KO/Pi \ No newline at end of file |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index c75b4bc..9ef97c9 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2226,754 +2226,754 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString | |||
2226 | QString anni; | 2226 | QString anni; |
2227 | QString formattedbday; | 2227 | QString formattedbday; |
2228 | 2228 | ||
2229 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) | 2229 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) |
2230 | { | 2230 | { |
2231 | if ( ! bar.isVisible() ) | 2231 | if ( ! bar.isVisible() ) |
2232 | return; | 2232 | return; |
2233 | bar.setProgress( count++ ); | 2233 | bar.setProgress( count++ ); |
2234 | qApp->processEvents(); | 2234 | qApp->processEvents(); |
2235 | bday = (*it).birthday().date(); | 2235 | bday = (*it).birthday().date(); |
2236 | anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); | 2236 | anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); |
2237 | 2237 | ||
2238 | if ( bday.isValid() || !anni.isEmpty()) | 2238 | if ( bday.isValid() || !anni.isEmpty()) |
2239 | { | 2239 | { |
2240 | if (bday.isValid()) | 2240 | if (bday.isValid()) |
2241 | formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); | 2241 | formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); |
2242 | else | 2242 | else |
2243 | formattedbday = "NOTVALID"; | 2243 | formattedbday = "NOTVALID"; |
2244 | if (anni.isEmpty()) | 2244 | if (anni.isEmpty()) |
2245 | anni = "INVALID"; | 2245 | anni = "INVALID"; |
2246 | 2246 | ||
2247 | birthdayList.append(formattedbday); | 2247 | birthdayList.append(formattedbday); |
2248 | anniversaryList.append(anni); //should be ISODate | 2248 | anniversaryList.append(anni); //should be ISODate |
2249 | realNameList.append((*it).realName()); | 2249 | realNameList.append((*it).realName()); |
2250 | preferredEmailList.append((*it).preferredEmail()); | 2250 | preferredEmailList.append((*it).preferredEmail()); |
2251 | assembledNameList.append((*it).assembledName()); | 2251 | assembledNameList.append((*it).assembledName()); |
2252 | uidList.append((*it).uid()); | 2252 | uidList.append((*it).uid()); |
2253 | 2253 | ||
2254 | qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() ); | 2254 | qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() ); |
2255 | } | 2255 | } |
2256 | } | 2256 | } |
2257 | 2257 | ||
2258 | bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); | 2258 | bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); |
2259 | 2259 | ||
2260 | } | 2260 | } |
2261 | 2261 | ||
2262 | /* this method will be called through the QCop interface from other apps to show details of a contact. | 2262 | /* this method will be called through the QCop interface from other apps to show details of a contact. |
2263 | */ | 2263 | */ |
2264 | void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) | 2264 | void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) |
2265 | { | 2265 | { |
2266 | qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); | 2266 | qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); |
2267 | 2267 | ||
2268 | QString foundUid = QString::null; | 2268 | QString foundUid = QString::null; |
2269 | if ( ! uid.isEmpty() ) { | 2269 | if ( ! uid.isEmpty() ) { |
2270 | Addressee adrr = mAddressBook->findByUid( uid ); | 2270 | Addressee adrr = mAddressBook->findByUid( uid ); |
2271 | if ( !adrr.isEmpty() ) { | 2271 | if ( !adrr.isEmpty() ) { |
2272 | foundUid = uid; | 2272 | foundUid = uid; |
2273 | } | 2273 | } |
2274 | if ( email == "sendbacklist" ) { | 2274 | if ( email == "sendbacklist" ) { |
2275 | //qDebug("ssssssssssssssssssssssend "); | 2275 | //qDebug("ssssssssssssssssssssssend "); |
2276 | QStringList nameList; | 2276 | QStringList nameList; |
2277 | QStringList emailList; | 2277 | QStringList emailList; |
2278 | QStringList uidList; | 2278 | QStringList uidList; |
2279 | nameList.append(adrr.realName()); | 2279 | nameList.append(adrr.realName()); |
2280 | emailList = adrr.emails(); | 2280 | emailList = adrr.emails(); |
2281 | uidList.append( adrr.preferredEmail()); | 2281 | uidList.append( adrr.preferredEmail()); |
2282 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); | 2282 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); |
2283 | return; | 2283 | return; |
2284 | } | 2284 | } |
2285 | 2285 | ||
2286 | } | 2286 | } |
2287 | 2287 | ||
2288 | if ( email == "sendbacklist" ) | 2288 | if ( email == "sendbacklist" ) |
2289 | return; | 2289 | return; |
2290 | if (foundUid.isEmpty()) | 2290 | if (foundUid.isEmpty()) |
2291 | { | 2291 | { |
2292 | //find the uid of the person first | 2292 | //find the uid of the person first |
2293 | Addressee::List namelist; | 2293 | Addressee::List namelist; |
2294 | Addressee::List emaillist; | 2294 | Addressee::List emaillist; |
2295 | 2295 | ||
2296 | if (!name.isEmpty()) | 2296 | if (!name.isEmpty()) |
2297 | namelist = mAddressBook->findByName( name ); | 2297 | namelist = mAddressBook->findByName( name ); |
2298 | 2298 | ||
2299 | if (!email.isEmpty()) | 2299 | if (!email.isEmpty()) |
2300 | emaillist = mAddressBook->findByEmail( email ); | 2300 | emaillist = mAddressBook->findByEmail( email ); |
2301 | qDebug("count %d %d ", namelist.count(),emaillist.count() ); | 2301 | qDebug("count %d %d ", namelist.count(),emaillist.count() ); |
2302 | //check if we have a match in Namelist and Emaillist | 2302 | //check if we have a match in Namelist and Emaillist |
2303 | if ((namelist.count() == 0) && (emaillist.count() > 0)) { | 2303 | if ((namelist.count() == 0) && (emaillist.count() > 0)) { |
2304 | foundUid = emaillist[0].uid(); | 2304 | foundUid = emaillist[0].uid(); |
2305 | } | 2305 | } |
2306 | else if ((namelist.count() > 0) && (emaillist.count() == 0)) | 2306 | else if ((namelist.count() > 0) && (emaillist.count() == 0)) |
2307 | foundUid = namelist[0].uid(); | 2307 | foundUid = namelist[0].uid(); |
2308 | else | 2308 | else |
2309 | { | 2309 | { |
2310 | for (int i = 0; i < namelist.count(); i++) | 2310 | for (int i = 0; i < namelist.count(); i++) |
2311 | { | 2311 | { |
2312 | for (int j = 0; j < emaillist.count(); j++) | 2312 | for (int j = 0; j < emaillist.count(); j++) |
2313 | { | 2313 | { |
2314 | if (namelist[i] == emaillist[j]) | 2314 | if (namelist[i] == emaillist[j]) |
2315 | { | 2315 | { |
2316 | foundUid = namelist[i].uid(); | 2316 | foundUid = namelist[i].uid(); |
2317 | } | 2317 | } |
2318 | } | 2318 | } |
2319 | } | 2319 | } |
2320 | } | 2320 | } |
2321 | } | 2321 | } |
2322 | else | 2322 | else |
2323 | { | 2323 | { |
2324 | foundUid = uid; | 2324 | foundUid = uid; |
2325 | } | 2325 | } |
2326 | 2326 | ||
2327 | if (!foundUid.isEmpty()) | 2327 | if (!foundUid.isEmpty()) |
2328 | { | 2328 | { |
2329 | 2329 | ||
2330 | // raise Ka/Pi if it is in the background | 2330 | // raise Ka/Pi if it is in the background |
2331 | #ifndef DESKTOP_VERSION | 2331 | #ifndef DESKTOP_VERSION |
2332 | #ifndef KORG_NODCOP | 2332 | #ifndef KORG_NODCOP |
2333 | //QCopEnvelope e("QPE/Application/kapi", "raise()"); | 2333 | //QCopEnvelope e("QPE/Application/kapi", "raise()"); |
2334 | #endif | 2334 | #endif |
2335 | #endif | 2335 | #endif |
2336 | 2336 | ||
2337 | mMainWindow->showMaximized(); | 2337 | mMainWindow->showMaximized(); |
2338 | mMainWindow-> raise(); | 2338 | mMainWindow-> raise(); |
2339 | 2339 | ||
2340 | mViewManager->setSelected( "", false); | 2340 | mViewManager->setSelected( "", false); |
2341 | mViewManager->refreshView( "" ); | 2341 | mViewManager->refreshView( "" ); |
2342 | mViewManager->setSelected( foundUid, true ); | 2342 | mViewManager->setSelected( foundUid, true ); |
2343 | mViewManager->refreshView( foundUid ); | 2343 | mViewManager->refreshView( foundUid ); |
2344 | 2344 | ||
2345 | if ( !mMultipleViewsAtOnce ) | 2345 | if ( !mMultipleViewsAtOnce ) |
2346 | { | 2346 | { |
2347 | setDetailsVisible( true ); | 2347 | setDetailsVisible( true ); |
2348 | mActionDetails->setChecked(true); | 2348 | mActionDetails->setChecked(true); |
2349 | } | 2349 | } |
2350 | } | 2350 | } |
2351 | } | 2351 | } |
2352 | 2352 | ||
2353 | void KABCore::whatsnew() | 2353 | void KABCore::whatsnew() |
2354 | { | 2354 | { |
2355 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 2355 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
2356 | } | 2356 | } |
2357 | void KABCore::synchowto() | 2357 | void KABCore::synchowto() |
2358 | { | 2358 | { |
2359 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 2359 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
2360 | } | 2360 | } |
2361 | void KABCore::kdesynchowto() | 2361 | void KABCore::kdesynchowto() |
2362 | { | 2362 | { |
2363 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 2363 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
2364 | } | 2364 | } |
2365 | void KABCore::multisynchowto() | 2365 | void KABCore::multisynchowto() |
2366 | { | 2366 | { |
2367 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 2367 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
2368 | } | 2368 | } |
2369 | void KABCore::faq() | 2369 | void KABCore::faq() |
2370 | { | 2370 | { |
2371 | KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); | 2371 | KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); |
2372 | } | 2372 | } |
2373 | 2373 | ||
2374 | #include <libkcal/syncdefines.h> | 2374 | #include <libkcal/syncdefines.h> |
2375 | 2375 | ||
2376 | KABC::Addressee KABCore::getLastSyncAddressee() | 2376 | KABC::Addressee KABCore::getLastSyncAddressee() |
2377 | { | 2377 | { |
2378 | Addressee lse; | 2378 | Addressee lse; |
2379 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2379 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2380 | 2380 | ||
2381 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); | 2381 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); |
2382 | lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); | 2382 | lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); |
2383 | if (lse.isEmpty()) { | 2383 | if (lse.isEmpty()) { |
2384 | qDebug("Creating new last-syncAddressee "); | 2384 | qDebug("Creating new last-syncAddressee "); |
2385 | lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); | 2385 | lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); |
2386 | QString sum = ""; | 2386 | QString sum = ""; |
2387 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) | 2387 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) |
2388 | sum = "E: "; | 2388 | sum = "E: "; |
2389 | lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); | 2389 | lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); |
2390 | lse.setRevision( mLastAddressbookSync ); | 2390 | lse.setRevision( mLastAddressbookSync ); |
2391 | lse.setCategories( i18n("SyncEvent") ); | 2391 | lse.setCategories( i18n("SyncEvent") ); |
2392 | mAddressBook->insertAddressee( lse ); | 2392 | mAddressBook->insertAddressee( lse ); |
2393 | } | 2393 | } |
2394 | return lse; | 2394 | return lse; |
2395 | } | 2395 | } |
2396 | int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) | 2396 | int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) |
2397 | { | 2397 | { |
2398 | 2398 | ||
2399 | //void setZaurusId(int id); | 2399 | //void setZaurusId(int id); |
2400 | // int zaurusId() const; | 2400 | // int zaurusId() const; |
2401 | // void setZaurusUid(int id); | 2401 | // void setZaurusUid(int id); |
2402 | // int zaurusUid() const; | 2402 | // int zaurusUid() const; |
2403 | // void setZaurusStat(int id); | 2403 | // void setZaurusStat(int id); |
2404 | // int zaurusStat() const; | 2404 | // int zaurusStat() const; |
2405 | // 0 equal | 2405 | // 0 equal |
2406 | // 1 take local | 2406 | // 1 take local |
2407 | // 2 take remote | 2407 | // 2 take remote |
2408 | // 3 cancel | 2408 | // 3 cancel |
2409 | QDateTime lastSync = mLastAddressbookSync; | 2409 | QDateTime lastSync = mLastAddressbookSync; |
2410 | QDateTime localMod = local->revision(); | 2410 | QDateTime localMod = local->revision(); |
2411 | QDateTime remoteMod = remote->revision(); | 2411 | QDateTime remoteMod = remote->revision(); |
2412 | 2412 | ||
2413 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2413 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2414 | 2414 | ||
2415 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2415 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2416 | bool remCh, locCh; | 2416 | bool remCh, locCh; |
2417 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); | 2417 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); |
2418 | 2418 | ||
2419 | //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); | 2419 | //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); |
2420 | locCh = ( localMod > mLastAddressbookSync ); | 2420 | locCh = ( localMod > mLastAddressbookSync ); |
2421 | if ( !remCh && ! locCh ) { | 2421 | if ( !remCh && ! locCh ) { |
2422 | //qDebug("both not changed "); | 2422 | //qDebug("both not changed "); |
2423 | lastSync = localMod.addDays(1); | 2423 | lastSync = localMod.addDays(1); |
2424 | if ( mode <= SYNC_PREF_ASK ) | 2424 | if ( mode <= SYNC_PREF_ASK ) |
2425 | return 0; | 2425 | return 0; |
2426 | } else { | 2426 | } else { |
2427 | if ( locCh ) { | 2427 | if ( locCh ) { |
2428 | //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); | 2428 | //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); |
2429 | lastSync = localMod.addDays( -1 ); | 2429 | lastSync = localMod.addDays( -1 ); |
2430 | if ( !remCh ) | 2430 | if ( !remCh ) |
2431 | remoteMod =( lastSync.addDays( -1 ) ); | 2431 | remoteMod =( lastSync.addDays( -1 ) ); |
2432 | } else { | 2432 | } else { |
2433 | //qDebug(" not loc changed "); | 2433 | //qDebug(" not loc changed "); |
2434 | lastSync = localMod.addDays( 1 ); | 2434 | lastSync = localMod.addDays( 1 ); |
2435 | if ( remCh ) | 2435 | if ( remCh ) |
2436 | remoteMod =( lastSync.addDays( 1 ) ); | 2436 | remoteMod =( lastSync.addDays( 1 ) ); |
2437 | 2437 | ||
2438 | } | 2438 | } |
2439 | } | 2439 | } |
2440 | full = true; | 2440 | full = true; |
2441 | if ( mode < SYNC_PREF_ASK ) | 2441 | if ( mode < SYNC_PREF_ASK ) |
2442 | mode = SYNC_PREF_ASK; | 2442 | mode = SYNC_PREF_ASK; |
2443 | } else { | 2443 | } else { |
2444 | if ( localMod == remoteMod ) | 2444 | if ( localMod == remoteMod ) |
2445 | return 0; | 2445 | return 0; |
2446 | 2446 | ||
2447 | } | 2447 | } |
2448 | // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); | 2448 | // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); |
2449 | 2449 | ||
2450 | //qDebug("%s %d %s %d", local->lastModified().toString().latin1() , localMod, remote->lastModified().toString().latin1(), remoteMod); | 2450 | //qDebug("%s %d %s %d", local->lastModified().toString().latin1() , localMod, remote->lastModified().toString().latin1(), remoteMod); |
2451 | //qDebug("%d %d %d %d ", local->lastModified().time().second(), local->lastModified().time().msec(), remote->lastModified().time().second(), remote->lastModified().time().msec() ); | 2451 | //qDebug("%d %d %d %d ", local->lastModified().time().second(), local->lastModified().time().msec(), remote->lastModified().time().second(), remote->lastModified().time().msec() ); |
2452 | //full = true; //debug only | 2452 | //full = true; //debug only |
2453 | if ( full ) { | 2453 | if ( full ) { |
2454 | bool equ = ( (*local) == (*remote) ); | 2454 | bool equ = ( (*local) == (*remote) ); |
2455 | if ( equ ) { | 2455 | if ( equ ) { |
2456 | //qDebug("equal "); | 2456 | //qDebug("equal "); |
2457 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2457 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2458 | local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); | 2458 | local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); |
2459 | } | 2459 | } |
2460 | if ( mode < SYNC_PREF_FORCE_LOCAL ) | 2460 | if ( mode < SYNC_PREF_FORCE_LOCAL ) |
2461 | return 0; | 2461 | return 0; |
2462 | 2462 | ||
2463 | }//else //debug only | 2463 | }//else //debug only |
2464 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); | 2464 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); |
2465 | } | 2465 | } |
2466 | int result; | 2466 | int result; |
2467 | bool localIsNew; | 2467 | bool localIsNew; |
2468 | //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() ); | 2468 | //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() ); |
2469 | 2469 | ||
2470 | if ( full && mode < SYNC_PREF_NEWEST ) | 2470 | if ( full && mode < SYNC_PREF_NEWEST ) |
2471 | mode = SYNC_PREF_ASK; | 2471 | mode = SYNC_PREF_ASK; |
2472 | 2472 | ||
2473 | switch( mode ) { | 2473 | switch( mode ) { |
2474 | case SYNC_PREF_LOCAL: | 2474 | case SYNC_PREF_LOCAL: |
2475 | if ( lastSync > remoteMod ) | 2475 | if ( lastSync > remoteMod ) |
2476 | return 1; | 2476 | return 1; |
2477 | if ( lastSync > localMod ) | 2477 | if ( lastSync > localMod ) |
2478 | return 2; | 2478 | return 2; |
2479 | return 1; | 2479 | return 1; |
2480 | break; | 2480 | break; |
2481 | case SYNC_PREF_REMOTE: | 2481 | case SYNC_PREF_REMOTE: |
2482 | if ( lastSync > remoteMod ) | 2482 | if ( lastSync > remoteMod ) |
2483 | return 1; | 2483 | return 1; |
2484 | if ( lastSync > localMod ) | 2484 | if ( lastSync > localMod ) |
2485 | return 2; | 2485 | return 2; |
2486 | return 2; | 2486 | return 2; |
2487 | break; | 2487 | break; |
2488 | case SYNC_PREF_NEWEST: | 2488 | case SYNC_PREF_NEWEST: |
2489 | if ( localMod > remoteMod ) | 2489 | if ( localMod > remoteMod ) |
2490 | return 1; | 2490 | return 1; |
2491 | else | 2491 | else |
2492 | return 2; | 2492 | return 2; |
2493 | break; | 2493 | break; |
2494 | case SYNC_PREF_ASK: | 2494 | case SYNC_PREF_ASK: |
2495 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 2495 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
2496 | if ( lastSync > remoteMod ) | 2496 | if ( lastSync > remoteMod ) |
2497 | return 1; | 2497 | return 1; |
2498 | if ( lastSync > localMod ) | 2498 | if ( lastSync > localMod ) |
2499 | return 2; | 2499 | return 2; |
2500 | localIsNew = localMod >= remoteMod; | 2500 | localIsNew = localMod >= remoteMod; |
2501 | //qDebug("conflict! ************************************** "); | 2501 | //qDebug("conflict! ************************************** "); |
2502 | { | 2502 | { |
2503 | KPIM::AddresseeChooser acd ( *local,*remote, localIsNew , this ); | 2503 | KPIM::AddresseeChooser acd ( *local,*remote, localIsNew , this ); |
2504 | result = acd.executeD(localIsNew); | 2504 | result = acd.executeD(localIsNew); |
2505 | return result; | 2505 | return result; |
2506 | } | 2506 | } |
2507 | break; | 2507 | break; |
2508 | case SYNC_PREF_FORCE_LOCAL: | 2508 | case SYNC_PREF_FORCE_LOCAL: |
2509 | return 1; | 2509 | return 1; |
2510 | break; | 2510 | break; |
2511 | case SYNC_PREF_FORCE_REMOTE: | 2511 | case SYNC_PREF_FORCE_REMOTE: |
2512 | return 2; | 2512 | return 2; |
2513 | break; | 2513 | break; |
2514 | 2514 | ||
2515 | default: | 2515 | default: |
2516 | // SYNC_PREF_TAKE_BOTH not implemented | 2516 | // SYNC_PREF_TAKE_BOTH not implemented |
2517 | break; | 2517 | break; |
2518 | } | 2518 | } |
2519 | return 0; | 2519 | return 0; |
2520 | } | 2520 | } |
2521 | 2521 | ||
2522 | 2522 | ||
2523 | bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) | 2523 | bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) |
2524 | { | 2524 | { |
2525 | bool syncOK = true; | 2525 | bool syncOK = true; |
2526 | int addedAddressee = 0; | 2526 | int addedAddressee = 0; |
2527 | int addedAddresseeR = 0; | 2527 | int addedAddresseeR = 0; |
2528 | int deletedAddresseeR = 0; | 2528 | int deletedAddresseeR = 0; |
2529 | int deletedAddresseeL = 0; | 2529 | int deletedAddresseeL = 0; |
2530 | int changedLocal = 0; | 2530 | int changedLocal = 0; |
2531 | int changedRemote = 0; | 2531 | int changedRemote = 0; |
2532 | 2532 | ||
2533 | QString mCurrentSyncName = syncManager->getCurrentSyncName(); | 2533 | QString mCurrentSyncName = syncManager->getCurrentSyncName(); |
2534 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2534 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2535 | 2535 | ||
2536 | //QPtrList<Addressee> el = local->rawAddressees(); | 2536 | //QPtrList<Addressee> el = local->rawAddressees(); |
2537 | Addressee addresseeR; | 2537 | Addressee addresseeR; |
2538 | QString uid; | 2538 | QString uid; |
2539 | int take; | 2539 | int take; |
2540 | Addressee addresseeL; | 2540 | Addressee addresseeL; |
2541 | Addressee addresseeRSync; | 2541 | Addressee addresseeRSync; |
2542 | Addressee addresseeLSync; | 2542 | Addressee addresseeLSync; |
2543 | // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); | 2543 | // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); |
2544 | //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); | 2544 | //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); |
2545 | bool fullDateRange = false; | 2545 | bool fullDateRange = false; |
2546 | local->resetTempSyncStat(); | 2546 | local->resetTempSyncStat(); |
2547 | mLastAddressbookSync = QDateTime::currentDateTime(); | 2547 | mLastAddressbookSync = QDateTime::currentDateTime(); |
2548 | if ( syncManager->syncWithDesktop() ) { | 2548 | if ( syncManager->syncWithDesktop() ) { |
2549 | // remote->removeSyncInfo( QString());//remove all info | 2549 | // remote->removeSyncInfo( QString());//remove all info |
2550 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { | 2550 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { |
2551 | mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; | 2551 | mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; |
2552 | qDebug("using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); | 2552 | qDebug("using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); |
2553 | } else { | 2553 | } else { |
2554 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); | 2554 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); |
2555 | } | 2555 | } |
2556 | } | 2556 | } |
2557 | QDateTime modifiedCalendar = mLastAddressbookSync; | 2557 | QDateTime modifiedCalendar = mLastAddressbookSync; |
2558 | addresseeLSync = getLastSyncAddressee(); | 2558 | addresseeLSync = getLastSyncAddressee(); |
2559 | qDebug("Last Sync %s ", addresseeLSync.revision().toString().latin1()); | 2559 | qDebug("Last Sync %s ", addresseeLSync.revision().toString().latin1()); |
2560 | addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); | 2560 | addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); |
2561 | if ( !addresseeR.isEmpty() ) { | 2561 | if ( !addresseeR.isEmpty() ) { |
2562 | addresseeRSync = addresseeR; | 2562 | addresseeRSync = addresseeR; |
2563 | remote->removeAddressee(addresseeR ); | 2563 | remote->removeAddressee(addresseeR ); |
2564 | 2564 | ||
2565 | } else { | 2565 | } else { |
2566 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2566 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2567 | addresseeRSync = addresseeLSync ; | 2567 | addresseeRSync = addresseeLSync ; |
2568 | } else { | 2568 | } else { |
2569 | qDebug("FULLDATE 1"); | 2569 | qDebug("FULLDATE 1"); |
2570 | fullDateRange = true; | 2570 | fullDateRange = true; |
2571 | Addressee newAdd; | 2571 | Addressee newAdd; |
2572 | addresseeRSync = newAdd; | 2572 | addresseeRSync = newAdd; |
2573 | addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); | 2573 | addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); |
2574 | addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); | 2574 | addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); |
2575 | addresseeRSync.setRevision( mLastAddressbookSync ); | 2575 | addresseeRSync.setRevision( mLastAddressbookSync ); |
2576 | addresseeRSync.setCategories( i18n("SyncAddressee") ); | 2576 | addresseeRSync.setCategories( i18n("SyncAddressee") ); |
2577 | } | 2577 | } |
2578 | } | 2578 | } |
2579 | if ( addresseeLSync.revision() == mLastAddressbookSync ) { | 2579 | if ( addresseeLSync.revision() == mLastAddressbookSync ) { |
2580 | qDebug("FULLDATE 2"); | 2580 | qDebug("FULLDATE 2"); |
2581 | fullDateRange = true; | 2581 | fullDateRange = true; |
2582 | } | 2582 | } |
2583 | if ( ! fullDateRange ) { | 2583 | if ( ! fullDateRange ) { |
2584 | if ( addresseeLSync.revision() != addresseeRSync.revision() ) { | 2584 | if ( addresseeLSync.revision() != addresseeRSync.revision() ) { |
2585 | 2585 | ||
2586 | // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() ); | 2586 | // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() ); |
2587 | //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec()); | 2587 | //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec()); |
2588 | fullDateRange = true; | 2588 | fullDateRange = true; |
2589 | qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() ); | 2589 | qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() ); |
2590 | } | 2590 | } |
2591 | } | 2591 | } |
2592 | // fullDateRange = true; // debug only! | 2592 | // fullDateRange = true; // debug only! |
2593 | if ( fullDateRange ) | 2593 | if ( fullDateRange ) |
2594 | mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365); | 2594 | mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365); |
2595 | else | 2595 | else |
2596 | mLastAddressbookSync = addresseeLSync.revision(); | 2596 | mLastAddressbookSync = addresseeLSync.revision(); |
2597 | // for resyncing if own file has changed | 2597 | // for resyncing if own file has changed |
2598 | // PENDING fixme later when implemented | 2598 | // PENDING fixme later when implemented |
2599 | #if 0 | 2599 | #if 0 |
2600 | if ( mCurrentSyncDevice == "deleteaftersync" ) { | 2600 | if ( mCurrentSyncDevice == "deleteaftersync" ) { |
2601 | mLastAddressbookSync = loadedFileVersion; | 2601 | mLastAddressbookSync = loadedFileVersion; |
2602 | qDebug("setting mLastAddressbookSync "); | 2602 | qDebug("setting mLastAddressbookSync "); |
2603 | } | 2603 | } |
2604 | #endif | 2604 | #endif |
2605 | 2605 | ||
2606 | //qDebug("*************************** "); | 2606 | //qDebug("*************************** "); |
2607 | // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); | 2607 | // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); |
2608 | QStringList er = remote->uidList(); | 2608 | QStringList er = remote->uidList(); |
2609 | Addressee inR ;//= er.first(); | 2609 | Addressee inR ;//= er.first(); |
2610 | Addressee inL; | 2610 | Addressee inL; |
2611 | 2611 | ||
2612 | syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count()); | 2612 | syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count()); |
2613 | 2613 | ||
2614 | int modulo = (er.count()/10)+1; | 2614 | int modulo = (er.count()/10)+1; |
2615 | int incCounter = 0; | 2615 | int incCounter = 0; |
2616 | while ( incCounter < er.count()) { | 2616 | while ( incCounter < er.count()) { |
2617 | if (syncManager->isProgressBarCanceled()) | 2617 | if (syncManager->isProgressBarCanceled()) |
2618 | return false; | 2618 | return false; |
2619 | if ( incCounter % modulo == 0 ) | 2619 | if ( incCounter % modulo == 0 ) |
2620 | syncManager->showProgressBar(incCounter); | 2620 | syncManager->showProgressBar(incCounter); |
2621 | 2621 | ||
2622 | uid = er[ incCounter ]; | 2622 | uid = er[ incCounter ]; |
2623 | bool skipIncidence = false; | 2623 | bool skipIncidence = false; |
2624 | if ( uid.left(19) == QString("last-syncAddressee-") ) | 2624 | if ( uid.left(19) == QString("last-syncAddressee-") ) |
2625 | skipIncidence = true; | 2625 | skipIncidence = true; |
2626 | QString idS,OidS; | 2626 | QString idS,OidS; |
2627 | qApp->processEvents(); | 2627 | qApp->processEvents(); |
2628 | if ( !skipIncidence ) { | 2628 | if ( !skipIncidence ) { |
2629 | inL = local->findByUid( uid ); | 2629 | inL = local->findByUid( uid ); |
2630 | inR = remote->findByUid( uid ); | 2630 | inR = remote->findByUid( uid ); |
2631 | //inL.setResource( 0 ); | 2631 | //inL.setResource( 0 ); |
2632 | //inR.setResource( 0 ); | 2632 | //inR.setResource( 0 ); |
2633 | if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars | 2633 | if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars |
2634 | if ( !inL.resource() || inL.resource()->includeInSync() ) { | 2634 | if ( !inL.resource() || inL.resource()->includeInSync() ) { |
2635 | if ( take = takeAddressee( &inL, &inR, mode, fullDateRange ) ) { | 2635 | if ( take = takeAddressee( &inL, &inR, mode, fullDateRange ) ) { |
2636 | //qDebug("take %d %s ", take, inL.summary().latin1()); | 2636 | //qDebug("take %d %s ", take, inL.summary().latin1()); |
2637 | if ( take == 3 ) | 2637 | if ( take == 3 ) |
2638 | return false; | 2638 | return false; |
2639 | if ( take == 1 ) {// take local ********************** | 2639 | if ( take == 1 ) {// take local ********************** |
2640 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2640 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2641 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 2641 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
2642 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 2642 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
2643 | local->insertAddressee( inL, false ); | 2643 | local->insertAddressee( inL, false ); |
2644 | idS = inR.externalUID(); | 2644 | idS = inR.externalUID(); |
2645 | OidS = inR.originalExternalUID(); | 2645 | OidS = inR.originalExternalUID(); |
2646 | } | 2646 | } |
2647 | else | 2647 | else |
2648 | idS = inR.IDStr(); | 2648 | idS = inR.IDStr(); |
2649 | remote->removeAddressee( inR ); | 2649 | remote->removeAddressee( inR ); |
2650 | inR = inL; | 2650 | inR = inL; |
2651 | inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 2651 | inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
2652 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2652 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2653 | inR.setOriginalExternalUID( OidS ); | 2653 | inR.setOriginalExternalUID( OidS ); |
2654 | inR.setExternalUID( idS ); | 2654 | inR.setExternalUID( idS ); |
2655 | if ( syncManager->syncWithDesktop() ) | 2655 | if ( syncManager->syncWithDesktop() ) |
2656 | inR.setIDStr("changed" ); | 2656 | inR.setIDStr("changed" ); |
2657 | //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); | 2657 | //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); |
2658 | } else { | 2658 | } else { |
2659 | inR.setIDStr( idS ); | 2659 | inR.setIDStr( idS ); |
2660 | } | 2660 | } |
2661 | inR.setResource( 0 ); | 2661 | inR.setResource( 0 ); |
2662 | remote->insertAddressee( inR , false); | 2662 | remote->insertAddressee( inR , false); |
2663 | ++changedRemote; | 2663 | ++changedRemote; |
2664 | } else { // take == 2 take remote ********************** | 2664 | } else { // take == 2 take remote ********************** |
2665 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2665 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2666 | if ( inR.revision().date().year() < 2004 ) | 2666 | if ( inR.revision().date().year() < 2004 ) |
2667 | inR.setRevision( modifiedCalendar ); | 2667 | inR.setRevision( modifiedCalendar ); |
2668 | } | 2668 | } |
2669 | idS = inL.IDStr(); | 2669 | idS = inL.IDStr(); |
2670 | local->removeAddressee( inL ); | 2670 | local->removeAddressee( inL ); |
2671 | inL = inR; | 2671 | inL = inR; |
2672 | inL.setIDStr( idS ); | 2672 | inL.setIDStr( idS ); |
2673 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2673 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2674 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 2674 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
2675 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 2675 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
2676 | } | 2676 | } |
2677 | inL.setResource( 0 ); | 2677 | inL.setResource( 0 ); |
2678 | local->insertAddressee( inL , false ); | 2678 | local->insertAddressee( inL , false ); |
2679 | ++changedLocal; | 2679 | ++changedLocal; |
2680 | } | 2680 | } |
2681 | } | 2681 | } |
2682 | } | 2682 | } |
2683 | } else { // no conflict ********** add or delete remote | 2683 | } else { // no conflict ********** add or delete remote |
2684 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2684 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2685 | QString des = addresseeLSync.note(); | 2685 | QString des = addresseeLSync.note(); |
2686 | if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it | 2686 | if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it |
2687 | inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); | 2687 | inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); |
2688 | remote->insertAddressee( inR, false ); | 2688 | remote->insertAddressee( inR, false ); |
2689 | ++deletedAddresseeR; | 2689 | ++deletedAddresseeR; |
2690 | } else { | 2690 | } else { |
2691 | inR.setRevision( modifiedCalendar ); | 2691 | inR.setRevision( modifiedCalendar ); |
2692 | remote->insertAddressee( inR, false ); | 2692 | remote->insertAddressee( inR, false ); |
2693 | inL = inR; | 2693 | inL = inR; |
2694 | inL.setIDStr( ":" ); | 2694 | inL.setIDStr( ":" ); |
2695 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 2695 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
2696 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 2696 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
2697 | inL.setResource( 0 ); | 2697 | inL.setResource( 0 ); |
2698 | local->insertAddressee( inL , false); | 2698 | local->insertAddressee( inL , false); |
2699 | ++addedAddressee; | 2699 | ++addedAddressee; |
2700 | } | 2700 | } |
2701 | } else { | 2701 | } else { |
2702 | if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { | 2702 | if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { |
2703 | inR.setRevision( modifiedCalendar ); | 2703 | inR.setRevision( modifiedCalendar ); |
2704 | remote->insertAddressee( inR, false ); | 2704 | remote->insertAddressee( inR, false ); |
2705 | inR.setResource( 0 ); | 2705 | inR.setResource( 0 ); |
2706 | local->insertAddressee( inR, false ); | 2706 | local->insertAddressee( inR, false ); |
2707 | ++addedAddressee; | 2707 | ++addedAddressee; |
2708 | } else { | 2708 | } else { |
2709 | // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); | 2709 | // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); |
2710 | remote->removeAddressee( inR ); | 2710 | remote->removeAddressee( inR ); |
2711 | ++deletedAddresseeR; | 2711 | ++deletedAddresseeR; |
2712 | } | 2712 | } |
2713 | } | 2713 | } |
2714 | } | 2714 | } |
2715 | } | 2715 | } |
2716 | ++incCounter; | 2716 | ++incCounter; |
2717 | } | 2717 | } |
2718 | er.clear(); | 2718 | er.clear(); |
2719 | QStringList el = local->uidList(); | 2719 | QStringList el = local->uidList(); |
2720 | modulo = (el.count()/10)+1; | 2720 | modulo = (el.count()/10)+1; |
2721 | 2721 | ||
2722 | syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); | 2722 | syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); |
2723 | incCounter = 0; | 2723 | incCounter = 0; |
2724 | while ( incCounter < el.count()) { | 2724 | while ( incCounter < el.count()) { |
2725 | qApp->processEvents(); | 2725 | qApp->processEvents(); |
2726 | if (syncManager->isProgressBarCanceled()) | 2726 | if (syncManager->isProgressBarCanceled()) |
2727 | return false; | 2727 | return false; |
2728 | if ( incCounter % modulo == 0 ) | 2728 | if ( incCounter % modulo == 0 ) |
2729 | syncManager->showProgressBar(incCounter); | 2729 | syncManager->showProgressBar(incCounter); |
2730 | uid = el[ incCounter ]; | 2730 | uid = el[ incCounter ]; |
2731 | bool skipIncidence = false; | 2731 | bool skipIncidence = false; |
2732 | if ( uid.left(19) == QString("last-syncAddressee-") ) | 2732 | if ( uid.left(19) == QString("last-syncAddressee-") ) |
2733 | skipIncidence = true; | 2733 | skipIncidence = true; |
2734 | if ( !skipIncidence ) { | 2734 | if ( !skipIncidence ) { |
2735 | inL = local->findByUid( uid ); | 2735 | inL = local->findByUid( uid ); |
2736 | if ( !inL.resource() || inL.resource()->includeInSync() ) { | 2736 | if ( !inL.resource() || inL.resource()->includeInSync() ) { |
2737 | inR = remote->findByUid( uid ); | 2737 | inR = remote->findByUid( uid ); |
2738 | if ( inR.isEmpty() ) { / no conflict ********** add or delete local | 2738 | if ( inR.isEmpty() ) { // no conflict ********** add or delete local |
2739 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2739 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2740 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 2740 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
2741 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 2741 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
2742 | local->removeAddressee( inL ); | 2742 | local->removeAddressee( inL ); |
2743 | ++deletedAddresseeL; | 2743 | ++deletedAddresseeL; |
2744 | } else { | 2744 | } else { |
2745 | if ( ! syncManager->mWriteBackExistingOnly ) { | 2745 | if ( ! syncManager->mWriteBackExistingOnly ) { |
2746 | inL.removeID(mCurrentSyncDevice ); | 2746 | inL.removeID(mCurrentSyncDevice ); |
2747 | ++addedAddresseeR; | 2747 | ++addedAddresseeR; |
2748 | inL.setRevision( modifiedCalendar ); | 2748 | inL.setRevision( modifiedCalendar ); |
2749 | local->insertAddressee( inL, false ); | 2749 | local->insertAddressee( inL, false ); |
2750 | inR = inL; | 2750 | inR = inL; |
2751 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); | 2751 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); |
2752 | inR.setResource( 0 ); | 2752 | inR.setResource( 0 ); |
2753 | remote->insertAddressee( inR, false ); | 2753 | remote->insertAddressee( inR, false ); |
2754 | } | 2754 | } |
2755 | } | 2755 | } |
2756 | } else { | 2756 | } else { |
2757 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { | 2757 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { |
2758 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 2758 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
2759 | local->removeAddressee( inL ); | 2759 | local->removeAddressee( inL ); |
2760 | ++deletedAddresseeL; | 2760 | ++deletedAddresseeL; |
2761 | } else { | 2761 | } else { |
2762 | if ( ! syncManager->mWriteBackExistingOnly ) { | 2762 | if ( ! syncManager->mWriteBackExistingOnly ) { |
2763 | ++addedAddresseeR; | 2763 | ++addedAddresseeR; |
2764 | inL.setRevision( modifiedCalendar ); | 2764 | inL.setRevision( modifiedCalendar ); |
2765 | local->insertAddressee( inL, false ); | 2765 | local->insertAddressee( inL, false ); |
2766 | inR = inL; | 2766 | inR = inL; |
2767 | inR.setIDStr( ":" ); | 2767 | inR.setIDStr( ":" ); |
2768 | inR.setResource( 0 ); | 2768 | inR.setResource( 0 ); |
2769 | remote->insertAddressee( inR, false ); | 2769 | remote->insertAddressee( inR, false ); |
2770 | } | 2770 | } |
2771 | } | 2771 | } |
2772 | } | 2772 | } |
2773 | } | 2773 | } |
2774 | } | 2774 | } |
2775 | } | 2775 | } |
2776 | ++incCounter; | 2776 | ++incCounter; |
2777 | } | 2777 | } |
2778 | el.clear(); | 2778 | el.clear(); |
2779 | syncManager->hideProgressBar(); | 2779 | syncManager->hideProgressBar(); |
2780 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); | 2780 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); |
2781 | // get rid of micro seconds | 2781 | // get rid of micro seconds |
2782 | QTime t = mLastAddressbookSync.time(); | 2782 | QTime t = mLastAddressbookSync.time(); |
2783 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); | 2783 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); |
2784 | addresseeLSync.setRevision( mLastAddressbookSync ); | 2784 | addresseeLSync.setRevision( mLastAddressbookSync ); |
2785 | addresseeRSync.setRevision( mLastAddressbookSync ); | 2785 | addresseeRSync.setRevision( mLastAddressbookSync ); |
2786 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; | 2786 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; |
2787 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); | 2787 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); |
2788 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; | 2788 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; |
2789 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); | 2789 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); |
2790 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; | 2790 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; |
2791 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); | 2791 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); |
2792 | addresseeRSync.setNote( "" ) ; | 2792 | addresseeRSync.setNote( "" ) ; |
2793 | addresseeLSync.setNote( "" ); | 2793 | addresseeLSync.setNote( "" ); |
2794 | 2794 | ||
2795 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) | 2795 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) |
2796 | remote->insertAddressee( addresseeRSync, false ); | 2796 | remote->insertAddressee( addresseeRSync, false ); |
2797 | local->insertAddressee( addresseeLSync, false ); | 2797 | local->insertAddressee( addresseeLSync, false ); |
2798 | QString mes; | 2798 | QString mes; |
2799 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); | 2799 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); |
2800 | qDebug( mes ); | 2800 | qDebug( mes ); |
2801 | if ( syncManager->mShowSyncSummary ) { | 2801 | if ( syncManager->mShowSyncSummary ) { |
2802 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, | 2802 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, |
2803 | i18n("KA/Pi Synchronization"),i18n("Write back"))) { | 2803 | i18n("KA/Pi Synchronization"),i18n("Write back"))) { |
2804 | qDebug("cancelled "); | 2804 | qDebug("cancelled "); |
2805 | return false; | 2805 | return false; |
2806 | } | 2806 | } |
2807 | } | 2807 | } |
2808 | return syncOK; | 2808 | return syncOK; |
2809 | } | 2809 | } |
2810 | 2810 | ||
2811 | 2811 | ||
2812 | //this is a overwritten callbackmethods from the syncinterface | 2812 | //this is a overwritten callbackmethods from the syncinterface |
2813 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | 2813 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) |
2814 | { | 2814 | { |
2815 | 2815 | ||
2816 | //pending prepare addresseeview for output | 2816 | //pending prepare addresseeview for output |
2817 | //pending detect, if remote file has REV field. if not switch to external sync | 2817 | //pending detect, if remote file has REV field. if not switch to external sync |
2818 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 2818 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
2819 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2819 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2820 | 2820 | ||
2821 | AddressBook abLocal(filename,"syncContact"); | 2821 | AddressBook abLocal(filename,"syncContact"); |
2822 | bool syncOK = false; | 2822 | bool syncOK = false; |
2823 | if ( abLocal.load() ) { | 2823 | if ( abLocal.load() ) { |
2824 | qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); | 2824 | qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); |
2825 | bool external = false; | 2825 | bool external = false; |
2826 | bool isXML = false; | 2826 | bool isXML = false; |
2827 | if ( filename.right(4) == ".xml") { | 2827 | if ( filename.right(4) == ".xml") { |
2828 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2828 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2829 | isXML = true; | 2829 | isXML = true; |
2830 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); | 2830 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); |
2831 | } else { | 2831 | } else { |
2832 | external = !manager->mIsKapiFile; | 2832 | external = !manager->mIsKapiFile; |
2833 | if ( external ) { | 2833 | if ( external ) { |
2834 | qDebug("Setting vcf mode to external "); | 2834 | qDebug("Setting vcf mode to external "); |
2835 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2835 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2836 | AddressBook::Iterator it; | 2836 | AddressBook::Iterator it; |
2837 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 2837 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
2838 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); | 2838 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); |
2839 | (*it).computeCsum( mCurrentSyncDevice ); | 2839 | (*it).computeCsum( mCurrentSyncDevice ); |
2840 | } | 2840 | } |
2841 | } | 2841 | } |
2842 | } | 2842 | } |
2843 | //AddressBook::Iterator it; | 2843 | //AddressBook::Iterator it; |
2844 | //QStringList vcards; | 2844 | //QStringList vcards; |
2845 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 2845 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
2846 | // qDebug("Name %s ", (*it).familyName().latin1()); | 2846 | // qDebug("Name %s ", (*it).familyName().latin1()); |
2847 | //} | 2847 | //} |
2848 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); | 2848 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); |
2849 | if ( syncOK ) { | 2849 | if ( syncOK ) { |
2850 | if ( syncManager->mWriteBackFile ) | 2850 | if ( syncManager->mWriteBackFile ) |
2851 | { | 2851 | { |
2852 | if ( external ) | 2852 | if ( external ) |
2853 | abLocal.removeSyncAddressees( !isXML); | 2853 | abLocal.removeSyncAddressees( !isXML); |
2854 | qDebug("Saving remote AB "); | 2854 | qDebug("Saving remote AB "); |
2855 | if ( ! abLocal.saveAB()) | 2855 | if ( ! abLocal.saveAB()) |
2856 | qDebug("Error writing back AB to file "); | 2856 | qDebug("Error writing back AB to file "); |
2857 | if ( external ) { | 2857 | if ( external ) { |
2858 | // afterwrite processing | 2858 | // afterwrite processing |
2859 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); | 2859 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); |
2860 | } | 2860 | } |
2861 | } | 2861 | } |
2862 | } | 2862 | } |
2863 | setModified(); | 2863 | setModified(); |
2864 | 2864 | ||
2865 | } | 2865 | } |
2866 | if ( syncOK ) | 2866 | if ( syncOK ) |
2867 | mViewManager->refreshView(); | 2867 | mViewManager->refreshView(); |
2868 | return syncOK; | 2868 | return syncOK; |
2869 | 2869 | ||
2870 | } | 2870 | } |
2871 | void KABCore::removeSyncInfo( QString syncProfile) | 2871 | void KABCore::removeSyncInfo( QString syncProfile) |
2872 | { | 2872 | { |
2873 | qDebug("AB:removeSyncInfo for profile %s ", syncProfile.latin1()); | 2873 | qDebug("AB:removeSyncInfo for profile %s ", syncProfile.latin1()); |
2874 | mAddressBook->removeSyncInfo( syncProfile ); | 2874 | mAddressBook->removeSyncInfo( syncProfile ); |
2875 | setModified(); | 2875 | setModified(); |
2876 | } | 2876 | } |
2877 | 2877 | ||
2878 | 2878 | ||
2879 | //this is a overwritten callbackmethods from the syncinterface | 2879 | //this is a overwritten callbackmethods from the syncinterface |
2880 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) | 2880 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) |
2881 | { | 2881 | { |
2882 | if ( resource == "phone" ) | 2882 | if ( resource == "phone" ) |
2883 | return syncPhone(); | 2883 | return syncPhone(); |
2884 | disableBR( true ); | 2884 | disableBR( true ); |
2885 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2885 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2886 | 2886 | ||
2887 | AddressBook abLocal( resource,"syncContact"); | 2887 | AddressBook abLocal( resource,"syncContact"); |
2888 | bool syncOK = false; | 2888 | bool syncOK = false; |
2889 | if ( abLocal.load() ) { | 2889 | if ( abLocal.load() ) { |
2890 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 2890 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
2891 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2891 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2892 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); | 2892 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); |
2893 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 2893 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
2894 | if ( syncOK ) { | 2894 | if ( syncOK ) { |
2895 | if ( syncManager->mWriteBackFile ) { | 2895 | if ( syncManager->mWriteBackFile ) { |
2896 | abLocal.removeSyncAddressees( false ); | 2896 | abLocal.removeSyncAddressees( false ); |
2897 | abLocal.saveAB(); | 2897 | abLocal.saveAB(); |
2898 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); | 2898 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); |
2899 | } | 2899 | } |
2900 | } else | 2900 | } else |
2901 | message( i18n("Sync cancelled or failed.") ); | 2901 | message( i18n("Sync cancelled or failed.") ); |
2902 | setModified(); | 2902 | setModified(); |
2903 | } | 2903 | } |
2904 | if ( syncOK ) | 2904 | if ( syncOK ) |
2905 | mViewManager->refreshView(); | 2905 | mViewManager->refreshView(); |
2906 | disableBR( false ); | 2906 | disableBR( false ); |
2907 | return syncOK; | 2907 | return syncOK; |
2908 | 2908 | ||
2909 | } | 2909 | } |
2910 | void KABCore::message( QString m ) | 2910 | void KABCore::message( QString m ) |
2911 | { | 2911 | { |
2912 | topLevelWidget()->setCaption( m ); | 2912 | topLevelWidget()->setCaption( m ); |
2913 | mMessageTimer->start( 15000, true ); | 2913 | mMessageTimer->start( 15000, true ); |
2914 | } | 2914 | } |
2915 | bool KABCore::syncPhone() | 2915 | bool KABCore::syncPhone() |
2916 | { | 2916 | { |
2917 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2917 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2918 | QString fileName = getPhoneFile(); | 2918 | QString fileName = getPhoneFile(); |
2919 | if ( !PhoneAccess::readFromPhone( fileName) ) { | 2919 | if ( !PhoneAccess::readFromPhone( fileName) ) { |
2920 | message(i18n("Phone access failed!")); | 2920 | message(i18n("Phone access failed!")); |
2921 | return false; | 2921 | return false; |
2922 | } | 2922 | } |
2923 | AddressBook abLocal( fileName,"syncContact"); | 2923 | AddressBook abLocal( fileName,"syncContact"); |
2924 | bool syncOK = false; | 2924 | bool syncOK = false; |
2925 | { | 2925 | { |
2926 | abLocal.importFromFile( fileName ); | 2926 | abLocal.importFromFile( fileName ); |
2927 | qDebug("AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 2927 | qDebug("AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
2928 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2928 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2929 | abLocal.preparePhoneSync( mCurrentSyncDevice, true ); | 2929 | abLocal.preparePhoneSync( mCurrentSyncDevice, true ); |
2930 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); | 2930 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); |
2931 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 2931 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
2932 | if ( syncOK ) { | 2932 | if ( syncOK ) { |
2933 | if ( syncManager->mWriteBackFile ) { | 2933 | if ( syncManager->mWriteBackFile ) { |
2934 | abLocal.removeSyncAddressees( true ); | 2934 | abLocal.removeSyncAddressees( true ); |
2935 | abLocal.saveABphone( fileName ); | 2935 | abLocal.saveABphone( fileName ); |
2936 | abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); | 2936 | abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); |
2937 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); | 2937 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); |
2938 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); | 2938 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); |
2939 | } | 2939 | } |
2940 | } | 2940 | } |
2941 | setModified(); | 2941 | setModified(); |
2942 | } | 2942 | } |
2943 | if ( syncOK ) | 2943 | if ( syncOK ) |
2944 | mViewManager->refreshView(); | 2944 | mViewManager->refreshView(); |
2945 | return syncOK; | 2945 | return syncOK; |
2946 | } | 2946 | } |
2947 | void KABCore::getFile( bool success ) | 2947 | void KABCore::getFile( bool success ) |
2948 | { | 2948 | { |
2949 | if ( ! success ) { | 2949 | if ( ! success ) { |
2950 | message( i18n("Error receiving file. Nothing changed!") ); | 2950 | message( i18n("Error receiving file. Nothing changed!") ); |
2951 | return; | 2951 | return; |
2952 | } | 2952 | } |
2953 | int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); | 2953 | int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); |
2954 | if ( count ) | 2954 | if ( count ) |
2955 | setModified( true ); | 2955 | setModified( true ); |
2956 | message( i18n("Pi-Sync successful!") ); | 2956 | message( i18n("Pi-Sync successful!") ); |
2957 | mViewManager->refreshView(); | 2957 | mViewManager->refreshView(); |
2958 | } | 2958 | } |
2959 | void KABCore::syncFileRequest() | 2959 | void KABCore::syncFileRequest() |
2960 | { | 2960 | { |
2961 | if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { | 2961 | if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { |
2962 | syncManager->slotSyncMenu( 999 ); | 2962 | syncManager->slotSyncMenu( 999 ); |
2963 | } | 2963 | } |
2964 | mAddressBook->export2File( sentSyncFile() ); | 2964 | mAddressBook->export2File( sentSyncFile() ); |
2965 | } | 2965 | } |
2966 | QString KABCore::sentSyncFile() | 2966 | QString KABCore::sentSyncFile() |
2967 | { | 2967 | { |
2968 | #ifdef DESKTOP_VERSION | 2968 | #ifdef DESKTOP_VERSION |
2969 | return locateLocal( "tmp", "copysyncab.vcf" ); | 2969 | return locateLocal( "tmp", "copysyncab.vcf" ); |
2970 | #else | 2970 | #else |
2971 | return QString( "/tmp/copysyncab.vcf" ); | 2971 | return QString( "/tmp/copysyncab.vcf" ); |
2972 | #endif | 2972 | #endif |
2973 | } | 2973 | } |
2974 | 2974 | ||
2975 | void KABCore::setCaptionBack() | 2975 | void KABCore::setCaptionBack() |
2976 | { | 2976 | { |
2977 | mMessageTimer->stop(); | 2977 | mMessageTimer->stop(); |
2978 | topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); | 2978 | topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); |
2979 | } | 2979 | } |