summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt29
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt40
-rw-r--r--kaddressbook/kabcore.cpp3
-rw-r--r--korganizer/calendarview.cpp3
-rw-r--r--libkdepim/ksyncmanager.cpp13
-rw-r--r--microkde/kdecore/klocale.cpp2
7 files changed, 84 insertions, 10 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 6ccf763..81b0d59 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,947 +1,949 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.6 ************ 3********** VERSION 2.0.6 ************
4 4
5Two bugfixes in the pi-sync mode. 5Some bugfixes in the pi-sync mode.
6Added German translation for pi-sync mode.
7
6KO/Pi: 8KO/Pi:
7Made the todolist using alternate background. 9Made the todolist using alternate background.
8 10
9Other minor fixes in KO/Pi. 11Other minor fixes in KO/Pi.
10 12
11 13
12********** VERSION 2.0.5 ************ 14********** VERSION 2.0.5 ************
13 15
14Bugfixes in KO/Pi. 16Bugfixes in KO/Pi.
15 17
16********** VERSION 2.0.4 ************ 18********** VERSION 2.0.4 ************
17 19
18KO/Pi: 20KO/Pi:
19Fixed problem loading translations for summary/location edit boxes in event/todo editor. 21Fixed problem loading translations for summary/location edit boxes in event/todo editor.
20 22
21Added a general "select week number" to the toolbar. 23Added a general "select week number" to the toolbar.
22 24
23Fixed some small problem of the new features introduced in version 2.0.3. 25Fixed some small problem of the new features introduced in version 2.0.3.
24 26
25Made it possible to specify one specific category as category color, 27Made it possible to specify one specific category as category color,
26if more than one categories are selected. 28if more than one categories are selected.
27 29
28Fixed a bug in saving colors for categories with non-ascii characters. 30Fixed a bug in saving colors for categories with non-ascii characters.
29(Like, e.g. German Umlauts). 31(Like, e.g. German Umlauts).
30Propably you have to set your colors again for those categories. 32Propably you have to set your colors again for those categories.
31 33
32 34
33********** VERSION 2.0.3 ************ 35********** VERSION 2.0.3 ************
34 36
35KO/Pi: 37KO/Pi:
36Added feature for changing alarm settings for many items at once: 38Added feature for changing alarm settings for many items at once:
37Open list view (or search dialog), select the desired items and choose in 39Open list view (or search dialog), select the desired items and choose in
38the popup menu: Set alarm for selected... 40the popup menu: Set alarm for selected...
39 41
40Added to the event/todo viewer the option to send an email to 42Added to the event/todo viewer the option to send an email to
41all attendees or all selected (with RSVP) attendees. 43all attendees or all selected (with RSVP) attendees.
42 44
43Made the week-month mode changing in month view faster. 45Made the week-month mode changing in month view faster.
44 46
45Made month view better useable with keyboard. 47Made month view better useable with keyboard.
46Now TAB key jumps to next cell with an event/todo. 48Now TAB key jumps to next cell with an event/todo.
47Scroll in cell with coursor keys, scroll in time (next week) with 49Scroll in cell with coursor keys, scroll in time (next week) with
48Shift/Control + coursorkeys. 50Shift/Control + coursorkeys.
49 51
50Fixed bug that the todo view flat mode was reset after first view update. 52Fixed bug that the todo view flat mode was reset after first view update.
51 53
52If a todo is displayed closed in the todo view, 54If a todo is displayed closed in the todo view,
53it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. 55it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties.
54 56
55Added info about the numbers of years to the caption (title) information about a birthday event. 57Added info about the numbers of years to the caption (title) information about a birthday event.
56 58
57Made completion date in todo editor editable. 59Made completion date in todo editor editable.
58 60
59Added possibility to save/load templates for journals. 61Added possibility to save/load templates for journals.
60(Which is just a simple "save text to file" or "insert text from file". 62(Which is just a simple "save text to file" or "insert text from file".
61 63
62********** VERSION 2.0.2 ************ 64********** VERSION 2.0.2 ************
63 65
64KO/Pi: 66KO/Pi:
65Fixed the layout problem of the day label buttons 67Fixed the layout problem of the day label buttons
66of the agenda view introduced in version 2.0.1. 68of the agenda view introduced in version 2.0.1.
67 69
68Added WhatsThis support for the todo view and the list view. 70Added WhatsThis support for the todo view and the list view.
69 71
70Added a quite useful feature to the montview. 72Added a quite useful feature to the montview.
71Just click on the week numbers on the left. 73Just click on the week numbers on the left.
72And in the top right corner of month view/agenda view 74And in the top right corner of month view/agenda view
73there is now a "week number quick selector". 75there is now a "week number quick selector".
74(Click on the black triangle). 76(Click on the black triangle).
75 77
76Made the quite difficult timezone change in KO/Pi easy. 78Made the quite difficult timezone change in KO/Pi easy.
77 79
78OM/Pi: 80OM/Pi:
79Fixed too small icons on desktop. 81Fixed too small icons on desktop.
80Fixed non visible icons in mainwindow on Z with fastload enabled. 82Fixed non visible icons in mainwindow on Z with fastload enabled.
81Added signature file setting to smtp account config. 83Added signature file setting to smtp account config.
82And the signature can be edited and saved in the edit mail dialog. 84And the signature can be edited and saved in the edit mail dialog.
83That does mean: 85That does mean:
84Simply edit the signature for the selected smtp account in the 86Simply edit the signature for the selected smtp account in the
85edit new mail dialog and press the "save signature" button there. 87edit new mail dialog and press the "save signature" button there.
86Then the signature is saved to the file specified in the smtp account settings. 88Then the signature is saved to the file specified in the smtp account settings.
87If there is no file specified, it is saved automatically to the file 89If there is no file specified, it is saved automatically to the file
88kdepim/apps/kopiemail/<accountname>.sig. 90kdepim/apps/kopiemail/<accountname>.sig.
89 91
90 92
91 93
92********** VERSION 2.0.1 ************ 94********** VERSION 2.0.1 ************
93 95
94Oooops ... I forgot to test on the Zaurus 5500 ... 96Oooops ... I forgot to test on the Zaurus 5500 ...
95 97
96Fixed many problems of new (english) strings (and german translations) 98Fixed many problems of new (english) strings (and german translations)
97introduced in the latest versions, where the text was not fitting on the 99introduced in the latest versions, where the text was not fitting on the
98240x320 display of the Zaurus 5500. 100240x320 display of the Zaurus 5500.
99 101
100KO/Pi: 102KO/Pi:
101Added a popup menu ( press pen and hold to get popup ) to the agenda view 103Added a popup menu ( press pen and hold to get popup ) to the agenda view
102with many useful items (add event/todo, show next week, two weeks, month, journal). 104with many useful items (add event/todo, show next week, two weeks, month, journal).
103 105
104Added items to the todolist popup menu for: 106Added items to the todolist popup menu for:
105Display all opened, all closed or all todos flat. 107Display all opened, all closed or all todos flat.
106The "flat" view makes is possible to sort all todos after ,e.g., prio or date. 108The "flat" view makes is possible to sort all todos after ,e.g., prio or date.
107Made the reparenting of todos on the desktop possible via Drag&Drop. 109Made the reparenting of todos on the desktop possible via Drag&Drop.
108Fixed several bugs in setting the completed datetime for todos. 110Fixed several bugs in setting the completed datetime for todos.
109Added info about completed datetime of todos to the todo viewer. 111Added info about completed datetime of todos to the todo viewer.
110Now displaying a completed todo (with completed datetime set) in the agenda view 112Now displaying a completed todo (with completed datetime set) in the agenda view
111at the time of the completion. Such that now it is possible to see in the agenda view 113at the time of the completion. Such that now it is possible to see in the agenda view
112when what todo was completed. 114when what todo was completed.
113Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos. 115Fixed behaviour of automatic setting completion of todos with sub-todos/parent todos.
114Now the behaviour is: 116Now the behaviour is:
115Setting a parent to complete sets all (sub)childs to complete. 117Setting a parent to complete sets all (sub)childs to complete.
116Setting a parent to uncomplete does not change the childs. 118Setting a parent to uncomplete does not change the childs.
117Setting a child to uncomplete sets all parent to uncomplete. 119Setting a child to uncomplete sets all parent to uncomplete.
118Setting a child to complete does not change the parents. 120Setting a child to complete does not change the parents.
119 121
120Smart updating and double buffering of the daymatrix. 122Smart updating and double buffering of the daymatrix.
121Showing holidays in the day matrix. 123Showing holidays in the day matrix.
122Many other small performance updates. 124Many other small performance updates.
123 125
124Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode. 126Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
125 127
126Now the translation file usertranslation.txt is supposed to be in utf8 format. 128Now the translation file usertranslation.txt is supposed to be in utf8 format.
127If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu. 129If you want to translate a language from western europe, just change the germantranslation.txt file. Please read the updated Usertranslation HowTo in KO/Pi Help menu.
128 130
129 131
130********** VERSION 2.0.0 ************ 132********** VERSION 2.0.0 ************
131 133
132Stable release 2.0.0! 134Stable release 2.0.0!
133 135
134KO/Pi: 136KO/Pi:
135Fixed problem in edit dialog recreation at startup. 137Fixed problem in edit dialog recreation at startup.
136Made "toggle view*" menu items enabled context sensitive. 138Made "toggle view*" menu items enabled context sensitive.
137Changed agenda size menu to items 1-10. 139Changed agenda size menu to items 1-10.
138Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. 140Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down.
139Usebility enhancements in the KO/Pi menus. 141Usebility enhancements in the KO/Pi menus.
140Birthday import now adds year to summary. 142Birthday import now adds year to summary.
141What's Next view shows age in years for birthday. 143What's Next view shows age in years for birthday.
142 144
143OM/Pi: 145OM/Pi:
144Added three info lines to display subject, from and to of selected mails. 146Added three info lines to display subject, from and to of selected mails.
145 147
146KA/Pi: 148KA/Pi:
147Fixed jump bar behaviour on Zaurus. 149Fixed jump bar behaviour on Zaurus.
148Now KA/Pi search field supports searching for a range of starting characters. 150Now KA/Pi search field supports searching for a range of starting characters.
149E.g. to search for all contact beginning with b to n, type 151E.g. to search for all contact beginning with b to n, type
150b-n 152b-n
151in the search field. 153in the search field.
152 154
153********** VERSION 1.9.20 ************ 155********** VERSION 1.9.20 ************
154 156
155KO/Pi: 157KO/Pi:
156Added for the "dislplay one day" agenda mode 158Added for the "dislplay one day" agenda mode
157info in the caption and in the day lables: 159info in the caption and in the day lables:
158Now it is displayed, if the selected day is from "day before yesterday" 160Now it is displayed, if the selected day is from "day before yesterday"
159to "day after tomorrow". 161to "day after tomorrow".
160Made it possible to delete a Todo, which has sub-todos. 162Made it possible to delete a Todo, which has sub-todos.
161Fixed two small problems in the todo view. 163Fixed two small problems in the todo view.
162Added missing German translation for filter edit and print dialog. 164Added missing German translation for filter edit and print dialog.
163Made search dialog closeable by cancel key. 165Made search dialog closeable by cancel key.
164 166
165Made it possible to select in the date picker the (ligt grey ) 167Made it possible to select in the date picker the (ligt grey )
166dates of the prev./next month with the mouse. 168dates of the prev./next month with the mouse.
167 169
168OM/Pi: 170OM/Pi:
169"Delete mail" icon in main window now deletes all selected mails. 171"Delete mail" icon in main window now deletes all selected mails.
170Fixed the problem, that the state flag of imap mails was ignored. 172Fixed the problem, that the state flag of imap mails was ignored.
171Now mails with "FLAG_SEEN" on the imap server get no icon in the list view 173Now mails with "FLAG_SEEN" on the imap server get no icon in the list view
172to indecate that they are already seen. 174to indecate that they are already seen.
173Fixed the problem that the body of some mails was not displayed in the 175Fixed the problem that the body of some mails was not displayed in the
174mail viewer when fetching them from the imap server directly to read them. 176mail viewer when fetching them from the imap server directly to read them.
175Made it (configurable) possible to show the "To:" field in the list view. 177Made it (configurable) possible to show the "To:" field in the list view.
176Added to the mail viewer the option "View Source" to make it possible to see the raw mail data. 178Added to the mail viewer the option "View Source" to make it possible to see the raw mail data.
177Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the 179Added a "Download Mail" button to the mail viewer to quickly download the viewed mail to the
178local storage folder (specified in account settings) of the account of the mail. 180local storage folder (specified in account settings) of the account of the mail.
179Removed some memory leaks in OM/Pi. 181Removed some memory leaks in OM/Pi.
180 182
181 183
182********** VERSION 1.9.19 ************ 184********** VERSION 1.9.19 ************
183 185
184Added a lot of missing translations to KA/Pi, 186Added a lot of missing translations to KA/Pi,
185Added some missing translations to KO/Pi and OM/Pi. 187Added some missing translations to KO/Pi and OM/Pi.
186 188
187Fixed some minor problems in KA/Pi + KO/Pi. 189Fixed some minor problems in KA/Pi + KO/Pi.
188 190
189Fixed a crash when closing PwM/Pi. 191Fixed a crash when closing PwM/Pi.
190Added German translation for PwM/Pi. 192Added German translation for PwM/Pi.
191 193
192Made view change and Month View update faster in KO/Pi. 194Made view change and Month View update faster in KO/Pi.
193 195
194 196
195********** VERSION 1.9.18 ************ 197********** VERSION 1.9.18 ************
196 198
197FYI: The VERSION 1.9.17 was a testing release only. 199FYI: The VERSION 1.9.17 was a testing release only.
198Please read the changelog of VERSION 1.9.17 as well. 200Please read the changelog of VERSION 1.9.17 as well.
199 201
200Cleaned up the syncing config dialog. 202Cleaned up the syncing config dialog.
201Added sync config options for date range for events. 203Added sync config options for date range for events.
202Added sync config options for filters on incoming data. 204Added sync config options for filters on incoming data.
203Added sync config options for filters on outgoing data. 205Added sync config options for filters on outgoing data.
204Please read the updated SyncHowTo about the new filter settings. 206Please read the updated SyncHowTo about the new filter settings.
205These filter settings make it now possible to sync with shared 207These filter settings make it now possible to sync with shared
206calendars without writing back private or confidential data 208calendars without writing back private or confidential data
207(via the outgoing filters). 209(via the outgoing filters).
208To sync only with particular parts of a shared calendar, 210To sync only with particular parts of a shared calendar,
209the incoming filter settings can be used. 211the incoming filter settings can be used.
210An example can be found in the SyncHowTo. 212An example can be found in the SyncHowTo.
211Same for shared addressbooks. 213Same for shared addressbooks.
212 214
213Added a setting for the global kdepim data storage. 215Added a setting for the global kdepim data storage.
214Usually the data is stored in (yourhomedir/kdepim). 216Usually the data is stored in (yourhomedir/kdepim).
215Now you can set in the Global config dialog TAB, subTAB "Data storage path" 217Now you can set in the Global config dialog TAB, subTAB "Data storage path"
216a directory where all the kdepim data is stored. 218a directory where all the kdepim data is stored.
217That makes it easy to save all kdepim data on a SD card on the Z, for example. 219That makes it easy to save all kdepim data on a SD card on the Z, for example.
218 220
219KO/Pi: 221KO/Pi:
220The timeedit input has a pulldown list for times. 222The timeedit input has a pulldown list for times.
221If opened, this pulldown list should now has the right time highlighted. 223If opened, this pulldown list should now has the right time highlighted.
222Added the possibility to exclude events/todos/journals in a filter. 224Added the possibility to exclude events/todos/journals in a filter.
223You should exclude journals, if you do not want them to sync with a public calendar. 225You should exclude journals, if you do not want them to sync with a public calendar.
224 226
225KA/Pi: 227KA/Pi:
226Added the possibility to in/exclude public/private/confidential contacts to a filter. 228Added the possibility to in/exclude public/private/confidential contacts to a filter.
227If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... 229If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ...
228Added printing of card view and details view on desktop. 230Added printing of card view and details view on desktop.
229Printing of list view is not working... 231Printing of list view is not working...
230Added button for removing pictures in contact editor. 232Added button for removing pictures in contact editor.
231Parsing data fix of KA/Pi version 1.9.17. 233Parsing data fix of KA/Pi version 1.9.17.
232Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 234Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
233Fixed some syncing merging problems. 235Fixed some syncing merging problems.
234 236
235 237
236********** VERSION 1.9.17 ************ 238********** VERSION 1.9.17 ************
237 239
238KO/Pi: 240KO/Pi:
239Fixed that tooltips were not updated after moving an item in agenda view. 241Fixed that tooltips were not updated after moving an item in agenda view.
240Fixed a bug in sorting start date for recurring events in list view. 242Fixed a bug in sorting start date for recurring events in list view.
241Changed the left button in todo viewer from "Agenda" to "Set completed". 243Changed the left button in todo viewer from "Agenda" to "Set completed".
242This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. 244This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
243Added more info in the todo viewer: Startdate, parent/sub todos. 245Added more info in the todo viewer: Startdate, parent/sub todos.
244 246
245 247
246KA/Pi: 248KA/Pi:
247All fields search does now actually search all the (possible) fields, 249All fields search does now actually search all the (possible) fields,
248not only those listed in the contact list. 250not only those listed in the contact list.
249Made is possible to inline a picture in a vcard on the Z. 251Made is possible to inline a picture in a vcard on the Z.
250This was only possible on the desktop, now is it possible on the Z as well. 252This was only possible on the desktop, now is it possible on the Z as well.
251Fixed of missing save settings after filter configuration. 253Fixed of missing save settings after filter configuration.
252Made saving of addressbook much faster. 254Made saving of addressbook much faster.
253Fixed extension widget layout problem. 255Fixed extension widget layout problem.
254Fixed saving of default formatted name settings. 256Fixed saving of default formatted name settings.
255Fixed formatted name handling in edit dialog. 257Fixed formatted name handling in edit dialog.
256Added an option for changing formatted names of many contacts 258Added an option for changing formatted names of many contacts
257(menu: File - Change - Set formatted name). 259(menu: File - Change - Set formatted name).
258 260
259QWhatsThis was not working on the Z ( only black rectangle was shown). 261QWhatsThis was not working on the Z ( only black rectangle was shown).
260This is Fixed. 262This is Fixed.
261 263
262KDE-Sync: 264KDE-Sync:
263Now readonly KDE resources are synced as well. 265Now readonly KDE resources are synced as well.
264(They are not changed in KDE itself, of course). 266(They are not changed in KDE itself, of course).
265 267
266 268
267 269
268********** VERSION 1.9.16 ************ 270********** VERSION 1.9.16 ************
269 271
270KO/Pi: 272KO/Pi:
271Fixed search dialog size on Z 6000 (480x640 display). 273Fixed search dialog size on Z 6000 (480x640 display).
272Added setting to hide/show time in agenda items. 274Added setting to hide/show time in agenda items.
273Added setting to hide not running todos in todo view. 275Added setting to hide not running todos in todo view.
274Added columns for start date/time in todo view. 276Added columns for start date/time in todo view.
275Replaced the solid half-hour lines in agenda view by dot lines. 277Replaced the solid half-hour lines in agenda view by dot lines.
276Added possibility of printing the What's Next View on the desktop 278Added possibility of printing the What's Next View on the desktop
277(i.e. Windows and Linux). 279(i.e. Windows and Linux).
278Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 280Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
279Added tooltips in month view.(Tooltips only available on desktop) 281Added tooltips in month view.(Tooltips only available on desktop)
280 282
281Fixed a strange problem in KO/Pi alarm applet. 283Fixed a strange problem in KO/Pi alarm applet.
282Did not find the actual problem, 284Did not find the actual problem,
283such that now Qtopia reboots again if deinstalling the alarm applet. 285such that now Qtopia reboots again if deinstalling the alarm applet.
284But the alarm applet should work again. 286But the alarm applet should work again.
285 287
286KA/Pi: 288KA/Pi:
287Fixed the problem, that internal pictures were not saved. 289Fixed the problem, that internal pictures were not saved.
288 290
289Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 291Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
290 292
291Fixed some minor problems. (Like word wrap in help text windows). 293Fixed some minor problems. (Like word wrap in help text windows).
292 294
293Fixed a compiling problem in microkde/kresources. 295Fixed a compiling problem in microkde/kresources.
294 296
295KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 297KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
296This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 298This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
297such that now syncing KO/Pi with Sharp DTM should work on the 299such that now syncing KO/Pi with Sharp DTM should work on the
298Zaurus C 3000 model. 300Zaurus C 3000 model.
299 301
300********** VERSION 1.9.15 ************ 302********** VERSION 1.9.15 ************
301 303
302Usebilty enhancements in KO/Pi: 304Usebilty enhancements in KO/Pi:
303When clicking on the date in a month view cell, the day view is shown. 305When clicking on the date in a month view cell, the day view is shown.
304Old behaviour was, that the "new event" dialog popped up. 306Old behaviour was, that the "new event" dialog popped up.
305 307
306Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 308Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
307That means, you can restore the latest 309That means, you can restore the latest
308event/todo/journal you have deleted. 310event/todo/journal you have deleted.
309A journal is deleted, if you clear all the text of the journal. 311A journal is deleted, if you clear all the text of the journal.
310 312
311Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 313Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
312 314
313KA/Pi starting in 480x640 resolution: 315KA/Pi starting in 480x640 resolution:
314Hide the filter action in toolbar 316Hide the filter action in toolbar
315and added icons for undo/delete/redo in toolbar. 317and added icons for undo/delete/redo in toolbar.
316 318
317Change in OM/Pi ViewMail dialog: 319Change in OM/Pi ViewMail dialog:
318When clicking on the "delete" icon the mail is deleted after confirmation as usual. 320When clicking on the "delete" icon the mail is deleted after confirmation as usual.
319But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 321But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
320 322
321Fixed a crash when deleting mail-accounts in OM/Pi. 323Fixed a crash when deleting mail-accounts in OM/Pi.
322 324
323 325
324********** VERSION 1.9.14 ************ 326********** VERSION 1.9.14 ************
325 327
326Fixed some problems with the dialog sizes when switching 328Fixed some problems with the dialog sizes when switching
327portrait/landscape mode on 640x480 PDA display. 329portrait/landscape mode on 640x480 PDA display.
328 330
329Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 331Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
330 332
331Fixed an ugly bug in KOpieMail: 333Fixed an ugly bug in KOpieMail:
332KOpieMail was not able to write files (mails) to MSDOS file system, 334KOpieMail was not able to write files (mails) to MSDOS file system,
333like on an usual preformatted SD card. That should work now. 335like on an usual preformatted SD card. That should work now.
334To save your mail data on the Sd card do the following: 336To save your mail data on the Sd card do the following:
335Create a dir on the SD card: 337Create a dir on the SD card:
336mkdir /mnt/card/localmail 338mkdir /mnt/card/localmail
337Go to your home dir: 339Go to your home dir:
338cd 340cd
339Go to kopiemail data storage dir: 341Go to kopiemail data storage dir:
340cd kdepim/apps/kopiemail 342cd kdepim/apps/kopiemail
341Create a symlink to the SD card: 343Create a symlink to the SD card:
342ls -s /mnt/card/localmail 344ls -s /mnt/card/localmail
343Now KOpieMail will store all mails on the SD card. 345Now KOpieMail will store all mails on the SD card.
344 346
345KO/Pi Monthview: 347KO/Pi Monthview:
346Now "Go to Today" selects the current month from day 1-end, 348Now "Go to Today" selects the current month from day 1-end,
347not the current date + some days. 349not the current date + some days.
348I.e. "Go to Today" shows now always 350I.e. "Go to Today" shows now always
349the current month with first day of month in the first row. 351the current month with first day of month in the first row.
350 352
351Added missing German translation. 353Added missing German translation.
352 354
353Fixed icons of executeable on Wintendo. 355Fixed icons of executeable on Wintendo.
354 356
355Added a "Show next Mail" button to the OM/Pi 357Added a "Show next Mail" button to the OM/Pi
356mail viewer such that the mail below the current mail 358mail viewer such that the mail below the current mail
357in the mail list view of the current folder 359in the mail list view of the current folder
358can be read with a single click. 360can be read with a single click.
359 361
360 362
361********** VERSION 1.9.13 ************ 363********** VERSION 1.9.13 ************
362 364
363Fixed nasty PwM/Pi file reading bug, when 365Fixed nasty PwM/Pi file reading bug, when
364the used hash algo of file is different then the global 366the used hash algo of file is different then the global
365hash algo. 367hash algo.
366 368
367Added KA/Pi support for opie mailit mailapplication. 369Added KA/Pi support for opie mailit mailapplication.
368 370
369Fixed some bugs in OM/Pi. 371Fixed some bugs in OM/Pi.
370Now character conversion tables are available for the Zaurus 372Now character conversion tables are available for the Zaurus
371to make OM/Pi working properly. 373to make OM/Pi working properly.
372To get the character conversion in OM/Pi working, please download 374To get the character conversion in OM/Pi working, please download
373at the sourceforge project site the package 375at the sourceforge project site the package
374sr-character-conversion_SharpROM_arm.ipk.zip 376sr-character-conversion_SharpROM_arm.ipk.zip
375(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 377(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
376from the section "general files for KDE/Pim" 378from the section "general files for KDE/Pim"
377Instructions how to install this package are in a ReadMe in this file. 379Instructions how to install this package are in a ReadMe in this file.
378 380
379 381
380Fixed the orientation change problem in KA/Pi when switching 382Fixed the orientation change problem in KA/Pi when switching
381portrait/landscape mode. 383portrait/landscape mode.
382 384
383French translation available for KA/Pi and OM/Pi. 385French translation available for KA/Pi and OM/Pi.
384 386
385Fixed some problems with categories in KO/Pi in DTM sync. 387Fixed some problems with categories in KO/Pi in DTM sync.
386 388
387Added selection dialog for export to phone in KA/Pi. 389Added selection dialog for export to phone in KA/Pi.
388 390
389If in KO/Pi is an attendee selected to add to a meeting and this 391If in KO/Pi is an attendee selected to add to a meeting and this
390attendee is already in the list of attendees, this person is not added 392attendee is already in the list of attendees, this person is not added
391again. 393again.
392 394
393Some menu cleanup in KA/Pi. 395Some menu cleanup in KA/Pi.
394 396
395********** VERSION 1.9.12 ************ 397********** VERSION 1.9.12 ************
396 398
397Fix for the bug in KO/Pi What's Next view of version 1.9.11. 399Fix for the bug in KO/Pi What's Next view of version 1.9.11.
398 400
399Bugfix: Licence file is now shown again. 401Bugfix: Licence file is now shown again.
400 402
401OM/Pi now supports Unicode (utf8 charset). 403OM/Pi now supports Unicode (utf8 charset).
402Fixed some bugs in OM/Pi. 404Fixed some bugs in OM/Pi.
403 405
404KA/Pi has more German translation. 406KA/Pi has more German translation.
405 407
406 408
407********** VERSION 1.9.11 ************ 409********** VERSION 1.9.11 ************
408 410
409Fixed several problems in PWM/Pi, like 411Fixed several problems in PWM/Pi, like
410asking the user, if unsaved changed are pending 412asking the user, if unsaved changed are pending
411when closing the app. 413when closing the app.
412And PwM/Pi handles now different texts for the 414And PwM/Pi handles now different texts for the
413fields Description, Username, Password, configurable per category. 415fields Description, Username, Password, configurable per category.
414 416
415Fixed a crash in KO/Pi , when importing/loading vcs files 417Fixed a crash in KO/Pi , when importing/loading vcs files
416which have an entry with an attendee with state: 418which have an entry with an attendee with state:
417NEEDS ACTION 419NEEDS ACTION
418 420
419Fixed some problems in the German translation of OM/Pi, 421Fixed some problems in the German translation of OM/Pi,
420which makes some dialogs not fitting on the screen 422which makes some dialogs not fitting on the screen
421of the Z 5500. 423of the Z 5500.
422 424
423Fixed Qtopia crash, when disabling/deinstalling 425Fixed Qtopia crash, when disabling/deinstalling
424KO/Pi alarm applet. 426KO/Pi alarm applet.
425 427
426Implemented direct KDE<->KA/Pi sync for KA/Pi running 428Implemented direct KDE<->KA/Pi sync for KA/Pi running
427on Linux desktop. 429on Linux desktop.
428 430
429Added feature "remove sync info" to sync menu. 431Added feature "remove sync info" to sync menu.
430 432
431Tweaked the KO/Pi What's next view a bit, added 433Tweaked the KO/Pi What's next view a bit, added
432setting to hide events that are done. 434setting to hide events that are done.
433 435
434Disabled "beam receive enabled" on startup to 436Disabled "beam receive enabled" on startup to
435avoid problems if Fastload is enabled. 437avoid problems if Fastload is enabled.
436Please set "beam receive enabled", 438Please set "beam receive enabled",
437if you want to receive data via IR. 439if you want to receive data via IR.
438 440
439Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 441Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
440on Linux desktop. 442on Linux desktop.
441 443
442Made in KA/Pi scrolling possible, if details view is selected. 444Made in KA/Pi scrolling possible, if details view is selected.
443(The keyboard focus is set automatically to the search line) 445(The keyboard focus is set automatically to the search line)
444 446
445Fixed a bug in DMT sync, that a new entry in DTM was added 447Fixed a bug in DMT sync, that a new entry in DTM was added
446on every sync to Kx/Pi. 448on every sync to Kx/Pi.
447 449
448Fixed missing writing of KA/Pi categories to DMT entries when syncing. 450Fixed missing writing of KA/Pi categories to DMT entries when syncing.
449 451
450Fixed a bug in DMT sync with todos created in KO/Pi containing 452Fixed a bug in DMT sync with todos created in KO/Pi containing
451non-latin1 characters. 453non-latin1 characters.
452 454
453Rearranged package contents of Sharp-ipks and made all 455Rearranged package contents of Sharp-ipks and made all
454packages installable on SD again. 456packages installable on SD again.
455 457
456Fixed the writing of addressbook data in DTM sync. 458Fixed the writing of addressbook data in DTM sync.
457Empty fields in KA/Pi were not removed. 459Empty fields in KA/Pi were not removed.
458 460
459Added better category handling in KA/Pi: 461Added better category handling in KA/Pi:
460Added item 462Added item
461Edit Categories and 463Edit Categories and
462Manage new categories 464Manage new categories
463to the settings menu. 465to the settings menu.
464Possible to configure a view to display categories. 466Possible to configure a view to display categories.
465 467
466Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. 468Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu.
467 469
468Fixed displaying of "free" days and time in KO Monthview and Agendaview. 470Fixed displaying of "free" days and time in KO Monthview and Agendaview.
469 471
470... and many other bugfixes. 472... and many other bugfixes.
471 473
472********** VERSION 1.9.10 ************ 474********** VERSION 1.9.10 ************
473 475
474Many internal small bugfixes. 476Many internal small bugfixes.
475And fix of the "big" bug in KO/Pi, 477And fix of the "big" bug in KO/Pi,
476that after Syncing the appointments had an offset by several hours. 478that after Syncing the appointments had an offset by several hours.
477That was a problem with the internal timezone setting, 479That was a problem with the internal timezone setting,
478introduced by the changed timezone configuration settings. 480introduced by the changed timezone configuration settings.
479 481
480German translation for OM/Pi is now available. 482German translation for OM/Pi is now available.
481 483
482 484
483********** VERSION 1.9.9 ************ 485********** VERSION 1.9.9 ************
484 486
485KDE-Pim/Pi has a new Member! 487KDE-Pim/Pi has a new Member!
486It is called PWM/Pi (Passwordmanager/platform-independent) 488It is called PWM/Pi (Passwordmanager/platform-independent)
487and it is available for the Zaurus. 489and it is available for the Zaurus.
488It is planned, that it will be available later for Windows. 490It is planned, that it will be available later for Windows.
489(And for Linux, of course). 491(And for Linux, of course).
490It is a port of the Passwordmanager of KDE. 492It is a port of the Passwordmanager of KDE.
491It will need the MicroKDElibs to run. 493It will need the MicroKDElibs to run.
492 494
493Made loading of addressbooks in KA/Pi up to 7 times faster! 495Made loading of addressbooks in KA/Pi up to 7 times faster!
494The bigger your addressbook file, the more starting speed 496The bigger your addressbook file, the more starting speed
495will you gain. (relatively) 497will you gain. (relatively)
496 498
497The Qtopia addressbook connector is now platform independend 499The Qtopia addressbook connector is now platform independend
498as well and should work on any platform for importing/exporting 500as well and should work on any platform for importing/exporting
499Qtopia and Opie XML files. 501Qtopia and Opie XML files.
500 502
501Added a +30min feature to the timezone settings to make 503Added a +30min feature to the timezone settings to make
502KDE-Pim/Pi useable in Australia and other parts on the 504KDE-Pim/Pi useable in Australia and other parts on the
503world with strange timezones ;-) 505world with strange timezones ;-)
504 506
505German "Umlaute" should now be sorted correctly on the Z in KA/Pi. 507German "Umlaute" should now be sorted correctly on the Z in KA/Pi.
506 508
507It is now possible to disable the 509It is now possible to disable the
508"receive data via infrared" feature, such that syncing with 510"receive data via infrared" feature, such that syncing with
509Outlook is now possible again with Kx/Pi runing. 511Outlook is now possible again with Kx/Pi runing.
510Please disable it, before syncing Sharp DTM with Outlook. 512Please disable it, before syncing Sharp DTM with Outlook.
511For your convenience, the "receive data via infrared" feature 513For your convenience, the "receive data via infrared" feature
512is disabled automatically, if you sync Kx/Pi with DTM. 514is disabled automatically, if you sync Kx/Pi with DTM.
513You have to enable it again manually after syncing. 515You have to enable it again manually after syncing.
514Enabling this feature makes it impossible to start the 516Enabling this feature makes it impossible to start the
515Sharp DTM apps. If this feature is enabled, you will only get the 517Sharp DTM apps. If this feature is enabled, you will only get the
516alarm notification from KO/Pi and not from the Sharp calendar. 518alarm notification from KO/Pi and not from the Sharp calendar.
517This is very useful if you sync KO/Pi with Sharp DTM, 519This is very useful if you sync KO/Pi with Sharp DTM,
518because after syncing you usually would get notified about 520because after syncing you usually would get notified about
519an alarm by KO/Pi and the Sharp Calendar. 521an alarm by KO/Pi and the Sharp Calendar.
520 522
521Together with the Linux desktop version of KO/Pi 523Together with the Linux desktop version of KO/Pi
522it is now possible to sync KO/Pi on the Zaurus 524it is now possible to sync KO/Pi on the Zaurus
523with the complete KDE-desktop (3.3 or later) 525with the complete KDE-desktop (3.3 or later)
524calendar data easily. 526calendar data easily.
525That makes it possible to sync the Z with one 527That makes it possible to sync the Z with one
526click of a mouse with the KDE-Desktop. 528click of a mouse with the KDE-Desktop.
527This feature it available for all Zaurus platforms KO/Pi 529This feature it available for all Zaurus platforms KO/Pi
528is running on. 530is running on.
529The only thing needed is a running KO/Pi on Linux and 531The only thing needed is a running KO/Pi on Linux and
530a compiled version of the small 532a compiled version of the small
531KDE-Pim/Pi<->KDE-Desktop access command line program, 533KDE-Pim/Pi<->KDE-Desktop access command line program,
532which is in the KDE-Pim/Pi sources available. 534which is in the KDE-Pim/Pi sources available.
533 535
534The "KDE-desktop" syncing feature for KA/Pi will follow 536The "KDE-desktop" syncing feature for KA/Pi will follow
535in the next releases. 537in the next releases.
536 538
537Fixed the vcard export bug, which had the version 1.9.8. 539Fixed the vcard export bug, which had the version 1.9.8.
538 540
539Added missing GERMAN translation to KO/Pi. 541Added missing GERMAN translation to KO/Pi.
540Hi PsionX, could you add the missing french translation?Thx! 542Hi PsionX, could you add the missing french translation?Thx!
541 543
542Translation files for KA/Pi are available as well. 544Translation files for KA/Pi are available as well.
543GERMAN translation will be available in the next release. 545GERMAN translation will be available in the next release.
544PsionX ( yres, you again ;-) ), could you start translating 546PsionX ( yres, you again ;-) ), could you start translating
545KA/Pi? Thx! 547KA/Pi? Thx!
546 548
547You can download the version 1.9.9 at 549You can download the version 1.9.9 at
548 550
549http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 551http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604
550 552
551Note: 553Note:
552To run the mail program OM/Pi you need libopenssl. 554To run the mail program OM/Pi you need libopenssl.
553A link to a download loaction is available at 555A link to a download loaction is available at
554ZSI at www.killefiz.de 556ZSI at www.killefiz.de
555 557
556 558
557********** VERSION 1.9.8 ************ 559********** VERSION 1.9.8 ************
558 560
559Fixed character decoding in OM/Pi. 561Fixed character decoding in OM/Pi.
560(e.g. German "Umlaute" were not displayed properly.) 562(e.g. German "Umlaute" were not displayed properly.)
561 563
562Made is possible to reparent todos in KO/Pi. 564Made is possible to reparent todos in KO/Pi.
563Use contextmenu or keys (look at Help-Keys + Colors) for that. 565Use contextmenu or keys (look at Help-Keys + Colors) for that.
564 566
565Added the missing Sync-Howto and WhatsNew to the packages. 567Added the missing Sync-Howto and WhatsNew to the packages.
566 568
567KO/Pi on Linux desktop can now sync with KDE desktop. 569KO/Pi on Linux desktop can now sync with KDE desktop.
568That means: When using KO/Pi on Linux desktop for syncing with 570That means: When using KO/Pi on Linux desktop for syncing with
569KDE desktop and the Zaurus, the Zaurus can be synced now 571KDE desktop and the Zaurus, the Zaurus can be synced now
570with all KDE-Calendar resources, not only with one local file. 572with all KDE-Calendar resources, not only with one local file.
571(That makes it possible to sync the Zaurus with the 573(That makes it possible to sync the Zaurus with the
572calendar data on a Kolab server) 574calendar data on a Kolab server)
573 575
574KA/Pi syncing with KDE desktop will be available in the next version. 576KA/Pi syncing with KDE desktop will be available in the next version.
575 577
576 578
577********** VERSION 1.9.7 ************ 579********** VERSION 1.9.7 ************
578 580
579KO/Pi - KA/Pi on Windows: 581KO/Pi - KA/Pi on Windows:
580Now a directory can be defined by the user, where the 582Now a directory can be defined by the user, where the
581application/config data should be saved. 583application/config data should be saved.
582 Define your desired path in the evironment variable 584 Define your desired path in the evironment variable
583 MICROKDEHOME 585 MICROKDEHOME
584 before starting KO/Pi or KA/Pi. 586 before starting KO/Pi or KA/Pi.
585 587
586An easy Kx/Pi to Kx/Pi syncing is now possible 588An easy Kx/Pi to Kx/Pi syncing is now possible
587(it is called Pi-Sync) via network. 589(it is called Pi-Sync) via network.
588Please look at the Sync Howto. 590Please look at the Sync Howto.
589 591
590Exporting of calendar data and contacts to mobile phones is now possible. 592Exporting of calendar data and contacts to mobile phones is now possible.
591The SyncHowto is updated with information howto 593The SyncHowto is updated with information howto
592access/sync mobile phones. 594access/sync mobile phones.
593Please look at the Sync Howto. 595Please look at the Sync Howto.
594 596
595Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. 597Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly.
596Please disable Fastload for the original contact/calendar applications 598Please disable Fastload for the original contact/calendar applications
597and close them. 599and close them.
598KO/Pi and KA/Pi must be running in order to receive the data. 600KO/Pi and KA/Pi must be running in order to receive the data.
599(KO/Pi and KA/Pi are always running if Fastload for them is enabled!) 601(KO/Pi and KA/Pi are always running if Fastload for them is enabled!)
600 602
601In the KA/Pi details view are now the preferred tel. numbers displayed on top 603In the KA/Pi details view are now the preferred tel. numbers displayed on top
602of the other data ( emails/tel.numbers/addresses) 604of the other data ( emails/tel.numbers/addresses)
603 605
604Fixed some syncing problems in KA/Pi. 606Fixed some syncing problems in KA/Pi.
605 607
606Added font settings for the KA/Pi details view. 608Added font settings for the KA/Pi details view.
607Added fields "children's name" and "gender" to KA/Pi. 609Added fields "children's name" and "gender" to KA/Pi.
608 610
609Made searching in KA/Pi better: 611Made searching in KA/Pi better:
610Now the first item in a view is selected after a search automatically and 612Now the first item in a view is selected after a search automatically and
611the views can be scrolled up/down when the search input field has the keyboard focus. 613the views can be scrolled up/down when the search input field has the keyboard focus.
612 614
613And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. 615And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi.
614 616
615 617
616********** VERSION 1.9.6 ************ 618********** VERSION 1.9.6 ************
617 619
618Changes in the external application communication on the Zaurus 620Changes in the external application communication on the Zaurus
619in order to use less RAM when the apps are running. 621in order to use less RAM when the apps are running.
620First syncing of addressbooks (KA/Pi) is possible. 622First syncing of addressbooks (KA/Pi) is possible.
621 623
622 624
623********** VERSION 1.9.5a ************ 625********** VERSION 1.9.5a ************
624 626
625Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. 627Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5.
626Fixed some small bugs. 628Fixed some small bugs.
627KA/Pi shows now the birthday in summary view. 629KA/Pi shows now the birthday in summary view.
628Now OM/Pi and KA/Pi are using the date format defined in KO/Pi 630Now OM/Pi and KA/Pi are using the date format defined in KO/Pi
629for displaying dates. 631for displaying dates.
630 632
631 633
632********** VERSION 1.9.5 ************ 634********** VERSION 1.9.5 ************
633 635
634There is still no Addressbook syncing! 636There is still no Addressbook syncing!
635 637
636New in 1.9.5: 638New in 1.9.5:
637 639
638Many bugfixes. 640Many bugfixes.
639Better searching in KA/Pi. 641Better searching in KA/Pi.
640You can configure in KA/Pi if you want to search only after 642You can configure in KA/Pi if you want to search only after
641<return> key pressed. 643<return> key pressed.
642 644
643Better mail downloading in OM/Pi. 645Better mail downloading in OM/Pi.
644 646
645First experimental alpha version of sync of KO/Pi with mobile phones. 647First experimental alpha version of sync of KO/Pi with mobile phones.
646See gammu documentation for supported phones. 648See gammu documentation for supported phones.
647You 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. 649You 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.
648Quick hint how to use: 650Quick hint how to use:
649NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! 651NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL!
650Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. 652Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp.
651Create syncprofile - mobile device 653Create syncprofile - mobile device
652Remove entry for model. (Leave empty ). 654Remove entry for model. (Leave empty ).
653Enable infrared on Zaurus and your Phone. 655Enable infrared on Zaurus and your Phone.
654Sync. 656Sync.
655To get a more detailed log, start kopi from konsole. 657To get a more detailed log, start kopi from konsole.
656 658
657********** VERSION 1.9.4 ************ 659********** VERSION 1.9.4 ************
658 660
659This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. 661This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus.
660 662
661WARNING: 663WARNING:
662PLEASE BACKUP ALL YOUR DATA! 664PLEASE BACKUP ALL YOUR DATA!
663We have changed a lot and maybe there are some unknown problems. 665We have changed a lot and maybe there are some unknown problems.
664 666
665SYNC HANDLING HAS CHANGED! 667SYNC HANDLING HAS CHANGED!
666Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 668Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
667(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 669(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
668 670
669You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. 671You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs.
670If 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. 672If 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.
671 673
672As programs are available: 674As programs are available:
673KO/Pi (korganizer ipk) - a calendar program. 675KO/Pi (korganizer ipk) - a calendar program.
674KA/Pi (kaddressbook ipk ) - an addressbook 676KA/Pi (kaddressbook ipk ) - an addressbook
675OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. 677OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support.
676 678
677An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. 679An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode.
678(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) 680(If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia)
679 681
680All the applications are installed in a "Pim" TAB. 682All the applications are installed in a "Pim" TAB.
681If 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 683If 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
682 684
683All the application are integrated. 685All the application are integrated.
684Such 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. 686Such 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.
685 687
686HINT: 688HINT:
687If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. 689If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number.
688 690
689What's new? 691What's new?
690 692
691SYNC HANDLING HAS CHANGED! 693SYNC HANDLING HAS CHANGED!
692Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. 694Such that, if you sync now with an already synded device, you will duplicated entries after the first sync.
693(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). 695(This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks).
694 696
695New in OM/Pi: 697New in OM/Pi:
696When 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. 698When 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.
697 699
698New in KO/Pi: 700New in KO/Pi:
699French is now available for KO/Pi. 701French is now available for KO/Pi.
700Choose menu:Actions - Configure:TAB locale 702Choose menu:Actions - Configure:TAB locale
701Syncing has changed. 703Syncing has changed.
702Phone sync available soon. 704Phone sync available soon.
703Not much changes, I cannot remember them ... 705Not much changes, I cannot remember them ...
704 706
705New in KA/Pi: 707New in KA/Pi:
706Beaming possible. 708Beaming possible.
707Sharp DTM readonly access possible( create a new DTM resource ); 709Sharp DTM readonly access possible( create a new DTM resource );
708Better searching possible. 710Better searching possible.
709Search is performed only after pressing the return key. 711Search is performed only after pressing the return key.
710Use wildcard * to specify parts of a name. 712Use wildcard * to specify parts of a name.
711 713
712Better 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 * . 714Better 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 * .
713 715
714A big improvement is the new management of the contact access. 716A big improvement is the new management of the contact access.
715In version 1.9.3, every application was using their own addressbook access data. 717In version 1.9.3, every application was using their own addressbook access data.
716That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. 718That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi.
717That was wasting of memory, if you had several hundreds of contacts. 719That was wasting of memory, if you had several hundreds of contacts.
718 720
719Now only KA/Pi accesses the addressbook. 721Now only KA/Pi accesses the addressbook.
720If 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. 722If 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.
721If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. 723If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly.
722That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. 724That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first.
723 725
724New in the KO/Pi alarm applet: 726New in the KO/Pi alarm applet:
725Configure your own timer popup menu! 727Configure your own timer popup menu!
726(Text and minutes for timer countdown) 728(Text and minutes for timer countdown)
727Just edit the file 729Just edit the file
728(yourhomedir)/.kopialarmtimerrc 730(yourhomedir)/.kopialarmtimerrc
729and start/stop a timer to get a new menu with the data of this file. 731and start/stop a timer to get a new menu with the data of this file.
730 732
731********** VERSION 1.9.3 ************ 733********** VERSION 1.9.3 ************
7321) 7341)
733Now KO/Pi on Windows imports directly the calendar data of 735Now KO/Pi on Windows imports directly the calendar data of
734an installed Outlook. Should work with OL version >= 2000. 736an installed Outlook. Should work with OL version >= 2000.
735 737
736********** VERSION 1.9.2 ************ 738********** VERSION 1.9.2 ************
7371) 7391)
738KDE-Pim/Pi has got a new member: 740KDE-Pim/Pi has got a new member:
739KmicroMail (KM/Pi) is a mail program, 741KmicroMail (KM/Pi) is a mail program,
740which can handle IMAP and POP mail access. 742which can handle IMAP and POP mail access.
741It is based on Opie-Mail v3. 743It is based on Opie-Mail v3.
742All dependencies to the Opie libraries ar removed, 744All dependencies to the Opie libraries ar removed,
743such that no additional Opie lib is needed. 745such that no additional Opie lib is needed.
744It is already integrated in KO/Pi and KA/Pi. 746It is already integrated in KO/Pi and KA/Pi.
745It it now available for the Zaurus,probably it 747It it now available for the Zaurus,probably it
746will be available for other platforms later. 748will be available for other platforms later.
747Hint: 749Hint:
748Create your own contact (name + email) 750Create your own contact (name + email)
749in KA/Pi, select this contact and choose menu: 751in KA/Pi, select this contact and choose menu:
750Settings - Set Who Am I. 752Settings - Set Who Am I.
751Now the settings of this contact are used as 753Now the settings of this contact are used as
752the sender data in KM/Pi. 754the sender data in KM/Pi.
7532) 7552)
754KDE-Pim/Pi is split up in five different 756KDE-Pim/Pi is split up in five different
755packages now precompiled for Sharp Zaurus: 757packages now precompiled for Sharp Zaurus:
756--kmicrokdelibs_1.9.2_arm.ipk 758--kmicrokdelibs_1.9.2_arm.ipk
757The libs are needed for any 759The libs are needed for any
758of the following programs: 760of the following programs:
759--kaddressbook_1.9.2_arm.ipk 761--kaddressbook_1.9.2_arm.ipk
760--kmicromail_1.9.2_arm.ipk 762--kmicromail_1.9.2_arm.ipk
761--korganizer_1.9.2_arm.ipk 763--korganizer_1.9.2_arm.ipk
762Independ from that, there is the alarm applet 764Independ from that, there is the alarm applet
763available for KO/Pi, which also offers 765available for KO/Pi, which also offers
764quick access for a new mail or 766quick access for a new mail or
765showing the addressbook.: 767showing the addressbook.:
766--korganizer-alarm_1.9.2_arm.ipk 768--korganizer-alarm_1.9.2_arm.ipk
767Independend means, that the alarm applet 769Independend means, that the alarm applet
768does not need any of the libs or programs above to run. 770does not need any of the libs or programs above to run.
769But it would be quite useless without these programs. 771But it would be quite useless without these programs.
770NOTE: 772NOTE:
771If you get a 773If you get a
772"This application depends on other programs" 774"This application depends on other programs"
773during installation of 775during installation of
774--kmicrokdelibs_1.9.2_arm.ipk 776--kmicrokdelibs_1.9.2_arm.ipk
775you probably do not have to care about that. 777you probably do not have to care about that.
776kmicrokdelibs_1.9.2 will come with some 778kmicrokdelibs_1.9.2 will come with some
777resource plugins, which needs additional libraries. 779resource plugins, which needs additional libraries.
778(E.g. libopie1, if you want to use the 780(E.g. libopie1, if you want to use the
779opie resource connector in KA/Pi). 781opie resource connector in KA/Pi).
780If you do not have this libraries installed, 782If you do not have this libraries installed,
781you simply cannot use the resource. 783you simply cannot use the resource.
782To make it clear: 784To make it clear:
783If the libraries are missing, the applications 785If the libraries are missing, the applications
784using kmicrokdelibs will start, 786using kmicrokdelibs will start,
785because the resources are plugins. 787because the resources are plugins.
7863) 7883)
787KO/Pi and friends are now installable on SD-Card! 789KO/Pi and friends are now installable on SD-Card!
788It is recommended to install all libs and apps 790It is recommended to install all libs and apps
789on the SD card or all in the internal storage. 791on the SD card or all in the internal storage.
790There may be problems, if this is mixed. 792There may be problems, if this is mixed.
7914) 7934)
792Fixed two bugs in the alarm notification on Windows. 794Fixed two bugs in the alarm notification on Windows.
7935) 7955)
794Great improvement! 796Great improvement!
795KO/Pi uses now the latest version of libical. 797KO/Pi uses now the latest version of libical.
796Libical is the library which actually reads 798Libical is the library which actually reads
797the calendar files and extract the data from it. 799the calendar files and extract the data from it.
798With the old version, there were problems 800With the old version, there were problems
799(crashes or program hangs) when licical did read 801(crashes or program hangs) when licical did read
800files, which were not stored from KO/Pi. 802files, which were not stored from KO/Pi.
801I do not know, if the new libical works perfect, 803I do not know, if the new libical works perfect,
802but actually it works much better than 804but actually it works much better than
803the old version. 805the old version.
804There are no problems with compatibility with 806There are no problems with compatibility with
805old calendar files of KO/Pi, of course! 807old calendar files of KO/Pi, of course!
8066) 8086)
807New in KA/Pi: 809New in KA/Pi:
808Opie addressbook resource connector available! 810Opie addressbook resource connector available!
809You will need libopie1 and the opie addressbook, 811You will need libopie1 and the opie addressbook,
810of course. 812of course.
811With the Opie addressbook resource connector, 813With the Opie addressbook resource connector,
812you can access the Opie addressbook readonly in KA/Pi. 814you can access the Opie addressbook readonly in KA/Pi.
813If you want to edit or import the data into KA/Pi, 815If you want to edit or import the data into KA/Pi,
814do this: 816do this:
815a) Create an Opie resource. 817a) Create an Opie resource.
816 (Menu: Settings-Configure Resources). 818 (Menu: Settings-Configure Resources).
817After configuration and restarting KA/Pi you should see 819After configuration and restarting KA/Pi you should see
818the Opie contacts in KA/Pi. 820the Opie contacts in KA/Pi.
819b) Select some or all Opie contacts. 821b) Select some or all Opie contacts.
820(NOTE: +++++ 822(NOTE: +++++
821To know exactly, what contacts are Opie contacts, 823To know exactly, what contacts are Opie contacts,
822do this: Choose menu: 824do this: Choose menu:
823View-Modify View - TAB Fields. 825View-Modify View - TAB Fields.
824Select in the above list "Resource" and click 826Select in the above list "Resource" and click
825down arrow to add it to the "Selected fields". 827down arrow to add it to the "Selected fields".
826Click OK. 828Click OK.
827Now you have a new column "Resource" in your list, 829Now you have a new column "Resource" in your list,
828where you can see, what an Opie resource is. 830where you can see, what an Opie resource is.
829++++ NOTE end.) 831++++ NOTE end.)
830Ok, we do have now some Opie contacts seleted. 832Ok, we do have now some Opie contacts seleted.
831(Use SHIFT or CTRL key in order to multiple select). 833(Use SHIFT or CTRL key in order to multiple select).
832c) Choose menu: Edit-Copy. 834c) Choose menu: Edit-Copy.
833d) Choose menu: Edit-Paste. 835d) Choose menu: Edit-Paste.
834e) Select the resource, you want to add the contacts to. 836e) Select the resource, you want to add the contacts to.
835Congrats! Now you have read/write access to the copied 837Congrats! Now you have read/write access to the copied
836opie contacts as "real" KA/Pi contacts. 838opie contacts as "real" KA/Pi contacts.
837 839
838 840
839********** VERSION 1.9.1 ************ 841********** VERSION 1.9.1 ************
8401) 8421)
841 +++ IMPORTANT 1 +++ 843 +++ IMPORTANT 1 +++
842 844
843The storing place of the default calendar 845The storing place of the default calendar
844file has changed! 846file has changed!
845The default calendar file was 847The default calendar file was
846Applications/korganizer/mycalendar.ics 848Applications/korganizer/mycalendar.ics
847on Zaurus and 849on Zaurus and
848(yourHomeDir)/korganizer/mycalendar.ics 850(yourHomeDir)/korganizer/mycalendar.ics
849on Windows/Linux desktop. Now it is 851on Windows/Linux desktop. Now it is
850(yourHomeDir)/kdepim/korganizer/mycalendar.ics 852(yourHomeDir)/kdepim/korganizer/mycalendar.ics
851on Zaurus, Windows and Linux. 853on Zaurus, Windows and Linux.
852To load the old file, choose menu 854To load the old file, choose menu
853File-Load calendar backup. 855File-Load calendar backup.
854(It should be loaded automatically 856(It should be loaded automatically
855at startup with a warning message displayed). 857at startup with a warning message displayed).
856The place of the configuration file has changed too. 858The place of the configuration file has changed too.
857If you want to use your old KO/Pi config, 859If you want to use your old KO/Pi config,
858copy it to 860copy it to
859(yourHomeDir)/kdepim/config/korganizerrc 861(yourHomeDir)/kdepim/config/korganizerrc
860Please read VERSION 1.9.0 - topic 3) as well! 862Please read VERSION 1.9.0 - topic 3) as well!
861 863
862 +++ IMPORTANT 2 +++ 864 +++ IMPORTANT 2 +++
863 865
864Because of the new paths, you will need 866Because of the new paths, you will need
865a new version of the KO/Pi alarm applet 867a new version of the KO/Pi alarm applet
866for Zaurus. 868for Zaurus.
867Use version >= 1.9.1 869Use version >= 1.9.1
868 870
8692) 8712)
870Now the QWhat'sThis Icon works for items 872Now the QWhat'sThis Icon works for items
871in the month view as well. 873in the month view as well.
872(See VERSION 1.7.8 Topic 1) ). 874(See VERSION 1.7.8 Topic 1) ).
8733) 8753)
874You can import birtsdays/anniversaries 876You can import birtsdays/anniversaries
875from KA/Pi into KO/Pi. 877from KA/Pi into KO/Pi.
876Choose menu File-Import birthdays. 878Choose menu File-Import birthdays.
877If you import twice, already imported items 879If you import twice, already imported items
878will not be imported again, if they 880will not be imported again, if they
879have not been changed in KO/Pi. 881have not been changed in KO/Pi.
8804) 8824)
881When syncing with sharp DTM, now a progress 883When syncing with sharp DTM, now a progress
882is shown, when the data is written back. 884is shown, when the data is written back.
883If there is much data in KO/Pi and no data 885If there is much data in KO/Pi and no data
884in DTM, that can take a long time. 886in DTM, that can take a long time.
885(But only for the first time ). 887(But only for the first time ).
8865) 8885)
887In the search dialog, you can search 889In the search dialog, you can search
888now for the name/email of an attendee 890now for the name/email of an attendee
889of an event/todo. 891of an event/todo.
890To get more space for displaying 892To get more space for displaying
891search results, the buttons 893search results, the buttons
892for "search" and "close" on the 894for "search" and "close" on the
893bottom are removed in the PDA version. 895bottom are removed in the PDA version.
894You have to click OK in the top right 896You have to click OK in the top right
895corner to do a search. 897corner to do a search.
8966) 8986)
897Now it is possible to disable the displaying 899Now it is possible to disable the displaying
898of todo items in the Allday part of the Agenda. 900of todo items in the Allday part of the Agenda.
899Choose Menu Action-Configure, 901Choose Menu Action-Configure,
900TAB Todo View, checkbox 902TAB Todo View, checkbox
901"Allday Agenda view shows todos" 903"Allday Agenda view shows todos"
9027) 9047)
903If FastLoad is enabled, now the settings and the 905If FastLoad is enabled, now the settings and the
904calendar data are saved, when KO/Pi is closed. 906calendar data are saved, when KO/Pi is closed.
905(If no Fastload is enabled, KO/Pi saves 907(If no Fastload is enabled, KO/Pi saves
906the data as well, of course) 908the data as well, of course)
9078) 9098)
908The Agenda View has a minimize-splitter now, 910The Agenda View has a minimize-splitter now,
909such that the height of the allday part can be 911such that the height of the allday part can be
910changed quickly. 912changed quickly.
911 913
912********** VERSION 1.9.0 ************ 914********** VERSION 1.9.0 ************
9131) 9151)
914KO/Pi is now merged with the new microKDE from KA/Pi. 916KO/Pi is now merged with the new microKDE from KA/Pi.
915KO/Pi accesses now KA/Pi as the addressbook. 917KO/Pi accesses now KA/Pi as the addressbook.
916The other ddressbook-plugins are not working any longer. 918The other ddressbook-plugins are not working any longer.
917(It is planned, that later KA/Pi itself uses these plugins) 919(It is planned, that later KA/Pi itself uses these plugins)
918New versions of KO/Pi are only available 920New versions of KO/Pi are only available
919together with KA/Pi as the KDE-Pim/Pi package. 921together with KA/Pi as the KDE-Pim/Pi package.
9202) 9222)
921If you click on an attendee of a meeting in the 923If you click on an attendee of a meeting in the
922event viewer, a detailed summary of the 924event viewer, a detailed summary of the
923attendee is shown. 925attendee is shown.
9243) 9263)
925The place of the configuration file has changed. 927The place of the configuration file has changed.
926If you want to use your old KO/Pi config, copy 928If you want to use your old KO/Pi config, copy
927Applications/korganizer/config_korganizerrc 929Applications/korganizer/config_korganizerrc
928to 930to
929Applications/korganizer/config/korganizerrc 931Applications/korganizer/config/korganizerrc
930 932
931********** VERSION 1.7.8 ************ 933********** VERSION 1.7.8 ************
9321) 9341)
933Now the QWhat'sThis ist working. 935Now the QWhat'sThis ist working.
934Enable the QWhat'sThis icon in the toolbar. 936Enable the QWhat'sThis icon in the toolbar.
935(You have to restart to reload the changed toolbar config). 937(You have to restart to reload the changed toolbar config).
936Now click on the QWhat'sThis Icon 938Now click on the QWhat'sThis Icon
937in the top right corner of KO/Pi. 939in the top right corner of KO/Pi.
938Then click on an item in the Agenda View: 940Then click on an item in the Agenda View:
939You will get a detailed display of the items content. 941You will get a detailed display of the items content.
9402) 9422)
941Some other very minor changes. 943Some other very minor changes.
942But I have forgotten the details ... 944But I have forgotten the details ...
943For that reason I start this log here: 945For that reason I start this log here:
944To document my changes, when I am doing it. 946To document my changes, when I am doing it.
945 947
946********** VERSION 1.7.7 ************ 948********** VERSION 1.7.7 ************
947Stable Version of KO/Pi 949Stable Version of KO/Pi
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 57b2fda..5335f47 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -1,728 +1,757 @@
1{ "file","Datei" }, 1{ "file","Datei" },
2{ "Choose one file","Wähle eine Datei" }, 2{ "Choose one file","Wähle eine Datei" },
3{ "dir","Verzeichnis" }, 3{ "dir","Verzeichnis" },
4{ "Choose a directory with may files","Wähle Verzeichnis" }, 4{ "Choose a directory with may files","Wähle Verzeichnis" },
5{ "ldap","ldap" }, 5{ "ldap","ldap" },
6{ "No description available","Keine Beschreibung verfügbar" }, 6{ "No description available","Keine Beschreibung verfügbar" },
7{ "Library files for "%1" not found in paths","Bibliothek für "%1" nicht gefunden" }, 7{ "Library files for "%1" not found in paths","Bibliothek für "%1" nicht gefunden" },
8{ "qtopia","qtopia" }, 8{ "qtopia","qtopia" },
9{ "Qtopia PIM Addressbook.","Qtopia PIM Adressbuch." }, 9{ "Qtopia PIM Addressbook.","Qtopia PIM Adressbuch." },
10{ "vCard","vCard" }, 10{ "vCard","vCard" },
11{ "vCard Format","vCard Format" }, 11{ "vCard Format","vCard Format" },
12{ "microkabcformat_binary","microkabcformat_binary" }, 12{ "microkabcformat_binary","microkabcformat_binary" },
13{ "Binary","Binary" }, 13{ "Binary","Binary" },
14{ "No description available.","Keine Beschreibung verfügbar." }, 14{ "No description available.","Keine Beschreibung verfügbar." },
15{ "Department","Abteilung" }, 15{ "Department","Abteilung" },
16{ "Profession","Beruf" }, 16{ "Profession","Beruf" },
17{ "Assistant's Name","Name d.Assistenten" }, 17{ "Assistant's Name","Name d.Assistenten" },
18{ "Manager's Name","Name d.Manager's" }, 18{ "Manager's Name","Name d.Manager's" },
19{ "Spouse's Name","Name d.Ehegatten" }, 19{ "Spouse's Name","Name d.Ehegatten" },
20{ "Office","Büro" }, 20{ "Office","Büro" },
21{ "IM Address","IM Adresse" }, 21{ "IM Address","IM Adresse" },
22{ "Anniversary","Jahrestag" }, 22{ "Anniversary","Jahrestag" },
23{ "Gender","Geschlecht" }, 23{ "Gender","Geschlecht" },
24{ "Children","Kinder" }, 24{ "Children","Kinder" },
25{ "FreeBusyUrl","FreeBusyUrl" }, 25{ "FreeBusyUrl","FreeBusyUrl" },
26{ "ExternalID","ExternalID" }, 26{ "ExternalID","ExternalID" },
27{ "Resource loaded: '%1'","Resource geladen: '%1'" }, 27{ "Resource loaded: '%1'","Resource geladen: '%1'" },
28{ "Select View","Ansicht wählen" }, 28{ "Select View","Ansicht wählen" },
29{ "Modify View...","Ansicht ändern..." }, 29{ "Modify View...","Ansicht ändern..." },
30{ "Add View...","Ansicht hinzufügen..." }, 30{ "Add View...","Ansicht hinzufügen..." },
31{ "Delete View","Ansicht löschen" }, 31{ "Delete View","Ansicht löschen" },
32{ "Refresh View","Ansicht aktualisieren" }, 32{ "Refresh View","Ansicht aktualisieren" },
33{ "Edit &Filters...","Bearbeite &Filter..." }, 33{ "Edit &Filters...","Bearbeite &Filter..." },
34{ "Select Filter","Filter wählen" }, 34{ "Select Filter","Filter wählen" },
35{ "Style:","Stil:" }, 35{ "Style:","Stil:" },
36{ "HTML table style.","HTML tabellen stil." }, 36{ "HTML table style.","HTML tabellen stil." },
37{ "Default Table View","Standard Tabellen Ansicht" }, 37{ "Default Table View","Standard Tabellen Ansicht" },
38{ "Show Extension Bar","Zeige Extension Bar" }, 38{ "Show Extension Bar","Zeige Extension Bar" },
39{ "None","Kein" }, 39{ "None","Kein" },
40{ "Name...","Name..." }, 40{ "Name...","Name..." },
41{ "Role:","Funktion:" }, 41{ "Role:","Funktion:" },
42{ "Organization:","Firma:" }, 42{ "Organization:","Firma:" },
43{ "Formatted name:","Formatt. Name:" }, 43{ "Formatted name:","Formatt. Name:" },
44{ "Edit Phone Numbers...","Bearbeite Telefonnummern..." }, 44{ "Edit Phone Numbers...","Bearbeite Telefonnummern..." },
45{ "Categories","Kategorien" }, 45{ "Categories","Kategorien" },
46{ "Public","Öffentlich" }, 46{ "Public","Öffentlich" },
47{ "Private","Privat" }, 47{ "Private","Privat" },
48{ "Confidential","Vertraulich" }, 48{ "Confidential","Vertraulich" },
49{ "&General","Allgemein" }, 49{ "&General","Allgemein" },
50{ "&Edit Addresses...","B&earbeite Adressen..." }, 50{ "&Edit Addresses...","B&earbeite Adressen..." },
51{ "Edit Email Addresses...","Bearbeite E-Mail Adressen..." }, 51{ "Edit Email Addresses...","Bearbeite E-Mail Adressen..." },
52{ "Email:","Email:" }, 52{ "Email:","Email:" },
53{ "URL:","URL:" }, 53{ "URL:","URL:" },
54{ "&IM address:","&IM address:" }, 54{ "&IM address:","&IM address:" },
55{ "&Address","&Adresse" }, 55{ "&Address","&Adresse" },
56{ "Department:","Abteilung:" }, 56{ "Department:","Abteilung:" },
57{ "Office:","Büro:" }, 57{ "Office:","Büro:" },
58{ "Profession:","Beruf:" }, 58{ "Profession:","Beruf:" },
59{ "Manager's name:","N.d.Manager's:" }, 59{ "Manager's name:","N.d.Manager's:" },
60{ "Assistant's name:","N.d.Assistenten:" }, 60{ "Assistant's name:","N.d.Assistenten:" },
61{ "Nick name:","Spitzname:" }, 61{ "Nick name:","Spitzname:" },
62{ "Spouse's name:","N.d.Ehegatten:" }, 62{ "Spouse's name:","N.d.Ehegatten:" },
63{ "Children's names:","N.d.Kinder:" }, 63{ "Children's names:","N.d.Kinder:" },
64{ "Birthday:","Geburtstag:" }, 64{ "Birthday:","Geburtstag:" },
65{ " Local Time","Ortszeit" }, 65{ " Local Time","Ortszeit" },
66{ "Mon","Mo" }, 66{ "Mon","Mo" },
67{ "Tue","Di" }, 67{ "Tue","Di" },
68{ "Wed","Mi" }, 68{ "Wed","Mi" },
69{ "Thu","Do" }, 69{ "Thu","Do" },
70{ "Fri","Fr" }, 70{ "Fri","Fr" },
71{ "Sat","Sa" }, 71{ "Sat","Sa" },
72{ "Sun","So" }, 72{ "Sun","So" },
73{ "January","Januar" }, 73{ "January","Januar" },
74{ "February","Februar" }, 74{ "February","Februar" },
75{ "March","März" }, 75{ "March","März" },
76{ "April","April" }, 76{ "April","April" },
77{ "May","Mai" }, 77{ "May","Mai" },
78{ "June","Juni" }, 78{ "June","Juni" },
79{ "July","July" }, 79{ "July","July" },
80{ "August","August" }, 80{ "August","August" },
81{ "September","September" }, 81{ "September","September" },
82{ "October","October" }, 82{ "October","October" },
83{ "November","November" }, 83{ "November","November" },
84{ "December","Dezember" }, 84{ "December","Dezember" },
85{ "tomorrow","Morgen" }, 85{ "tomorrow","Morgen" },
86{ "today","Heute" }, 86{ "today","Heute" },
87{ "yesterday","Gestern" }, 87{ "yesterday","Gestern" },
88{ "Monday","Montag" }, 88{ "Monday","Montag" },
89{ "Tuesday","Dienstag" }, 89{ "Tuesday","Dienstag" },
90{ "Wednesday","Mittwoch" }, 90{ "Wednesday","Mittwoch" },
91{ "Thursday","Donnerstag" }, 91{ "Thursday","Donnerstag" },
92{ "Friday","Freitag" }, 92{ "Friday","Freitag" },
93{ "Saturday","Samstag" }, 93{ "Saturday","Samstag" },
94{ "Sunday","Sonntag" }, 94{ "Sunday","Sonntag" },
95{ "Anniversary:","Jahrestag:" }, 95{ "Anniversary:","Jahrestag:" },
96{ "Gender:","Geschlecht:" }, 96{ "Gender:","Geschlecht:" },
97{ "ALIEN (gender undefined)","ALIEN (Geschlecht unbekannt)" }, 97{ "ALIEN (gender undefined)","ALIEN (Geschlecht unbekannt)" },
98{ "female","weiblich" }, 98{ "female","weiblich" },
99{ "male","männlich" }, 99{ "male","männlich" },
100{ "&Details","&Details" }, 100{ "&Details","&Details" },
101{ "Note:","Notiz:" }, 101{ "Note:","Notiz:" },
102{ "&Notes","&Notizen" }, 102{ "&Notes","&Notizen" },
103{ "Use geo data","Benutze geo Daten" }, 103{ "Use geo data","Benutze geo Daten" },
104{ "Latitude:","Breitengrad:" }, 104{ "Latitude:","Breitengrad:" },
105{ "Longitude:","Längengrad:" }, 105{ "Longitude:","Längengrad:" },
106{ "Edit Geo Data...","Edit geo Daten..." }, 106{ "Edit Geo Data...","Edit geo Daten..." },
107{ "Keys:","Schlüssel:" }, 107{ "Keys:","Schlüssel:" },
108{ "Add","Hinzufügen" }, 108{ "Add","Hinzufügen" },
109{ "Remove","Entfernen" }, 109{ "Remove","Entfernen" },
110{ "Export","Exportiere" }, 110{ "Export","Exportiere" },
111{ "&Misc","Verschiedenes" }, 111{ "&Misc","Verschiedenes" },
112{ "Photo","Foto" }, 112{ "Photo","Foto" },
113{ "Store as URL","Speichere als URL" }, 113{ "Store as URL","Speichere als URL" },
114{ "Logo","Logo" }, 114{ "Logo","Logo" },
115{ "&Images","B&ilder" }, 115{ "&Images","B&ilder" },
116{ "Home","Privat" }, 116{ "Home","Privat" },
117{ "Work","Geschäft" }, 117{ "Work","Geschäft" },
118{ "Mobile","Handy" }, 118{ "Mobile","Handy" },
119{ "Fax","Fax" }, 119{ "Fax","Fax" },
120{ "Contact Editor","Bearbeite Kontakt" }, 120{ "Contact Editor","Bearbeite Kontakt" },
121{ "&Mail...","&Mail..." }, 121{ "&Mail...","&Mail..." },
122{ "&Print...","Drucken..." }, 122{ "&Print...","Drucken..." },
123{ "&Save","&Speichern" }, 123{ "&Save","&Speichern" },
124{ "&New Contact...","&Neuer Kontakt..." }, 124{ "&New Contact...","&Neuer Kontakt..." },
125{ "Mail &vCard...","Mail &vCard..." }, 125{ "Mail &vCard...","Mail &vCard..." },
126{ "Selected to phone","Auswahl zum Telefon" }, 126{ "Selected to phone","Auswahl zum Telefon" },
127{ "Beam selected v&Card(s)","Beame ausgewählte v&Card(s)" }, 127{ "Beam selected v&Card(s)","Beame ausgewählte v&Card(s)" },
128{ "&Beam personal vCard","Beame persönliche vCard" }, 128{ "&Beam personal vCard","Beame persönliche vCard" },
129{ "&Edit Contact...","Bearbeite Kontakt..." }, 129{ "&Edit Contact...","Bearbeite Kontakt..." },
130{ "&Exit","B&eenden" }, 130{ "&Exit","B&eenden" },
131{ "&Copy","Kopieren" }, 131{ "&Copy","Kopieren" },
132{ "Cu&t","Ausschneiden" }, 132{ "Cu&t","Ausschneiden" },
133{ "&Paste","Einfügen" }, 133{ "&Paste","Einfügen" },
134{ "Select &All","Alles auswählen" }, 134{ "Select &All","Alles auswählen" },
135{ "&Undo","Rückgängig machen" }, 135{ "&Undo","Rückgängig machen" },
136{ "Re&do","Wiederherstellen" }, 136{ "Re&do","Wiederherstellen" },
137{ "&Delete Contact","Lösche Kontakt" }, 137{ "&Delete Contact","Lösche Kontakt" },
138{ "Configure &Resources...","Konfiguriere &Resourcen..." }, 138{ "Configure &Resources...","Konfiguriere &Resourcen..." },
139{ "&Configure %1...","Konfiguriere %1..." }, 139{ "&Configure %1...","Konfiguriere %1..." },
140{ "Configure S&hortcuts...","Konfiguriere S&hortcuts..." }, 140{ "Configure S&hortcuts...","Konfiguriere S&hortcuts..." },
141{ "Show Jump Bar","Zeige Jump Bar" }, 141{ "Show Jump Bar","Zeige Jump Bar" },
142{ "Show Details","Zeige Details" }, 142{ "Show Details","Zeige Details" },
143{ "Beam receive enabled","Beam (IR) Empfang AN" }, 143{ "Beam receive enabled","Beam (IR) Empfang AN" },
144{ "Set Who Am I","Setze "wer bin ich"" }, 144{ "Set Who Am I","Setze "wer bin ich"" },
145{ "Set Categories for Contacts...","Setze Kategorien für Kontakte..." }, 145{ "Set Categories for Contacts...","Setze Kategorien für Kontakte..." },
146{ "Edit Category List...","Editiere Kategorieliste..." }, 146{ "Edit Category List...","Editiere Kategorieliste..." },
147{ "Remove "voice"...","Entferne "voice"..." }, 147{ "Remove "voice"...","Entferne "voice"..." },
148{ "Import from Outlook...","Importiere aus Outlook..." }, 148{ "Import from Outlook...","Importiere aus Outlook..." },
149{ "Licence","Lizenz" }, 149{ "Licence","Lizenz" },
150{ "Faq","Fragen + Antworten" }, 150{ "Faq","Fragen + Antworten" },
151{ "What's New?","Was ist neu?" }, 151{ "What's New?","Was ist neu?" },
152{ "Sync HowTo","Sync Anleitung" }, 152{ "Sync HowTo","Sync Anleitung" },
153{ "&About KAddressBook","Über KAdressBuch" }, 153{ "&About KAddressBook","Über KAdressBuch" },
154{ "Select Incremental Search Field","Selektiere Such Feld" }, 154{ "Select Incremental Search Field","Selektiere Such Feld" },
155{ "Synchronize","Synchronisieren" }, 155{ "Synchronize","Synchronisieren" },
156{ "Configure...","Konfigurieren..." }, 156{ "Configure...","Konfigurieren..." },
157{ "Enable Pi-Sync","Aktiviere Pi-Sync" }, 157{ "Enable Pi-Sync","Aktiviere Pi-Sync" },
158{ "Multiple sync","Multi Sync" }, 158{ "Multiple sync","Multi Sync" },
159{ "Import CSV List...","Importiere CSV-Datei..." }, 159{ "Import CSV List...","Importiere CSV-Datei..." },
160{ "Export CSV List...","Exportiere CSV-Datei..." }, 160{ "Export CSV List...","Exportiere CSV-Datei..." },
161{ "Import KDE 2 Addressbook...","Importiere KDE 2 Adressbuch..." }, 161{ "Import KDE 2 Addressbook...","Importiere KDE 2 Adressbuch..." },
162{ "Import vCard...","Importiere vCard..." }, 162{ "Import vCard...","Importiere vCard..." },
163{ "Export vCard 3.0...","Exportiere vCard 3.0..." }, 163{ "Export vCard 3.0...","Exportiere vCard 3.0..." },
164{ "Import Qtopia...","Importiere Qtopia..." }, 164{ "Import Qtopia...","Importiere Qtopia..." },
165{ "Export Qtopia...","Exportiere Qtopia..." }, 165{ "Export Qtopia...","Exportiere Qtopia..." },
166{ "Edit Contact","Bearbeite Kontakt" }, 166{ "Edit Contact","Bearbeite Kontakt" },
167{ "Ok","Ok" }, 167{ "Ok","Ok" },
168{ "Apply","Anwenden" }, 168{ "Apply","Anwenden" },
169{ "Cancel","Abbrechen" }, 169{ "Cancel","Abbrechen" },
170{ "KAddressbook/Pi","KAdressbuch/Pi" }, 170{ "KAddressbook/Pi","KAdressbuch/Pi" },
171{ "No Filter","Kein Filter" }, 171{ "No Filter","Kein Filter" },
172{ "Given Name","Vorname" }, 172{ "Given Name","Vorname" },
173{ "Family Name","Nachname" }, 173{ "Family Name","Nachname" },
174{ "Email Address","E-Mail Adresse" }, 174{ "Email Address","E-Mail Adresse" },
175{ "All Fields","Alle Felder" }, 175{ "All Fields","Alle Felder" },
176{ "Question","Frage" }, 176{ "Question","Frage" },
177{ "After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as "other".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?","After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as "other".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?" }, 177{ "After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as "other".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?","After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as "other".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?" },
178{ "No","Nein" }, 178{ "No","Nein" },
179{ "Yes","Ja" }, 179{ "Yes","Ja" },
180{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" }, 180{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" },
181{ "Local device name:","Name dieses Gerätes:" }, 181{ "Local device name:","Name dieses Gerätes:" },
182{ "New profile","Neues Profil" }, 182{ "New profile","Neues Profil" },
183{ "Clone profile","Klone Profil" }, 183{ "Clone profile","Klone Profil" },
184{ "Delete profile","Lösche Profil" }, 184{ "Delete profile","Lösche Profil" },
185{ "Profile:","Profil:" }, 185{ "Profile:","Profil:" },
186{ "Ask for every entry on conflict","Frage bei Konflikten nach"}, 186{ "Ask for every entry on conflict","Frage bei Konflikten nach"},
187{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, 187{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
188{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, 188{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
189{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" } 189{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }
190{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 190{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
191{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 191{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
192{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 192{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
193{ "Write back file","Schreibe Datei zurück" }, 193{ "Write back file","Schreibe Datei zurück" },
194{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 194{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
195{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 195{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
196{ "Local device name:","Name dieses Gerätes:" }, 196{ "Local device name:","Name dieses Gerätes:" },
197{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 197{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
198{ "Sync preferences","Synchronisations Einstellungen" }, 198{ "Sync preferences","Synchronisations Einstellungen" },
199{ "Profile kind","Profil Art" }, 199{ "Profile kind","Profil Art" },
200{ "Local file","Lokale Datei" }, 200{ "Local file","Lokale Datei" },
201{ "Local file:","Lokale Datei:" }, 201{ "Local file:","Lokale Datei:" },
202{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 202{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
203{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 203{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
204{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 204{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
205{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, 205{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"},
206{ "Device","Gerät:" }, 206{ "Device","Gerät:" },
207{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, 207{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" },
208{ "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","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, 208{ "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","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" },
209{ "Synchronization successful","Synchronisation erfolgreich" }, 209{ "Synchronization successful","Synchronisation erfolgreich" },
210{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, 210{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." },
211{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, 211{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" },
212{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, 212{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" },
213{ "Enter password","Passwort eingeben" }, 213{ "Enter password","Passwort eingeben" },
214{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, 214{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" },
215{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, 215{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." },
216{ "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, 216{ "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" },
217{ "Writing back file result: ","Resultat des Dateizurückschreibens: " }, 217{ "Writing back file result: ","Resultat des Dateizurückschreibens: " },
218{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, 218{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" },
219{ "Used %1 Client","Benutzter %1 Client" }, 219{ "Used %1 Client","Benutzter %1 Client" },
220{ "No email client installed","Kein Email Klient installiert" }, 220{ "No email client installed","Kein Email Klient installiert" },
221{ "Userdefined email client","Benutzerdef. Email Klient" }, 221{ "Userdefined email client","Benutzerdef. Email Klient" },
222{ "OM/Pi email client","OM/Pi Email Klient" }, 222{ "OM/Pi email client","OM/Pi Email Klient" },
223{ "Include in multiple ","Beziehe in mehrfach " }, 223{ "Include in multiple ","Beziehe in mehrfach " },
224{ "calendar ","Kalender " }, 224{ "calendar ","Kalender " },
225{ "addressbook ","Adressbuch " }, 225{ "addressbook ","Adressbuch " },
226{ "pwmanager","PWmanager" }, 226{ "pwmanager","PWmanager" },
227{ " sync"," Sync ein" }, 227{ " sync"," Sync ein" },
228{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 228{ "Write back synced data","Schreibe gesyncte Daten zurück" },
229{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 229{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
230{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 230{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
231{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 231{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
232{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 232{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
233{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 233{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
234{ "Help...","Hilfe..." }, 234{ "Help...","Hilfe..." },
235{ "Local file Cal:","Lokale Datei Kal:" }, 235{ "Local file Cal:","Lokale Datei Kal:" },
236{ "Local file ABook:","Lokale Datei ABuch:" }, 236{ "Local file ABook:","Lokale Datei ABuch:" },
237{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 237{ "Local file PWMgr:","Lokale Datei PWMgr:" },
238{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 238{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
239{ "Calendar:","Kalender:" }, 239{ "Calendar:","Kalender:" },
240{ "AddressBook:","AdressBuch:" }, 240{ "AddressBook:","AdressBuch:" },
241{ "PWManager:","PWManager:" }, 241{ "PWManager:","PWManager:" },
242{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 242{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
243{ "ssh/scp","ssh/scp" }, 243{ "ssh/scp","ssh/scp" },
244{ "ftp","ftp" }, 244{ "ftp","ftp" },
245{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 245{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
246{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 246{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
247{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 247{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
248{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 248{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
249{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 249{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
250{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 250{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
251{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 251{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
252{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 252{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
253{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 253{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
254{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 254{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
255{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 255{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
256{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 256{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
257{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 257{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
258{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 258{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
259{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 259{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
260{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, 260{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
261{ "KDE-Pim Sync","KDE-Pim Sync" }, 261{ "KDE-Pim Sync","KDE-Pim Sync" },
262{ "Multiple profiles","Multi-Sync Profile" }, 262{ "Multiple profiles","Multi-Sync Profile" },
263{ "Device: ","Gerät: " }, 263{ "Device: ","Gerät: " },
264{ "Multiple sync started.","Multi-Sync gestartet." }, 264{ "Multiple sync started.","Multi-Sync gestartet." },
265{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 265{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
266{ "KDE-Pim sync config","KDE-Pim Sync Konfig" }, 266{ "KDE-Pim sync config","KDE-Pim Sync Konfig" },
267{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein, z.B.:\n" }, 267{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein, z.B.:\n" },
268{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Modell\nautomatisch\erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 268{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Modell\nautomatisch\erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
269{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 269{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
270{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 270{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
271{ "Edit Address Book Filters","Editiere Addressbuch Filter" }, 271{ "Edit Address Book Filters","Editiere Addressbuch Filter" },
272{ "&Add...","Hinzufügen..." }, 272{ "&Add...","Hinzufügen..." },
273{ "&Edit...","B&earbeiten..." }, 273{ "&Edit...","B&earbeiten..." },
274{ "&Remove","Entfe&rne" }, 274{ "&Remove","Entfe&rne" },
275{ "Modify View: ","Ansicht ändern: " }, 275{ "Modify View: ","Ansicht ändern: " },
276{ "Fields","Felder" }, 276{ "Fields","Felder" },
277{ "Select Fields to Display","Wähle anzuzeigende Felder" }, 277{ "Select Fields to Display","Wähle anzuzeigende Felder" },
278{ "All","Alles" }, 278{ "All","Alles" },
279{ "Frequent","Frequent" }, 279{ "Frequent","Frequent" },
280{ "Address","Adresse" }, 280{ "Address","Adresse" },
281{ "Email","E-Mail" }, 281{ "Email","E-Mail" },
282{ "Personal","Persönl." }, 282{ "Personal","Persönl." },
283{ "Organization","Organisation" }, 283{ "Organization","Organisation" },
284{ "Custom","Benutzerdefiniert" }, 284{ "Custom","Benutzerdefiniert" },
285{ "&Selected\nfields:","&Selektierte\nFelder:" }, 285{ "&Selected\nfields:","&Selektierte\nFelder:" },
286{ "Formatted Name","Format. Name" }, 286{ "Formatted Name","Format. Name" },
287{ "Additional Names","Mittelname" }, 287{ "Additional Names","Mittelname" },
288{ "Honorific Prefixes","Namen Prefix" }, 288{ "Honorific Prefixes","Namen Prefix" },
289{ "Honorific Suffixes","Namen Suffix" }, 289{ "Honorific Suffixes","Namen Suffix" },
290{ "Nick Name","Sptitzname" }, 290{ "Nick Name","Sptitzname" },
291{ "Birthday","Geburtstag" }, 291{ "Birthday","Geburtstag" },
292{ "Home Address Street","Privat Adresse Strasse" }, 292{ "Home Address Street","Privat Adresse Strasse" },
293{ "Home Address Locality","Privat Adresse Stadt" }, 293{ "Home Address Locality","Privat Adresse Stadt" },
294{ "Home Address Region","Privat Adresse Bundesland" }, 294{ "Home Address Region","Privat Adresse Bundesland" },
295{ "Home Address Postal Code","Privat Adresse PLZ" }, 295{ "Home Address Postal Code","Privat Adresse PLZ" },
296{ "Home Address Country","Privat Adresse Land" }, 296{ "Home Address Country","Privat Adresse Land" },
297{ "Home Address Label","Privat Adresse Label" }, 297{ "Home Address Label","Privat Adresse Label" },
298{ "Business Address Street","Büro Adresse Strasse" }, 298{ "Business Address Street","Büro Adresse Strasse" },
299{ "Business Address Locality","Büro Adresse Stadt" }, 299{ "Business Address Locality","Büro Adresse Stadt" },
300{ "Business Address Region","Büro Adresse Bundesland" }, 300{ "Business Address Region","Büro Adresse Bundesland" },
301{ "Business Address Postal Code","Büro Adresse PLZ" }, 301{ "Business Address Postal Code","Büro Adresse PLZ" },
302{ "Business Address Country","Büro Adresse Land" }, 302{ "Business Address Country","Büro Adresse Land" },
303{ "Business Address Label","Büro Adresse Label" }, 303{ "Business Address Label","Büro Adresse Label" },
304{ "Home Phone","Privat Telefon" }, 304{ "Home Phone","Privat Telefon" },
305{ "Business Phone","Büro Telefon" }, 305{ "Business Phone","Büro Telefon" },
306{ "Mobile Phone","Handy" }, 306{ "Mobile Phone","Handy" },
307{ "Home Fax","Privat Fax" }, 307{ "Home Fax","Privat Fax" },
308{ "Business Fax","Büro Fax" }, 308{ "Business Fax","Büro Fax" },
309{ "Car Phone","Autotelefon" }, 309{ "Car Phone","Autotelefon" },
310{ "ISDN","ISDN" }, 310{ "ISDN","ISDN" },
311{ "Pager","Pager" }, 311{ "Pager","Pager" },
312{ "Mail Client","Mail Client" }, 312{ "Mail Client","Mail Client" },
313{ "Title","Titel" }, 313{ "Title","Titel" },
314{ "Role","Rolle" }, 314{ "Role","Rolle" },
315{ "Note","Notiz" }, 315{ "Note","Notiz" },
316{ "URL","URL" }, 316{ "URL","URL" },
317{ "Resource","Resource" }, 317{ "Resource","Resource" },
318{ "SIP","SIP" }, 318{ "SIP","SIP" },
319{ "Default Filter","Default Filter" }, 319{ "Default Filter","Default Filter" },
320{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." }, 320{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." },
321{ "No default filter","Kein default Filter" }, 321{ "No default filter","Kein default Filter" },
322{ "Use last active filter","Nutze letzen aktiven Filter" }, 322{ "Use last active filter","Nutze letzen aktiven Filter" },
323{ "Use filter:","Nutze Filter:" }, 323{ "Use filter:","Nutze Filter:" },
324{ "Look & Feel","Look & Feel" }, 324{ "Look & Feel","Look & Feel" },
325{ "Row Separator","Reihen Separator" }, 325{ "Row Separator","Reihen Separator" },
326{ "Alternating backgrounds","Abwechselnder Hintergrund" }, 326{ "Alternating backgrounds","Abwechselnder Hintergrund" },
327{ "Single line","Einzelne Zeile" }, 327{ "Single line","Einzelne Zeile" },
328{ "Enable background image:","Hintergrundbild:" }, 328{ "Enable background image:","Hintergrundbild:" },
329{ "Enable contact tooltips","Contact Tooltips" }, 329{ "Enable contact tooltips","Contact Tooltips" },
330{ "&Enable custom Colors","Benutzerdef. Farben" }, 330{ "&Enable custom Colors","Benutzerdef. Farben" },
331{ "&Colors","Farben" }, 331{ "&Colors","Farben" },
332{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." }, 332{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." },
333{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." }, 333{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." },
334{ "&Enable custom fonts","B&enutzerdefinierte Schriften" }, 334{ "&Enable custom fonts","B&enutzerdefinierte Schriften" },
335{ "&Text font:","Textschriftart:" }, 335{ "&Text font:","Textschriftart:" },
336{ "&Header font:","Titelschriftart:" }, 336{ "&Header font:","Titelschriftart:" },
337{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." }, 337{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." },
338{ "&Fonts","Schri&ften" }, 338{ "&Fonts","Schri&ften" },
339{ "Background Color","Hintergrundfarbe" }, 339{ "Background Color","Hintergrundfarbe" },
340{ "Text Color","Textfarbe" }, 340{ "Text Color","Textfarbe" },
341{ "Header Background Color","Titel Hintergrundfarbe" }, 341{ "Header Background Color","Titel Hintergrundfarbe" },
342{ "Header Text Color","Titel Farbe" }, 342{ "Header Text Color","Titel Farbe" },
343{ "Highlight Color","Auswahlfarbe" }, 343{ "Highlight Color","Auswahlfarbe" },
344{ "Highlighted Text Color","Auswahltextfarbe" }, 344{ "Highlighted Text Color","Auswahltextfarbe" },
345{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" }, 345{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" },
346{ "Postal","Post" }, 346{ "Postal","Post" },
347{ "Dr.","Dr." }, 347{ "Dr.","Dr." },
348{ "Miss","Frl." }, 348{ "Miss","Frl." },
349{ "Mr.","Herr" }, 349{ "Mr.","Herr" },
350{ "Mrs.","Frau" }, 350{ "Mrs.","Frau" },
351{ "Ms.","Fr." }, 351{ "Ms.","Fr." },
352{ "Prof.","Prof." }, 352{ "Prof.","Prof." },
353{ "I","I" }, 353{ "I","I" },
354{ "II","II" }, 354{ "II","II" },
355{ "III","III" }, 355{ "III","III" },
356{ "Jr.","Jr." }, 356{ "Jr.","Jr." },
357{ "Sr.","Sr." }, 357{ "Sr.","Sr." },
358{ "Name:","Name:" }, 358{ "Name:","Name:" },
359{ "Documents","Dokumente" }, 359{ "Documents","Dokumente" },
360{ "Files","Dateien" }, 360{ "Files","Dateien" },
361{ "All Files","Alle Dateien" }, 361{ "All Files","Alle Dateien" },
362{ "Name","Name" }, 362{ "Name","Name" },
363{ "Size","Größe" }, 363{ "Size","Größe" },
364{ "Date","Datum" }, 364{ "Date","Datum" },
365{ "Mime Type","Mime Typ" }, 365{ "Mime Type","Mime Typ" },
366{ "Geo Data Input","Geo Dateneingabe" }, 366{ "Geo Data Input","Geo Dateneingabe" },
367{ "Sexagesimal","Sexagesimal" }, 367{ "Sexagesimal","Sexagesimal" },
368{ "North","Nord" }, 368{ "North","Nord" },
369{ "South","Süd" }, 369{ "South","Süd" },
370{ "East","Ost" }, 370{ "East","Ost" },
371{ "West","West" }, 371{ "West","West" },
372{ "Undefined","Unbestimmt" }, 372{ "Undefined","Unbestimmt" },
373{ "Edit Address","Bearbeite Adresse" }, 373{ "Edit Address","Bearbeite Adresse" },
374{ "Street:","Strasse:" }, 374{ "Street:","Strasse:" },
375{ "Post office box:","Postfach:" }, 375{ "Post office box:","Postfach:" },
376{ "Locality:","Stadt:" }, 376{ "Locality:","Stadt:" },
377{ "Region:","Region:" }, 377{ "Region:","Region:" },
378{ "Postal code:","PLZ:" }, 378{ "Postal code:","PLZ:" },
379{ "Country:","Staat:" }, 379{ "Country:","Staat:" },
380{ "This is the preferred address","Dies ist die bevorzugte Adresse" }, 380{ "This is the preferred address","Dies ist die bevorzugte Adresse" },
381{ "New...","Neu..." }, 381{ "New...","Neu..." },
382{ "Change Type","Ändere Art" }, 382{ "Change Type","Ändere Art" },
383{ "Edit Address Type","Ändere Address Art" }, 383{ "Edit Address Type","Ändere Address Art" },
384{ "Address Types","Address Art" }, 384{ "Address Types","Address Art" },
385{ "Domestic","Inland" }, 385{ "Domestic","Inland" },
386{ "International","International" }, 386{ "International","International" },
387{ "Parcel","Paket" }, 387{ "Parcel","Paket" },
388{ "Edit Contact Name","Ändere Kontakt Name" }, 388{ "Edit Contact Name","Ändere Kontakt Name" },
389{ "Honorific prefixes:","Namensprefixes:" }, 389{ "Honorific prefixes:","Namensprefixes:" },
390{ "Given name:","Vorname:" }, 390{ "Given name:","Vorname:" },
391{ "Additional names:","Mittelnamen:" }, 391{ "Additional names:","Mittelnamen:" },
392{ "Family names:","Nachname:" }, 392{ "Family names:","Nachname:" },
393{ "Honorific suffixes:","Namenssuffixe:" }, 393{ "Honorific suffixes:","Namenssuffixe:" },
394{ "Parse name automatically","Setze Namen automatisch" }, 394{ "Parse name automatically","Setze Namen automatisch" },
395{ "Edit Phone Numbers","Bearbeite Telefonnummern" }, 395{ "Edit Phone Numbers","Bearbeite Telefonnummern" },
396{ "Number","Nummer" }, 396{ "Number","Nummer" },
397{ "Type","Typ" }, 397{ "Type","Typ" },
398{ "Edit Phone Number","Bearbeite Telefonnummer" }, 398{ "Edit Phone Number","Bearbeite Telefonnummer" },
399{ "Number:","Nummer:" }, 399{ "Number:","Nummer:" },
400{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" }, 400{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" },
401{ "Types","Typen" }, 401{ "Types","Typen" },
402{ "Messenger","Messenger" }, 402{ "Messenger","Messenger" },
403{ "Other","Anderes" }, 403{ "Other","Anderes" },
404{ "Video","Video" }, 404{ "Video","Video" },
405{ "Mailbox","Mailbox" }, 405{ "Mailbox","Mailbox" },
406{ "Modem","Modem" }, 406{ "Modem","Modem" },
407{ "Car","Auto" }, 407{ "Car","Auto" },
408{ "PCS","PCS" }, 408{ "PCS","PCS" },
409{ "Category","Kategorie" }, 409{ "Category","Kategorie" },
410{ "Select Categories","Wähle Kategorien" }, 410{ "Select Categories","Wähle Kategorien" },
411{ " &Deselect All "," &Deselektiere alle " }, 411{ " &Deselect All "," &Deselektiere alle " },
412{ " &Edit Categories "," B&earbeite Kategorien " }, 412{ " &Edit Categories "," B&earbeite Kategorien " },
413{ "&OK","&OK" }, 413{ "&OK","&OK" },
414{ "&Cancel","Abbre&chen" }, 414{ "&Cancel","Abbre&chen" },
415{ "Configure","Konfiguriere" }, 415{ "Configure","Konfiguriere" },
416{ "Default","Voreinstellungen" }, 416{ "Default","Voreinstellungen" },
417{ "Addressbook","Adressbuch" }, 417{ "Addressbook","Adressbuch" },
418{ "Details view font","Schriftart Detailansicht" }, 418{ "Details view font","Schriftart Detailansicht" },
419{ "phone:123","phone:123" }, 419{ "phone:123","phone:123" },
420{ "Search only after <return> key pressed","Suche nur nach <return> Taste" }, 420{ "Search only after <return> key pressed","Suche nur nach <return> Taste" },
421{ "Honor KDE single click","Benutze KDE Einzelklick" }, 421{ "Honor KDE single click","Benutze KDE Einzelklick" },
422{ "Automatic name parsing for new addressees","Automa. Name Parsen für neue Einträge" }, 422{ "Automatic name parsing for new addressees","Automa. Name Parsen für neue Einträge" },
423{ "Display List and Details at once (restart)","Zeige Liste und Details zusammen(neustart)" }, 423{ "Display List and Details at once (restart)","Zeige Liste und Details zusammen(neustart)" },
424{ "Ask for quit when closing Ka/Pi","Vor Beenden von Ka/Pi nachfragen" }, 424{ "Ask for quit when closing Ka/Pi","Vor Beenden von Ka/Pi nachfragen" },
425{ "General","Algemein" }, 425{ "General","Algemein" },
426{ "Extensions (restart)","Extensions (restart)" }, 426{ "Extensions (restart)","Extensions (restart)" },
427{ "Description","Beschreibungen" }, 427{ "Description","Beschreibungen" },
428{ "Extensions","Extensions" }, 428{ "Extensions","Extensions" },
429{ "Prefixes","Prefixe" }, 429{ "Prefixes","Prefixe" },
430{ "Inclusions","Inclusions" }, 430{ "Inclusions","Inclusions" },
431{ "Suffixes","Suffixe" }, 431{ "Suffixes","Suffixe" },
432{ "Default formatted name:","Default format. Name:" }, 432{ "Default formatted name:","Default format. Name:" },
433{ "Empty","Leer" }, 433{ "Empty","Leer" },
434{ "Simple Name","Einfacher Name" }, 434{ "Simple Name","Einfacher Name" },
435{ "Full Name","Voller Name" }, 435{ "Full Name","Voller Name" },
436{ "Reverse Name","Namen umdrehen" }, 436{ "Reverse Name","Namen umdrehen" },
437{ "Contact","Kontakt" }, 437{ "Contact","Kontakt" },
438{ "Global","Allgemein" }, 438{ "Global","Allgemein" },
439{ "Phone","Telefon" }, 439{ "Phone","Telefon" },
440{ "SMS","SMS" }, 440{ "SMS","SMS" },
441{ "Language:(needs restart)","Sprache:(Neustart)" }, 441{ "Language:(needs restart)","Sprache:(Neustart)" },
442{ "English","English" }, 442{ "English","English" },
443{ "German","Deutsch" }, 443{ "German","Deutsch" },
444{ "French","Französisch" }, 444{ "French","Französisch" },
445{ "Italian","Italienisch" }, 445{ "Italian","Italienisch" },
446{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" }, 446{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
447{ "Time Format(nr):","Zeit Format(nr):" }, 447{ "Time Format(nr):","Zeit Format(nr):" },
448{ "24:00","24:00" }, 448{ "24:00","24:00" },
449{ "12:00am","12:00am" }, 449{ "12:00am","12:00am" },
450{ "Week starts on Sunday","Woche beginnt Sonntags" }, 450{ "Week starts on Sunday","Woche beginnt Sonntags" },
451{ "Locale","Locale" }, 451{ "Locale","Locale" },
452{ "Date Format:","Datums Format:" }, 452{ "Date Format:","Datums Format:" },
453{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 453{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
454{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 454{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
455{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 455{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
456{ "User defined","Benutzerdefiniert" }, 456{ "User defined","Benutzerdefiniert" },
457{ "User long date:","Format langes Datum:" }, 457{ "User long date:","Format langes Datum:" },
458{ "User short date:","Format kurzes Datum:" }, 458{ "User short date:","Format kurzes Datum:" },
459{ "Daylight start:","Sommerzeit Beginn:" }, 459{ "Daylight start:","Sommerzeit Beginn:" },
460{ "Daylight end:","Sommerzeit Ende:" }, 460{ "Daylight end:","Sommerzeit Ende:" },
461{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 461{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
462{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" }, 462{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" },
463{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 463{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
464{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 464{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
465{ "Date Format","Datums Format" }, 465{ "Date Format","Datums Format" },
466{ "Timezone:","Zeitzone:" }, 466{ "Timezone:","Zeitzone:" },
467{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 467{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
468{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 468{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
469{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 469{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
470{ "Used Mail Client","Benutzter Mail Client" }, 470{ "Used Mail Client","Benutzter Mail Client" },
471{ "Channel:","Channel:" }, 471{ "Channel:","Channel:" },
472{ "Message:","Message:" }, 472{ "Message:","Message:" },
473{ "Parameters:","Parameter:" }, 473{ "Parameters:","Parameter:" },
474{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 474{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
475{ "extra Message:","extra Message:" }, 475{ "extra Message:","extra Message:" },
476{ "extra Parameters:","extra Parameter:" }, 476{ "extra Parameters:","extra Parameter:" },
477{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 477{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
478{ "External Apps.","Externe Appl." }, 478{ "External Apps.","Externe Appl." },
479{ "Used %1 Client","Benutzer %1 Client" }, 479{ "Used %1 Client","Benutzer %1 Client" },
480{ "No email client installed","Keine Email Client installiert" }, 480{ "No email client installed","Keine Email Client installiert" },
481{ "Userdefined email client","Benutzerdef. Email Client" }, 481{ "Userdefined email client","Benutzerdef. Email Client" },
482{ "OM/Pi email client","OM/Pi Email Client" }, 482{ "OM/Pi email client","OM/Pi Email Client" },
483{ "Close KA/Pi?","Schließe KA/Pi?" }, 483{ "Close KA/Pi?","Schließe KA/Pi?" },
484{ "\nChanges will be saved!","\nÄnderungen werden gespeichert!" }, 484{ "\nChanges will be saved!","\nÄnderungen werden gespeichert!" },
485{ "Yes!","Ja!" }, 485{ "Yes!","Ja!" },
486{ "There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. ","#There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. " }, 486{ "There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. ","#There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. " },
487{ "Saving addressbook ... ","Speichere Adressbuch ... " }, 487{ "Saving addressbook ... ","Speichere Adressbuch ... " },
488{ "Addressbook saved!","Adressbuch gespeichert!" }, 488{ "Addressbook saved!","Adressbuch gespeichert!" },
489{ "Default Table View","Default Tabellenansicht" }, 489{ "Default Table View","Default Tabellenansicht" },
490{ "Merge and Remove","Zusammenfügen/entfernen" }, 490{ "Merge and Remove","Zusammenfügen/entfernen" },
491{ "Merge","Zusammenfügen" }, 491{ "Merge","Zusammenfügen" },
492{ "Merge Contacts Editor","Contact-Zusammenfüge-Editor" }, 492{ "Merge Contacts Editor","Contact-Zusammenfüge-Editor" },
493{ "New List...","Neue Liste..." }, 493{ "New List...","Neue Liste..." },
494{ "Rename List...","Ändere Namen..." }, 494{ "Rename List...","Ändere Namen..." },
495{ "Remove List","Lösche Liste" }, 495{ "Remove List","Lösche Liste" },
496{ "Add Contact","Kontakt hinzu" }, 496{ "Add Contact","Kontakt hinzu" },
497{ "Change Email...","Ändere Email..." }, 497{ "Change Email...","Ändere Email..." },
498{ "Remove Contact","Entferne Kontakt" }, 498{ "Remove Contact","Entferne Kontakt" },
499{ "Use Preferred","Nutze Preferred" }, 499{ "Use Preferred","Nutze Preferred" },
500{ "Distribution List Editor","Distribution List Editor" }, 500{ "Distribution List Editor","Distribution List Editor" },
501{ "Choose which contacts to export","Wähle Kontakte zum Exportieren" }, 501{ "Choose which contacts to export","Wähle Kontakte zum Exportieren" },
502{ "Which contacts do you want to export?","Welche Kontakte sollen exportiert werden?" }, 502{ "Which contacts do you want to export?","Welche Kontakte sollen exportiert werden?" },
503{ "Contact Selection","Kontaktauswahl" }, 503{ "Contact Selection","Kontaktauswahl" },
504{ "&All","&Alle" }, 504{ "&All","&Alle" },
505{ "Export the entire address book","Exportiere das komplette Addressbuch" }, 505{ "Export the entire address book","Exportiere das komplette Addressbuch" },
506{ "&Selected","Au&sgewählte" }, 506{ "&Selected","Au&sgewählte" },
507{ "Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","###Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected." }, 507{ "Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","###Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected." },
508{ "By matching &filter","Zutreffender &Filter" }, 508{ "By matching &filter","Zutreffender &Filter" },
509{ "Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","###Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters" }, 509{ "Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","###Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters" },
510{ "By Cate&gories","Kategorien" }, 510{ "By Cate&gories","Kategorien" },
511{ "Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","###Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories." }, 511{ "Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","###Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories." },
512{ "Select a filter to decide which contacts to export.","Wähle Filter zum Export aus." }, 512{ "Select a filter to decide which contacts to export.","Wähle Filter zum Export aus." },
513{ "Check the categories whose members you want to export.","Wähle die Kategorien zum Export aus." }, 513{ "Check the categories whose members you want to export.","Wähle die Kategorien zum Export aus." },
514{ "Sorting","Sortieren" }, 514{ "Sorting","Sortieren" },
515{ "Criterion:","Merkmal:" }, 515{ "Criterion:","Merkmal:" },
516{ "Order:","Reihenfolge:" }, 516{ "Order:","Reihenfolge:" },
517{ "Ascending","Aufsteigend" }, 517{ "Ascending","Aufsteigend" },
518{ "Descending","Absteigend" }, 518{ "Descending","Absteigend" },
519{ "Save file","Datei speichern" }, 519{ "Save file","Datei speichern" },
520{ "Error","Fehler" }, 520{ "Error","Fehler" },
521{ "Unable to export contacts.","Exportieren der Kontakte geht nicht." }, 521{ "Unable to export contacts.","Exportieren der Kontakte geht nicht." },
522{ "\nNo unsaved changes detected!\nNothing will be saved!","\nKeine ungespeicherten\nÄnderungen erkannt!\nNichts wird gespeichert!" }, 522{ "\nNo unsaved changes detected!\nNothing will be saved!","\nKeine ungespeicherten\nÄnderungen erkannt!\nNichts wird gespeichert!" },
523{ "Manage new categories...","Verwalte neue Kategorien..." }, 523{ "Manage new categories...","Verwalte neue Kategorien..." },
524{ "&File","Datei" }, 524{ "&File","Datei" },
525{ "&Edit","Bearbeite" }, 525{ "&Edit","Bearbeite" },
526{ "&View","Ansichten" }, 526{ "&View","Ansichten" },
527{ "&Settings","Konfiguration" }, 527{ "&Settings","Konfiguration" },
528{ "&Change selected","Ändere Selekt." }, 528{ "&Change selected","Ändere Selekt." },
529{ "&Help","Hilfe" }, 529{ "&Help","Hilfe" },
530{ "Remove sync info","Entferne Sync Info" }, 530{ "Remove sync info","Entferne Sync Info" },
531{ "For all profiles","Für alle Profile" }, 531{ "For all profiles","Für alle Profile" },
532{ "&Change","Ändere" }, 532{ "&Change","Ändere" },
533{ "Import xml (Qtopia)...","Importiere xml (Qtopia)..." }, 533{ "Import xml (Qtopia)...","Importiere xml (Qtopia)..." },
534{ "Export xml (Qtopia)...","Exportiere xml (Qtopia)..." }, 534{ "Export xml (Qtopia)...","Exportiere xml (Qtopia)..." },
535{ "Export to phone","Exportiere aufs Handy..." }, 535{ "Export to phone","Exportiere aufs Handy..." },
536{ "Which contacts do you want to select?","Welche Kontakte möchten Sie wählen?" }, 536{ "Which contacts do you want to select?","Welche Kontakte möchten Sie wählen?" },
537{ "&Modify","Ändere" }, 537{ "&Modify","Ändere" },
538{ "Choose which contacts to select","Bitte Kontakte auswählen!" }, 538{ "Choose which contacts to select","Bitte Kontakte auswählen!" },
539{ "After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nKontakten geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, 539{ "After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nKontakten geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " },
540{ "Manage new Categories","Verwalte neue Kategorien" }, 540{ "Manage new Categories","Verwalte neue Kategorien" },
541{ "Add to category list","Füge zur Kategorieliste hinzu" }, 541{ "Add to category list","Füge zur Kategorieliste hinzu" },
542{ "Remove from addressees","Entferne von den Kontakten" }, 542{ "Remove from addressees","Entferne von den Kontakten" },
543{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, 543{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" },
544{ "A&dd","Hinzufügen" }, 544{ "A&dd","Hinzufügen" },
545{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 545{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
546{ "NOTE: This will remove all old\ncontact data on phone!","ACHTUNG: Das löscht alle alten\nKontakt Daten auf dem Handy!" }, 546{ "NOTE: This will remove all old\ncontact data on phone!","ACHTUNG: Das löscht alle alten\nKontakt Daten auf dem Handy!" },
547{ "Export to mobile phone!","Exportiere auf das Handy!" }, 547{ "Export to mobile phone!","Exportiere auf das Handy!" },
548{ "Export to phone options","Export ans Handy Optionen" }, 548{ "Export to phone options","Export ans Handy Optionen" },
549{ "Writing to phone...","Sende Daten ans Handy..." }, 549{ "Writing to phone...","Sende Daten ans Handy..." },
550{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 550{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
551{ "Retry","Nochmal versuchen" }, 551{ "Retry","Nochmal versuchen" },
552{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 552{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
553{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 553{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
554{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 554{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
555{ "&Print View","Drucke Ansicht" }, 555{ "&Print View","Drucke Ansicht" },
556{ "&Print Details","Drucke Details" }, 556{ "&Print Details","Drucke Details" },
557{ "Beam v&Card(s)...","Beame v&Card(s)..." }, 557{ "Beam v&Card(s)...","Beame v&Card(s)..." },
558{ "Set formatted name...","Setze formatierten Namen..." }, 558{ "Set formatted name...","Setze formatierten Namen..." },
559{ "Kde Sync HowTo","Kde Sync HowTo" }, 559{ "Kde Sync HowTo","Kde Sync HowTo" },
560{ "Multi Sync HowTo","Multi Sync HowTo" }, 560{ "Multi Sync HowTo","Multi Sync HowTo" },
561{ "&Beam","&Beame" }, 561{ "&Beam","&Beame" },
562{ "Edit Email Addresses","Editiere Email Adressen" }, 562{ "Edit Email Addresses","Editiere Email Adressen" },
563{ "Email address:","Email Adresse:" }, 563{ "Email address:","Email Adresse:" },
564{ "Change","Ändere" }, 564{ "Change","Ändere" },
565{ "Set Standard","Setze Standard" }, 565{ "Set Standard","Setze Standard" },
566{ "New Contact","Neuer Contact" }, 566{ "New Contact","Neuer Contact" },
567{ "Undo %1","Rückgängig %1" }, 567{ "Undo %1","Rückgängig %1" },
568{ "Redo","Wiederholen" }, 568{ "Redo","Wiederholen" },
569{ "Saving ... please wait! ","Am Speichern ... bitte warten! " }, 569{ "Saving ... please wait! ","Am Speichern ... bitte warten! " },
570{ "CSV Import Dialog","CSV Import Dialog" }, 570{ "CSV Import Dialog","CSV Import Dialog" },
571{ "File to import:","Datei zum Import:" }, 571{ "File to import:","Datei zum Import:" },
572{ "Delimiter","Trennzeichen" }, 572{ "Delimiter","Trennzeichen" },
573{ "Comma","Komma" }, 573{ "Comma","Komma" },
574{ "Semicolon","Semikolon" }, 574{ "Semicolon","Semikolon" },
575{ "Tabulator","Tabulator" }, 575{ "Tabulator","Tabulator" },
576{ "Space","Leerzeichen" }, 576{ "Space","Leerzeichen" },
577{ "1","1" }, 577{ "1","1" },
578{ """,""" }, 578{ """,""" },
579{ "'","'" }, 579{ "'","'" },
580{ "Start at line:","Beginne mit Zeile:" }, 580{ "Start at line:","Beginne mit Zeile:" },
581{ "Textquote:","Textquote:" }, 581{ "Textquote:","Textquote:" },
582{ "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" }, 582{ "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" },
583{ "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" }, 583{ "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" },
584{ "Override previously imported entries?","Überschreibe bereits importierte Einträge?" }, 584{ "Override previously imported entries?","Überschreibe bereits importierte Einträge?" },
585{ "Select vCard to Import","Selektiere zu importierende vCard" }, 585{ "Select vCard to Import","Selektiere zu importierende vCard" },
586{ "Information","Information" }, 586{ "Information","Information" },
587{ "contacts successfully imported.","Kontakte erfolgreich importiert." }, 587{ "contacts successfully imported.","Kontakte erfolgreich importiert." },
588{ "Import xml file","Importiere xml Datei" }, 588{ "Import xml file","Importiere xml Datei" },
589{ "Choose contact selection","Wähle Kontakt Auswahl" }, 589{ "Choose contact selection","Wähle Kontakt Auswahl" },
590{ "Select the entire address book","Wähle das ganze Adressbuch" }, 590{ "Select the entire address book","Wähle das ganze Adressbuch" },
591{ "Only contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","Nur in KA/Pi selektierte Kontate.\nDiese Option ist nicht verfügbar\nwhen keine Kontakte selektiert sind." }, 591{ "Only contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","Nur in KA/Pi selektierte Kontate.\nDiese Option ist nicht verfügbar\nwhen keine Kontakte selektiert sind." },
592{ "Only contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","Nur Kontakte die auf den Filter zutreffen.\nDiese Option ist nicht verfügbar, wenn keine Filter definiert sind." }, 592{ "Only contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","Nur Kontakte die auf den Filter zutreffen.\nDiese Option ist nicht verfügbar, wenn keine Filter definiert sind." },
593{ "Only contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","Nur Kontakte die Mitglieder der Kategirien sind,\die links selektiert sind.\nDiese Option ist nicht verfügbar, wenn es keine Kategirien gibt." }, 593{ "Only contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","Nur Kontakte die Mitglieder der Kategirien sind,\die links selektiert sind.\nDiese Option ist nicht verfügbar, wenn es keine Kategirien gibt." },
594{ "Select a filter to decide which contacts to select.","Selektiere einen Filter um festzulegen welche Kontakte ausgewählt werden sollen." }, 594{ "Select a filter to decide which contacts to select.","Selektiere einen Filter um festzulegen welche Kontakte ausgewählt werden sollen." },
595{ "Check the categories whose members you want to select.","Setzte die Kategorien, dessen Mitglieder Sie auswählen möchten." }, 595{ "Check the categories whose members you want to select.","Setzte die Kategorien, dessen Mitglieder Sie auswählen möchten." },
596{ "I/O device: ","I/O device: " }, 596{ "I/O device: ","I/O device: " },
597{ "Connection: ","Connection: " }, 597{ "Connection: ","Connection: " },
598{ "Model(opt.): ","Model(opt.): " }, 598{ "Model(opt.): ","Model(opt.): " },
599{ "Exporting to phone...","Exportiere aufs Handy..." }, 599{ "Exporting to phone...","Exportiere aufs Handy..." },
600{ "Error exporting to phone","Fehler beim Export aufs Handy" }, 600{ "Error exporting to phone","Fehler beim Export aufs Handy" },
601{ "contacts successfully exported.","Kontakte erfolgreich exportiert." }, 601{ "contacts successfully exported.","Kontakte erfolgreich exportiert." },
602{ "Do you want to remove<br>all existing entries from<br>%1<br>before exporting.?","Wollen Sie<br>alle existieren Einträge von<br>%1<br>vor dem Export entfernen?" }, 602{ "Do you want to remove<br>all existing entries from<br>%1<br>before exporting.?","Wollen Sie<br>alle existieren Einträge von<br>%1<br>vor dem Export entfernen?" },
603{ "Set formatted name","Setze formatierten Namen" }, 603{ "Set formatted name","Setze formatierten Namen" },
604{ "You can set the formatted name\nfor a list of contacts in one go.","Sie können den formatierten Namen für\nein Liste von Kontakten auf einmal setzen." }, 604{ "You can set the formatted name\nfor a list of contacts in one go.","Sie können den formatierten Namen für\nein Liste von Kontakten auf einmal setzen." },
605{ "Set formatted name to:","Setze formatierten Name auf:" }, 605{ "Set formatted name to:","Setze formatierten Name auf:" },
606{ "Simple: James Bond","Einfach: James Bond" }, 606{ "Simple: James Bond","Einfach: James Bond" },
607{ "Full: Mr. James 007 Bond I","Voll: Mr. James 007 Bond I" }, 607{ "Full: Mr. James 007 Bond I","Voll: Mr. James 007 Bond I" },
608{ "Reverse: Bond, James","Umgekehrt: Bond, James" }, 608{ "Reverse: Bond, James","Umgekehrt: Bond, James" },
609{ "Organization: MI6","Organisation: MI6" }, 609{ "Organization: MI6","Organisation: MI6" },
610{ "Set formatted name to\norganization, if name empty","Setze formatierten Namen auf\nOrganisation, wenn Name leer ist." }, 610{ "Set formatted name to\norganization, if name empty","Setze formatierten Namen auf\nOrganisation, wenn Name leer ist." },
611{ "Select contact list","Selektiere Kontakt Liste" }, 611{ "Select contact list","Selektiere Kontakt Liste" },
612{ "Changing contact #%1","Ändere Kontakt #%1" }, 612{ "Changing contact #%1","Ändere Kontakt #%1" },
613{ "Refreshing view...","Lade Ansicht neu..." }, 613{ "Refreshing view...","Lade Ansicht neu..." },
614{ "Setting formatted name completed!","Setzen vom formatierten Namen beendet!" }, 614{ "Setting formatted name completed!","Setzen vom formatierten Namen beendet!" },
615{ "Removing voice...","Entferne voice..." }, 615{ "Removing voice...","Entferne voice..." },
616{ "Remove voice completed!","Entferne voice beendet!" }, 616{ "Remove voice completed!","Entferne voice beendet!" },
617{ "Merge with existing categories?","Zu bestehenden\nKategorien hinzufügen?" }, 617{ "Merge with existing categories?","Zu bestehenden\nKategorien hinzufügen?" },
618{ "Setting categories ... please wait!","Setze Kategorien ... bitte warten!" }, 618{ "Setting categories ... please wait!","Setze Kategorien ... bitte warten!" },
619{ "Setting categories completed!","Setzen der Kategorien beendet!" }, 619{ "Setting categories completed!","Setzen der Kategorien beendet!" },
620{ "OK","OK" }, 620{ "OK","OK" },
621{ "Please wait, processing categories...","Bitte warten, bearbeite Kategorien..." }, 621{ "Please wait, processing categories...","Bitte warten, bearbeite Kategorien..." },
622{ "Processing contact #%1","Bearbeite Kontakt #%1" }, 622{ "Processing contact #%1","Bearbeite Kontakt #%1" },
623{ " categories added to list! "," Kategorien zur Liste hinzugefügt! " }, 623{ " categories added to list! "," Kategorien zur Liste hinzugefügt! " },
624{ "%1: %2","%1: %2" }, 624{ "%1: %2","%1: %2" },
625{ "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n","Ihr persönlicher Kontakt ist\nnicht gesetzt! Bitte selektieren Sie\nihn und setzen ihn mit Menu:\nKonfiguration - Setze wer bin ich\n" }, 625{ "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n","Ihr persönlicher Kontakt ist\nnicht gesetzt! Bitte selektieren Sie\nihn und setzen ihn mit Menu:\nKonfiguration - Setze wer bin ich\n" },
626{ "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>","<qt>Wollen Sie wirklich<br><b>%1</b><br>als persönlichen Kontakt setzent?</qt>" }, 626{ "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>","<qt>Wollen Sie wirklich<br><b>%1</b><br>als persönlichen Kontakt setzent?</qt>" },
627{ "Cut","Ausschneiden" }, 627{ "Cut","Ausschneiden" },
628{ "Paste","Einfügen" }, 628{ "Paste","Einfügen" },
629{ "Delete","Löschen" }, 629{ "Delete","Löschen" },
630{ "Choose...","Wähle..." }, 630{ "Choose...","Wähle..." },
631{ "Add View","Ansicht hinzufügen" }, 631{ "Add View","Ansicht hinzufügen" },
632{ "View name:","Ansicht Name:" }, 632{ "View name:","Ansicht Name:" },
633{ "View Type","Ainsicht Typ" }, 633{ "View Type","Ainsicht Typ" },
634{ "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." }, 634{ "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." },
635{ "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." }, 635{ "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." },
636{ "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." }, 636{ "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." },
637{ "Draw &separators","Zeichne &Trennlinie" }, 637{ "Draw &separators","Zeichne &Trennlinie" },
638{ "Separator &width:","Trennlinien &Breite:" }, 638{ "Separator &width:","Trennlinien &Breite:" },
639{ "&Padding:","Füllung:" }, 639{ "&Padding:","Füllung:" },
640{ "Cards","Karten" }, 640{ "Cards","Karten" },
641{ "&Margin:","&Rand:" }, 641{ "&Margin:","&Rand:" },
642{ "Draw &borders","Zeichne Ränder" }, 642{ "Draw &borders","Zeichne Ränder" },
643{ "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data.","The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data." }, 643{ "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data.","The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data." },
644{ "The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators.","The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators." }, 644{ "The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators.","The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators." },
645{ "Sets the width of column separators","Sets the width of column separators" }, 645{ "Sets the width of column separators","Sets the width of column separators" },
646{ "&Layout","&Layout" }, 646{ "&Layout","&Layout" },
647{ "Show &empty fields","Zeige leere Felder" }, 647{ "Show &empty fields","Zeige leere Felder" },
648{ "Show field &labels","Zeige Feld Label" }, 648{ "Show field &labels","Zeige Feld Label" },
649{ "Be&havior","Ver&halten" }, 649{ "Be&havior","Ver&halten" },
650{ "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" }, 650{ "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" },
651{ "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>","<qt>Sind Sie sicher, dass Sie die Ansicht <b>%1</b> löschen möchten?</qt>" }, 651{ "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>","<qt>Sind Sie sicher, dass Sie die Ansicht <b>%1</b> löschen möchten?</qt>" },
652{ "Confirm Delete","Bestätige Löschen" }, 652{ "Confirm Delete","Bestätige Löschen" },
653{ "Edit Address Book Filter","Editiere Adressbuch Filter" }, 653{ "Edit Address Book Filter","Editiere Adressbuch Filter" },
654{ "Category rule","Kategorie Regel" }, 654{ "Category rule","Kategorie Regel" },
655{ "Include categories","Inklusive" }, 655{ "Include categories","Inklusive" },
656{ "Exclude categories","Exclusive" }, 656{ "Exclude categories","Exclusive" },
657{ "Include contacts, that are:","Schließe folgende Kontakte ein:" }, 657{ "Include contacts, that are:","Schließe folgende Kontakte ein:" },
658{ "public","Öffentlich" }, 658{ "public","Öffentlich" },
659{ "private","Privat" }, 659{ "private","Privat" },
660{ "confidential","Vertraulich" }, 660{ "confidential","Vertraulich" },
661{ "Configure Resources","Konfiguriere Resourcen" }, 661{ "Configure Resources","Konfiguriere Resourcen" },
662{ "Resource Configuration","Resource Konfiguration" }, 662{ "Resource Configuration","Resource Konfiguration" },
663{ "Resources","Resourcen" }, 663{ "Resources","Resourcen" },
664{ "Standard","Standard" }, 664{ "Standard","Standard" },
665{ "&Use as Standard","Setze als Standard" }, 665{ "&Use as Standard","Setze als Standard" },
666{ "Select type of the new resource:","Selektiere Typ der neuen Resource:" }, 666{ "Select type of the new resource:","Selektiere Typ der neuen Resource:" },
667{ "General Settings","Allgemeine Einstellungen" }, 667{ "General Settings","Allgemeine Einstellungen" },
668{ "Read-only","Nur-Lesen" }, 668{ "Read-only","Nur-Lesen" },
669{ "Include in sync","Schließe in Sync mit ein" }, 669{ "Include in sync","Schließe in Sync mit ein" },
670{ "%1 Resource Settings","%1 Resource Einstellungen" }, 670{ "%1 Resource Settings","%1 Resource Einstellungen" },
671{ "Format:","Format:" }, 671{ "Format:","Format:" },
672{ "Location:","Ort:" }, 672{ "Location:","Ort:" },
673{ "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" }, 673{ "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" },
674{ "Language","Sprache" }, 674{ "Language","Sprache" },
675{ "Time Format","Zeit Format" }, 675{ "Time Format","Zeit Format" },
676{ "Time Zone","Zeit Zone" }, 676{ "Time Zone","Zeit Zone" },
677{ "Data storage path","Daten Speicherpfad" }, 677{ "Data storage path","Daten Speicherpfad" },
678{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, 678{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
679{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 679{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
680{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 680{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
681{ "Save settings","Speichere Einstellungen" }, 681{ "Save settings","Speichere Einstellungen" },
682{ "Save standard","Speichere Standard" }, 682{ "Save standard","Speichere Standard" },
683{ "Save","Speichern" }, 683{ "Save","Speichern" },
684{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 684{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
685{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 685{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
686{ "Multiple Sync options","Multi Sync Optionen" }, 686{ "Multiple Sync options","Multi Sync Optionen" },
687{ "Sync algo options","Sync Ablauf Optionen" }, 687{ "Sync algo options","Sync Ablauf Optionen" },
688{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 688{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
689{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 689{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
690{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 690{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
691{ "Write back options","Optionen zum Zurückschreiben" }, 691{ "Write back options","Optionen zum Zurückschreiben" },
692{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 692{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
693{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 693{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
694{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 694{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
695{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 695{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
696{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 696{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
697{ "Time period","Zeitspanne" }, 697{ "Time period","Zeitspanne" },
698{ "From ","Von " }, 698{ "From ","Von " },
699{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 699{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
700{ " weeks in the future "," Wochen in der Zukunft " }, 700{ " weeks in the future "," Wochen in der Zukunft " },
701{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 701{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
702{ "Local temp file:","Lokale temp Datei:" }, 702{ "Local temp file:","Lokale temp Datei:" },
703{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 703{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
704{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 704{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
705{ "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." }, 705{ "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." },
706{ "Sorry","Tut mir leid" }, 706{ "Sorry","Tut mir leid" },
707{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" }, 707{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" },
708{ "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" }, 708{ "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" },
709{ "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" }, 709{ "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" },
710{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" }, 710{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" },
711{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" }, 711{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" },
712{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 712{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
713{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 713{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
714{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 714{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
715{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, 715{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" },
716{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 716{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
717{ "Error","Fehler" }, 717{ "Error","Fehler" },
718{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 718{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
719{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 719{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
720{ "Warning","Warnung" }, 720{ "Warning","Warnung" },
721{ "Select week number","Wähle Wochen Nummer" },
722{ "Februar","Februar" },
723{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
724{ "Password for remote access:","Passwort für fernen Zugriff:" },
725{ "Remote IP address:","Ferne IP Adresse:" },
726{ "Remote port number:","Ferne Port Nummer:" },
727{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
728{ "Remote from: ","Fern von: " },
729{ "Local from: ","Lokal von: " },
730{ "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 %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
731{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
732{ "Write back","Schreibe zurück" },
733{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
734{ "Received sync request","Sync Anfrage erhalten" },
735{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
736{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
737{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
738{ "Sending file...","Sende Datei..." },
739{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
740{ "Receiving synced file...","Gesyncte Daten erhalten..." },
741{ "Received %1 bytes","%1 Bytes erhalten" },
742{ "Writing file to disk...","Speichere Datei..." },
743{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
744{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
745{ "Synchronize!","Synchronisiere!" },
746{ "High clock skew!","Großer Uhrzeitunterschied!" },
747{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
748{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
749{ "","" },
721{ "","" }, 750{ "","" },
722{ "","" }, 751{ "","" },
723{ "","" }, 752{ "","" },
724{ "","" }, 753{ "","" },
725{ "","" }, 754{ "","" },
726{ "","" }, 755{ "","" },
727{ "","" }, 756{ "","" },
728{ "","" }, \ No newline at end of file 757{ "","" }, \ No newline at end of file
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 6587eaa..c85ca35 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1,1244 +1,1284 @@
1{ "10 minutes","10 Minuten" }, 1{ "10 minutes","10 Minuten" },
2{ "10th","10." }, 2{ "10th","10." },
3{ "11th","11." }, 3{ "11th","11." },
4{ "12 pm Format","12 AM/PM Format" }, 4{ "12 pm Format","12 AM/PM Format" },
5{ "12th","12." }, 5{ "12th","12." },
6{ "13th","13." }, 6{ "13th","13." },
7{ "14th","14." }, 7{ "14th","14." },
8{ "15th","15." }, 8{ "15th","15." },
9{ "16th","16." }, 9{ "16th","16." },
10{ "17th","17." }, 10{ "17th","17." },
11{ "18th","18." }, 11{ "18th","18." },
12{ "19th","19." }, 12{ "19th","19." },
13{ "1 Day","1 Tag" }, 13{ "1 Day","1 Tag" },
14{ "1 h","1 Std" }, 14{ "1 h","1 Std" },
15{ "1 (high)","1 (hoch)" }, 15{ "1 (high)","1 (hoch)" },
16{ "5 (low)","5" }, 16{ "5 (low)","5" },
17{ "1st","1." }, 17{ "1st","1." },
18{ "20th","20." }, 18{ "20th","20." },
19{ "21st","21." }, 19{ "21st","21." },
20{ "22nd","22." }, 20{ "22nd","22." },
21{ "23rd","23." }, 21{ "23rd","23." },
22{ "24:00 Hour Format","24:00 Stunden Format" }, 22{ "24:00 Hour Format","24:00 Stunden Format" },
23{ "24th","24." }, 23{ "24th","24." },
24{ "25th","25." }, 24{ "25th","25." },
25{ "26th","26." }, 25{ "26th","26." },
26{ "27th","27." }, 26{ "27th","27." },
27{ "28th","28." }, 27{ "28th","28." },
28{ "29th","29." }, 28{ "29th","29." },
29{ "2nd","2." }, 29{ "2nd","2." },
30{ "30 minutes","30 Minuten" }, 30{ "30 minutes","30 Minuten" },
31{ "30th","30." }, 31{ "30th","30." },
32{ "31st","31." }, 32{ "31st","31." },
33{ "3rd","3." }, 33{ "3rd","3." },
34{ "4th","4." }, 34{ "4th","4." },
35{ "5 (lowest)","5 (Niedrigster)" }, 35{ "5 (lowest)","5 (Niedrigster)" },
36{ "5th","5." }, 36{ "5th","5." },
37{ "6th","6." }, 37{ "6th","6." },
38{ "7th","7." }, 38{ "7th","7." },
39{ "8th","8." }, 39{ "8th","8." },
40{ "9th","9." }, 40{ "9th","9." },
41{ "About...","Über..." }, 41{ "About...","Über..." },
42{ "&Accept","&Akzeptieren" }, 42{ "&Accept","&Akzeptieren" },
43{ "Accept","Akzeptieren" }, 43{ "Accept","Akzeptieren" },
44{ "Accept A&ll","A&lles Akzepieren" }, 44{ "Accept A&ll","A&lles Akzepieren" },
45{ "Access:","Zugriff:" }, 45{ "Access:","Zugriff:" },
46{ "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, 46{ "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" },
47{ "Actions","Aktionen" }, 47{ "Actions","Aktionen" },
48{ "Add Filter","Filter Hinzufügen" }, 48{ "Add Filter","Filter Hinzufügen" },
49{ "&Add","Hinzufügen" }, 49{ "&Add","Hinzufügen" },
50{ "Add","Hinzufügen" }, 50{ "Add","Hinzufügen" },
51{ "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, 51{ "Additional email addresses:","Zusätzliche E-Mail Adressen:" },
52{ "Additional email address:","Zusätzliche E-Mail Adresse:" }, 52{ "Additional email address:","Zusätzliche E-Mail Adresse:" },
53{ "&Addressbook","&Adressbuch" }, 53{ "&Addressbook","&Adressbuch" },
54{ "Address &Book...","Adress&buch..." }, 54{ "Address &Book...","Adress&buch..." },
55{ "Agenda Size","Agende Größe" }, 55{ "Agenda Size","Agende Größe" },
56{ "Agenda Size:","Größe der Agenda:" }, 56{ "Agenda Size:","Größe der Agenda:" },
57{ "Agenda view:","Agenda Ansicht:" }, 57{ "Agenda view:","Agenda Ansicht:" },
58{ "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, 58{ "Agenda view background color:","Hintergrund der Agenda Ansicht:" },
59{ "All attendees","Alle Teilnehmer" }, 59{ "All attendees","Alle Teilnehmer" },
60{ "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, 60{ "AllDayAgenda Height:","Höhe Ganztages Agenda:" },
61{ "All day event","Ganztägig" }, 61{ "All day event","Ganztägig" },
62{ "Anonymous","Anonym" }, 62{ "Anonymous","Anonym" },
63{ "Apply","Anwenden" }, 63{ "Apply","Anwenden" },
64{ "Apr","Apr" }, 64{ "Apr","Apr" },
65{ "April","April" }, 65{ "April","April" },
66{"Ask for every entry on conflict","Frage bei Konflikten nach"}, 66{"Ask for every entry on conflict","Frage bei Konflikten nach"},
67{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, 67{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" },
68{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, 68{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" },
69{ "Attendees","Teilnehmer" }, 69{ "Attendees","Teilnehmer" },
70{ "Aug","Aug" }, 70{ "Aug","Aug" },
71{ "August","August" }, 71{ "August","August" },
72{ "Auto-Save","Automatisches Abspeichern" }, 72{ "Auto-Save","Automatisches Abspeichern" },
73{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, 73{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" },
74{ "Auto saving...","Automatische Sicherung..." }, 74{ "Auto saving...","Automatische Sicherung..." },
75{ "Begin on:","Starte mit:" }, 75{ "Begin on:","Starte mit:" },
76{ "Begins on: %1","Starte mit: %1" }, 76{ "Begins on: %1","Starte mit: %1" },
77{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, 77{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" },
78{ "<b>On:</b> %1","<b>Am:</b> %1" }, 78{ "<b>On:</b> %1","<b>Am:</b> %1" },
79{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, 79{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" },
80{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, 80{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" },
81{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, 81{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" },
82{ "Busy","Belegt" }, 82{ "Busy","Belegt" },
83{ "&Cancel","Abbre&chen" }, 83{ "&Cancel","Abbre&chen" },
84{ "Cancel","Abbrechen" }, 84{ "Cancel","Abbrechen" },
85{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, 85{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" },
86{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, 86{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." },
87{ "Categories...","Kategorien..." }, 87{ "Categories...","Kategorien..." },
88{ "Categories","Kategorien" }, 88{ "Categories","Kategorien" },
89{ "Category","Kategorie" }, 89{ "Category","Kategorie" },
90{ "Center View","Zentriere Ansicht" }, 90{ "Center View","Zentriere Ansicht" },
91{ "Change","Ändere" }, 91{ "Change","Ändere" },
92{ "Cinema","Kino" }, 92{ "Cinema","Kino" },
93{ "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, 93{ "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" },
94{ "Clone Item","Klone Eintrag" }, 94{ "Clone Item","Klone Eintrag" },
95{ "&Close","S&chließen" }, 95{ "&Close","S&chließen" },
96{ "Close","Schließen" }, 96{ "Close","Schließen" },
97{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, 97{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" },
98{ "Colors","Farben" }, 98{ "Colors","Farben" },
99{ "completed","erledigt" }, 99{ "completed","erledigt" },
100{ "completed on %1","erledigt am %1" }, 100{ "completed on %1","erledigt am %1" },
101{ "Complete","Erledigt" }, 101{ "Complete","Erledigt" },
102{ "Confidential","Vertraulich" }, 102{ "Confidential","Vertraulich" },
103{ "Configure...","Einstellungen..." }, 103{ "Configure...","Einstellungen..." },
104{ "Confirm &deletes","Löschvogang bestätigen" }, 104{ "Confirm &deletes","Löschvogang bestätigen" },
105{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, 105{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." },
106{ "Counter-event Viewer","Terminzähler Ansicht" }, 106{ "Counter-event Viewer","Terminzähler Ansicht" },
107{ "Daily ending hour:","Feierabend:" }, 107{ "Daily ending hour:","Feierabend:" },
108{ "Daily starting hour:","Anfangszeit:" }, 108{ "Daily starting hour:","Anfangszeit:" },
109{ "Daily","Täglich" }, 109{ "Daily","Täglich" },
110{ "Date Format","Datums Format" }, 110{ "Date Format","Datums Format" },
111{ "Date Format:","Datums Format:" }, 111{ "Date Format:","Datums Format:" },
112{ "DateNavigator:(nr)","Datums Navigator" }, 112{ "DateNavigator:(nr)","Datums Navigator" },
113{ "Dates: ","Datum: " }, 113{ "Dates: ","Datum: " },
114{ "Date && Time","Datum && Zeit" }, 114{ "Date && Time","Datum && Zeit" },
115{ "Day begins at:","Der Tag beginnt um:" }, 115{ "Day begins at:","Der Tag beginnt um:" },
116{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, 116{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" },
117{ "Days in What's Next:","Tage in What's Next:" }, 117{ "Days in What's Next:","Tage in What's Next:" },
118{ "day(s)","Tag(e)" }, 118{ "day(s)","Tag(e)" },
119{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, 119{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" },
120{ "day","Tag" }, 120{ "day","Tag" },
121{ "Dec","Dez" }, 121{ "Dec","Dez" },
122{ "December","Dezember" }, 122{ "December","Dezember" },
123{ "Default alarm time:","Standard Alarmzeit:" }, 123{ "Default alarm time:","Standard Alarmzeit:" },
124{ "Default appointment time:","Standard Termin Startzeit:" }, 124{ "Default appointment time:","Standard Termin Startzeit:" },
125{ "Default event color:","Standard Terminfarbe:" }, 125{ "Default event color:","Standard Terminfarbe:" },
126{ "Default","Standard" }, 126{ "Default","Standard" },
127{ "Def. duration of new app.:","Standard Termin Länge:" }, 127{ "Def. duration of new app.:","Standard Termin Länge:" },
128{ "Delete all completed To-Dos?","Alle bereits erledigten Todos löschen?" }, 128{ "Delete all completed To-Dos?","Alle bereits erledigten Todos löschen?" },
129{ "Delete All","Lösche alles" }, 129{ "Delete All","Lösche alles" },
130{ "Delete all selected","Lösche alle Selektierten" }, 130{ "Delete all selected","Lösche alle Selektierten" },
131{ "Delete Current","Aktuellen löschen" }, 131{ "Delete Current","Aktuellen löschen" },
132{ "Delete Event...","Lösche Termin..." }, 132{ "Delete Event...","Lösche Termin..." },
133{ "Delete Event","Lösche Termin" }, 133{ "Delete Event","Lösche Termin" },
134{ "&Delete","Löschen" }, 134{ "&Delete","Löschen" },
135{ "Delete...","Löschen..." }, 135{ "Delete...","Löschen..." },
136{ "Delete","Löschen" }, 136{ "Delete","Löschen" },
137{ "Delete Todo...","Lösche Todo..." }, 137{ "Delete Todo...","Lösche Todo..." },
138{ "Delete To-Do","Lösche Todo" }, 138{ "Delete To-Do","Lösche Todo" },
139{ "Deleting item %d ...","Lösche Eintrag %d..." }, 139{ "Deleting item %d ...","Lösche Eintrag %d..." },
140{ "Descriptions","Beschreibungen" }, 140{ "Descriptions","Beschreibungen" },
141{ "Deselect all","Deselektiere Alle" }, 141{ "Deselect all","Deselektiere Alle" },
142{ "Details","Details" }, 142{ "Details","Details" },
143{ "Dinner","Abendessen" }, 143{ "Dinner","Abendessen" },
144{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, 144{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" },
145{ "Due Date","Fällig am" }, 145{ "Due Date","Fällig am" },
146{ "Due: ","Fällig: "}, 146{ "Due: ","Fällig: "},
147{ "Due Time","Fällig um" }, 147{ "Due Time","Fällig um" },
148{ "Due:","Fällig:"}, 148{ "Due:","Fällig:"},
149{ "Duration: ","Dauer: " }, 149{ "Duration: ","Dauer: " },
150{ "Edit...","Bearbeite..." }, 150{ "Edit...","Bearbeite..." },
151{ "Edit","Bearbeite" }, 151{ "Edit","Bearbeite" },
152{ "Edit Event...","Bearbeite Termin..." }, 152{ "Edit Event...","Bearbeite Termin..." },
153{ "Edit Event","Bearbeite Termin" }, 153{ "Edit Event","Bearbeite Termin" },
154{ "Edit exceptions","Bearbeite Ausnahmen" }, 154{ "Edit exceptions","Bearbeite Ausnahmen" },
155{ "EditorBox:","Editor Fenster:" }, 155{ "EditorBox:","Editor Fenster:" },
156{ "Edit Recurrence Range","Bearbeite Wiederholung" }, 156{ "Edit Recurrence Range","Bearbeite Wiederholung" },
157{ "Edit Todo...","Berabeite Todo..." }, 157{ "Edit Todo...","Berabeite Todo..." },
158{ "Edit To-Do","Todo bearbeiten" }, 158{ "Edit To-Do","Todo bearbeiten" },
159{ "E&mail address:","E&mail Adresse:" }, 159{ "E&mail address:","E&mail Adresse:" },
160{ "(EmptyEmail)","(KeineEmail)" }, 160{ "(EmptyEmail)","(KeineEmail)" },
161{ "(EmptyName)","(KeinName)" }, 161{ "(EmptyName)","(KeinName)" },
162{ "Enable Recurrence","Wiederholender Termin" }, 162{ "Enable Recurrence","Wiederholender Termin" },
163{ "End after","Endet nach"}, 163{ "End after","Endet nach"},
164{ "End by:","Endet am"}, 164{ "End by:","Endet am"},
165{ "End Date","End Datum" }, 165{ "End Date","End Datum" },
166{ "End:","Ende:" }, 166{ "End:","Ende:" },
167{ "End Time","End Zeit" }, 167{ "End Time","End Zeit" },
168{ "English","Englisch" }, 168{ "English","Englisch" },
169{ "Event","Termin" }, 169{ "Event","Termin" },
170{ "Event list","Termin Liste" }, 170{ "Event list","Termin Liste" },
171{ "Events","Termine" }, 171{ "Events","Termine" },
172{ "Event Viewer:","Termin Übersicht:" }, 172{ "Event Viewer:","Termin Übersicht:" },
173{ "every","jede" }, 173{ "every","jede" },
174{ "Exceptions...","Ausnahmen..." }, 174{ "Exceptions...","Ausnahmen..." },
175{ "Exceptions","Ausnahmen" }, 175{ "Exceptions","Ausnahmen" },
176{ "Exclude holidays","Ohne freie Tage" }, 176{ "Exclude holidays","Ohne freie Tage" },
177{ "Exclude Saturdays","Ohne Samstage" }, 177{ "Exclude Saturdays","Ohne Samstage" },
178{ "Feb","Feb" }, 178{ "Feb","Feb" },
179{ "February","Februar" }, 179{ "February","Februar" },
180{ "&Find","Suche!" }, 180{ "&Find","Suche!" },
181{ "Fonts","Schriftart" }, 181{ "Fonts","Schriftart" },
182{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, 182{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" },
183{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, 183{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"},
184{ "Free","Frei" }, 184{ "Free","Frei" },
185{ "Friday","Freitag" }, 185{ "Friday","Freitag" },
186{ "Fri","Fr" }, 186{ "Fri","Fr" },
187{ "From:","Vom:" }, 187{ "From:","Vom:" },
188{ "Full &name:","Vor- und &Nachname:" }, 188{ "Full &name:","Vor- und &Nachname:" },
189{ "General","Allgemein" }, 189{ "General","Allgemein" },
190{ "German","Deutsch" }, 190{ "German","Deutsch" },
191{ "Gifts","Geschenke" }, 191{ "Gifts","Geschenke" },
192{ "Go to Today","Heute anzeigen" }, 192{ "Go to Today","Heute anzeigen" },
193{ "Help","Hilfe" }, 193{ "Help","Hilfe" },
194{ "Hide Dates","Daten ausblenden" }, 194{ "Hide Dates","Daten ausblenden" },
195{ "Highlight color:","Markierungen:" }, 195{ "Highlight color:","Markierungen:" },
196{ "Holiday color:","Freie Tage:" }, 196{ "Holiday color:","Freie Tage:" },
197{ "hour(s)","Stunde(n)" }, 197{ "hour(s)","Stunde(n)" },
198{ "In %1 days: ","In %1 Tagen: " }, 198{ "In %1 days: ","In %1 Tagen: " },
199{ "Incomplete Todo:","Unerledigte Aufgaben:" }, 199{ "Incomplete Todo:","Unerledigte Aufgaben:" },
200{ "Information","Information" }, 200{ "Information","Information" },
201{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, 201{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" },
202{ "Jan","Jan" }, 202{ "Jan","Jan" },
203{ "January","Januar" }, 203{ "January","Januar" },
204{ "JournalView:","Journal Ansicht:" }, 204{ "JournalView:","Journal Ansicht:" },
205{ "Journals","Journale" }, 205{ "Journals","Journale" },
206{ "Jul","Jul" }, 206{ "Jul","Jul" },
207{ "July","Juli" }, 207{ "July","Juli" },
208{ "Jump to date","Springe zum Datum" }, 208{ "Jump to date","Springe zum Datum" },
209{ "June","Juni" }, 209{ "June","Juni" },
210{ "Jun","Jun" }, 210{ "Jun","Jun" },
211{ "Key Bindings...","Tastenzuordnung..." }, 211{ "Key Bindings...","Tastenzuordnung..." },
212{ "Kids","Kinder" }, 212{ "Kids","Kinder" },
213{ "Known Problems...","Bekannte Probleme..." }, 213{ "Known Problems...","Bekannte Probleme..." },
214{ "KO/Pi Find ","KO/Pi Suchdialog " }, 214{ "KO/Pi Find ","KO/Pi Suchdialog " },
215{ "KO/Pi Find: ","KO/Pi Suchen: " }, 215{ "KO/Pi Find: ","KO/Pi Suchen: " },
216{ "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, 216{ "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." },
217{ "Language:(needs restart)","Sprache (Neustart!)" }, 217{ "Language:(needs restart)","Sprache (Neustart!)" },
218{ "Language:","Sprache" }, 218{ "Language:","Sprache" },
219{ "Large","Etwas mehr" }, 219{ "Large","Etwas mehr" },
220{ "List View:","Listenansicht:" }, 220{ "List View:","Listenansicht:" },
221{ "List View","Listenansicht" }, 221{ "List View","Listenansicht" },
222{ "Load/Save","Laden/Speichern" }, 222{ "Load/Save","Laden/Speichern" },
223{ "Load Template","Lade Vorlage" }, 223{ "Load Template","Lade Vorlage" },
224{ "Locale","Localisation" }, 224{ "Locale","Localisation" },
225{ "Local temp file:","Lokale temp. Datei:" }, 225{ "Local temp file:","Lokale temp. Datei:" },
226{ "Location: ","Ort: " }, 226{ "Location: ","Ort: " },
227{ "Location:","Ort:" }, 227{ "Location:","Ort:" },
228{ "Mail client","Mail Programm" }, 228{ "Mail client","Mail Programm" },
229{ "Mail Client","Mail Programm" }, 229{ "Mail Client","Mail Programm" },
230{ "March","März" }, 230{ "March","März" },
231{ "Mar","Mär" }, 231{ "Mar","Mär" },
232{ "May","Mai" }, 232{ "May","Mai" },
233{ "M. Bains line:","M. Bains Linie:" }, 233{ "M. Bains line:","M. Bains Linie:" },
234{ "Medium","Medium" }, 234{ "Medium","Medium" },
235{ "Method","Methode" }, 235{ "Method","Methode" },
236{ "minute(s)","Minute(n)" }, 236{ "minute(s)","Minute(n)" },
237{ "Monday","Montag" }, 237{ "Monday","Montag" },
238{ "Mon","Mo" }, 238{ "Mon","Mo" },
239{ "Monthly","Monatlich" }, 239{ "Monthly","Monatlich" },
240{ "Month not long enough","Monat ist nicht lang genug" }, 240{ "Month not long enough","Monat ist nicht lang genug" },
241{ "month(s)","Monat(e)" }, 241{ "month(s)","Monat(e)" },
242{ "Month view:","Monatsansicht:" }, 242{ "Month view:","Monatsansicht:" },
243{ "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, 243{ "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" },
244{ "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" }, 244{ "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" },
245{ "Move &Down","Nach unten verschieben" }, 245{ "Move &Down","Nach unten verschieben" },
246{ "Move &Up","Nach oben verschieben" }, 246{ "Move &Up","Nach oben verschieben" },
247{ "Name:","Name:" }, 247{ "Name:","Name:" },
248{ "Name","Name" }, 248{ "Name","Name" },
249{ "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, 249{ "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" },
250{ "%n Days","%n Tage" }, 250{ "%n Days","%n Tage" },
251{ "Never","Nie" }, 251{ "Never","Nie" },
252{ "New event...","Neuer Termin..." }, 252{ "New event...","Neuer Termin..." },
253{ "New event","Neuer Termin" }, 253{ "New event","Neuer Termin" },
254{ "New Event...","Neuer Termin..." }, 254{ "New Event...","Neuer Termin..." },
255{ "New Events/Todos should","Neue Termine/Todos sollten" }, 255{ "New Events/Todos should","Neue Termine/Todos sollten" },
256{ "&New","&Neu" }, 256{ "&New","&Neu" },
257{ "New","Neu", }, 257{ "New","Neu", },
258{ "New Sub-Todo...","Neues Sub-Todo..." }, 258{ "New Sub-Todo...","Neues Sub-Todo..." },
259{ "New Todo...","Neues Todo..." }, 259{ "New Todo...","Neues Todo..." },
260{ "Next Alarm: ","Nächster Alarm: ", }, 260{ "Next Alarm: ","Nächster Alarm: ", },
261{ "&Next Day","&Nächster Tag", }, 261{ "&Next Day","&Nächster Tag", },
262{ "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, 262{ "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" },
263{ "Next month","Nächster Monat" }, 263{ "Next month","Nächster Monat" },
264{ "&Next Week","&Nächste Woche" }, 264{ "&Next Week","&Nächste Woche" },
265{ "Next year","Nächstes Jahr" }, 265{ "Next year","Nächstes Jahr" },
266{ "Next Year","Nächstes Jahr" }, 266{ "Next Year","Nächstes Jahr" },
267{ "%n h","%n Std" }, 267{ "%n h","%n Std" },
268{ "No ending date","Kein End-Datum", }, 268{ "No ending date","Kein End-Datum", },
269{ "No event, nothing to do.","Kein Termin, nichts zu tun.", }, 269{ "No event, nothing to do.","Kein Termin, nichts zu tun.", },
270{ "No event selected.","Kein Termin selektiert" }, 270{ "No event selected.","Kein Termin selektiert" },
271{ "No","Nein" }, 271{ "No","Nein" },
272{ "No program set","Kein Programm ausgewählt", }, 272{ "No program set","Kein Programm ausgewählt", },
273{ "Normal","Normal" }, 273{ "Normal","Normal" },
274{ "[No selection]","Keine Selektion", }, 274{ "[No selection]","Keine Selektion", },
275{ "No sound set","Kein Sound ausgewählt", }, 275{ "No sound set","Kein Sound ausgewählt", },
276{ "no time ","keine Zeit ", }, 276{ "no time ","keine Zeit ", },
277{ "no time","keine Zeit", }, 277{ "no time","keine Zeit", },
278{ "No Time","Keine Zeit" }, 278{ "No Time","Keine Zeit" },
279{ "November","November" }, 279{ "November","November" },
280{ "Nov","Nov", }, 280{ "Nov","Nov", },
281{ "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, 281{ "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" },
282{ "occurrence(s)","Vorkommen" }, 282{ "occurrence(s)","Vorkommen" },
283{ "October","Oktober" }, 283{ "October","Oktober" },
284{ "Oct","Okt", }, 284{ "Oct","Okt", },
285{ "O-due!","Ü-fällig! " }, 285{ "O-due!","Ü-fällig! " },
286{ "&OK","&OK" }, 286{ "&OK","&OK" },
287{ "Ok+Show!","Ok+Anzeigen" }, 287{ "Ok+Show!","Ok+Anzeigen" },
288{ "Organizer: %1","Organisator %1" }, 288{ "Organizer: %1","Organisator %1" },
289{ "Organizer","Organisator" }, 289{ "Organizer","Organisator" },
290{ "Owner: ","Besitzer: " }, 290{ "Owner: ","Besitzer: " },
291{ "Owner:","Besitzer:" }, 291{ "Owner:","Besitzer:" },
292{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, 292{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" },
293{ "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, 293{ "Pick a date to display","Wähle einen Tag zum anzeigen aus" },
294{ "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, 294{ "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."},
295{ "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, 295{ "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." },
296{ "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, 296{ "Please specify a valid start date.","Bitte gültiges Startdatum angeben." },
297{ "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, 297{ "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." },
298{ "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, 298{ "Please specify a valid start time.","Bitte gültige Startzeit angeben."},
299{ "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, 299{ "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." },
300{ "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, 300{ "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" },
301{ "&Previous Day","Vorheriger Tag" }, 301{ "&Previous Day","Vorheriger Tag" },
302{ "Previous month","Vorheriger Monat" }, 302{ "Previous month","Vorheriger Monat" },
303{ "Previous Month","Vorheriger Monat" }, 303{ "Previous Month","Vorheriger Monat" },
304{ "&Previous Week","Vorherige Woche" }, 304{ "&Previous Week","Vorherige Woche" },
305{ "Previous year","Vorheriges Jahr" }, 305{ "Previous year","Vorheriges Jahr" },
306{ "Previous Year","Vorheriges Jahr" }, 306{ "Previous Year","Vorheriges Jahr" },
307{ "Printing","Drucken" }, 307{ "Printing","Drucken" },
308{ "Priority:","Priorität:" }, 308{ "Priority:","Priorität:" },
309{ "Private","Privat" }, 309{ "Private","Privat" },
310{ "Proceed","Weiter" }, 310{ "Proceed","Weiter" },
311{ "Public","Öffentlich" }, 311{ "Public","Öffentlich" },
312{ "Purge","Entferne" }, 312{ "Purge","Entferne" },
313{ "Purge Completed","Entferne erledigte ToDos" }, 313{ "Purge Completed","Entferne erledigte ToDos" },
314{ "Purge To-Dos","Todos bereinigen" }, 314{ "Purge To-Dos","Todos bereinigen" },
315{ "read-only","schreibgeschützt" }, 315{ "read-only","schreibgeschützt" },
316{ "Recur every","Wiederh. alle" }, 316{ "Recur every","Wiederh. alle" },
317{ "Recur in the month of","Wiederh. im Monat" }, 317{ "Recur in the month of","Wiederh. im Monat" },
318{ "Recur on the","Wiederh. am" }, 318{ "Recur on the","Wiederh. am" },
319{ "Recur on this day","Wiederh. am diesen Tag" }, 319{ "Recur on this day","Wiederh. am diesen Tag" },
320{ "Recurrence Range...","Wiederholungs Zeitraum..." }, 320{ "Recurrence Range...","Wiederholungs Zeitraum..." },
321{ "Recurrence Range","Wiederholungs Zeitraum" }, 321{ "Recurrence Range","Wiederholungs Zeitraum" },
322{ "Recurrence Rule","Wiederholungs Regel" }, 322{ "Recurrence Rule","Wiederholungs Regel" },
323{ "Recurrence","Wiederholung" }, 323{ "Recurrence","Wiederholung" },
324{ "Recurs","Wiederholung" }, 324{ "Recurs","Wiederholung" },
325{"&Reject","Abweisen"}, 325{"&Reject","Abweisen"},
326{ "Reminder:","Alarm:" }, 326{ "Reminder:","Alarm:" },
327{ "Rem.:","Alarm:" }, 327{ "Rem.:","Alarm:" },
328{ "Rem.","Alarm:" }, 328{ "Rem.","Alarm:" },
329{ "Remote file:","Remote Datei:"}, 329{ "Remote file:","Remote Datei:"},
330{ "Remote IP:","Remote (ferne) IP:" }, 330{ "Remote IP:","Remote (ferne) IP:" },
331{ "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, 331{ "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " },
332{ "Remote user:","Remote Benutzer"}, 332{ "Remote user:","Remote Benutzer"},
333{ "&Remove","Entfe&rnen" }, 333{ "&Remove","Entfe&rnen" },
334{ "Remove","Entfernen" }, 334{ "Remove","Entfernen" },
335{ "Request response","Bemerkung anfordern" }, 335{ "Request response","Bemerkung anfordern" },
336{ "Role:","Rolle:" }, 336{ "Role:","Rolle:" },
337{ "Role","Rolle" }, 337{ "Role","Rolle" },
338{ "Sat","Sa" }, 338{ "Sat","Sa" },
339{ "Saturday","Samstag" }, 339{ "Saturday","Samstag" },
340{ "Search for:","Suche nach:" }, 340{ "Search for:","Suche nach:" },
341{ "Search In","Suche in" }, 341{ "Search In","Suche in" },
342{ "Search...","Suche..." }, 342{ "Search...","Suche..." },
343{ "Search","Suche" }, 343{ "Search","Suche" },
344{ "Select Addresses","Wähle Adressen" }, 344{ "Select Addresses","Wähle Adressen" },
345{ "Select all","Selektiere Alle" }, 345{ "Select all","Selektiere Alle" },
346{ "Select a month","Wähle Monat" }, 346{ "Select a month","Wähle Monat" },
347{ "Select a week","Wähle Woche" }, 347{ "Select a week","Wähle Woche" },
348{ "Select a year","Wähle Jahr" }, 348{ "Select a year","Wähle Jahr" },
349{ "Send directly","Sende direkt" }, 349{ "Send directly","Sende direkt" },
350{ "&Send Messages","&Sende Nachrichten", }, 350{ "&Send Messages","&Sende Nachrichten", },
351{ "Sep","Sep" }, 351{ "Sep","Sep" },
352{ "September","September" }, 352{ "September","September" },
353{ "Shopping","Einkaufen" }, 353{ "Shopping","Einkaufen" },
354{ "Use short date in (WN/E) view","Kurzdatum in (WN/Termin) Ansicht" }, 354{ "Use short date in (WN/E) view","Kurzdatum in (WN/Termin) Ansicht" },
355{ "Show Dates","Zeige Daten" }, 355{ "Show Dates","Zeige Daten" },
356{ "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, 356{ "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." },
357{ "Show Event...","Zeige Termin..." }, 357{ "Show Event...","Zeige Termin..." },
358{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, 358{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." },
359{ "Show Marcus Bains line","Zeige Marcus Bains Linie" }, 359{ "Show Marcus Bains line","Zeige Marcus Bains Linie" },
360{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, 360{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." },
361{ "Show time as:","Zeige Zeit als" }, 361{ "Show time as:","Zeige Zeit als" },
362{ "Show Todo...","Zeige To-Do" }, 362{ "Show Todo...","Zeige To-Do" },
363{ "Show topmost todo prios in What's N.:","Anz. höchster Prios in What's N.:"}, 363{ "Show topmost todo prios in What's N.:","Anz. höchster Prios in What's N.:"},
364{ "Show topmost todo prios in What's Next:","Anz. höchster Prios in What's Next:"}, 364{ "Show topmost todo prios in What's Next:","Anz. höchster Prios in What's Next:"},
365{ "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, 365{ "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" },
366{ "&Show","Zeige" }, 366{ "&Show","Zeige" },
367{ "Show...","Zeige..." }, 367{ "Show...","Zeige..." },
368{ "Show","Zeige" }, 368{ "Show","Zeige" },
369{ "Small","Klein" }, 369{ "Small","Klein" },
370{ "Sorry","Entschuldigung" }, 370{ "Sorry","Entschuldigung" },
371{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, 371{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"},
372{ "Start:","Start:" }, 372{ "Start:","Start:" },
373{ "Start Date","Start Datum" }, 373{ "Start Date","Start Datum" },
374{ "Start date: %1","Start Datum: %1" }, 374{ "Start date: %1","Start Datum: %1" },
375{ "Start Time","Start Zeit" }, 375{ "Start Time","Start Zeit" },
376{ "Status:","Status:" }, 376{ "Status:","Status:" },
377{ "Status","Status:" }, 377{ "Status","Status:" },
378{ "Summaries","Titel" }, 378{ "Summaries","Titel" },
379{ "Summary:","Titel:" }, 379{ "Summary:","Titel:" },
380{ "Summary","Titel" }, 380{ "Summary","Titel" },
381{ "Sunday","Sonntag" }, 381{ "Sunday","Sonntag" },
382{ "Sun","So" }, 382{ "Sun","So" },
383{ "Sync preferences:","Sync Einstellungen" }, 383{ "Sync preferences:","Sync Einstellungen" },
384{ "Sync Prefs","Sync Einstellungen" }, 384{ "Sync Prefs","Sync Einstellungen" },
385{ "Syncronize","Daten abgleich" }, 385{ "Syncronize","Daten abgleich" },
386{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, 386{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
387{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, 387{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
388{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, 388{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" },
389{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, 389{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" },
390{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, 390{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" },
391{ "Template...","Vorlage..." }, 391{ "Template...","Vorlage..." },
392{ "This day","Dieser Tag" }, 392{ "This day","Dieser Tag" },
393{ "This is an experimental feature. ","Dieses Feature ist experimentel" }, 393{ "This is an experimental feature. ","Dieses Feature ist experimentel" },
394{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, 394{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." },
395{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, 395{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." },
396{ "Thu","Do" }, 396{ "Thu","Do" },
397{ "Thursday","Donnerstag" }, 397{ "Thursday","Donnerstag" },
398{ "Time associated","Mit Zeit" }, 398{ "Time associated","Mit Zeit" },
399{ "Time bar:","Uhrzeit Zeile:" }, 399{ "Time bar:","Uhrzeit Zeile:" },
400{ "Time && Date","Zeit und Datum" }, 400{ "Time && Date","Zeit und Datum" },
401{ "Time Format","Zeit Format" }, 401{ "Time Format","Zeit Format" },
402{ "Time Format(nr):","Zeit Format(Neustart!)" }, 402{ "Time Format(nr):","Zeit Format(Neustart!)" },
403{ "Date Labels:","Datumsleiste:" }, 403{ "Date Labels:","Datumsleiste:" },
404{ "Time: ","Zeit: " }, 404{ "Time: ","Zeit: " },
405{ "Timezone:","Zeitzone:" }, 405{ "Timezone:","Zeitzone:" },
406{ "To: ","Bis: " }, 406{ "To: ","Bis: " },
407{ "To:","Bis:" }, 407{ "To:","Bis:" },
408{ "Today: ","Heute: " }, 408{ "Today: ","Heute: " },
409{ "Todo due today color:","Heute fällige To-Do's" }, 409{ "Todo due today color:","Heute fällige To-Do's" },
410{ "To-do items:","To-Do items:" }, 410{ "To-do items:","To-Do items:" },
411{ "Todo overdue color:","Überfällige To-Do's" }, 411{ "Todo overdue color:","Überfällige To-Do's" },
412{ "Todo","Todo" }, 412{ "Todo","Todo" },
413{ "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, 413{ "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" },
414{ "ToDoView:","Todo Ansicht:" }, 414{ "ToDoView:","Todo Ansicht:" },
415{ "Toggle Alarm","Wechsle Alarm" }, 415{ "Toggle Alarm","Wechsle Alarm" },
416{ "Toggle Allday","Umschalten Ganztag" }, 416{ "Toggle Allday","Umschalten Ganztag" },
417{ "Tomorrow: ","Morgen: " }, 417{ "Tomorrow: ","Morgen: " },
418{ "Tue","Di" }, 418{ "Tue","Di" },
419{ "Tuesday","Dienstag" }, 419{ "Tuesday","Dienstag" },
420{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, 420{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" },
421{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, 421{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." },
422{ "Unknown","Unbekannt" }, 422{ "Unknown","Unbekannt" },
423{ "Up","Hinauf" }, 423{ "Up","Hinauf" },
424{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, 424{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" },
425{ "User defined","Benutzerdefiniert" }, 425{ "User defined","Benutzerdefiniert" },
426{ "User long date:","Format langes Datum:" }, 426{ "User long date:","Format langes Datum:" },
427{ "User short date:","Forma kurzes Datum:" }, 427{ "User short date:","Forma kurzes Datum:" },
428{ "View","Ansicht" }, 428{ "View","Ansicht" },
429{ "View Fonts","Schriftarten Ansichten" }, 429{ "View Fonts","Schriftarten Ansichten" },
430{ "Views","Ansichten" }, 430{ "Views","Ansichten" },
431{ "Wed","Mi" }, 431{ "Wed","Mi" },
432{ "Wednesday","Mittwoch" }, 432{ "Wednesday","Mittwoch" },
433{ "Week %1","Woche %1" }, 433{ "Week %1","Woche %1" },
434{ "Weekly","Wöchentlich" }, 434{ "Weekly","Wöchentlich" },
435{ "Week starts on Sunday","Woche beginnt Sonntags" }, 435{ "Week starts on Sunday","Woche beginnt Sonntags" },
436{ "What's Next View:","What's Next Anz." }, 436{ "What's Next View:","What's Next Anz." },
437{ "What's next ?","Was kommt als nächstes?(What's Next)" }, 437{ "What's next ?","Was kommt als nächstes?(What's Next)" },
438{ "Working Hours","Tägliche Arbeitszeit" }, 438{ "Working Hours","Tägliche Arbeitszeit" },
439{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, 439{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" },
440{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, 440{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" },
441{ "Write back synced file","Syncronisierte Datei zurückschreiben" }, 441{ "Write back synced file","Syncronisierte Datei zurückschreiben" },
442{ "Yearly","Jährlich" }, 442{ "Yearly","Jährlich" },
443{ "year(s)","Jahr(e)" }, 443{ "year(s)","Jahr(e)" },
444{ "Yes","Ja" }, 444{ "Yes","Ja" },
445{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, 445{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" },
446{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, 446{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." },
447{ "week(s) on:","Woche(n) am: " }, 447{ "week(s) on:","Woche(n) am: " },
448{ "Full menu bar(nr)","Volle Menuleiste(bn)" }, 448{ "Full menu bar(nr)","Volle Menuleiste(bn)" },
449{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 449{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
450{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 450{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
451{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 451{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
452{ "Daylight start:","Sommerzeit Beginn:" }, 452{ "Daylight start:","Sommerzeit Beginn:" },
453{ "Daylight end:","Sommerzeit Ende:" }, 453{ "Daylight end:","Sommerzeit Ende:" },
454{ "Time Zone","Zeitzone" }, 454{ "Time Zone","Zeitzone" },
455{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, 455{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" },
456{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, 456{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" },
457{ "minutely","minütlich" }, 457{ "minutely","minütlich" },
458{ "hourly","stündlich" }, 458{ "hourly","stündlich" },
459{ "daily","täglich" }, 459{ "daily","täglich" },
460{ "weekly","wöchentlich" }, 460{ "weekly","wöchentlich" },
461{ "monthly","monatlich" }, 461{ "monthly","monatlich" },
462{ "day-monthly","tag-monatlich" }, 462{ "day-monthly","tag-monatlich" },
463{ "month-yearly","monat-jährlich" }, 463{ "month-yearly","monat-jährlich" },
464{ "day-yearly","tag-jährlich" }, 464{ "day-yearly","tag-jährlich" },
465{ "position-yearly","pos-jährlich" }, 465{ "position-yearly","pos-jährlich" },
466{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, 466{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" },
467{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, 467{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" },
468{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, 468{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" },
469{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, 469{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" },
470{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, 470{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" },
471{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, 471{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." },
472{ "Event list view uses full window","Listenansicht nutzt Vollbild" }, 472{ "Event list view uses full window","Listenansicht nutzt Vollbild" },
473{ "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, 473{ "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" },
474{ "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, 474{ "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" },
475{ "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, 475{ "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" },
476{ "ViewChange","Ansichtswechsel" }, 476{ "ViewChange","Ansichtswechsel" },
477{ "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, 477{ "Default alarm *.wav file:","Standard Alarm *.wav Datei:" },
478{ "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, 478{ "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" },
479{ "File","Datei" }, 479{ "File","Datei" },
480{ "Clone...","Dupliziere.." }, 480{ "Clone...","Dupliziere.." },
481{ "Move...","Bewege..." }, 481{ "Move...","Bewege..." },
482{ "Beam...","Sende via IR..." }, 482{ "Beam...","Sende via IR..." },
483{ "&Clone...","Dupliziere.." }, 483{ "&Clone...","Dupliziere.." },
484{ "&Move...","Bewege..." }, 484{ "&Move...","Bewege..." },
485{ "&Beam...","Sende via IR..." }, 485{ "&Beam...","Sende via IR..." },
486{ "Show Completed","Zeige erledigte Todos" }, 486{ "Show Completed","Zeige erledigte Todos" },
487{ "Show Quick Todo","Zeige Quick Todo" }, 487{ "Show Quick Todo","Zeige Quick Todo" },
488{ "Unparent Todo","Un-sub Todo" }, 488{ "Unparent Todo","Un-sub Todo" },
489{ "Save selected to file...","Speichere Selektierte..." }, 489{ "Save selected to file...","Speichere Selektierte..." },
490{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, 490{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." },
491{ "Set Categ. for selected...","Setze Kateg. für Selekt." }, 491{ "Set Categ. for selected...","Setze Kateg. für Selekt." },
492{ "Beam selected via IR","Sende Selekt. via IR..." }, 492{ "Beam selected via IR","Sende Selekt. via IR..." },
493{ "Search","Suchen" }, 493{ "Search","Suchen" },
494{ "Date Picker","Datum auswählen" }, 494{ "Date Picker","Datum auswählen" },
495{ "Day View","Tagesansicht" }, 495{ "Day View","Tagesansicht" },
496{ "Work Week","Arbeitswoche" }, 496{ "Work Week","Arbeitswoche" },
497{ "Week","Wochenansicht" }, 497{ "Week","Wochenansicht" },
498{ "Month","Monatsansicht" }, 498{ "Month","Monatsansicht" },
499{ "Todo View","Todo Liste" }, 499{ "Todo View","Todo Liste" },
500{ "Journal","Journal Ansicht" }, 500{ "Journal","Journal Ansicht" },
501{ "Next days","Nächste Tage" }, 501{ "Next days","Nächste Tage" },
502{ "Print agenda selection...","Drucke Agendaselektion..." }, 502{ "Print agenda selection...","Drucke Agendaselektion..." },
503{ "Toggle DateNavigator","Navigator umschalten" }, 503{ "Toggle DateNavigator","Navigator umschalten" },
504{ "Toggle FilterView","Filteransicht umschalten" }, 504{ "Toggle FilterView","Filteransicht umschalten" },
505{ "Prev. month","Vorheriger Monat" }, 505{ "Prev. month","Vorheriger Monat" },
506{ "Go backward","Gehe zurück" }, 506{ "Go backward","Gehe zurück" },
507{ "Go forward","Gehe weiter" }, 507{ "Go forward","Gehe weiter" },
508{ "Synchronize","Synchronisieren" }, 508{ "Synchronize","Synchronisieren" },
509{ "AgendaSize","Agendagröße" }, 509{ "AgendaSize","Agendagröße" },
510{ "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, 510{ "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" },
511{ "Import last file","Importiere letzte Datei" }, 511{ "Import last file","Importiere letzte Datei" },
512{ "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, 512{ "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." },
513{ "Load Calendar Backup","Lade Kalender Backup" }, 513{ "Load Calendar Backup","Lade Kalender Backup" },
514{ "Save Calendar Backup","Speichere Kalender Backup" }, 514{ "Save Calendar Backup","Speichere Kalender Backup" },
515{ "Export VCalendar","Exportiere VCalendar" }, 515{ "Export VCalendar","Exportiere VCalendar" },
516{ "Manage new categories...","Verwalte neue Kategorien..." }, 516{ "Manage new categories...","Verwalte neue Kategorien..." },
517{ "Beam complete calendar...","Sende kompletten Kalender via IR" }, 517{ "Beam complete calendar...","Sende kompletten Kalender via IR" },
518{ "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, 518{ "Beam filtered calendar...","Sende gefilterten Kalender via IR" },
519{ "Remote via ssh","Über Netzwerk via ssh" }, 519{ "Remote via ssh","Über Netzwerk via ssh" },
520{ "With local file","Mit lokaler Datei" }, 520{ "With local file","Mit lokaler Datei" },
521{ "With last file","Mit letzter Datei" }, 521{ "With last file","Mit letzter Datei" },
522{ "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, 522{ "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" },
523{ "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, 523{ "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" },
524{ "Save filename","Speichern: Dateinamen wählen" }, 524{ "Save filename","Speichern: Dateinamen wählen" },
525{ "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, 525{ "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" },
526{ "KO/Pi: Warning!","KO/Pi: Warnung!" }, 526{ "KO/Pi: Warning!","KO/Pi: Warnung!" },
527{ "Overwrite!","Überschreibe!" }, 527{ "Overwrite!","Überschreibe!" },
528{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 528{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
529{ "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, 529{ "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" },
530{ "KO/Pi Confirmation","KO/Pi Bestätigung" }, 530{ "KO/Pi Confirmation","KO/Pi Bestätigung" },
531{ "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, 531{ "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" },
532{ "Deleting item %d ...","Lösche Eintrag %d ..." }, 532{ "Deleting item %d ...","Lösche Eintrag %d ..." },
533{ "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, 533{ "%d items remaining in list.","%d Einträge sind in der Liste verblieben." },
534{ "Size","Größe" }, 534{ "Size","Größe" },
535{ "Date","Datum" }, 535{ "Date","Datum" },
536{ "Mime Type","Datei Typ" }, 536{ "Mime Type","Datei Typ" },
537{ "All Files","Alle Dateien" }, 537{ "All Files","Alle Dateien" },
538{ "Files","Dateien" }, 538{ "Files","Dateien" },
539{ "Documents","DoKumente" }, 539{ "Documents","DoKumente" },
540{ "Select Categories","Selektiere Kategorien" }, 540{ "Select Categories","Selektiere Kategorien" },
541{ " &Deselect All "," Auswahl aufheben " }, 541{ " &Deselect All "," Auswahl aufheben " },
542{ "A&dd","Hinzu" }, 542{ "A&dd","Hinzu" },
543{ "&Modify","Ändern" }, 543{ "&Modify","Ändern" },
544{ "Edit Categories","Editiere Kategorien" }, 544{ "Edit Categories","Editiere Kategorien" },
545{ " &Edit Categories "," &Editiere Kategorien " }, 545{ " &Edit Categories "," &Editiere Kategorien " },
546{ "Beam Options","Beam Einstellungen" }, 546{ "Beam Options","Beam Einstellungen" },
547{ " With timezone "," Mit Zeitzone " }, 547{ " With timezone "," Mit Zeitzone " },
548{ " Local time ", " Lokale Zeit " }, 548{ " Local time ", " Lokale Zeit " },
549{ "Manage new Categories","Verwalte neue Kategorien" }, 549{ "Manage new Categories","Verwalte neue Kategorien" },
550{ "Add to category list","Füge zur Kategorieliste hinzu" }, 550{ "Add to category list","Füge zur Kategorieliste hinzu" },
551{ "Remove from Events/Todos","Entferne von Terminen/Todos" }, 551{ "Remove from Events/Todos","Entferne von Terminen/Todos" },
552{ "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, 552{ "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " },
553{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, 553{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" },
554{ "File format","Datei Format" }, 554{ "File format","Datei Format" },
555{ "Time format","Zeit Format" }, 555{ "Time format","Zeit Format" },
556{ "Delete all\ncompleted To-Dos?","Lösche alle\nerledigten To-Dos?" }, 556{ "Delete all\ncompleted To-Dos?","Lösche alle\nerledigten To-Dos?" },
557{ "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, 557{ "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." },
558{ "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, 558{ "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" },
559{ "h","Std" }, 559{ "h","Std" },
560{ "min","Min" }, 560{ "min","Min" },
561{ "hou","Std" }, 561{ "hou","Std" },
562{ "day","Tag" }, 562{ "day","Tag" },
563{ "French","Französich" }, 563{ "French","Französich" },
564{ "Time","Zeit" }, 564{ "Time","Zeit" },
565{ "Event Viewer","Termin Ansicht" }, 565{ "Event Viewer","Termin Ansicht" },
566{ "Cancel Sync","Sync Abbrechen" }, 566{ "Cancel Sync","Sync Abbrechen" },
567{ "Remote","Fern" }, 567{ "Remote","Fern" },
568{ "Local","Lokal" }, 568{ "Local","Lokal" },
569{ "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, 569{ "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" },
570{ "Local: ","Lokal: " }, 570{ "Local: ","Lokal: " },
571{ "Remote: ","Fern: " }, 571{ "Remote: ","Fern: " },
572{ "Last modified: ","Zuletzt geändert: " }, 572{ "Last modified: ","Zuletzt geändert: " },
573{ "Location: ","Ort: " }, 573{ "Location: ","Ort: " },
574{ "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, 574{ "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" },
575{ "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, 575{ "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" },
576{ "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, 576{ "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " },
577{ "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, 577{ "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" },
578{ "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, 578{ "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " },
579{ "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, 579{ "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" },
580{ "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, 580{ "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." },
581{ "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, 581{ "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" },
582{ "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, 582{ "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" },
583{ "( %1 min before )","( %1 min vorher )" }, 583{ "( %1 min before )","( %1 min vorher )" },
584{ "<b>Alarm on: ","<b>Alarm am: " }, 584{ "<b>Alarm on: ","<b>Alarm am: " },
585{ "<b>Details: </b>","<b>Details: </b>" }, 585{ "<b>Details: </b>","<b>Details: </b>" },
586{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, 586{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" },
587{ "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, 587{ "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" },
588{ "Organizer","Organisator" }, 588{ "Organizer","Organisator" },
589{ "Save","Speichern" }, 589{ "Save","Speichern" },
590{ "Exit (+save)","Beenden (+ speichern)" }, 590{ "Exit (+save)","Beenden (+ speichern)" },
591{ "Home","Zuhause" }, 591{ "Home","Zuhause" },
592{ "Office","Büro" }, 592{ "Office","Büro" },
593{ "Libary","Bücherei" }, 593{ "Libary","Bücherei" },
594{ "Doctor","Arzt" }, 594{ "Doctor","Arzt" },
595{ "Beach","Strand" }, 595{ "Beach","Strand" },
596{ "Conference room","Konferenzraum" }, 596{ "Conference room","Konferenzraum" },
597{ "Drive Home","Heimfahrt" }, 597{ "Drive Home","Heimfahrt" },
598{ "Watch TV","Tv gucken" }, 598{ "Watch TV","Tv gucken" },
599{ "Phone call","Telefonanruf" }, 599{ "Phone call","Telefonanruf" },
600{ "Pay bill","Rechnung bezahlen" }, 600{ "Pay bill","Rechnung bezahlen" },
601{ "Read book","Buch lesen" }, 601{ "Read book","Buch lesen" },
602{ "Watering plants","Pflanzen giessen" }, 602{ "Watering plants","Pflanzen giessen" },
603{"Appointment","Verabredung" }, 603{"Appointment","Verabredung" },
604{"Birthday","Geburtstag" }, 604{"Birthday","Geburtstag" },
605{"Business","Geschäft" }, 605{"Business","Geschäft" },
606{"Business Travel","Geschäftsreise" }, 606{"Business Travel","Geschäftsreise" },
607{"Cinema","Kino" }, 607{"Cinema","Kino" },
608{"Customer","Kunde" }, 608{"Customer","Kunde" },
609{"Break","Pause" }, 609{"Break","Pause" },
610{"Breakfast","Frühstück" }, 610{"Breakfast","Frühstück" },
611{"Competition","Wettkampf" }, 611{"Competition","Wettkampf" },
612{"Dinner","Abendessen" }, 612{"Dinner","Abendessen" },
613{"Education","Erziehung" }, 613{"Education","Erziehung" },
614{"Family","Familie" }, 614{"Family","Familie" },
615{"Favorites","Favoriten" }, 615{"Favorites","Favoriten" },
616{"Festival","Festival" }, 616{"Festival","Festival" },
617{"Fishing","Angeln" }, 617{"Fishing","Angeln" },
618{"Flight","Flug" }, 618{"Flight","Flug" },
619{"Gifts","Geschenk" }, 619{"Gifts","Geschenk" },
620{"Holiday","Feiertag" }, 620{"Holiday","Feiertag" },
621{"Holiday Cards","Ansichtskarten" }, 621{"Holiday Cards","Ansichtskarten" },
622{"Hot Contacts","Heisse Kontakte" }, 622{"Hot Contacts","Heisse Kontakte" },
623{"Hiking","Wandern" }, 623{"Hiking","Wandern" },
624{"Hunting","Jagen" }, 624{"Hunting","Jagen" },
625{"Key Customer","Wichtiger Kunde" }, 625{"Key Customer","Wichtiger Kunde" },
626{"Kids","Kinder" }, 626{"Kids","Kinder" },
627{"Lunch","Mittagessen" }, 627{"Lunch","Mittagessen" },
628{"Meeting","Treffen" }, 628{"Meeting","Treffen" },
629{"Miscellaneous","Verschiedenes" }, 629{"Miscellaneous","Verschiedenes" },
630{"Partner","Partner" }, 630{"Partner","Partner" },
631{"Party","Partie" }, 631{"Party","Partie" },
632{"Personal","Privat" }, 632{"Personal","Privat" },
633{"Personal Travel","Privatreise"}, 633{"Personal Travel","Privatreise"},
634{"PHB","PHB" }, 634{"PHB","PHB" },
635{"Phone Calls","Telefonanruf" }, 635{"Phone Calls","Telefonanruf" },
636{"Projects","Projekt" }, 636{"Projects","Projekt" },
637{"Recurring","Wiederholend" }, 637{"Recurring","Wiederholend" },
638{"School","Schule" }, 638{"School","Schule" },
639{"Shopping","Einkaufen" }, 639{"Shopping","Einkaufen" },
640{"Speach","Rede" }, 640{"Speach","Rede" },
641{"Special Occasion","Spez.Gelegenheit" }, 641{"Special Occasion","Spez.Gelegenheit" },
642{"Sports","Sport" }, 642{"Sports","Sport" },
643{"Talk","Vortrag" }, 643{"Talk","Vortrag" },
644{"Travel","Reise" }, 644{"Travel","Reise" },
645{"TV","TV" }, 645{"TV","TV" },
646{"Germany","Deutschland" }, 646{"Germany","Deutschland" },
647{"Sweden","Schweden" }, 647{"Sweden","Schweden" },
648{"Forest","Wald" }, 648{"Forest","Wald" },
649{ "Desert","Wüste" }, 649{ "Desert","Wüste" },
650{ "Kitchen","Küche" }, 650{ "Kitchen","Küche" },
651{ "Lake","See" }, 651{ "Lake","See" },
652{"University","Universität"}, 652{"University","Universität"},
653{"Vacation","Urlaub" }, 653{"Vacation","Urlaub" },
654{"VIP","VIP" }, 654{"VIP","VIP" },
655{ "Import Sharp Calendar","Importiere Sharp Kalender" }, 655{ "Import Sharp Calendar","Importiere Sharp Kalender" },
656{ "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, 656{ "This todo has been cancelled!","Dieses Todo wurde gecancelt!" },
657{ "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, 657{ "This event has been cancelled!","Dieser Termin wurde gecancelt!" },
658{ "Cancelled","Gecancelt" }, 658{ "Cancelled","Gecancelt" },
659{ "Multiple sync","Mehrfach Sync" }, 659{ "Multiple sync","Mehrfach Sync" },
660{ "Local file","Lokale Datei" }, 660{ "Local file","Lokale Datei" },
661{ "Last file","Letzte Datei" }, 661{ "Last file","Letzte Datei" },
662{ "Keys + Colors...","Tasten + Farben..." }, 662{ "Keys + Colors...","Tasten + Farben..." },
663{ "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, 663{ "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" },
664{ "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, 664{ "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" },
665{ "Choose...","Wähle..." }, 665{ "Choose...","Wähle..." },
666{ "Use colors for application:","Setze Farben für Programm:" }, 666{ "Use colors for application:","Setze Farben für Programm:" },
667{ "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, 667{ "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" },
668{ "Frames, labels, etc.:","Rahmen, Label, etc.:" }, 668{ "Frames, labels, etc.:","Rahmen, Label, etc.:" },
669{ "Show parent To-Do's in What's Next view","Zeige Ober-Todo in What's Next Anz." }, 669{ "Show parent To-Do's in What's Next view","Zeige Ober-Todo in What's Next Anz." },
670{ "Show location in What's Next view","Zeige Ort in What's Next Anz." }, 670{ "Show location in What's Next view","Zeige Ort in What's Next Anz." },
671{ "Show events that recur ","Zeige Termine, die sich wiederholen:" }, 671{ "Show events that recur ","Zeige Termine, die sich wiederholen:" },
672{ "Show in every cell ","Zeige in jeder Zelle " }, 672{ "Show in every cell ","Zeige in jeder Zelle " },
673{ "short month","kurzen Monat" }, 673{ "short month","kurzen Monat" },
674{ "icons","Icons" }, 674{ "icons","Icons" },
675{ "Show Sat/Sun together","Zeige Sam/Son zusammen" }, 675{ "Show Sat/Sun together","Zeige Sam/Son zusammen" },
676{ "Categorie colors are applied to text","Kategorie Farben färben Text" }, 676{ "Categorie colors are applied to text","Kategorie Farben färben Text" },
677{ "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, 677{ "Month view uses day colors","Monatsansicht zeigt Tagesfarben" },
678{ "Day color odd months","Tagesfarbe ungerade Monate" }, 678{ "Day color odd months","Tagesfarbe ungerade Monate" },
679{ "Day color even months","Tagesfarbe gerade Monate" }, 679{ "Day color even months","Tagesfarbe gerade Monate" },
680{ "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, 680{ "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" },
681{ "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, 681{ "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" },
682{ "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, 682{ "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" },
683{ "Colors are applied to text","Farben werden auf Text angewendet" }, 683{ "Colors are applied to text","Farben werden auf Text angewendet" },
684{ "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, 684{ "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" },
685{ "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, 685{ "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" },
686{ "Play beeps count:","Anzahl der Alarmpiepse: " }, 686{ "Play beeps count:","Anzahl der Alarmpiepse: " },
687{ "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, 687{ "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " },
688{ "Default suspend time in min:","Standard Supendierungs Zeit: " }, 688{ "Default suspend time in min:","Standard Supendierungs Zeit: " },
689{ "Auto suspend count:","Anzahl der auto Suspendierungen" }, 689{ "Auto suspend count:","Anzahl der auto Suspendierungen" },
690{ "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, 690{ "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" },
691{ "New profile","Neues Profil" }, 691{ "New profile","Neues Profil" },
692{ "Clone profile","Klone Profil" }, 692{ "Clone profile","Klone Profil" },
693{ "Delete profile","Lösche Profil" }, 693{ "Delete profile","Lösche Profil" },
694{ "Profile:","Profil:" }, 694{ "Profile:","Profil:" },
695{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, 695{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" },
696{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 696{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
697{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 697{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
698{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 698{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
699{ "Write back file","Schreibe Datei zurück" }, 699{ "Write back file","Schreibe Datei zurück" },
700{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 700{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
701{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 701{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
702{ "Local device name:","Name dieses Gerätes:" }, 702{ "Local device name:","Name dieses Gerätes:" },
703{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 703{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
704{ "Sync preferences","Synchronisations Einstellungen" }, 704{ "Sync preferences","Synchronisations Einstellungen" },
705{ "Profile kind","Profil Art" }, 705{ "Profile kind","Profil Art" },
706{ "Local file","Lokale Datei" }, 706{ "Local file","Lokale Datei" },
707{ "Local file:","Lokale Datei:" }, 707{ "Local file:","Lokale Datei:" },
708{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 708{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
709{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 709{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
710{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 710{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
711{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, 711{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"},
712{ "Device","Gerät:" }, 712{ "Device","Gerät:" },
713{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, 713{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" },
714{ "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","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, 714{ "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","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" },
715{ "Synchronization successful","Synchronisation erfolgreich" }, 715{ "Synchronization successful","Synchronisation erfolgreich" },
716{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, 716{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." },
717{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, 717{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" },
718{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, 718{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" },
719{ "Enter password","Passwort eingeben" }, 719{ "Enter password","Passwort eingeben" },
720{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, 720{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" },
721{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, 721{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." },
722{ "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, 722{ "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" },
723{ "Writing back file result: ","Resultat des Dateizurückschreibens: " }, 723{ "Writing back file result: ","Resultat des Dateizurückschreibens: " },
724{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, 724{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" },
725{ "Edit Calendar Filters","Editiere Kalendar Filter" }, 725{ "Edit Calendar Filters","Editiere Kalendar Filter" },
726{ "Enter filter name:","Neuer Filter Name:" }, 726{ "Enter filter name:","Neuer Filter Name:" },
727{ "Add Filter","Filter hinzufügen" }, 727{ "Add Filter","Filter hinzufügen" },
728{ "Question","Frage" }, 728{ "Question","Frage" },
729{ "Filter position: ","Filter Position: " }, 729{ "Filter position: ","Filter Position: " },
730{ "Month View","Monatsansicht" }, 730{ "Month View","Monatsansicht" },
731{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, 731{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" },
732{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 732{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
733{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 733{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
734{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, 734{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" },
735{ "Access: ","Zugriff: " }, 735{ "Access: ","Zugriff: " },
736{ "Needs Action","Aktion notwendig" }, 736{ "Needs Action","Aktion notwendig" },
737{ "Accepted","Akzeptiert" }, 737{ "Accepted","Akzeptiert" },
738{ "Declined","Abgelehnt" }, 738{ "Declined","Abgelehnt" },
739{ "Tentative","Vorläufig" }, 739{ "Tentative","Vorläufig" },
740{ "Delegated","Beauftragt" }, 740{ "Delegated","Beauftragt" },
741{ "Completed","Vollständig" }, 741{ "Completed","Vollständig" },
742{ "In Process","In Bearbeitung" }, 742{ "In Process","In Bearbeitung" },
743{ "Participant","Teilnehmer" }, 743{ "Participant","Teilnehmer" },
744{ "Optional Participant","Möglicher Teilnehmer" }, 744{ "Optional Participant","Möglicher Teilnehmer" },
745{ "Observer","Beobachter" }, 745{ "Observer","Beobachter" },
746{ "Chair","Vorsitzender" }, 746{ "Chair","Vorsitzender" },
747{ "Not supported \non desktop!\n","" }, 747{ "Not supported \non desktop!\n","" },
748{ "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die verticale Auswahl zum Drucken zu bestimmen,\nbitte einen verticalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen. " }, 748{ "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die verticale Auswahl zum Drucken zu bestimmen,\nbitte einen verticalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen. " },
749{ "Date range: ","Datums Zeitspanne: " }, 749{ "Date range: ","Datums Zeitspanne: " },
750{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, 750{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " },
751{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, 751{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." },
752{ "Add / remove events","Add./entferne Termine" }, 752{ "Add / remove events","Add./entferne Termine" },
753{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, 753{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." },
754{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, 754{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." },
755{ "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, 755{ "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" },
756{ "Overwrite","Überschreiben" }, 756{ "Overwrite","Überschreiben" },
757{ "Sync+save","Syncen+speichern" }, 757{ "Sync+save","Syncen+speichern" },
758{ "Default","Standard" }, 758{ "Default","Standard" },
759{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, 759{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " },
760{ " %d items?"," %d Einträge?" }, 760{ " %d items?"," %d Einträge?" },
761{ "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, 761{ "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" },
762{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, 762{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" },
763{ "Current","Aktuelle" }, 763{ "Current","Aktuelle" },
764{ "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, 764{ "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" },
765{ "All","Alle" }, 765{ "All","Alle" },
766{ "Data Loss Warning","Datenverlust Warnung" }, 766{ "Data Loss Warning","Datenverlust Warnung" },
767{ "Proceed","Weitermachen" }, 767{ "Proceed","Weitermachen" },
768{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, 768{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" },
769{ "Filter disabled ","Filter abgeschaltet" }, 769{ "Filter disabled ","Filter abgeschaltet" },
770{ "Filter selected: ","Gewählter Filter: " }, 770{ "Filter selected: ","Gewählter Filter: " },
771{ "Toggle Cancel","Gecancelt ändern" }, 771{ "Toggle Cancel","Gecancelt ändern" },
772{ "&Toggle Cancel","Gecancel&t ändern" }, 772{ "&Toggle Cancel","Gecancel&t ändern" },
773{ "Configure Toolbar","Konfiguriere Toolbar" }, 773{ "Configure Toolbar","Konfiguriere Toolbar" },
774{ "Stretched TB","Gedehnte TB" }, 774{ "Stretched TB","Gedehnte TB" },
775{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, 775{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" },
776{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, 776{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" },
777{ "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, 777{ "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" },
778{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, 778{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" },
779{ "Imported file successfully","Datei erfolgreich importiert" }, 779{ "Imported file successfully","Datei erfolgreich importiert" },
780{ "Error importing file","Fehler beim Importieren der Datei" }, 780{ "Error importing file","Fehler beim Importieren der Datei" },
781{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, 781{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" },
782{ "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, 782{ "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" },
783{ "Overwrite!","Überschreiben!" }, 783{ "Overwrite!","Überschreiben!" },
784{ "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, 784{ "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" },
785{ "Load backup filename","Lade Backup Dateiname" }, 785{ "Load backup filename","Lade Backup Dateiname" },
786{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, 786{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" },
787{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, 787{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" },
788{ "Save backup filename","Speichere Backup Dateiname" }, 788{ "Save backup filename","Speichere Backup Dateiname" },
789{ "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, 789{ "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" },
790{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 790{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
791{ "Details of attendee","Teilnehmerdetails" }, 791{ "Details of attendee","Teilnehmerdetails" },
792{ "Work phone:\n","Telefon Arbeit:\n" }, 792{ "Work phone:\n","Telefon Arbeit:\n" },
793{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, 793{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" },
794{ "Home phone:\n","Telefon privat:\n" }, 794{ "Home phone:\n","Telefon privat:\n" },
795{ "Mobile home phone:\n","Mobiltelefon privat:\n" }, 795{ "Mobile home phone:\n","Mobiltelefon privat:\n" },
796{ "Email:\n","Email:\n" }, 796{ "Email:\n","Email:\n" },
797{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, 797{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" },
798{ "Audio Al.: ","Audio Al.: " }, 798{ "Audio Al.: ","Audio Al.: " },
799{ "Proc.Al.: ","Proz.Al.: " }, 799{ "Proc.Al.: ","Proz.Al.: " },
800{ "No sound set","Kein Sound definiert" }, 800{ "No sound set","Kein Sound definiert" },
801{ "*.wav|Wav Files","*.wav|Wav Dateien" }, 801{ "*.wav|Wav Files","*.wav|Wav Dateien" },
802{ "No program set","Kein Programm definiert" }, 802{ "No program set","Kein Programm definiert" },
803{ "Running '%1'","Ausführen '%1'" }, 803{ "Running '%1'","Ausführen '%1'" },
804{ "Playing '%1'","Abspielen '%1'" }, 804{ "Playing '%1'","Abspielen '%1'" },
805{ "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" }, 805{ "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" },
806{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, 806{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" },
807{ "Load!","Laden!" }, 807{ "Load!","Laden!" },
808{ "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, 808{ "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" },
809{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, 809{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" },
810{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, 810{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" },
811{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, 811{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" },
812{ "Features + hints...","Eigenschaften + Tipps..." }, 812{ "Features + hints...","Eigenschaften + Tipps..." },
813{ "User translation...","Benutzer Übersetzung..." }, 813{ "User translation...","Benutzer Übersetzung..." },
814{ "Sync HowTo...","Synchronisation HowTo..." }, 814{ "Sync HowTo...","Synchronisation HowTo..." },
815{ "Print calendar...","Drucke Kalender..." }, 815{ "Print calendar...","Drucke Kalender..." },
816{ "Anniversary","Jahrestag" }, 816{ "Anniversary","Jahrestag" },
817{ "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, 817{ "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" },
818{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, 818{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" },
819{ "Next recurrence is on: ","Nächste Wiederholung ist am:" }, 819{ "Next recurrence is on: ","Nächste Wiederholung ist am:" },
820{ "<b>Alarm on: </b>","<b>Alarm am: </b>" }, 820{ "<b>Alarm on: </b>","<b>Alarm am: </b>" },
821{ "<b>Access: </b>","<b>Zugriff: </b>" }, 821{ "<b>Access: </b>","<b>Zugriff: </b>" },
822{ "(%1 min before)","(%1 min vorher)" }, 822{ "(%1 min before)","(%1 min vorher)" },
823{ "<b>Categories: </b>","<b>Kategorien: </b>" }, 823{ "<b>Categories: </b>","<b>Kategorien: </b>" },
824{ "Save Journal/Description...","Speichere Journal/Details..." }, 824{ "Save Journal/Description...","Speichere Journal/Details..." },
825{ "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, 825{ "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." },
826{ "Continue","Weitermachen" }, 826{ "Continue","Weitermachen" },
827{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, 827{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" },
828{ "Attendee:","Teilnehmer:" }, 828{ "Attendee:","Teilnehmer:" },
829{ "Click OK to search ->","Klicke zum Suchen auf OK ->" }, 829{ "Click OK to search ->","Klicke zum Suchen auf OK ->" },
830{ "On day ","Am Tag " }, 830{ "On day ","Am Tag " },
831{ "%1 of ","%1 des Monats" }, 831{ "%1 of ","%1 des Monats" },
832{ "%1 of the year","%1 des Jahres" }, 832{ "%1 of the year","%1 des Jahres" },
833{ "Anonymous","Anonymo" }, 833{ "Anonymous","Anonymo" },
834{ "nobody@nowhere","niemand@nirgendwo" }, 834{ "nobody@nowhere","niemand@nirgendwo" },
835{ "calendar.html","calendar.html" }, 835{ "calendar.html","calendar.html" },
836{ " Local Time"," Locale Zeit" }, 836{ " Local Time"," Locale Zeit" },
837{ "Unknown Name","Unbekannter Name" }, 837{ "Unknown Name","Unbekannter Name" },
838{ "unknown@nowhere","unbekannt@nirgendwo" }, 838{ "unknown@nowhere","unbekannt@nirgendwo" },
839{ "Beam via IR!","Beam via IR!" }, 839{ "Beam via IR!","Beam via IR!" },
840{ "Next Month","Nächster Monat" }, 840{ "Next Month","Nächster Monat" },
841{ "Prio","Prio" }, 841{ "Prio","Prio" },
842{ "Reparent Todo","Mache Sub-Todo" }, 842{ "Reparent Todo","Mache Sub-Todo" },
843{ "tomorrow","morgen" }, 843{ "tomorrow","morgen" },
844{ "today","heute" }, 844{ "today","heute" },
845{ "yesterday","gestern" }, 845{ "yesterday","gestern" },
846{ "Ok","Ok" }, 846{ "Ok","Ok" },
847{ "Ok+Agenda","Ok+Agenda" }, 847{ "Ok+Agenda","Ok+Agenda" },
848{ "Email","Email" }, 848{ "Email","Email" },
849{ "RSVP","RSVP" }, 849{ "RSVP","RSVP" },
850{ "Email:","Email:" }, 850{ "Email:","Email:" },
851{ "Appointment Time ","Termin Zeit " }, 851{ "Appointment Time ","Termin Zeit " },
852{ "2","2" }, 852{ "2","2" },
853{ "3","3" }, 853{ "3","3" },
854{ "4","4" }, 854{ "4","4" },
855{ " 0 %"," 0 %" }, 855{ " 0 %"," 0 %" },
856{ " 20 %"," 20 %" }, 856{ " 20 %"," 20 %" },
857{ " 40 %"," 40 %" }, 857{ " 40 %"," 40 %" },
858{ " 60 %"," 60 %" }, 858{ " 60 %"," 60 %" },
859{ " 80 %"," 80 %" }, 859{ " 80 %"," 80 %" },
860{ "100 %","100 %" }, 860{ "100 %","100 %" },
861{ "Filter","Filter" }, 861{ "Filter","Filter" },
862{ "Configure","Konfiguriere" }, 862{ "Configure","Konfiguriere" },
863{ "What's Next","What's Next" }, 863{ "What's Next","What's Next" },
864{ "Complete calendar...","Kompletten Kalender..." }, 864{ "Complete calendar...","Kompletten Kalender..." },
865{ "Filtered calendar...","Gefilterten Kalender..." }, 865{ "Filtered calendar...","Gefilterten Kalender..." },
866{ "Export to phone","Exportiere zum Handy" }, 866{ "Export to phone","Exportiere zum Handy" },
867{ "Beam receive enabled","Beam Empfang an" }, 867{ "Beam receive enabled","Beam Empfang an" },
868{ "What's new?","Was ist neu?" }, 868{ "What's new?","Was ist neu?" },
869{ "FAQ...","FAQ..." }, 869{ "FAQ...","FAQ..." },
870{ "Licence...","Licence..." }, 870{ "Licence...","Licence..." },
871{ "What's This?","What's This?" }, 871{ "What's This?","What's This?" },
872{ "&Edit...","&Editiere..." }, 872{ "&Edit...","&Editiere..." },
873{ "Oktober","Oktober" }, 873{ "Oktober","Oktober" },
874{ "Title","Titel" }, 874{ "Title","Titel" },
875{ "%1 %","%1 %" }, 875{ "%1 %","%1 %" },
876{ "Enable Pi-Sync","Schalte Pi-Sync an" }, 876{ "Enable Pi-Sync","Schalte Pi-Sync an" },
877{ "Import!","Importiere!" }, 877{ "Import!","Importiere!" },
878{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, 878{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" },
879{ "Export to phone options","Export ans Handy Optionen" }, 879{ "Export to phone options","Export ans Handy Optionen" },
880{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 880{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
881{ "I/O device: ","I/O device: " }, 881{ "I/O device: ","I/O device: " },
882{ "Connection: ","Connection: " }, 882{ "Connection: ","Connection: " },
883{ "Model(opt.): ","Model(opt.): " }, 883{ "Model(opt.): ","Model(opt.): " },
884{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, 884{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" },
885{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, 885{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " },
886{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" }, 886{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" },
887{ "Export to mobile phone!","Exportiere auf das Handy!" }, 887{ "Export to mobile phone!","Exportiere auf das Handy!" },
888{ "Export complete calendar","Exportiere kompletten Kalender" }, 888{ "Export complete calendar","Exportiere kompletten Kalender" },
889{ "Writing to phone...","Sende Daten ans Handy..." }, 889{ "Writing to phone...","Sende Daten ans Handy..." },
890{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 890{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
891{ "Retry","Nochmal versuchen" }, 891{ "Retry","Nochmal versuchen" },
892{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 892{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
893{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 893{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
894{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 894{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
895{ "Export filtered calendar","Exportiere gefilterten Kalender" }, 895{ "Export filtered calendar","Exportiere gefilterten Kalender" },
896{ "Preferences","Vorlieben" }, 896{ "Preferences","Vorlieben" },
897{ "Global","Global" }, 897{ "Global","Global" },
898{ "Phone","Phone" }, 898{ "Phone","Phone" },
899{ "SMS","SMS" }, 899{ "SMS","SMS" },
900{ "Fax","Fax" }, 900{ "Fax","Fax" },
901{ "Pager","Pager" }, 901{ "Pager","Pager" },
902{ "SIP","SIP" }, 902{ "SIP","SIP" },
903{ "Italian","Italienisch" }, 903{ "Italian","Italienisch" },
904{ "24:00","24:00" }, 904{ "24:00","24:00" },
905{ "12:00am","12:00am" }, 905{ "12:00am","12:00am" },
906{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 906{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
907{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 907{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
908{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 908{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
909{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 909{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
910{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 910{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
911{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 911{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
912{ "Used Mail Client","Benutzter Mail Client" }, 912{ "Used Mail Client","Benutzter Mail Client" },
913{ "Channel:","Channel:" }, 913{ "Channel:","Channel:" },
914{ "Message:","Message:" }, 914{ "Message:","Message:" },
915{ "Parameters:","Parameter:" }, 915{ "Parameters:","Parameter:" },
916{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 916{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
917{ "extra Message:","extra Message:" }, 917{ "extra Message:","extra Message:" },
918{ "extra Parameters:","extra Parameter:" }, 918{ "extra Parameters:","extra Parameter:" },
919{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 919{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
920{ "External Apps.","Externe Appl." }, 920{ "External Apps.","Externe Appl." },
921{ "24 hours","24 Std." }, 921{ "24 hours","24 Std." },
922{ "3 hours","3 Std." }, 922{ "3 hours","3 Std." },
923{ "1 hour","1 Std." }, 923{ "1 hour","1 Std." },
924{ "15 minutes","15 Min." }, 924{ "15 minutes","15 Min." },
925{ "5 minutes","5 Min." }, 925{ "5 minutes","5 Min." },
926{ "1 minute","1 Min." }, 926{ "1 minute","1 Min." },
927{ "23","23" }, 927{ "23","23" },
928{ "Mon 15","Mon 15" }, 928{ "Mon 15","Mon 15" },
929{ "Configure KO","Konfiguriere KO" }, 929{ "Configure KO","Konfiguriere KO" },
930{ "Event text","Termin Text" }, 930{ "Event text","Termin Text" },
931{ "ToDo","ToDo" }, 931{ "ToDo","ToDo" },
932{ "Today","Heute" }, 932{ "Today","Heute" },
933{ "What's Next View","What's Next Ansicht" }, 933{ "What's Next View","What's Next Ansicht" },
934{ "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" }, 934{ "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" },
935{ "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" }, 935{ "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" },
936{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, 936{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" },
937{ "Alarm","Alarm" }, 937{ "Alarm","Alarm" },
938{ "Used %1 Client","Benutzter %1 Client" }, 938{ "Used %1 Client","Benutzter %1 Client" },
939{ "No email client installed","Kein Email Klient installiert" }, 939{ "No email client installed","Kein Email Klient installiert" },
940{ "Userdefined email client","Benutzerdef. Email Klient" }, 940{ "Userdefined email client","Benutzerdef. Email Klient" },
941{ "OM/Pi email client","OM/Pi Email Klient" }, 941{ "OM/Pi email client","OM/Pi Email Klient" },
942{ "Include in multiple ","Beziehe in multiple " }, 942{ "Include in multiple ","Beziehe in multiple " },
943{ "calendar ","Kalender " }, 943{ "calendar ","Kalender " },
944{ "addressbook ","Adressbuch " }, 944{ "addressbook ","Adressbuch " },
945{ "pwmanager","PWmanager" }, 945{ "pwmanager","PWmanager" },
946{ " sync"," Sync ein" }, 946{ " sync"," Sync ein" },
947{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 947{ "Write back synced data","Schreibe gesyncte Daten zurück" },
948{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 948{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
949{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 949{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
950{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 950{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
951{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 951{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
952{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 952{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
953{ "Help...","Hilfe..." }, 953{ "Help...","Hilfe..." },
954{ "Local file Cal:","Lokale Datei Kal:" }, 954{ "Local file Cal:","Lokale Datei Kal:" },
955{ "Local file ABook:","Lokale Datei ABuch:" }, 955{ "Local file ABook:","Lokale Datei ABuch:" },
956{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 956{ "Local file PWMgr:","Lokale Datei PWMgr:" },
957{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 957{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
958{ "Calendar:","Kalender:" }, 958{ "Calendar:","Kalender:" },
959{ "AddressBook:","AdressBuch:" }, 959{ "AddressBook:","AdressBuch:" },
960{ "PWManager:","PWManager:" }, 960{ "PWManager:","PWManager:" },
961{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 961{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
962{ "ssh/scp","ssh/scp" }, 962{ "ssh/scp","ssh/scp" },
963{ "ftp","ftp" }, 963{ "ftp","ftp" },
964{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 964{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
965{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 965{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
966{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 966{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
967{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 967{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
968{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 968{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
969{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 969{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
970{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 970{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
971{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 971{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
972{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 972{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
973{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 973{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
974{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 974{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
975{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 975{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
976{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 976{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
977{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 977{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
978{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 978{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
979{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, 979{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
980{ "KDE-Pim Sync","KDE-Pim Sync" }, 980{ "KDE-Pim Sync","KDE-Pim Sync" },
981{ "Multiple profiles","Multi-Sync Profile" }, 981{ "Multiple profiles","Multi-Sync Profile" },
982{ "Device: ","Gerät: " }, 982{ "Device: ","Gerät: " },
983{ "Multiple sync started.","Multi-Sync gestartet." }, 983{ "Multiple sync started.","Multi-Sync gestartet." },
984{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 984{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
985{ "Turn filter on","Schalte Filter an" }, 985{ "Turn filter on","Schalte Filter an" },
986{ "Turn filter off","Schalte Filter aus" }, 986{ "Turn filter off","Schalte Filter aus" },
987{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, 987{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" },
988{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, 988{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" },
989{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, 989{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" },
990{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, 990{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" },
991{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, 991{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" },
992{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, 992{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" },
993{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, 993{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" },
994{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, 994{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" },
995{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, 995{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" },
996{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, 996{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" },
997{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, 997{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" },
998{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, 998{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" },
999{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, 999{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" },
1000{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, 1000{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" },
1001{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, 1001{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" },
1002{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, 1002{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" },
1003{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, 1003{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" },
1004{ "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, 1004{ "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" },
1005{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, 1005{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" },
1006{ "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, 1006{ "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" },
1007{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, 1007{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" },
1008{ "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, 1008{ "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" },
1009{ "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, 1009{ "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" },
1010{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, 1010{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" },
1011{ "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, 1011{ "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" },
1012{ "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, 1012{ "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" },
1013{ "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, 1013{ "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" },
1014{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, 1014{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" },
1015{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, 1015{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" },
1016{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, 1016{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" },
1017{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, 1017{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" },
1018{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, 1018{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" },
1019{ "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, 1019{ "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" },
1020{ "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, 1020{ "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" },
1021{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, 1021{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" },
1022{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, 1022{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" },
1023{ "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, 1023{ "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" },
1024{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datenavigator</p>\n" }, 1024{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datenavigator</p>\n" },
1025{ "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, 1025{ "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" },
1026{ "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, 1026{ "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" },
1027{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monats Ansicht</p>\n" }, 1027{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monats Ansicht</p>\n" },
1028{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochen Ansicht | <b>U</b>: Wochen Ansicht</p>\n" }, 1028{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochen Ansicht | <b>U</b>: Wochen Ansicht</p>\n" },
1029{ "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, 1029{ "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" },
1030{ "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht days view| <b>W</b>: What's next Ansicht\n " }, 1030{ "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht days view| <b>W</b>: What's next Ansicht\n " },
1031{ "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, 1031{ "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" },
1032{ "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, 1032{ "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" },
1033{ "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, 1033{ "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" },
1034{ "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, 1034{ "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" },
1035{ "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, 1035{ "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" },
1036{ "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, 1036{ "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" },
1037{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, 1037{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" },
1038{ "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, 1038{ "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" },
1039{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, 1039{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" },
1040{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, 1040{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" },
1041{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, 1041{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" },
1042{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" }, 1042{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.net\n" },
1043{ "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, 1043{ "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" },
1044{ "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, 1044{ "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" },
1045{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, 1045{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" },
1046{ "KO/Pi FAQ","KO/Pi FAQ" }, 1046{ "KO/Pi FAQ","KO/Pi FAQ" },
1047{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, 1047{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" },
1048{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, 1048{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" },
1049{ "About KOrganizer/Pi","Über KOrganizer/Pi" }, 1049{ "About KOrganizer/Pi","Über KOrganizer/Pi" },
1050{ "From: ","Von: " }, 1050{ "From: ","Von: " },
1051{ "Remove sync info","Entferne Sync Info" }, 1051{ "Remove sync info","Entferne Sync Info" },
1052{ "For all profiles","Für alle Profile" }, 1052{ "For all profiles","Für alle Profile" },
1053{ "Hide not Running","Verstecke nicht Laufende" }, 1053{ "Hide not Running","Verstecke nicht Laufende" },
1054{ "ME","ME" }, 1054{ "ME","ME" },
1055{ "Toolbar","Toolbar" }, 1055{ "Toolbar","Toolbar" },
1056{ "Undo Delete...","Löschen rückgängig machen..." }, 1056{ "Undo Delete...","Löschen rückgängig machen..." },
1057{ "Undo Delete","Löschen rückgängig machen" }, 1057{ "Undo Delete","Löschen rückgängig machen" },
1058{ "KDE Sync HowTo...","KDE Sync HowTo..." }, 1058{ "KDE Sync HowTo...","KDE Sync HowTo..." },
1059{ "Multi Sync HowTo...","Multi Sync HowTo..." }, 1059{ "Multi Sync HowTo...","Multi Sync HowTo..." },
1060{ "Januar","Januar" }, 1060{ "Januar","Januar" },
1061{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, 1061{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" },
1062{ "No Filter","Kein Filter" }, 1062{ "No Filter","Kein Filter" },
1063{ "Multiple Sync options","Multi Sync Optionen" }, 1063{ "Multiple Sync options","Multi Sync Optionen" },
1064{ "Sync algo options","Sync Ablauf Optionen" }, 1064{ "Sync algo options","Sync Ablauf Optionen" },
1065{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 1065{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
1066{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 1066{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
1067{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 1067{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
1068{ "Write back options","Optionen zum Zurückschreiben" }, 1068{ "Write back options","Optionen zum Zurückschreiben" },
1069{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 1069{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
1070{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 1070{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
1071{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 1071{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
1072{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 1072{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
1073{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 1073{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
1074{ "Time period","Zeitspanne" }, 1074{ "Time period","Zeitspanne" },
1075{ "From ","Von " }, 1075{ "From ","Von " },
1076{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 1076{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
1077{ " weeks in the future "," Wochen in der Zukunft " }, 1077{ " weeks in the future "," Wochen in der Zukunft " },
1078{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 1078{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
1079{ "Local temp file:","Lokale temp Datei:" }, 1079{ "Local temp file:","Lokale temp Datei:" },
1080{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 1080{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
1081{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 1081{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
1082{ "Language","Sprache" }, 1082{ "Language","Sprache" },
1083{ "Time Format","Zeit Format" }, 1083{ "Time Format","Zeit Format" },
1084{ "Time Zone","Zeit Zone" }, 1084{ "Time Zone","Zeit Zone" },
1085{ "%1 groups subscribed","%1 Guppen abboniert" }, 1085{ "%1 groups subscribed","%1 Guppen abboniert" },
1086{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, 1086{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
1087{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 1087{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
1088{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 1088{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
1089{ "Save settings","Speichere Einstellungen" }, 1089{ "Save settings","Speichere Einstellungen" },
1090{ "Save standard","Speichere Standard" }, 1090{ "Save standard","Speichere Standard" },
1091{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 1091{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
1092{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1092{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1093{ "Data storage path","Daten Speicherpfad" }, 1093{ "Data storage path","Daten Speicherpfad" },
1094{ "Language","Sprache" }, 1094{ "Language","Sprache" },
1095{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1095{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1096{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1096{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1097{ "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, 1097{ "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" },
1098{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1098{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1099{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1099{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1100{ "KO/Pi","KO/Pi" }, 1100{ "KO/Pi","KO/Pi" },
1101{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1101{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1102{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1102{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1103{ "Sound.Al.: ","Sound.Al.: " }, 1103{ "Sound.Al.: ","Sound.Al.: " },
1104{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1104{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1105{ "Restore","Wiederherstellen" }, 1105{ "Restore","Wiederherstellen" },
1106{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, 1106{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" },
1107{ "% completed","% komplett" }, 1107{ "% completed","% komplett" },
1108{ "%d item(s) found.","%d Item(s) gefunden." }, 1108{ "%d item(s) found.","%d Item(s) gefunden." },
1109{ "Set complete","Setze auf erledigt" }, 1109{ "Set complete","Setze auf erledigt" },
1110{ "(cancelled)","(gecancelt)" }, 1110{ "(cancelled)","(gecancelt)" },
1111{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1111{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1112{ " Local time "," Locale Zeit " }, 1112{ " Local time "," Locale Zeit " },
1113{ "Form2","Form2" }, 1113{ "Form2","Form2" },
1114{ "Filter enabled","Filter angeschaltet" }, 1114{ "Filter enabled","Filter angeschaltet" },
1115{ "Edit Filters","Ändere Filter" }, 1115{ "Edit Filters","Ändere Filter" },
1116{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1116{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1117{ "Agenda","Agenda" }, 1117{ "Agenda","Agenda" },
1118{ " ("," (" }, 1118{ " ("," (" },
1119{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1119{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1120{ "Print","Print" }, 1120{ "Print","Print" },
1121{ "&Setup Printer...","Drucker &Setup..." }, 1121{ "&Setup Printer...","Drucker &Setup..." },
1122{ "View Type","Zeige Typ" }, 1122{ "View Type","Zeige Typ" },
1123{ "Page &orientation:","Seiten Ausrichtung:" }, 1123{ "Page &orientation:","Seiten Ausrichtung:" },
1124{ "Use Default of Selected Style","Default des selektierten Stils" }, 1124{ "Use Default of Selected Style","Default des selektierten Stils" },
1125{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1125{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1126{ "Portrait","Portrait" }, 1126{ "Portrait","Portrait" },
1127{ "Landscape","Landschaft" }, 1127{ "Landscape","Landschaft" },
1128{ "Print day","Drucke Tag" }, 1128{ "Print day","Drucke Tag" },
1129{ "CalPrintDay_Base","CalPrintDay_Base" }, 1129{ "CalPrintDay_Base","CalPrintDay_Base" },
1130{ "Date && Time Range","Datum && Zeitspanne" }, 1130{ "Date && Time Range","Datum && Zeitspanne" },
1131{ "&End date:","&Enddatum:" }, 1131{ "&End date:","&Enddatum:" },
1132{ "&Start date:","&Startdatum:" }, 1132{ "&Start date:","&Startdatum:" },
1133{ "Start &time:","Startzeit:" }, 1133{ "Start &time:","Startzeit:" },
1134{ "End ti&me:","Endzeit:" }, 1134{ "End ti&me:","Endzeit:" },
1135{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1135{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1136{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1136{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1137{ "Alt+D","Alt+D" }, 1137{ "Alt+D","Alt+D" },
1138{ "&Use colors","Nutze Farben" }, 1138{ "&Use colors","Nutze Farben" },
1139{ "Alt+U","Alt+U" }, 1139{ "Alt+U","Alt+U" },
1140{ "Print week","Drucke Woche" }, 1140{ "Print week","Drucke Woche" },
1141{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1141{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1142{ "Use &colors","Nutze Farben" }, 1142{ "Use &colors","Nutze Farben" },
1143{ "Type of View","Typ der Ansicht" }, 1143{ "Type of View","Typ der Ansicht" },
1144{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1144{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1145{ "Alt+F","Alt+F" }, 1145{ "Alt+F","Alt+F" },
1146{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1146{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1147{ "Alt+T","Alt+T" }, 1147{ "Alt+T","Alt+T" },
1148{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1148{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1149{ "Print month","Drucke Monat" }, 1149{ "Print month","Drucke Monat" },
1150{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1150{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1151{ "&Start month:","&Startmonat:" }, 1151{ "&Start month:","&Startmonat:" },
1152{ "&End month:","&Endmonat:" }, 1152{ "&End month:","&Endmonat:" },
1153{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1153{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1154{ "Print todos","Drucke Todos" }, 1154{ "Print todos","Drucke Todos" },
1155{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1155{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1156{ "Include &description of the item","Inclusive Itembeschreibung" }, 1156{ "Include &description of the item","Inclusive Itembeschreibung" },
1157{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1157{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1158{ "Include &priority of the item","Inclusive Priorität des Items" }, 1158{ "Include &priority of the item","Inclusive Priorität des Items" },
1159{ "Items to Print","Zu druckende Items" }, 1159{ "Items to Print","Zu druckende Items" },
1160{ "&From:","Von:" }, 1160{ "&From:","Von:" },
1161{ "&To:","Bis:" }, 1161{ "&To:","Bis:" },
1162{ "Print &all todo items","Drucke alle Todo Items" }, 1162{ "Print &all todo items","Drucke alle Todo Items" },
1163{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1163{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1164{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1164{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1165{ "Todo List","Todo Liste" }, 1165{ "Todo List","Todo Liste" },
1166{ "&Title:","&Titel:" }, 1166{ "&Title:","&Titel:" },
1167{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, 1167{ "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" },
1168{ "Todo list","Todo Liste" }, 1168{ "Todo list","Todo Liste" },
1169{ "&Print...","Drucke..." }, 1169{ "&Print...","Drucke..." },
1170{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1170{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1171{ "[Unconfigured]","[Unkonfiguriert]" }, 1171{ "[Unconfigured]","[Unkonfiguriert]" },
1172{ "OK","OK" }, 1172{ "OK","OK" },
1173{ "FilterEditor","FilterEditor" }, 1173{ "FilterEditor","FilterEditor" },
1174{ "Include","Inclusive" }, 1174{ "Include","Inclusive" },
1175{ "Exclude","Exclusive" }, 1175{ "Exclude","Exclusive" },
1176{ "Edit Selection...","Editiere Auswahl" }, 1176{ "Edit Selection...","Editiere Auswahl" },
1177{ "recurring events","wiederholende Termine" }, 1177{ "recurring events","wiederholende Termine" },
1178{ "recurr. events","wiederh.Termine" }, 1178{ "recurr. events","wiederh.Termine" },
1179{ "completed to-dos","erledigte Todos" }, 1179{ "completed to-dos","erledigte Todos" },
1180{ "events","Termine" }, 1180{ "events","Termine" },
1181{ "todos","Todos" }, 1181{ "todos","Todos" },
1182{ "journals","Journale" }, 1182{ "journals","Journale" },
1183{ "public","öffentl." }, 1183{ "public","öffentl." },
1184{ "private","privat" }, 1184{ "private","privat" },
1185{ "confidential","vertraul." }, 1185{ "confidential","vertraul." },
1186{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, 1186{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" },
1187{ "Yesterday","Gestern" }, 1187{ "Yesterday","Gestern" },
1188{ "Day after tomorrow","Übermorgen" }, 1188{ "Day after tomorrow","Übermorgen" },
1189{ "Tomorrow","Morgen" }, 1189{ "Tomorrow","Morgen" },
1190{ "Day before yesterday","Vorgestern" }, 1190{ "Day before yesterday","Vorgestern" },
1191{ "Size %1","Größe %1" }, 1191{ "Size %1","Größe %1" },
1192{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1192{ "New Agendasize: %1","Neue Agendagröße: %1" },
1193{ " (%1 y.)"," (%1 J.)" }, 1193{ " (%1 y.)"," (%1 J.)" },
1194{ "Allday:","Ganztägig:" }, 1194{ "Allday:","Ganztägig:" },
1195{ "compl.todos","erled.Todos" }, 1195{ "compl.todos","erled.Todos" },
1196{ "Day view","Tagesansicht" }, 1196{ "Day view","Tagesansicht" },
1197{ "Next days","Nächste Tage" }, 1197{ "Next days","Nächste Tage" },
1198{ "Next week","Nächste Woche" }, 1198{ "Next week","Nächste Woche" },
1199{ "Next two weeks","Nächste zwei Wochen" }, 1199{ "Next two weeks","Nächste zwei Wochen" },
1200{ "Next month","Nächster Monat" }, 1200{ "Next month","Nächster Monat" },
1201{ "Journal view","Journal" }, 1201{ "Journal view","Journal" },
1202{ "Display all opened","Zeige alle geöffnet" }, 1202{ "Display all opened","Zeige alle geöffnet" },
1203{ "Display all closed","Zeige alle geschlossen" }, 1203{ "Display all closed","Zeige alle geschlossen" },
1204{ "Display all flat","Zeige alle flach" }, 1204{ "Display all flat","Zeige alle flach" },
1205{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1205{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1206{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1206{ "Default todo done color:","Standard Todo erledigt Farbe" },
1207{ "Select week %1-%2","Wähle Woche %1-%2" }, 1207{ "Select week %1-%2","Wähle Woche %1-%2" },
1208{ "Select Week","Wähle Woche" }, 1208{ "Select Week","Wähle Woche" },
1209{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1209{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1210{ "Set Alarm!","Setze Alarm!" }, 1210{ "Set Alarm!","Setze Alarm!" },
1211{ "Canged alarm for %1 items","Alarm für %1 Items geändert" }, 1211{ "Canged alarm for %1 items","Alarm für %1 Items geändert" },
1212{ " and "," und " }, 1212{ " and "," und " },
1213{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1213{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1214{ "Mail to selected","Mail an Ausgewählte" }, 1214{ "Mail to selected","Mail an Ausgewählte" },
1215{ "Mail to all","Mail an Alle" }, 1215{ "Mail to all","Mail an Alle" },
1216{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1216{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1217{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1217{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1218{ " on"," am" }, 1218{ " on"," am" },
1219{ " completed on "," erledigt am " }, 1219{ " completed on "," erledigt am " },
1220{ "Save as Event template","Speichere als Vorlage" }, 1220{ "Save as Event template","Speichere als Vorlage" },
1221{ "Load Event template","Lade Termin Vorlage" }, 1221{ "Load Event template","Lade Termin Vorlage" },
1222{ "Save as Journal template","Speichere als Journal Vorlage" }, 1222{ "Save as Journal template","Speichere als Journal Vorlage" },
1223{ "Insert Journal template","Füge Journal Vorlage ein" }, 1223{ "Insert Journal template","Füge Journal Vorlage ein" },
1224{ "Sub todos:<br>","Unter Todos:<br>" }, 1224{ "Sub todos:<br>","Unter Todos:<br>" },
1225{ "Parent todo:<br>","Über Todo:<br>" }, 1225{ "Parent todo:<br>","Über Todo:<br>" },
1226{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1226{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1227{ " completed"," erledigt" }, 1227{ " completed"," erledigt" },
1228{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.net --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, 1228{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.net --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" },
1229{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1229{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1230{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1230{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1231{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1231{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1232{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, 1232{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" },
1233{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1233{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1234{ "Error","Fehler" }, 1234{ "Error","Fehler" },
1235{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1235{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1236{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1236{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1237{ "Warning","Warnung" }, 1237{ "Warning","Warnung" },
1238{ "Select week number","Wähle Wochen Nummer" },
1239{ "Februar","Februar" },
1240{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1241{ "W","W" },
1242{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1243{ "T: %1","T: %1" },
1244{ "Start: ","Start: " },
1245{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1246{ "Password for remote access:","Passwort für fernen Zugriff:" },
1247{ "Remote IP address:","Ferne IP Adresse:" },
1248{ "Remote port number:","Ferne Port Nummer:" },
1249{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1250{ "Remote from: ","Fern von: " },
1251{ "Local from: ","Lokal von: " },
1252{ "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 %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
1253{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1254{ "Write back","Schreibe zurück" },
1255{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1256{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1257{ "Received sync request","Sync Anfrage erhalten" },
1258{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
1259{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1260{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1261{ "Sending file...","Sende Datei..." },
1262{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1263{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1264{ "Received %1 bytes","%1 Bytes erhalten" },
1265{ "Writing file to disk...","Speichere Datei..." },
1266{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1267{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1268{ "Synchronize!","Synchronisiere!" },
1269{ "High clock skew!","Großer Uhrzeitunterschied!" },
1270{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1271{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
1272{ "","" },
1273{ "","" },
1274{ "","" },
1275{ "","" },
1276{ "","" },
1277{ "","" },
1238{ "","" }, 1278{ "","" },
1239{ "","" }, 1279{ "","" },
1240{ "","" }, 1280{ "","" },
1241{ "","" }, 1281{ "","" },
1242{ "","" }, 1282{ "","" },
1243{ "","" }, 1283{ "","" },
1244{ "","" }, \ No newline at end of file 1284{ "","" }, \ No newline at end of file
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index a8e4de5..1b17665 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -65,3265 +65,3266 @@ $Id$
65#include <kprinter.h> 65#include <kprinter.h>
66#include <kprotocolinfo.h> 66#include <kprotocolinfo.h>
67#include <kresources/selectdialog.h> 67#include <kresources/selectdialog.h>
68#include <kstandarddirs.h> 68#include <kstandarddirs.h>
69#include <ktempfile.h> 69#include <ktempfile.h>
70#include <kxmlguiclient.h> 70#include <kxmlguiclient.h>
71#include <kaboutdata.h> 71#include <kaboutdata.h>
72#include <libkdepim/categoryselectdialog.h> 72#include <libkdepim/categoryselectdialog.h>
73 73
74#include "addresseeutil.h" 74#include "addresseeutil.h"
75#include "addresseeeditordialog.h" 75#include "addresseeeditordialog.h"
76#include "extensionmanager.h" 76#include "extensionmanager.h"
77#include "kstdaction.h" 77#include "kstdaction.h"
78#include "kaddressbookservice.h" 78#include "kaddressbookservice.h"
79#include "ldapsearchdialog.h" 79#include "ldapsearchdialog.h"
80#include "printing/printingwizard.h" 80#include "printing/printingwizard.h"
81#else // KAB_EMBEDDED 81#else // KAB_EMBEDDED
82 82
83#include <kapplication.h> 83#include <kapplication.h>
84#include "KDGanttMinimizeSplitter.h" 84#include "KDGanttMinimizeSplitter.h"
85#include "kaddressbookmain.h" 85#include "kaddressbookmain.h"
86#include "kactioncollection.h" 86#include "kactioncollection.h"
87#include "addresseedialog.h" 87#include "addresseedialog.h"
88//US 88//US
89#include <addresseeview.h> 89#include <addresseeview.h>
90 90
91#include <qapp.h> 91#include <qapp.h>
92#include <qmenubar.h> 92#include <qmenubar.h>
93//#include <qtoolbar.h> 93//#include <qtoolbar.h>
94#include <qmessagebox.h> 94#include <qmessagebox.h>
95#include <kdebug.h> 95#include <kdebug.h>
96#include <kiconloader.h> // needed for SmallIcon 96#include <kiconloader.h> // needed for SmallIcon
97#include <kresources/kcmkresources.h> 97#include <kresources/kcmkresources.h>
98#include <ktoolbar.h> 98#include <ktoolbar.h>
99 99
100 100
101//#include <qlabel.h> 101//#include <qlabel.h>
102 102
103 103
104#ifndef DESKTOP_VERSION 104#ifndef DESKTOP_VERSION
105#include <qpe/ir.h> 105#include <qpe/ir.h>
106#include <qpe/qpemenubar.h> 106#include <qpe/qpemenubar.h>
107#include <qtopia/qcopenvelope_qws.h> 107#include <qtopia/qcopenvelope_qws.h>
108#else 108#else
109 109
110#include <qmenubar.h> 110#include <qmenubar.h>
111#endif 111#endif
112 112
113#endif // KAB_EMBEDDED 113#endif // KAB_EMBEDDED
114#include "kcmconfigs/kcmkabconfig.h" 114#include "kcmconfigs/kcmkabconfig.h"
115#include "kcmconfigs/kcmkdepimconfig.h" 115#include "kcmconfigs/kcmkdepimconfig.h"
116#include "kpimglobalprefs.h" 116#include "kpimglobalprefs.h"
117#include "externalapphandler.h" 117#include "externalapphandler.h"
118#include "xxportselectdialog.h" 118#include "xxportselectdialog.h"
119 119
120 120
121#include <kresources/selectdialog.h> 121#include <kresources/selectdialog.h>
122#include <kmessagebox.h> 122#include <kmessagebox.h>
123 123
124#include <picture.h> 124#include <picture.h>
125#include <resource.h> 125#include <resource.h>
126 126
127//US#include <qsplitter.h> 127//US#include <qsplitter.h>
128#include <qmap.h> 128#include <qmap.h>
129#include <qdir.h> 129#include <qdir.h>
130#include <qfile.h> 130#include <qfile.h>
131#include <qvbox.h> 131#include <qvbox.h>
132#include <qlayout.h> 132#include <qlayout.h>
133#include <qclipboard.h> 133#include <qclipboard.h>
134#include <qtextstream.h> 134#include <qtextstream.h>
135#include <qradiobutton.h> 135#include <qradiobutton.h>
136#include <qbuttongroup.h> 136#include <qbuttongroup.h>
137 137
138#include <libkdepim/categoryselectdialog.h> 138#include <libkdepim/categoryselectdialog.h>
139#include <libkdepim/categoryeditdialog.h> 139#include <libkdepim/categoryeditdialog.h>
140#include <kabc/vcardconverter.h> 140#include <kabc/vcardconverter.h>
141 141
142 142
143#include "addresseeutil.h" 143#include "addresseeutil.h"
144#include "undocmds.h" 144#include "undocmds.h"
145#include "addresseeeditordialog.h" 145#include "addresseeeditordialog.h"
146#include "viewmanager.h" 146#include "viewmanager.h"
147#include "details/detailsviewcontainer.h" 147#include "details/detailsviewcontainer.h"
148#include "kabprefs.h" 148#include "kabprefs.h"
149#include "xxportmanager.h" 149#include "xxportmanager.h"
150#include "incsearchwidget.h" 150#include "incsearchwidget.h"
151#include "jumpbuttonbar.h" 151#include "jumpbuttonbar.h"
152#include "extensionmanager.h" 152#include "extensionmanager.h"
153#include "addresseeconfig.h" 153#include "addresseeconfig.h"
154#include "nameeditdialog.h" 154#include "nameeditdialog.h"
155#include <kcmultidialog.h> 155#include <kcmultidialog.h>
156 156
157#ifdef _WIN32_ 157#ifdef _WIN32_
158#ifdef _OL_IMPORT_ 158#ifdef _OL_IMPORT_
159#include "kaimportoldialog.h" 159#include "kaimportoldialog.h"
160#endif 160#endif
161#else 161#else
162#include <unistd.h> 162#include <unistd.h>
163#endif 163#endif
164// sync includes 164// sync includes
165#include <libkdepim/ksyncprofile.h> 165#include <libkdepim/ksyncprofile.h>
166#include <libkdepim/ksyncprefsdialog.h> 166#include <libkdepim/ksyncprefsdialog.h>
167 167
168 168
169class KABCatPrefs : public QDialog 169class KABCatPrefs : public QDialog
170{ 170{
171 public: 171 public:
172 KABCatPrefs( QWidget *parent=0, const char *name=0 ) : 172 KABCatPrefs( QWidget *parent=0, const char *name=0 ) :
173 QDialog( parent, name, true ) 173 QDialog( parent, name, true )
174 { 174 {
175 setCaption( i18n("Manage new Categories") ); 175 setCaption( i18n("Manage new Categories") );
176 QVBoxLayout* lay = new QVBoxLayout( this ); 176 QVBoxLayout* lay = new QVBoxLayout( this );
177 lay->setSpacing( 3 ); 177 lay->setSpacing( 3 );
178 lay->setMargin( 3 ); 178 lay->setMargin( 3 );
179 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 179 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
180 lay->addWidget( lab ); 180 lay->addWidget( lab );
181 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 181 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
182 lay->addWidget( format ); 182 lay->addWidget( format );
183 format->setExclusive ( true ) ; 183 format->setExclusive ( true ) ;
184 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 184 addCatBut = new QRadioButton(i18n("Add to category list"), format );
185 new QRadioButton(i18n("Remove from addressees"), format ); 185 new QRadioButton(i18n("Remove from addressees"), format );
186 addCatBut->setChecked( true ); 186 addCatBut->setChecked( true );
187 QPushButton * ok = new QPushButton( i18n("OK"), this ); 187 QPushButton * ok = new QPushButton( i18n("OK"), this );
188 lay->addWidget( ok ); 188 lay->addWidget( ok );
189 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 189 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
190 lay->addWidget( cancel ); 190 lay->addWidget( cancel );
191 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 191 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
192 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 192 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
193 resize( 200, 200 ); 193 resize( 200, 200 );
194 } 194 }
195 195
196 bool addCat() { return addCatBut->isChecked(); } 196 bool addCat() { return addCatBut->isChecked(); }
197private: 197private:
198 QRadioButton* addCatBut; 198 QRadioButton* addCatBut;
199}; 199};
200 200
201class KABFormatPrefs : public QDialog 201class KABFormatPrefs : public QDialog
202{ 202{
203 public: 203 public:
204 KABFormatPrefs( QWidget *parent=0, const char *name=0 ) : 204 KABFormatPrefs( QWidget *parent=0, const char *name=0 ) :
205 QDialog( parent, name, true ) 205 QDialog( parent, name, true )
206 { 206 {
207 setCaption( i18n("Set formatted name") ); 207 setCaption( i18n("Set formatted name") );
208 QVBoxLayout* lay = new QVBoxLayout( this ); 208 QVBoxLayout* lay = new QVBoxLayout( this );
209 lay->setSpacing( 3 ); 209 lay->setSpacing( 3 );
210 lay->setMargin( 3 ); 210 lay->setMargin( 3 );
211 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); 211 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this );
212 lay->addWidget( lab ); 212 lay->addWidget( lab );
213 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this ); 213 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this );
214 lay->addWidget( format ); 214 lay->addWidget( format );
215 format->setExclusive ( true ) ; 215 format->setExclusive ( true ) ;
216 simple = new QRadioButton(i18n("Simple: James Bond"), format ); 216 simple = new QRadioButton(i18n("Simple: James Bond"), format );
217 full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format ); 217 full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format );
218 reverse = new QRadioButton(i18n("Reverse: Bond, James"), format ); 218 reverse = new QRadioButton(i18n("Reverse: Bond, James"), format );
219 company = new QRadioButton(i18n("Organization: MI6"), format ); 219 company = new QRadioButton(i18n("Organization: MI6"), format );
220 simple->setChecked( true ); 220 simple->setChecked( true );
221 setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this); 221 setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this);
222 lay->addWidget( setCompany ); 222 lay->addWidget( setCompany );
223 QPushButton * ok = new QPushButton( i18n("Select contact list"), this ); 223 QPushButton * ok = new QPushButton( i18n("Select contact list"), this );
224 lay->addWidget( ok ); 224 lay->addWidget( ok );
225 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 225 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
226 lay->addWidget( cancel ); 226 lay->addWidget( cancel );
227 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 227 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
228 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 228 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
229 //resize( 200, 200 ); 229 //resize( 200, 200 );
230 230
231 } 231 }
232public: 232public:
233 QRadioButton* simple, *full, *reverse, *company; 233 QRadioButton* simple, *full, *reverse, *company;
234 QCheckBox* setCompany; 234 QCheckBox* setCompany;
235}; 235};
236 236
237 237
238 238
239class KAex2phonePrefs : public QDialog 239class KAex2phonePrefs : public QDialog
240{ 240{
241 public: 241 public:
242 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) : 242 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
243 QDialog( parent, name, true ) 243 QDialog( parent, name, true )
244 { 244 {
245 setCaption( i18n("Export to phone options") ); 245 setCaption( i18n("Export to phone options") );
246 QVBoxLayout* lay = new QVBoxLayout( this ); 246 QVBoxLayout* lay = new QVBoxLayout( this );
247 lay->setSpacing( 3 ); 247 lay->setSpacing( 3 );
248 lay->setMargin( 3 ); 248 lay->setMargin( 3 );
249 QLabel *lab; 249 QLabel *lab;
250 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 250 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
251 lab->setAlignment (AlignHCenter ); 251 lab->setAlignment (AlignHCenter );
252 QHBox* temphb; 252 QHBox* temphb;
253 temphb = new QHBox( this ); 253 temphb = new QHBox( this );
254 new QLabel( i18n("I/O device: "), temphb ); 254 new QLabel( i18n("I/O device: "), temphb );
255 mPhoneDevice = new QLineEdit( temphb); 255 mPhoneDevice = new QLineEdit( temphb);
256 lay->addWidget( temphb ); 256 lay->addWidget( temphb );
257 temphb = new QHBox( this ); 257 temphb = new QHBox( this );
258 new QLabel( i18n("Connection: "), temphb ); 258 new QLabel( i18n("Connection: "), temphb );
259 mPhoneConnection = new QLineEdit( temphb); 259 mPhoneConnection = new QLineEdit( temphb);
260 lay->addWidget( temphb ); 260 lay->addWidget( temphb );
261 temphb = new QHBox( this ); 261 temphb = new QHBox( this );
262 new QLabel( i18n("Model(opt.): "), temphb ); 262 new QLabel( i18n("Model(opt.): "), temphb );
263 mPhoneModel = new QLineEdit( temphb); 263 mPhoneModel = new QLineEdit( temphb);
264 lay->addWidget( temphb ); 264 lay->addWidget( temphb );
265 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); 265 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this );
266 // lay->addWidget( mWriteToSim ); 266 // lay->addWidget( mWriteToSim );
267 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); 267 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) );
268 lab->setAlignment (AlignHCenter); 268 lab->setAlignment (AlignHCenter);
269 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 269 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
270 lay->addWidget( ok ); 270 lay->addWidget( ok );
271 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 271 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
272 lay->addWidget( cancel ); 272 lay->addWidget( cancel );
273 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 273 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
274 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 274 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
275 resize( 220, 240 ); 275 resize( 220, 240 );
276 276
277 } 277 }
278 278
279public: 279public:
280 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 280 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
281 QCheckBox* mWriteToSim; 281 QCheckBox* mWriteToSim;
282}; 282};
283 283
284 284
285bool pasteWithNewUid = true; 285bool pasteWithNewUid = true;
286 286
287#ifdef KAB_EMBEDDED 287#ifdef KAB_EMBEDDED
288KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) 288KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name )
289 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 289 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
290 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ 290 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/
291 mReadWrite( readWrite ), mModified( false ), mMainWindow(client) 291 mReadWrite( readWrite ), mModified( false ), mMainWindow(client)
292#else //KAB_EMBEDDED 292#else //KAB_EMBEDDED
293KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) 293KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name )
294 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 294 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
295 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), 295 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ),
296 mReadWrite( readWrite ), mModified( false ) 296 mReadWrite( readWrite ), mModified( false )
297#endif //KAB_EMBEDDED 297#endif //KAB_EMBEDDED
298{ 298{
299 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 299 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
300 // syncManager->setBlockSave(false); 300 // syncManager->setBlockSave(false);
301 mMiniSplitter = 0; 301 mMiniSplitter = 0;
302 mExtensionBarSplitter = 0; 302 mExtensionBarSplitter = 0;
303 mIsPart = !parent->inherits( "KAddressBookMain" ); 303 mIsPart = !parent->inherits( "KAddressBookMain" );
304 mAddressBook = KABC::StdAddressBook::self(); 304 mAddressBook = KABC::StdAddressBook::self();
305 KABC::StdAddressBook::setAutomaticSave( false ); 305 KABC::StdAddressBook::setAutomaticSave( false );
306 306
307#ifndef KAB_EMBEDDED 307#ifndef KAB_EMBEDDED
308 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); 308 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler );
309#endif //KAB_EMBEDDED 309#endif //KAB_EMBEDDED
310 310
311 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), 311 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ),
312 SLOT( addressBookChanged() ) ); 312 SLOT( addressBookChanged() ) );
313 313
314#if 0 314#if 0
315 // LP moved to addressbook init method 315 // LP moved to addressbook init method
316 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, 316 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization,
317 "X-Department", "KADDRESSBOOK" ); 317 "X-Department", "KADDRESSBOOK" );
318 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, 318 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization,
319 "X-Profession", "KADDRESSBOOK" ); 319 "X-Profession", "KADDRESSBOOK" );
320 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, 320 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization,
321 "X-AssistantsName", "KADDRESSBOOK" ); 321 "X-AssistantsName", "KADDRESSBOOK" );
322 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, 322 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization,
323 "X-ManagersName", "KADDRESSBOOK" ); 323 "X-ManagersName", "KADDRESSBOOK" );
324 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, 324 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal,
325 "X-SpousesName", "KADDRESSBOOK" ); 325 "X-SpousesName", "KADDRESSBOOK" );
326 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, 326 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal,
327 "X-Office", "KADDRESSBOOK" ); 327 "X-Office", "KADDRESSBOOK" );
328 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, 328 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal,
329 "X-IMAddress", "KADDRESSBOOK" ); 329 "X-IMAddress", "KADDRESSBOOK" );
330 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, 330 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal,
331 "X-Anniversary", "KADDRESSBOOK" ); 331 "X-Anniversary", "KADDRESSBOOK" );
332 332
333 //US added this field to become compatible with Opie/qtopia addressbook 333 //US added this field to become compatible with Opie/qtopia addressbook
334 // values can be "female" or "male" or "". An empty field represents undefined. 334 // values can be "female" or "male" or "". An empty field represents undefined.
335 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, 335 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal,
336 "X-Gender", "KADDRESSBOOK" ); 336 "X-Gender", "KADDRESSBOOK" );
337 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, 337 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal,
338 "X-Children", "KADDRESSBOOK" ); 338 "X-Children", "KADDRESSBOOK" );
339 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, 339 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal,
340 "X-FreeBusyUrl", "KADDRESSBOOK" ); 340 "X-FreeBusyUrl", "KADDRESSBOOK" );
341#endif 341#endif
342 initGUI(); 342 initGUI();
343 343
344 mIncSearchWidget->setFocus(); 344 mIncSearchWidget->setFocus();
345 345
346 346
347 connect( mViewManager, SIGNAL( selected( const QString& ) ), 347 connect( mViewManager, SIGNAL( selected( const QString& ) ),
348 SLOT( setContactSelected( const QString& ) ) ); 348 SLOT( setContactSelected( const QString& ) ) );
349 connect( mViewManager, SIGNAL( executed( const QString& ) ), 349 connect( mViewManager, SIGNAL( executed( const QString& ) ),
350 SLOT( executeContact( const QString& ) ) ); 350 SLOT( executeContact( const QString& ) ) );
351 351
352 connect( mViewManager, SIGNAL( deleteRequest( ) ), 352 connect( mViewManager, SIGNAL( deleteRequest( ) ),
353 SLOT( deleteContacts( ) ) ); 353 SLOT( deleteContacts( ) ) );
354 connect( mViewManager, SIGNAL( modified() ), 354 connect( mViewManager, SIGNAL( modified() ),
355 SLOT( setModified() ) ); 355 SLOT( setModified() ) );
356 356
357 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); 357 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) );
358 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); 358 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) );
359 359
360 connect( mXXPortManager, SIGNAL( modified() ), 360 connect( mXXPortManager, SIGNAL( modified() ),
361 SLOT( setModified() ) ); 361 SLOT( setModified() ) );
362 362
363 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), 363 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
364 SLOT( incrementalSearch( const QString& ) ) ); 364 SLOT( incrementalSearch( const QString& ) ) );
365 connect( mIncSearchWidget, SIGNAL( fieldChanged() ), 365 connect( mIncSearchWidget, SIGNAL( fieldChanged() ),
366 mJumpButtonBar, SLOT( recreateButtons() ) ); 366 mJumpButtonBar, SLOT( recreateButtons() ) );
367 367
368 connect( mDetails, SIGNAL( sendEmail( const QString& ) ), 368 connect( mDetails, SIGNAL( sendEmail( const QString& ) ),
369 SLOT( sendMail( const QString& ) ) ); 369 SLOT( sendMail( const QString& ) ) );
370 370
371 371
372 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); 372 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&)));
373 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); 373 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
374 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); 374 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
375 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); 375 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
376 376
377 377
378#ifndef KAB_EMBEDDED 378#ifndef KAB_EMBEDDED
379 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), 379 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
380 mXXPortManager, SLOT( importVCard( const KURL& ) ) ); 380 mXXPortManager, SLOT( importVCard( const KURL& ) ) );
381 381
382 connect( mDetails, SIGNAL( browse( const QString& ) ), 382 connect( mDetails, SIGNAL( browse( const QString& ) ),
383 SLOT( browse( const QString& ) ) ); 383 SLOT( browse( const QString& ) ) );
384 384
385 385
386 mAddressBookService = new KAddressBookService( this ); 386 mAddressBookService = new KAddressBookService( this );
387 387
388#endif //KAB_EMBEDDED 388#endif //KAB_EMBEDDED
389 389
390 mMessageTimer = new QTimer( this ); 390 mMessageTimer = new QTimer( this );
391 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 391 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
392 mEditorDialog = 0; 392 mEditorDialog = 0;
393 createAddresseeEditorDialog( this ); 393 createAddresseeEditorDialog( this );
394 setModified( false ); 394 setModified( false );
395 mBRdisabled = false; 395 mBRdisabled = false;
396#ifndef DESKTOP_VERSION 396#ifndef DESKTOP_VERSION
397 infrared = 0; 397 infrared = 0;
398#endif 398#endif
399 //toggleBeamReceive( ); 399 //toggleBeamReceive( );
400 //mMainWindow->toolBar()->show(); 400 //mMainWindow->toolBar()->show();
401 // we have a toolbar repainting error on the Zaurus when starting KA/Pi 401 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
402 QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 402 QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
403} 403}
404 404
405void KABCore::updateToolBar() 405void KABCore::updateToolBar()
406{ 406{
407 static int iii = 0; 407 static int iii = 0;
408 ++iii; 408 ++iii;
409 mMainWindow->toolBar()->repaintMe(); 409 mMainWindow->toolBar()->repaintMe();
410 if ( iii < 4 ) 410 if ( iii < 4 )
411 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); 411 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar()));
412} 412}
413KABCore::~KABCore() 413KABCore::~KABCore()
414{ 414{
415 // save(); 415 // save();
416 //saveSettings(); 416 //saveSettings();
417 //KABPrefs::instance()->writeConfig(); 417 //KABPrefs::instance()->writeConfig();
418 delete AddresseeConfig::instance(); 418 delete AddresseeConfig::instance();
419 mAddressBook = 0; 419 mAddressBook = 0;
420 KABC::StdAddressBook::close(); 420 KABC::StdAddressBook::close();
421 421
422 delete syncManager; 422 delete syncManager;
423#ifndef DESKTOP_VERSION 423#ifndef DESKTOP_VERSION
424 if ( infrared ) 424 if ( infrared )
425 delete infrared; 425 delete infrared;
426#endif 426#endif
427} 427}
428void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 428void KABCore::receive( const QCString& cmsg, const QByteArray& data )
429{ 429{
430 //qDebug("KA: QCOP message received: %s ", cmsg.data() ); 430 //qDebug("KA: QCOP message received: %s ", cmsg.data() );
431 if ( cmsg == "setDocument(QString)" ) { 431 if ( cmsg == "setDocument(QString)" ) {
432 QDataStream stream( data, IO_ReadOnly ); 432 QDataStream stream( data, IO_ReadOnly );
433 QString fileName; 433 QString fileName;
434 stream >> fileName; 434 stream >> fileName;
435 recieve( fileName ); 435 recieve( fileName );
436 return; 436 return;
437 } 437 }
438} 438}
439void KABCore::toggleBeamReceive( ) 439void KABCore::toggleBeamReceive( )
440{ 440{
441 if ( mBRdisabled ) 441 if ( mBRdisabled )
442 return; 442 return;
443#ifndef DESKTOP_VERSION 443#ifndef DESKTOP_VERSION
444 if ( infrared ) { 444 if ( infrared ) {
445 qDebug("KA: AB disable BeamReceive "); 445 qDebug("KA: AB disable BeamReceive ");
446 delete infrared; 446 delete infrared;
447 infrared = 0; 447 infrared = 0;
448 mActionBR->setChecked(false); 448 mActionBR->setChecked(false);
449 return; 449 return;
450 } 450 }
451 qDebug("KA: AB enable BeamReceive "); 451 qDebug("KA: AB enable BeamReceive ");
452 mActionBR->setChecked(true); 452 mActionBR->setChecked(true);
453 453
454 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; 454 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
455 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); 455 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
456#endif 456#endif
457} 457}
458 458
459 459
460void KABCore::disableBR(bool b) 460void KABCore::disableBR(bool b)
461{ 461{
462#ifndef DESKTOP_VERSION 462#ifndef DESKTOP_VERSION
463 if ( b ) { 463 if ( b ) {
464 if ( infrared ) { 464 if ( infrared ) {
465 toggleBeamReceive( ); 465 toggleBeamReceive( );
466 } 466 }
467 mBRdisabled = true; 467 mBRdisabled = true;
468 } else { 468 } else {
469 if ( mBRdisabled ) { 469 if ( mBRdisabled ) {
470 mBRdisabled = false; 470 mBRdisabled = false;
471 //toggleBeamReceive( ); 471 //toggleBeamReceive( );
472 } 472 }
473 } 473 }
474#endif 474#endif
475 475
476} 476}
477void KABCore::recieve( QString fn ) 477void KABCore::recieve( QString fn )
478{ 478{
479 //qDebug("KABCore::recieve "); 479 //qDebug("KABCore::recieve ");
480 int count = mAddressBook->importFromFile( fn, true ); 480 int count = mAddressBook->importFromFile( fn, true );
481 if ( count ) 481 if ( count )
482 setModified( true ); 482 setModified( true );
483 mViewManager->refreshView(); 483 mViewManager->refreshView();
484 message(i18n("%1 contact(s) received!").arg( count )); 484 message(i18n("%1 contact(s) received!").arg( count ));
485 topLevelWidget()->showMaximized(); 485 topLevelWidget()->showMaximized();
486 topLevelWidget()->raise(); 486 topLevelWidget()->raise();
487} 487}
488void KABCore::restoreSettings() 488void KABCore::restoreSettings()
489{ 489{
490 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; 490 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce;
491 491
492 bool state; 492 bool state;
493 493
494 if (mMultipleViewsAtOnce) 494 if (mMultipleViewsAtOnce)
495 state = KABPrefs::instance()->mDetailsPageVisible; 495 state = KABPrefs::instance()->mDetailsPageVisible;
496 else 496 else
497 state = false; 497 state = false;
498 498
499 mActionDetails->setChecked( state ); 499 mActionDetails->setChecked( state );
500 setDetailsVisible( state ); 500 setDetailsVisible( state );
501 501
502 state = KABPrefs::instance()->mJumpButtonBarVisible; 502 state = KABPrefs::instance()->mJumpButtonBarVisible;
503 503
504 mActionJumpBar->setChecked( state ); 504 mActionJumpBar->setChecked( state );
505 setJumpButtonBarVisible( state ); 505 setJumpButtonBarVisible( state );
506/*US 506/*US
507 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; 507 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter;
508 if ( splitterSize.count() == 0 ) { 508 if ( splitterSize.count() == 0 ) {
509 splitterSize.append( width() / 2 ); 509 splitterSize.append( width() / 2 );
510 splitterSize.append( width() / 2 ); 510 splitterSize.append( width() / 2 );
511 } 511 }
512 mMiniSplitter->setSizes( splitterSize ); 512 mMiniSplitter->setSizes( splitterSize );
513 if ( mExtensionBarSplitter ) { 513 if ( mExtensionBarSplitter ) {
514 splitterSize = KABPrefs::instance()->mExtensionsSplitter; 514 splitterSize = KABPrefs::instance()->mExtensionsSplitter;
515 if ( splitterSize.count() == 0 ) { 515 if ( splitterSize.count() == 0 ) {
516 splitterSize.append( width() / 2 ); 516 splitterSize.append( width() / 2 );
517 splitterSize.append( width() / 2 ); 517 splitterSize.append( width() / 2 );
518 } 518 }
519 mExtensionBarSplitter->setSizes( splitterSize ); 519 mExtensionBarSplitter->setSizes( splitterSize );
520 520
521 } 521 }
522*/ 522*/
523 mViewManager->restoreSettings(); 523 mViewManager->restoreSettings();
524 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); 524 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField );
525 mExtensionManager->restoreSettings(); 525 mExtensionManager->restoreSettings();
526#ifdef DESKTOP_VERSION 526#ifdef DESKTOP_VERSION
527 int wid = width(); 527 int wid = width();
528 if ( wid < 10 ) 528 if ( wid < 10 )
529 wid = 400; 529 wid = 400;
530#else 530#else
531 int wid = QApplication::desktop()->width(); 531 int wid = QApplication::desktop()->width();
532 if ( wid < 640 ) 532 if ( wid < 640 )
533 wid = QApplication::desktop()->height(); 533 wid = QApplication::desktop()->height();
534#endif 534#endif
535 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; 535 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
536 if ( true /*splitterSize.count() == 0*/ ) { 536 if ( true /*splitterSize.count() == 0*/ ) {
537 splitterSize.append( wid / 2 ); 537 splitterSize.append( wid / 2 );
538 splitterSize.append( wid / 2 ); 538 splitterSize.append( wid / 2 );
539 } 539 }
540 mMiniSplitter->setSizes( splitterSize ); 540 mMiniSplitter->setSizes( splitterSize );
541 if ( mExtensionBarSplitter ) { 541 if ( mExtensionBarSplitter ) {
542 //splitterSize = KABPrefs::instance()->mExtensionsSplitter; 542 //splitterSize = KABPrefs::instance()->mExtensionsSplitter;
543 if ( true /*splitterSize.count() == 0*/ ) { 543 if ( true /*splitterSize.count() == 0*/ ) {
544 splitterSize.append( wid / 2 ); 544 splitterSize.append( wid / 2 );
545 splitterSize.append( wid / 2 ); 545 splitterSize.append( wid / 2 );
546 } 546 }
547 mExtensionBarSplitter->setSizes( splitterSize ); 547 mExtensionBarSplitter->setSizes( splitterSize );
548 548
549 } 549 }
550 550
551 551
552} 552}
553 553
554void KABCore::saveSettings() 554void KABCore::saveSettings()
555{ 555{
556 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); 556 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked();
557 if ( mExtensionBarSplitter ) 557 if ( mExtensionBarSplitter )
558 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 558 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
559 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); 559 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked();
560 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); 560 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes();
561#ifndef KAB_EMBEDDED 561#ifndef KAB_EMBEDDED
562 562
563 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 563 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
564 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); 564 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes();
565#endif //KAB_EMBEDDED 565#endif //KAB_EMBEDDED
566 mExtensionManager->saveSettings(); 566 mExtensionManager->saveSettings();
567 mViewManager->saveSettings(); 567 mViewManager->saveSettings();
568 568
569 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); 569 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
570 KABPrefs::instance()->writeConfig(); 570 KABPrefs::instance()->writeConfig();
571 qDebug("KA: KABCore::saveSettings() "); 571 qDebug("KA: KABCore::saveSettings() ");
572} 572}
573 573
574KABC::AddressBook *KABCore::addressBook() const 574KABC::AddressBook *KABCore::addressBook() const
575{ 575{
576 return mAddressBook; 576 return mAddressBook;
577} 577}
578 578
579KConfig *KABCore::config() 579KConfig *KABCore::config()
580{ 580{
581#ifndef KAB_EMBEDDED 581#ifndef KAB_EMBEDDED
582 return KABPrefs::instance()->config(); 582 return KABPrefs::instance()->config();
583#else //KAB_EMBEDDED 583#else //KAB_EMBEDDED
584 return KABPrefs::instance()->getConfig(); 584 return KABPrefs::instance()->getConfig();
585#endif //KAB_EMBEDDED 585#endif //KAB_EMBEDDED
586} 586}
587 587
588KActionCollection *KABCore::actionCollection() const 588KActionCollection *KABCore::actionCollection() const
589{ 589{
590 return mGUIClient->actionCollection(); 590 return mGUIClient->actionCollection();
591} 591}
592 592
593KABC::Field *KABCore::currentSearchField() const 593KABC::Field *KABCore::currentSearchField() const
594{ 594{
595 if (mIncSearchWidget) 595 if (mIncSearchWidget)
596 return mIncSearchWidget->currentField(); 596 return mIncSearchWidget->currentField();
597 else 597 else
598 return 0; 598 return 0;
599} 599}
600 600
601QStringList KABCore::selectedUIDs() const 601QStringList KABCore::selectedUIDs() const
602{ 602{
603 return mViewManager->selectedUids(); 603 return mViewManager->selectedUids();
604} 604}
605 605
606KABC::Resource *KABCore::requestResource( QWidget *parent ) 606KABC::Resource *KABCore::requestResource( QWidget *parent )
607{ 607{
608 QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); 608 QPtrList<KABC::Resource> kabcResources = addressBook()->resources();
609 609
610 QPtrList<KRES::Resource> kresResources; 610 QPtrList<KRES::Resource> kresResources;
611 QPtrListIterator<KABC::Resource> resIt( kabcResources ); 611 QPtrListIterator<KABC::Resource> resIt( kabcResources );
612 KABC::Resource *resource; 612 KABC::Resource *resource;
613 while ( ( resource = resIt.current() ) != 0 ) { 613 while ( ( resource = resIt.current() ) != 0 ) {
614 ++resIt; 614 ++resIt;
615 if ( !resource->readOnly() ) { 615 if ( !resource->readOnly() ) {
616 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 616 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
617 if ( res ) 617 if ( res )
618 kresResources.append( res ); 618 kresResources.append( res );
619 } 619 }
620 } 620 }
621 621
622 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent ); 622 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent );
623 return static_cast<KABC::Resource*>( res ); 623 return static_cast<KABC::Resource*>( res );
624} 624}
625 625
626#ifndef KAB_EMBEDDED 626#ifndef KAB_EMBEDDED
627KAboutData *KABCore::createAboutData() 627KAboutData *KABCore::createAboutData()
628#else //KAB_EMBEDDED 628#else //KAB_EMBEDDED
629void KABCore::createAboutData() 629void KABCore::createAboutData()
630#endif //KAB_EMBEDDED 630#endif //KAB_EMBEDDED
631{ 631{
632#ifndef KAB_EMBEDDED 632#ifndef KAB_EMBEDDED
633 KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ), 633 KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ),
634 "3.1", I18N_NOOP( "The KDE Address Book" ), 634 "3.1", I18N_NOOP( "The KDE Address Book" ),
635 KAboutData::License_GPL_V2, 635 KAboutData::License_GPL_V2,
636 I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) ); 636 I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) );
637 about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" ); 637 about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" );
638 about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) ); 638 about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) );
639 about->addAuthor( "Cornelius Schumacher", 639 about->addAuthor( "Cornelius Schumacher",
640 I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ), 640 I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ),
641 "schumacher@kde.org" ); 641 "schumacher@kde.org" );
642 about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ), 642 about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ),
643 "mpilone@slac.com" ); 643 "mpilone@slac.com" );
644 about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) ); 644 about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) );
645 about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) ); 645 about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) );
646 about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ), 646 about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ),
647 "michel@klaralvdalens-datakonsult.se" ); 647 "michel@klaralvdalens-datakonsult.se" );
648 about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ), 648 about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ),
649 "hansen@kde.org" ); 649 "hansen@kde.org" );
650 650
651 return about; 651 return about;
652#endif //KAB_EMBEDDED 652#endif //KAB_EMBEDDED
653 653
654 QString version; 654 QString version;
655#include <../version> 655#include <../version>
656 QMessageBox::about( this, "About KAddressbook/Pi", 656 QMessageBox::about( this, "About KAddressbook/Pi",
657 "KAddressbook/Platform-independent\n" 657 "KAddressbook/Platform-independent\n"
658 "(KA/Pi) " +version + " - " + 658 "(KA/Pi) " +version + " - " +
659#ifdef DESKTOP_VERSION 659#ifdef DESKTOP_VERSION
660 "Desktop Edition\n" 660 "Desktop Edition\n"
661#else 661#else
662 "PDA-Edition\n" 662 "PDA-Edition\n"
663 "for: Zaurus 5500 / 7x0 / 8x0\n" 663 "for: Zaurus 5500 / 7x0 / 8x0\n"
664#endif 664#endif
665 665
666 "(c) 2004 Ulf Schenk\n" 666 "(c) 2004 Ulf Schenk\n"
667 "(c) 2004 Lutz Rogowski\n" 667 "(c) 2004 Lutz Rogowski\n"
668 "(c) 1997-2003, The KDE PIM Team\n" 668 "(c) 1997-2003, The KDE PIM Team\n"
669 "Tobias Koenig Current maintainer\ntokoe@kde.org\n" 669 "Tobias Koenig Current maintainer\ntokoe@kde.org\n"
670 "Don Sanders Original author\n" 670 "Don Sanders Original author\n"
671 "Cornelius Schumacher Co-maintainer\nschumacher@kde.org\n" 671 "Cornelius Schumacher Co-maintainer\nschumacher@kde.org\n"
672 "Mike Pilone GUI and framework redesign\nmpilone@slac.com\n" 672 "Mike Pilone GUI and framework redesign\nmpilone@slac.com\n"
673 "Greg Stern DCOP interface\n" 673 "Greg Stern DCOP interface\n"
674 "Mark Westcot Contact pinning\n" 674 "Mark Westcot Contact pinning\n"
675 "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n" 675 "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n"
676 "Steffen Hansen LDAP Lookup\nhansen@kde.org\n" 676 "Steffen Hansen LDAP Lookup\nhansen@kde.org\n"
677#ifdef _WIN32_ 677#ifdef _WIN32_
678 "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n" 678 "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n"
679#endif 679#endif
680 ); 680 );
681} 681}
682 682
683void KABCore::setContactSelected( const QString &uid ) 683void KABCore::setContactSelected( const QString &uid )
684{ 684{
685 KABC::Addressee addr = mAddressBook->findByUid( uid ); 685 KABC::Addressee addr = mAddressBook->findByUid( uid );
686 if ( !mDetails->isHidden() ) 686 if ( !mDetails->isHidden() )
687 mDetails->setAddressee( addr ); 687 mDetails->setAddressee( addr );
688 688
689 if ( !addr.isEmpty() ) { 689 if ( !addr.isEmpty() ) {
690 emit contactSelected( addr.formattedName() ); 690 emit contactSelected( addr.formattedName() );
691 KABC::Picture pic = addr.photo(); 691 KABC::Picture pic = addr.photo();
692 if ( pic.isIntern() ) { 692 if ( pic.isIntern() ) {
693//US emit contactSelected( pic.data() ); 693//US emit contactSelected( pic.data() );
694//US instead use: 694//US instead use:
695 QPixmap px; 695 QPixmap px;
696 if (pic.data().isNull() != true) 696 if (pic.data().isNull() != true)
697 { 697 {
698 px.convertFromImage(pic.data()); 698 px.convertFromImage(pic.data());
699 } 699 }
700 700
701 emit contactSelected( px ); 701 emit contactSelected( px );
702 } 702 }
703 } 703 }
704 704
705 705
706 mExtensionManager->setSelectionChanged(); 706 mExtensionManager->setSelectionChanged();
707 707
708 // update the actions 708 // update the actions
709 bool selected = !uid.isEmpty(); 709 bool selected = !uid.isEmpty();
710 710
711 if ( mReadWrite ) { 711 if ( mReadWrite ) {
712 mActionCut->setEnabled( selected ); 712 mActionCut->setEnabled( selected );
713 mActionPaste->setEnabled( selected ); 713 mActionPaste->setEnabled( selected );
714 } 714 }
715 715
716 mActionCopy->setEnabled( selected ); 716 mActionCopy->setEnabled( selected );
717 mActionDelete->setEnabled( selected ); 717 mActionDelete->setEnabled( selected );
718 mActionEditAddressee->setEnabled( selected ); 718 mActionEditAddressee->setEnabled( selected );
719 mActionMail->setEnabled( selected ); 719 mActionMail->setEnabled( selected );
720 mActionMailVCard->setEnabled( selected ); 720 mActionMailVCard->setEnabled( selected );
721 //if (mActionBeam) 721 //if (mActionBeam)
722 //mActionBeam->setEnabled( selected ); 722 //mActionBeam->setEnabled( selected );
723 mActionWhoAmI->setEnabled( selected ); 723 mActionWhoAmI->setEnabled( selected );
724} 724}
725 725
726void KABCore::sendMail() 726void KABCore::sendMail()
727{ 727{
728 sendMail( mViewManager->selectedEmails().join( ", " ) ); 728 sendMail( mViewManager->selectedEmails().join( ", " ) );
729} 729}
730 730
731void KABCore::sendMail( const QString& emaillist ) 731void KABCore::sendMail( const QString& emaillist )
732{ 732{
733 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " 733 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... "
734 if (emaillist.contains(",") > 0) 734 if (emaillist.contains(",") > 0)
735 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); 735 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null );
736 else 736 else
737 ExternalAppHandler::instance()->mailToOneContact( emaillist ); 737 ExternalAppHandler::instance()->mailToOneContact( emaillist );
738} 738}
739 739
740 740
741 741
742void KABCore::mailVCard() 742void KABCore::mailVCard()
743{ 743{
744 QStringList uids = mViewManager->selectedUids(); 744 QStringList uids = mViewManager->selectedUids();
745 if ( !uids.isEmpty() ) 745 if ( !uids.isEmpty() )
746 mailVCard( uids ); 746 mailVCard( uids );
747} 747}
748 748
749void KABCore::mailVCard( const QStringList& uids ) 749void KABCore::mailVCard( const QStringList& uids )
750{ 750{
751 QStringList urls; 751 QStringList urls;
752 752
753// QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); 753// QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
754 754
755 QString dirName = "/tmp/" + KApplication::randomString( 8 ); 755 QString dirName = "/tmp/" + KApplication::randomString( 8 );
756 756
757 757
758 758
759 QDir().mkdir( dirName, true ); 759 QDir().mkdir( dirName, true );
760 760
761 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 761 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
762 KABC::Addressee a = mAddressBook->findByUid( *it ); 762 KABC::Addressee a = mAddressBook->findByUid( *it );
763 763
764 if ( a.isEmpty() ) 764 if ( a.isEmpty() )
765 continue; 765 continue;
766 766
767 QString name = a.givenName() + "_" + a.familyName() + ".vcf"; 767 QString name = a.givenName() + "_" + a.familyName() + ".vcf";
768 768
769 QString fileName = dirName + "/" + name; 769 QString fileName = dirName + "/" + name;
770 770
771 QFile outFile(fileName); 771 QFile outFile(fileName);
772 772
773 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully 773 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
774 KABC::VCardConverter converter; 774 KABC::VCardConverter converter;
775 QString vcard; 775 QString vcard;
776 776
777 converter.addresseeToVCard( a, vcard ); 777 converter.addresseeToVCard( a, vcard );
778 778
779 QTextStream t( &outFile ); // use a text stream 779 QTextStream t( &outFile ); // use a text stream
780 t.setEncoding( QTextStream::UnicodeUTF8 ); 780 t.setEncoding( QTextStream::UnicodeUTF8 );
781 t << vcard; 781 t << vcard;
782 782
783 outFile.close(); 783 outFile.close();
784 784
785 urls.append( fileName ); 785 urls.append( fileName );
786 } 786 }
787 } 787 }
788 788
789 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") ); 789 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") );
790 790
791 791
792/*US 792/*US
793 kapp->invokeMailer( QString::null, QString::null, QString::null, 793 kapp->invokeMailer( QString::null, QString::null, QString::null,
794 QString::null, // subject 794 QString::null, // subject
795 QString::null, // body 795 QString::null, // body
796 QString::null, 796 QString::null,
797 urls ); // attachments 797 urls ); // attachments
798*/ 798*/
799 799
800} 800}
801 801
802/** 802/**
803 Beams the "WhoAmI contact. 803 Beams the "WhoAmI contact.
804*/ 804*/
805void KABCore::beamMySelf() 805void KABCore::beamMySelf()
806{ 806{
807 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); 807 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI();
808 if (!a.isEmpty()) 808 if (!a.isEmpty())
809 { 809 {
810 QStringList uids; 810 QStringList uids;
811 uids << a.uid(); 811 uids << a.uid();
812 812
813 beamVCard(uids); 813 beamVCard(uids);
814 } else { 814 } else {
815 KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); 815 KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) );
816 816
817 817
818 } 818 }
819} 819}
820void KABCore::updateMainWindow() 820void KABCore::updateMainWindow()
821{ 821{
822 822
823 mMainWindow->showMaximized(); 823 mMainWindow->showMaximized();
824 mMainWindow->update(); 824 mMainWindow->update();
825} 825}
826void KABCore::resizeEvent(QResizeEvent* e ) 826void KABCore::resizeEvent(QResizeEvent* e )
827{ 827{
828 if ( !mMiniSplitter ) 828 if ( !mMiniSplitter )
829 return; 829 return;
830 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); 830 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) ");
831 if ( QApplication::desktop()->width() >= 480 ) { 831 if ( QApplication::desktop()->width() >= 480 ) {
832 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 832 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480
833 if ( mMiniSplitter->orientation() == Qt::Vertical ) { 833 if ( mMiniSplitter->orientation() == Qt::Vertical ) {
834 mMiniSplitter->setOrientation( Qt::Horizontal); 834 mMiniSplitter->setOrientation( Qt::Horizontal);
835 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 835 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
836 if ( QApplication::desktop()->width() <= 640 ) { 836 if ( QApplication::desktop()->width() <= 640 ) {
837 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 837 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
838 mViewManager->getFilterAction()->setComboWidth( 150 ); 838 mViewManager->getFilterAction()->setComboWidth( 150 );
839 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 839 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
840 } 840 }
841 } 841 }
842 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 842 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640
843 if ( mMiniSplitter->orientation() == Qt::Horizontal ) { 843 if ( mMiniSplitter->orientation() == Qt::Horizontal ) {
844 mMiniSplitter->setOrientation( Qt::Vertical ); 844 mMiniSplitter->setOrientation( Qt::Vertical );
845 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 845 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
846 if ( QApplication::desktop()->width() <= 640 ) { 846 if ( QApplication::desktop()->width() <= 640 ) {
847 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 847 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
848 mMainWindow->showMinimized(); 848 mMainWindow->showMinimized();
849 mViewManager->getFilterAction()->setComboWidth( 0 ); 849 mViewManager->getFilterAction()->setComboWidth( 0 );
850 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 850 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
851 } 851 }
852 } 852 }
853 } 853 }
854 } 854 }
855 855
856} 856}
857void KABCore::export2phone() 857void KABCore::export2phone()
858{ 858{
859 859
860 QStringList uids; 860 QStringList uids;
861 XXPortSelectDialog dlg( this, false, this ); 861 XXPortSelectDialog dlg( this, false, this );
862 if ( dlg.exec() ) 862 if ( dlg.exec() )
863 uids = dlg.uids(); 863 uids = dlg.uids();
864 else 864 else
865 return; 865 return;
866 if ( uids.isEmpty() ) 866 if ( uids.isEmpty() )
867 return; 867 return;
868 // qDebug("count %d ", uids.count()); 868 // qDebug("count %d ", uids.count());
869 869
870 KAex2phonePrefs ex2phone; 870 KAex2phonePrefs ex2phone;
871 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 871 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
872 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 872 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
873 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 873 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
874 874
875 if ( !ex2phone.exec() ) { 875 if ( !ex2phone.exec() ) {
876 return; 876 return;
877 } 877 }
878 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 878 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
879 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 879 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
880 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 880 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
881 881
882 882
883 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 883 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
884 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 884 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
885 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 885 KPimGlobalPrefs::instance()->mEx2PhoneModel );
886 886
887 QString fileName = getPhoneFile(); 887 QString fileName = getPhoneFile();
888 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) 888 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) )
889 return; 889 return;
890 890
891 message(i18n("Exporting to phone...")); 891 message(i18n("Exporting to phone..."));
892 QTimer::singleShot( 1, this , SLOT ( writeToPhone())); 892 QTimer::singleShot( 1, this , SLOT ( writeToPhone()));
893 893
894} 894}
895QString KABCore::getPhoneFile() 895QString KABCore::getPhoneFile()
896{ 896{
897#ifdef DESKTOP_VERSION 897#ifdef DESKTOP_VERSION
898 return locateLocal("tmp", "phonefile.vcf"); 898 return locateLocal("tmp", "phonefile.vcf");
899#else 899#else
900 return "/tmp/phonefile.vcf"; 900 return "/tmp/phonefile.vcf";
901#endif 901#endif
902 902
903} 903}
904void KABCore::writeToPhone( ) 904void KABCore::writeToPhone( )
905{ 905{
906 if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) 906 if ( PhoneAccess::writeToPhone( getPhoneFile() ) )
907 message(i18n("Export to phone finished!")); 907 message(i18n("Export to phone finished!"));
908 else 908 else
909 qDebug(i18n("KA: Error exporting to phone")); 909 qDebug(i18n("KA: Error exporting to phone"));
910} 910}
911void KABCore::beamVCard() 911void KABCore::beamVCard()
912{ 912{
913 QStringList uids; 913 QStringList uids;
914 XXPortSelectDialog dlg( this, false, this ); 914 XXPortSelectDialog dlg( this, false, this );
915 if ( dlg.exec() ) 915 if ( dlg.exec() )
916 uids = dlg.uids(); 916 uids = dlg.uids();
917 else 917 else
918 return; 918 return;
919 if ( uids.isEmpty() ) 919 if ( uids.isEmpty() )
920 return; 920 return;
921 beamVCard( uids ); 921 beamVCard( uids );
922} 922}
923 923
924 924
925void KABCore::beamVCard(const QStringList& uids) 925void KABCore::beamVCard(const QStringList& uids)
926{ 926{
927 927
928 // LR: we should use the /tmp dir on the Zaurus, 928 // LR: we should use the /tmp dir on the Zaurus,
929 // because: /tmp = RAM, (HOME)/kdepim = flash memory 929 // because: /tmp = RAM, (HOME)/kdepim = flash memory
930 930
931#ifdef DESKTOP_VERSION 931#ifdef DESKTOP_VERSION
932 QString fileName = locateLocal("tmp", "kapibeamfile.vcf"); 932 QString fileName = locateLocal("tmp", "kapibeamfile.vcf");
933#else 933#else
934 QString fileName = "/tmp/kapibeamfile.vcf"; 934 QString fileName = "/tmp/kapibeamfile.vcf";
935#endif 935#endif
936 936
937 KABC::VCardConverter converter; 937 KABC::VCardConverter converter;
938 QString description; 938 QString description;
939 QString datastream; 939 QString datastream;
940 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 940 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
941 KABC::Addressee a = mAddressBook->findByUid( *it ); 941 KABC::Addressee a = mAddressBook->findByUid( *it );
942 942
943 if ( a.isEmpty() ) 943 if ( a.isEmpty() )
944 continue; 944 continue;
945 945
946 if (description.isEmpty()) 946 if (description.isEmpty())
947 description = a.formattedName(); 947 description = a.formattedName();
948 948
949 QString vcard; 949 QString vcard;
950 converter.addresseeToVCard( a, vcard ); 950 converter.addresseeToVCard( a, vcard );
951 int start = 0; 951 int start = 0;
952 int next; 952 int next;
953 while ( (next = vcard.find("TYPE=", start) )>= 0 ) { 953 while ( (next = vcard.find("TYPE=", start) )>= 0 ) {
954 int semi = vcard.find(";", next); 954 int semi = vcard.find(";", next);
955 int dopp = vcard.find(":", next); 955 int dopp = vcard.find(":", next);
956 int sep; 956 int sep;
957 if ( semi < dopp && semi >= 0 ) 957 if ( semi < dopp && semi >= 0 )
958 sep = semi ; 958 sep = semi ;
959 else 959 else
960 sep = dopp; 960 sep = dopp;
961 datastream +=vcard.mid( start, next - start); 961 datastream +=vcard.mid( start, next - start);
962 datastream +=vcard.mid( next+5,sep -next -5 ).upper(); 962 datastream +=vcard.mid( next+5,sep -next -5 ).upper();
963 start = sep; 963 start = sep;
964 } 964 }
965 datastream += vcard.mid( start,vcard.length() ); 965 datastream += vcard.mid( start,vcard.length() );
966 } 966 }
967#ifndef DESKTOP_VERSION 967#ifndef DESKTOP_VERSION
968 QFile outFile(fileName); 968 QFile outFile(fileName);
969 if ( outFile.open(IO_WriteOnly) ) { 969 if ( outFile.open(IO_WriteOnly) ) {
970 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 970 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
971 QTextStream t( &outFile ); // use a text stream 971 QTextStream t( &outFile ); // use a text stream
972 //t.setEncoding( QTextStream::UnicodeUTF8 ); 972 //t.setEncoding( QTextStream::UnicodeUTF8 );
973 t.setEncoding( QTextStream::Latin1 ); 973 t.setEncoding( QTextStream::Latin1 );
974 t <<datastream.latin1(); 974 t <<datastream.latin1();
975 outFile.close(); 975 outFile.close();
976 Ir *ir = new Ir( this ); 976 Ir *ir = new Ir( this );
977 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 977 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
978 ir->send( fileName, description, "text/x-vCard" ); 978 ir->send( fileName, description, "text/x-vCard" );
979 } else { 979 } else {
980 qDebug("KA: Error open temp beam file "); 980 qDebug("KA: Error open temp beam file ");
981 return; 981 return;
982 } 982 }
983#endif 983#endif
984 984
985} 985}
986 986
987void KABCore::beamDone( Ir *ir ) 987void KABCore::beamDone( Ir *ir )
988{ 988{
989#ifndef DESKTOP_VERSION 989#ifndef DESKTOP_VERSION
990 delete ir; 990 delete ir;
991#endif 991#endif
992 topLevelWidget()->raise(); 992 topLevelWidget()->raise();
993 message( i18n("Beaming finished!") ); 993 message( i18n("Beaming finished!") );
994} 994}
995 995
996 996
997void KABCore::browse( const QString& url ) 997void KABCore::browse( const QString& url )
998{ 998{
999#ifndef KAB_EMBEDDED 999#ifndef KAB_EMBEDDED
1000 kapp->invokeBrowser( url ); 1000 kapp->invokeBrowser( url );
1001#else //KAB_EMBEDDED 1001#else //KAB_EMBEDDED
1002 qDebug("KABCore::browse must be fixed"); 1002 qDebug("KABCore::browse must be fixed");
1003#endif //KAB_EMBEDDED 1003#endif //KAB_EMBEDDED
1004} 1004}
1005 1005
1006void KABCore::selectAllContacts() 1006void KABCore::selectAllContacts()
1007{ 1007{
1008 mViewManager->setSelected( QString::null, true ); 1008 mViewManager->setSelected( QString::null, true );
1009} 1009}
1010 1010
1011void KABCore::deleteContacts() 1011void KABCore::deleteContacts()
1012{ 1012{
1013 QStringList uidList = mViewManager->selectedUids(); 1013 QStringList uidList = mViewManager->selectedUids();
1014 deleteContacts( uidList ); 1014 deleteContacts( uidList );
1015} 1015}
1016 1016
1017void KABCore::deleteContacts( const QStringList &uids ) 1017void KABCore::deleteContacts( const QStringList &uids )
1018{ 1018{
1019 if ( uids.count() > 0 ) { 1019 if ( uids.count() > 0 ) {
1020 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); 1020 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids );
1021 UndoStack::instance()->push( command ); 1021 UndoStack::instance()->push( command );
1022 RedoStack::instance()->clear(); 1022 RedoStack::instance()->clear();
1023 1023
1024 // now if we deleted anything, refresh 1024 // now if we deleted anything, refresh
1025 setContactSelected( QString::null ); 1025 setContactSelected( QString::null );
1026 setModified( true ); 1026 setModified( true );
1027 } 1027 }
1028} 1028}
1029 1029
1030void KABCore::copyContacts() 1030void KABCore::copyContacts()
1031{ 1031{
1032 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1032 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1033 1033
1034 QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); 1034 QString clipText = AddresseeUtil::addresseesToClipboard( addrList );
1035 1035
1036 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; 1036 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl;
1037 1037
1038 QClipboard *cb = QApplication::clipboard(); 1038 QClipboard *cb = QApplication::clipboard();
1039 cb->setText( clipText ); 1039 cb->setText( clipText );
1040} 1040}
1041 1041
1042void KABCore::cutContacts() 1042void KABCore::cutContacts()
1043{ 1043{
1044 QStringList uidList = mViewManager->selectedUids(); 1044 QStringList uidList = mViewManager->selectedUids();
1045 1045
1046//US if ( uidList.size() > 0 ) { 1046//US if ( uidList.size() > 0 ) {
1047 if ( uidList.count() > 0 ) { 1047 if ( uidList.count() > 0 ) {
1048 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList ); 1048 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList );
1049 UndoStack::instance()->push( command ); 1049 UndoStack::instance()->push( command );
1050 RedoStack::instance()->clear(); 1050 RedoStack::instance()->clear();
1051 1051
1052 setModified( true ); 1052 setModified( true );
1053 } 1053 }
1054} 1054}
1055 1055
1056void KABCore::pasteContacts() 1056void KABCore::pasteContacts()
1057{ 1057{
1058 QClipboard *cb = QApplication::clipboard(); 1058 QClipboard *cb = QApplication::clipboard();
1059 1059
1060 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); 1060 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() );
1061 1061
1062 pasteContacts( list ); 1062 pasteContacts( list );
1063} 1063}
1064 1064
1065void KABCore::pasteContacts( KABC::Addressee::List &list ) 1065void KABCore::pasteContacts( KABC::Addressee::List &list )
1066{ 1066{
1067 KABC::Resource *resource = requestResource( this ); 1067 KABC::Resource *resource = requestResource( this );
1068 KABC::Addressee::List::Iterator it; 1068 KABC::Addressee::List::Iterator it;
1069 for ( it = list.begin(); it != list.end(); ++it ) 1069 for ( it = list.begin(); it != list.end(); ++it )
1070 (*it).setResource( resource ); 1070 (*it).setResource( resource );
1071 1071
1072 PwPasteCommand *command = new PwPasteCommand( this, list ); 1072 PwPasteCommand *command = new PwPasteCommand( this, list );
1073 UndoStack::instance()->push( command ); 1073 UndoStack::instance()->push( command );
1074 RedoStack::instance()->clear(); 1074 RedoStack::instance()->clear();
1075 1075
1076 setModified( true ); 1076 setModified( true );
1077} 1077}
1078 1078
1079void KABCore::setWhoAmI() 1079void KABCore::setWhoAmI()
1080{ 1080{
1081 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1081 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1082 1082
1083 if ( addrList.count() > 1 ) { 1083 if ( addrList.count() > 1 ) {
1084 KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); 1084 KMessageBox::sorry( this, i18n( "Please select only one contact." ) );
1085 return; 1085 return;
1086 } 1086 }
1087 1087
1088 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); 1088 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
1089 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) 1089 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes )
1090 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); 1090 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] );
1091} 1091}
1092void KABCore::editCategories() 1092void KABCore::editCategories()
1093{ 1093{
1094 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true ); 1094 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true );
1095 dlg.exec(); 1095 dlg.exec();
1096} 1096}
1097void KABCore::setCategories() 1097void KABCore::setCategories()
1098{ 1098{
1099 1099
1100 QStringList uids; 1100 QStringList uids;
1101 XXPortSelectDialog dlgx( this, false, this ); 1101 XXPortSelectDialog dlgx( this, false, this );
1102 if ( dlgx.exec() ) 1102 if ( dlgx.exec() )
1103 uids = dlgx.uids(); 1103 uids = dlgx.uids();
1104 else 1104 else
1105 return; 1105 return;
1106 if ( uids.isEmpty() ) 1106 if ( uids.isEmpty() )
1107 return; 1107 return;
1108 // qDebug("count %d ", uids.count()); 1108 // qDebug("count %d ", uids.count());
1109 1109
1110 1110
1111 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); 1111 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true );
1112 if ( !dlg.exec() ) { 1112 if ( !dlg.exec() ) {
1113 message( i18n("Setting categories cancelled") ); 1113 message( i18n("Setting categories cancelled") );
1114 return; 1114 return;
1115 } 1115 }
1116 bool merge = false; 1116 bool merge = false;
1117 QString msg = i18n( "Merge with existing categories?" ); 1117 QString msg = i18n( "Merge with existing categories?" );
1118 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) 1118 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes )
1119 merge = true; 1119 merge = true;
1120 1120
1121 message( i18n("Setting categories ... please wait!") ); 1121 message( i18n("Setting categories ... please wait!") );
1122 QStringList categories = dlg.selectedCategories(); 1122 QStringList categories = dlg.selectedCategories();
1123 1123
1124 //QStringList uids = mViewManager->selectedUids(); 1124 //QStringList uids = mViewManager->selectedUids();
1125 QStringList::Iterator it; 1125 QStringList::Iterator it;
1126 for ( it = uids.begin(); it != uids.end(); ++it ) { 1126 for ( it = uids.begin(); it != uids.end(); ++it ) {
1127 KABC::Addressee addr = mAddressBook->findByUid( *it ); 1127 KABC::Addressee addr = mAddressBook->findByUid( *it );
1128 if ( !addr.isEmpty() ) { 1128 if ( !addr.isEmpty() ) {
1129 if ( !merge ) 1129 if ( !merge )
1130 addr.setCategories( categories ); 1130 addr.setCategories( categories );
1131 else { 1131 else {
1132 QStringList addrCategories = addr.categories(); 1132 QStringList addrCategories = addr.categories();
1133 QStringList::Iterator catIt; 1133 QStringList::Iterator catIt;
1134 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { 1134 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
1135 if ( !addrCategories.contains( *catIt ) ) 1135 if ( !addrCategories.contains( *catIt ) )
1136 addrCategories.append( *catIt ); 1136 addrCategories.append( *catIt );
1137 } 1137 }
1138 addr.setCategories( addrCategories ); 1138 addr.setCategories( addrCategories );
1139 } 1139 }
1140 mAddressBook->insertAddressee( addr ); 1140 mAddressBook->insertAddressee( addr );
1141 } 1141 }
1142 } 1142 }
1143 1143
1144 if ( uids.count() > 0 ) 1144 if ( uids.count() > 0 )
1145 setModified( true ); 1145 setModified( true );
1146 message( i18n("Setting categories completed!") ); 1146 message( i18n("Setting categories completed!") );
1147} 1147}
1148 1148
1149void KABCore::setSearchFields( const KABC::Field::List &fields ) 1149void KABCore::setSearchFields( const KABC::Field::List &fields )
1150{ 1150{
1151 mIncSearchWidget->setFields( fields ); 1151 mIncSearchWidget->setFields( fields );
1152} 1152}
1153 1153
1154void KABCore::incrementalSearch( const QString& text ) 1154void KABCore::incrementalSearch( const QString& text )
1155{ 1155{
1156 mViewManager->doSearch( text, mIncSearchWidget->currentField() ); 1156 mViewManager->doSearch( text, mIncSearchWidget->currentField() );
1157} 1157}
1158 1158
1159void KABCore::setModified() 1159void KABCore::setModified()
1160{ 1160{
1161 setModified( true ); 1161 setModified( true );
1162} 1162}
1163 1163
1164void KABCore::setModifiedWOrefresh() 1164void KABCore::setModifiedWOrefresh()
1165{ 1165{
1166 // qDebug("KABCore::setModifiedWOrefresh() "); 1166 // qDebug("KABCore::setModifiedWOrefresh() ");
1167 mModified = true; 1167 mModified = true;
1168 mActionSave->setEnabled( mModified ); 1168 mActionSave->setEnabled( mModified );
1169 1169
1170 1170
1171} 1171}
1172void KABCore::setModified( bool modified ) 1172void KABCore::setModified( bool modified )
1173{ 1173{
1174 mModified = modified; 1174 mModified = modified;
1175 mActionSave->setEnabled( mModified ); 1175 mActionSave->setEnabled( mModified );
1176 1176
1177 if ( modified ) 1177 if ( modified )
1178 mJumpButtonBar->recreateButtons(); 1178 mJumpButtonBar->recreateButtons();
1179 1179
1180 mViewManager->refreshView(); 1180 mViewManager->refreshView();
1181 1181
1182} 1182}
1183 1183
1184bool KABCore::modified() const 1184bool KABCore::modified() const
1185{ 1185{
1186 return mModified; 1186 return mModified;
1187} 1187}
1188 1188
1189void KABCore::contactModified( const KABC::Addressee &addr ) 1189void KABCore::contactModified( const KABC::Addressee &addr )
1190{ 1190{
1191 addrModified( addr ); 1191 addrModified( addr );
1192#if 0 // debug only 1192#if 0 // debug only
1193 KABC::Addressee ad = addr; 1193 KABC::Addressee ad = addr;
1194 ad.computeCsum( "123"); 1194 ad.computeCsum( "123");
1195#endif 1195#endif
1196} 1196}
1197 1197
1198void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails ) 1198void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails )
1199{ 1199{
1200 1200
1201 Command *command = 0; 1201 Command *command = 0;
1202 QString uid; 1202 QString uid;
1203 1203
1204 // check if it exists already 1204 // check if it exists already
1205 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() ); 1205 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() );
1206 if ( origAddr.isEmpty() ) 1206 if ( origAddr.isEmpty() )
1207 command = new PwNewCommand( mAddressBook, addr ); 1207 command = new PwNewCommand( mAddressBook, addr );
1208 else { 1208 else {
1209 command = new PwEditCommand( mAddressBook, origAddr, addr ); 1209 command = new PwEditCommand( mAddressBook, origAddr, addr );
1210 uid = addr.uid(); 1210 uid = addr.uid();
1211 } 1211 }
1212 1212
1213 UndoStack::instance()->push( command ); 1213 UndoStack::instance()->push( command );
1214 RedoStack::instance()->clear(); 1214 RedoStack::instance()->clear();
1215 if ( updateDetails ) 1215 if ( updateDetails )
1216 mDetails->setAddressee( addr ); 1216 mDetails->setAddressee( addr );
1217 setModified( true ); 1217 setModified( true );
1218} 1218}
1219 1219
1220void KABCore::newContact() 1220void KABCore::newContact()
1221{ 1221{
1222 1222
1223 1223
1224 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); 1224 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources();
1225 1225
1226 QPtrList<KRES::Resource> kresResources; 1226 QPtrList<KRES::Resource> kresResources;
1227 QPtrListIterator<KABC::Resource> it( kabcResources ); 1227 QPtrListIterator<KABC::Resource> it( kabcResources );
1228 KABC::Resource *resource; 1228 KABC::Resource *resource;
1229 while ( ( resource = it.current() ) != 0 ) { 1229 while ( ( resource = it.current() ) != 0 ) {
1230 ++it; 1230 ++it;
1231 if ( !resource->readOnly() ) { 1231 if ( !resource->readOnly() ) {
1232 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 1232 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
1233 if ( res ) 1233 if ( res )
1234 kresResources.append( res ); 1234 kresResources.append( res );
1235 } 1235 }
1236 } 1236 }
1237 1237
1238 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this ); 1238 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this );
1239 resource = static_cast<KABC::Resource*>( res ); 1239 resource = static_cast<KABC::Resource*>( res );
1240 1240
1241 if ( resource ) { 1241 if ( resource ) {
1242 KABC::Addressee addr; 1242 KABC::Addressee addr;
1243 addr.setResource( resource ); 1243 addr.setResource( resource );
1244 mEditorDialog->setAddressee( addr ); 1244 mEditorDialog->setAddressee( addr );
1245 KApplication::execDialog ( mEditorDialog ); 1245 KApplication::execDialog ( mEditorDialog );
1246 1246
1247 } else 1247 } else
1248 return; 1248 return;
1249 1249
1250 // mEditorDict.insert( dialog->addressee().uid(), dialog ); 1250 // mEditorDict.insert( dialog->addressee().uid(), dialog );
1251 1251
1252 1252
1253} 1253}
1254 1254
1255void KABCore::addEmail( QString aStr ) 1255void KABCore::addEmail( QString aStr )
1256{ 1256{
1257#ifndef KAB_EMBEDDED 1257#ifndef KAB_EMBEDDED
1258 QString fullName, email; 1258 QString fullName, email;
1259 1259
1260 KABC::Addressee::parseEmailAddress( aStr, fullName, email ); 1260 KABC::Addressee::parseEmailAddress( aStr, fullName, email );
1261 1261
1262 // Try to lookup the addressee matching the email address 1262 // Try to lookup the addressee matching the email address
1263 bool found = false; 1263 bool found = false;
1264 QStringList emailList; 1264 QStringList emailList;
1265 KABC::AddressBook::Iterator it; 1265 KABC::AddressBook::Iterator it;
1266 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) { 1266 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) {
1267 emailList = (*it).emails(); 1267 emailList = (*it).emails();
1268 if ( emailList.contains( email ) > 0 ) { 1268 if ( emailList.contains( email ) > 0 ) {
1269 found = true; 1269 found = true;
1270 (*it).setNameFromString( fullName ); 1270 (*it).setNameFromString( fullName );
1271 editContact( (*it).uid() ); 1271 editContact( (*it).uid() );
1272 } 1272 }
1273 } 1273 }
1274 1274
1275 if ( !found ) { 1275 if ( !found ) {
1276 KABC::Addressee addr; 1276 KABC::Addressee addr;
1277 addr.setNameFromString( fullName ); 1277 addr.setNameFromString( fullName );
1278 addr.insertEmail( email, true ); 1278 addr.insertEmail( email, true );
1279 1279
1280 mAddressBook->insertAddressee( addr ); 1280 mAddressBook->insertAddressee( addr );
1281 mViewManager->refreshView( addr.uid() ); 1281 mViewManager->refreshView( addr.uid() );
1282 editContact( addr.uid() ); 1282 editContact( addr.uid() );
1283 } 1283 }
1284#else //KAB_EMBEDDED 1284#else //KAB_EMBEDDED
1285 qDebug("KABCore::addEmail finsih method"); 1285 qDebug("KABCore::addEmail finsih method");
1286#endif //KAB_EMBEDDED 1286#endif //KAB_EMBEDDED
1287} 1287}
1288 1288
1289void KABCore::importVCard( const KURL &url, bool showPreview ) 1289void KABCore::importVCard( const KURL &url, bool showPreview )
1290{ 1290{
1291 mXXPortManager->importVCard( url, showPreview ); 1291 mXXPortManager->importVCard( url, showPreview );
1292} 1292}
1293void KABCore::importFromOL() 1293void KABCore::importFromOL()
1294{ 1294{
1295#ifdef _OL_IMPORT_ 1295#ifdef _OL_IMPORT_
1296 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); 1296 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this );
1297 idgl->exec(); 1297 idgl->exec();
1298 KABC::Addressee::List list = idgl->getAddressList(); 1298 KABC::Addressee::List list = idgl->getAddressList();
1299 if ( list.count() > 0 ) { 1299 if ( list.count() > 0 ) {
1300 KABC::Addressee::List listNew; 1300 KABC::Addressee::List listNew;
1301 KABC::Addressee::List listExisting; 1301 KABC::Addressee::List listExisting;
1302 KABC::Addressee::List::Iterator it; 1302 KABC::Addressee::List::Iterator it;
1303 KABC::AddressBook::Iterator iter; 1303 KABC::AddressBook::Iterator iter;
1304 for ( it = list.begin(); it != list.end(); ++it ) { 1304 for ( it = list.begin(); it != list.end(); ++it ) {
1305 if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) 1305 if ( mAddressBook->findByUid((*it).uid() ).isEmpty())
1306 listNew.append( (*it) ); 1306 listNew.append( (*it) );
1307 else 1307 else
1308 listExisting.append( (*it) ); 1308 listExisting.append( (*it) );
1309 } 1309 }
1310 if ( listExisting.count() > 0 ) 1310 if ( listExisting.count() > 0 )
1311 KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() )); 1311 KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() ));
1312 if ( listNew.count() > 0 ) { 1312 if ( listNew.count() > 0 ) {
1313 pasteWithNewUid = false; 1313 pasteWithNewUid = false;
1314 pasteContacts( listNew ); 1314 pasteContacts( listNew );
1315 pasteWithNewUid = true; 1315 pasteWithNewUid = true;
1316 } 1316 }
1317 } 1317 }
1318 delete idgl; 1318 delete idgl;
1319#endif 1319#endif
1320} 1320}
1321 1321
1322void KABCore::importVCard( const QString &vCard, bool showPreview ) 1322void KABCore::importVCard( const QString &vCard, bool showPreview )
1323{ 1323{
1324 mXXPortManager->importVCard( vCard, showPreview ); 1324 mXXPortManager->importVCard( vCard, showPreview );
1325} 1325}
1326 1326
1327//US added a second method without defaultparameter 1327//US added a second method without defaultparameter
1328void KABCore::editContact2() { 1328void KABCore::editContact2() {
1329 editContact( QString::null ); 1329 editContact( QString::null );
1330} 1330}
1331 1331
1332void KABCore::editContact( const QString &uid ) 1332void KABCore::editContact( const QString &uid )
1333{ 1333{
1334 1334
1335 if ( mExtensionManager->isQuickEditVisible() ) 1335 if ( mExtensionManager->isQuickEditVisible() )
1336 return; 1336 return;
1337 1337
1338 // First, locate the contact entry 1338 // First, locate the contact entry
1339 QString localUID = uid; 1339 QString localUID = uid;
1340 if ( localUID.isNull() ) { 1340 if ( localUID.isNull() ) {
1341 QStringList uidList = mViewManager->selectedUids(); 1341 QStringList uidList = mViewManager->selectedUids();
1342 if ( uidList.count() > 0 ) 1342 if ( uidList.count() > 0 )
1343 localUID = *( uidList.at( 0 ) ); 1343 localUID = *( uidList.at( 0 ) );
1344 } 1344 }
1345 1345
1346 KABC::Addressee addr = mAddressBook->findByUid( localUID ); 1346 KABC::Addressee addr = mAddressBook->findByUid( localUID );
1347 if ( !addr.isEmpty() ) { 1347 if ( !addr.isEmpty() ) {
1348 mEditorDialog->setAddressee( addr ); 1348 mEditorDialog->setAddressee( addr );
1349 KApplication::execDialog ( mEditorDialog ); 1349 KApplication::execDialog ( mEditorDialog );
1350 } 1350 }
1351} 1351}
1352 1352
1353/** 1353/**
1354 Shows or edits the detail view for the given uid. If the uid is QString::null, 1354 Shows or edits the detail view for the given uid. If the uid is QString::null,
1355 the method will try to find a selected addressee in the view. 1355 the method will try to find a selected addressee in the view.
1356 */ 1356 */
1357void KABCore::executeContact( const QString &uid /*US = QString::null*/ ) 1357void KABCore::executeContact( const QString &uid /*US = QString::null*/ )
1358{ 1358{
1359 if ( mMultipleViewsAtOnce ) 1359 if ( mMultipleViewsAtOnce )
1360 { 1360 {
1361 editContact( uid ); 1361 editContact( uid );
1362 } 1362 }
1363 else 1363 else
1364 { 1364 {
1365 setDetailsVisible( true ); 1365 setDetailsVisible( true );
1366 mActionDetails->setChecked(true); 1366 mActionDetails->setChecked(true);
1367 } 1367 }
1368 1368
1369} 1369}
1370 1370
1371void KABCore::save() 1371void KABCore::save()
1372{ 1372{
1373 if (syncManager->blockSave()) 1373 if (syncManager->blockSave())
1374 return; 1374 return;
1375 if ( !mModified ) 1375 if ( !mModified )
1376 return; 1376 return;
1377 1377
1378 syncManager->setBlockSave(true); 1378 syncManager->setBlockSave(true);
1379 QString text = i18n( "There was an error while attempting to save\n the " 1379 QString text = i18n( "There was an error while attempting to save\n the "
1380 "address book. Please check that some \nother application is " 1380 "address book. Please check that some \nother application is "
1381 "not using it. " ); 1381 "not using it. " );
1382 message(i18n("Saving ... please wait! "), false); 1382 message(i18n("Saving ... please wait! "), false);
1383 //qApp->processEvents(); 1383 //qApp->processEvents();
1384#ifndef KAB_EMBEDDED 1384#ifndef KAB_EMBEDDED
1385 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); 1385 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook );
1386 if ( !b || !b->save() ) { 1386 if ( !b || !b->save() ) {
1387 KMessageBox::error( this, text, i18n( "Unable to Save" ) ); 1387 KMessageBox::error( this, text, i18n( "Unable to Save" ) );
1388 } 1388 }
1389#else //KAB_EMBEDDED 1389#else //KAB_EMBEDDED
1390 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); 1390 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook );
1391 if ( !b || !b->save() ) { 1391 if ( !b || !b->save() ) {
1392 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); 1392 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok"));
1393 } 1393 }
1394#endif //KAB_EMBEDDED 1394#endif //KAB_EMBEDDED
1395 1395
1396 message(i18n("Addressbook saved!")); 1396 message(i18n("Addressbook saved!"));
1397 setModified( false ); 1397 setModified( false );
1398 syncManager->setBlockSave(false); 1398 syncManager->setBlockSave(false);
1399} 1399}
1400 1400
1401 1401
1402void KABCore::undo() 1402void KABCore::undo()
1403{ 1403{
1404 UndoStack::instance()->undo(); 1404 UndoStack::instance()->undo();
1405 1405
1406 // Refresh the view 1406 // Refresh the view
1407 mViewManager->refreshView(); 1407 mViewManager->refreshView();
1408} 1408}
1409 1409
1410void KABCore::redo() 1410void KABCore::redo()
1411{ 1411{
1412 RedoStack::instance()->redo(); 1412 RedoStack::instance()->redo();
1413 1413
1414 // Refresh the view 1414 // Refresh the view
1415 mViewManager->refreshView(); 1415 mViewManager->refreshView();
1416} 1416}
1417void KABCore::setJumpButtonBar( bool visible ) 1417void KABCore::setJumpButtonBar( bool visible )
1418{ 1418{
1419 setJumpButtonBarVisible(visible ); 1419 setJumpButtonBarVisible(visible );
1420 saveSettings(); 1420 saveSettings();
1421} 1421}
1422void KABCore::setJumpButtonBarVisible( bool visible ) 1422void KABCore::setJumpButtonBarVisible( bool visible )
1423{ 1423{
1424 if (mMultipleViewsAtOnce) 1424 if (mMultipleViewsAtOnce)
1425 { 1425 {
1426 if ( visible ) 1426 if ( visible )
1427 mJumpButtonBar->show(); 1427 mJumpButtonBar->show();
1428 else 1428 else
1429 mJumpButtonBar->hide(); 1429 mJumpButtonBar->hide();
1430 } 1430 }
1431 else 1431 else
1432 { 1432 {
1433 // show the jumpbar only if "the details are hidden" == "viewmanager are shown" 1433 // show the jumpbar only if "the details are hidden" == "viewmanager are shown"
1434 if (mViewManager->isVisible()) 1434 if (mViewManager->isVisible())
1435 { 1435 {
1436 if ( visible ) 1436 if ( visible )
1437 mJumpButtonBar->show(); 1437 mJumpButtonBar->show();
1438 else 1438 else
1439 mJumpButtonBar->hide(); 1439 mJumpButtonBar->hide();
1440 } 1440 }
1441 else 1441 else
1442 { 1442 {
1443 mJumpButtonBar->hide(); 1443 mJumpButtonBar->hide();
1444 } 1444 }
1445 } 1445 }
1446} 1446}
1447 1447
1448 1448
1449void KABCore::setDetailsToState() 1449void KABCore::setDetailsToState()
1450{ 1450{
1451 setDetailsVisible( mActionDetails->isChecked() ); 1451 setDetailsVisible( mActionDetails->isChecked() );
1452} 1452}
1453void KABCore::setDetailsToggle() 1453void KABCore::setDetailsToggle()
1454{ 1454{
1455 mActionDetails->setChecked( !mActionDetails->isChecked() ); 1455 mActionDetails->setChecked( !mActionDetails->isChecked() );
1456 setDetailsToState(); 1456 setDetailsToState();
1457} 1457}
1458 1458
1459 1459
1460 1460
1461void KABCore::setDetailsVisible( bool visible ) 1461void KABCore::setDetailsVisible( bool visible )
1462{ 1462{
1463 if (visible && mDetails->isHidden()) 1463 if (visible && mDetails->isHidden())
1464 { 1464 {
1465 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1465 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1466 if ( addrList.count() > 0 ) 1466 if ( addrList.count() > 0 )
1467 mDetails->setAddressee( addrList[ 0 ] ); 1467 mDetails->setAddressee( addrList[ 0 ] );
1468 } 1468 }
1469 1469
1470 // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between 1470 // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between
1471 // the listview and the detailview. We do that by changing the splitbar size. 1471 // the listview and the detailview. We do that by changing the splitbar size.
1472 if (mMultipleViewsAtOnce) 1472 if (mMultipleViewsAtOnce)
1473 { 1473 {
1474 if ( visible ) 1474 if ( visible )
1475 mDetails->show(); 1475 mDetails->show();
1476 else 1476 else
1477 mDetails->hide(); 1477 mDetails->hide();
1478 } 1478 }
1479 else 1479 else
1480 { 1480 {
1481 if ( visible ) { 1481 if ( visible ) {
1482 mViewManager->hide(); 1482 mViewManager->hide();
1483 mDetails->show(); 1483 mDetails->show();
1484 mIncSearchWidget->setFocus(); 1484 mIncSearchWidget->setFocus();
1485 } 1485 }
1486 else { 1486 else {
1487 mViewManager->show(); 1487 mViewManager->show();
1488 mDetails->hide(); 1488 mDetails->hide();
1489 mViewManager->setFocusAV(); 1489 mViewManager->setFocusAV();
1490 } 1490 }
1491 setJumpButtonBarVisible( !visible ); 1491 setJumpButtonBarVisible( !visible );
1492 } 1492 }
1493 1493
1494} 1494}
1495 1495
1496void KABCore::extensionChanged( int id ) 1496void KABCore::extensionChanged( int id )
1497{ 1497{
1498 //change the details view only for non desktop systems 1498 //change the details view only for non desktop systems
1499#ifndef DESKTOP_VERSION 1499#ifndef DESKTOP_VERSION
1500 1500
1501 if (id == 0) 1501 if (id == 0)
1502 { 1502 {
1503 //the user disabled the extension. 1503 //the user disabled the extension.
1504 1504
1505 if (mMultipleViewsAtOnce) 1505 if (mMultipleViewsAtOnce)
1506 { // enable detailsview again 1506 { // enable detailsview again
1507 setDetailsVisible( true ); 1507 setDetailsVisible( true );
1508 mActionDetails->setChecked( true ); 1508 mActionDetails->setChecked( true );
1509 } 1509 }
1510 else 1510 else
1511 { //go back to the listview 1511 { //go back to the listview
1512 setDetailsVisible( false ); 1512 setDetailsVisible( false );
1513 mActionDetails->setChecked( false ); 1513 mActionDetails->setChecked( false );
1514 mActionDetails->setEnabled(true); 1514 mActionDetails->setEnabled(true);
1515 } 1515 }
1516 1516
1517 } 1517 }
1518 else 1518 else
1519 { 1519 {
1520 //the user enabled the extension. 1520 //the user enabled the extension.
1521 setDetailsVisible( false ); 1521 setDetailsVisible( false );
1522 mActionDetails->setChecked( false ); 1522 mActionDetails->setChecked( false );
1523 1523
1524 if (!mMultipleViewsAtOnce) 1524 if (!mMultipleViewsAtOnce)
1525 { 1525 {
1526 mActionDetails->setEnabled(false); 1526 mActionDetails->setEnabled(false);
1527 } 1527 }
1528 1528
1529 mExtensionManager->setSelectionChanged(); 1529 mExtensionManager->setSelectionChanged();
1530 1530
1531 } 1531 }
1532 1532
1533#endif// DESKTOP_VERSION 1533#endif// DESKTOP_VERSION
1534 1534
1535} 1535}
1536 1536
1537 1537
1538void KABCore::extensionModified( const KABC::Addressee::List &list ) 1538void KABCore::extensionModified( const KABC::Addressee::List &list )
1539{ 1539{
1540 1540
1541 if ( list.count() != 0 ) { 1541 if ( list.count() != 0 ) {
1542 KABC::Addressee::List::ConstIterator it; 1542 KABC::Addressee::List::ConstIterator it;
1543 for ( it = list.begin(); it != list.end(); ++it ) 1543 for ( it = list.begin(); it != list.end(); ++it )
1544 mAddressBook->insertAddressee( *it ); 1544 mAddressBook->insertAddressee( *it );
1545 if ( list.count() > 1 ) 1545 if ( list.count() > 1 )
1546 setModified(); 1546 setModified();
1547 else 1547 else
1548 setModifiedWOrefresh(); 1548 setModifiedWOrefresh();
1549 } 1549 }
1550 if ( list.count() == 0 ) 1550 if ( list.count() == 0 )
1551 mViewManager->refreshView(); 1551 mViewManager->refreshView();
1552 else 1552 else
1553 mViewManager->refreshView( list[ 0 ].uid() ); 1553 mViewManager->refreshView( list[ 0 ].uid() );
1554 1554
1555 1555
1556 1556
1557} 1557}
1558 1558
1559QString KABCore::getNameByPhone( const QString &phone ) 1559QString KABCore::getNameByPhone( const QString &phone )
1560{ 1560{
1561#ifndef KAB_EMBEDDED 1561#ifndef KAB_EMBEDDED
1562 QRegExp r( "[/*/-/ ]" ); 1562 QRegExp r( "[/*/-/ ]" );
1563 QString localPhone( phone ); 1563 QString localPhone( phone );
1564 1564
1565 bool found = false; 1565 bool found = false;
1566 QString ownerName = ""; 1566 QString ownerName = "";
1567 KABC::AddressBook::Iterator iter; 1567 KABC::AddressBook::Iterator iter;
1568 KABC::PhoneNumber::List::Iterator phoneIter; 1568 KABC::PhoneNumber::List::Iterator phoneIter;
1569 KABC::PhoneNumber::List phoneList; 1569 KABC::PhoneNumber::List phoneList;
1570 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { 1570 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) {
1571 phoneList = (*iter).phoneNumbers(); 1571 phoneList = (*iter).phoneNumbers();
1572 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); 1572 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() );
1573 ++phoneIter) { 1573 ++phoneIter) {
1574 // Get rid of separator chars so just the numbers are compared. 1574 // Get rid of separator chars so just the numbers are compared.
1575 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { 1575 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) {
1576 ownerName = (*iter).formattedName(); 1576 ownerName = (*iter).formattedName();
1577 found = true; 1577 found = true;
1578 } 1578 }
1579 } 1579 }
1580 } 1580 }
1581 1581
1582 return ownerName; 1582 return ownerName;
1583#else //KAB_EMBEDDED 1583#else //KAB_EMBEDDED
1584 qDebug("KABCore::getNameByPhone finsih method"); 1584 qDebug("KABCore::getNameByPhone finsih method");
1585 return ""; 1585 return "";
1586#endif //KAB_EMBEDDED 1586#endif //KAB_EMBEDDED
1587 1587
1588} 1588}
1589 1589
1590void KABCore::openConfigDialog() 1590void KABCore::openConfigDialog()
1591{ 1591{
1592 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true ); 1592 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true );
1593 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" ); 1593 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" );
1594 ConfigureDialog->addModule(kabcfg ); 1594 ConfigureDialog->addModule(kabcfg );
1595 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); 1595 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" );
1596 ConfigureDialog->addModule(kdelibcfg ); 1596 ConfigureDialog->addModule(kdelibcfg );
1597 1597
1598 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1598 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1599 this, SLOT( configurationChanged() ) ); 1599 this, SLOT( configurationChanged() ) );
1600 connect( ConfigureDialog, SIGNAL( okClicked() ), 1600 connect( ConfigureDialog, SIGNAL( okClicked() ),
1601 this, SLOT( configurationChanged() ) ); 1601 this, SLOT( configurationChanged() ) );
1602 saveSettings(); 1602 saveSettings();
1603#ifndef DESKTOP_VERSION 1603#ifndef DESKTOP_VERSION
1604 ConfigureDialog->showMaximized(); 1604 ConfigureDialog->showMaximized();
1605#endif 1605#endif
1606 if ( ConfigureDialog->exec() ) 1606 if ( ConfigureDialog->exec() )
1607 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); 1607 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") );
1608 delete ConfigureDialog; 1608 delete ConfigureDialog;
1609} 1609}
1610 1610
1611void KABCore::openLDAPDialog() 1611void KABCore::openLDAPDialog()
1612{ 1612{
1613#ifndef KAB_EMBEDDED 1613#ifndef KAB_EMBEDDED
1614 if ( !mLdapSearchDialog ) { 1614 if ( !mLdapSearchDialog ) {
1615 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); 1615 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this );
1616 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, 1616 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager,
1617 SLOT( refreshView() ) ); 1617 SLOT( refreshView() ) );
1618 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, 1618 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this,
1619 SLOT( setModified() ) ); 1619 SLOT( setModified() ) );
1620 } else 1620 } else
1621 mLdapSearchDialog->restoreSettings(); 1621 mLdapSearchDialog->restoreSettings();
1622 1622
1623 if ( mLdapSearchDialog->isOK() ) 1623 if ( mLdapSearchDialog->isOK() )
1624 mLdapSearchDialog->exec(); 1624 mLdapSearchDialog->exec();
1625#else //KAB_EMBEDDED 1625#else //KAB_EMBEDDED
1626 qDebug("KABCore::openLDAPDialog() finsih method"); 1626 qDebug("KABCore::openLDAPDialog() finsih method");
1627#endif //KAB_EMBEDDED 1627#endif //KAB_EMBEDDED
1628} 1628}
1629 1629
1630void KABCore::print() 1630void KABCore::print()
1631{ 1631{
1632#ifndef KAB_EMBEDDED 1632#ifndef KAB_EMBEDDED
1633 KPrinter printer; 1633 KPrinter printer;
1634 if ( !printer.setup( this ) ) 1634 if ( !printer.setup( this ) )
1635 return; 1635 return;
1636 1636
1637 KABPrinting::PrintingWizard wizard( &printer, mAddressBook, 1637 KABPrinting::PrintingWizard wizard( &printer, mAddressBook,
1638 mViewManager->selectedUids(), this ); 1638 mViewManager->selectedUids(), this );
1639 1639
1640 wizard.exec(); 1640 wizard.exec();
1641#else //KAB_EMBEDDED 1641#else //KAB_EMBEDDED
1642 qDebug("KABCore::print() finsih method"); 1642 qDebug("KABCore::print() finsih method");
1643#endif //KAB_EMBEDDED 1643#endif //KAB_EMBEDDED
1644 1644
1645} 1645}
1646 1646
1647 1647
1648void KABCore::addGUIClient( KXMLGUIClient *client ) 1648void KABCore::addGUIClient( KXMLGUIClient *client )
1649{ 1649{
1650 if ( mGUIClient ) 1650 if ( mGUIClient )
1651 mGUIClient->insertChildClient( client ); 1651 mGUIClient->insertChildClient( client );
1652 else 1652 else
1653 KMessageBox::error( this, "no KXMLGUICLient"); 1653 KMessageBox::error( this, "no KXMLGUICLient");
1654} 1654}
1655 1655
1656 1656
1657void KABCore::configurationChanged() 1657void KABCore::configurationChanged()
1658{ 1658{
1659 mExtensionManager->reconfigure(); 1659 mExtensionManager->reconfigure();
1660} 1660}
1661 1661
1662void KABCore::addressBookChanged() 1662void KABCore::addressBookChanged()
1663{ 1663{
1664/*US 1664/*US
1665 QDictIterator<AddresseeEditorDialog> it( mEditorDict ); 1665 QDictIterator<AddresseeEditorDialog> it( mEditorDict );
1666 while ( it.current() ) { 1666 while ( it.current() ) {
1667 if ( it.current()->dirty() ) { 1667 if ( it.current()->dirty() ) {
1668 QString text = i18n( "Data has been changed externally. Unsaved " 1668 QString text = i18n( "Data has been changed externally. Unsaved "
1669 "changes will be lost." ); 1669 "changes will be lost." );
1670 KMessageBox::information( this, text ); 1670 KMessageBox::information( this, text );
1671 } 1671 }
1672 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); 1672 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) );
1673 ++it; 1673 ++it;
1674 } 1674 }
1675*/ 1675*/
1676 if (mEditorDialog) 1676 if (mEditorDialog)
1677 { 1677 {
1678 if (mEditorDialog->dirty()) 1678 if (mEditorDialog->dirty())
1679 { 1679 {
1680 QString text = i18n( "Data has been changed externally. Unsaved " 1680 QString text = i18n( "Data has been changed externally. Unsaved "
1681 "changes will be lost." ); 1681 "changes will be lost." );
1682 KMessageBox::information( this, text ); 1682 KMessageBox::information( this, text );
1683 } 1683 }
1684 QString currentuid = mEditorDialog->addressee().uid(); 1684 QString currentuid = mEditorDialog->addressee().uid();
1685 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); 1685 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) );
1686 } 1686 }
1687 mViewManager->refreshView(); 1687 mViewManager->refreshView();
1688 1688
1689 1689
1690} 1690}
1691 1691
1692AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, 1692AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
1693 const char *name ) 1693 const char *name )
1694{ 1694{
1695 1695
1696 if ( mEditorDialog == 0 ) { 1696 if ( mEditorDialog == 0 ) {
1697 mEditorDialog = new AddresseeEditorDialog( this, parent, 1697 mEditorDialog = new AddresseeEditorDialog( this, parent,
1698 name ? name : "editorDialog" ); 1698 name ? name : "editorDialog" );
1699 1699
1700 1700
1701 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ), 1701 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ),
1702 SLOT( contactModified( const KABC::Addressee& ) ) ); 1702 SLOT( contactModified( const KABC::Addressee& ) ) );
1703 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ), 1703 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ),
1704 // SLOT( slotEditorDestroyed( const QString& ) ) ; 1704 // SLOT( slotEditorDestroyed( const QString& ) ) ;
1705 } 1705 }
1706 1706
1707 return mEditorDialog; 1707 return mEditorDialog;
1708} 1708}
1709 1709
1710void KABCore::slotEditorDestroyed( const QString &uid ) 1710void KABCore::slotEditorDestroyed( const QString &uid )
1711{ 1711{
1712 //mEditorDict.remove( uid ); 1712 //mEditorDict.remove( uid );
1713} 1713}
1714 1714
1715void KABCore::initGUI() 1715void KABCore::initGUI()
1716{ 1716{
1717#ifndef KAB_EMBEDDED 1717#ifndef KAB_EMBEDDED
1718 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1718 QHBoxLayout *topLayout = new QHBoxLayout( this );
1719 topLayout->setSpacing( KDialogBase::spacingHint() ); 1719 topLayout->setSpacing( KDialogBase::spacingHint() );
1720 1720
1721 mExtensionBarSplitter = new QSplitter( this ); 1721 mExtensionBarSplitter = new QSplitter( this );
1722 mExtensionBarSplitter->setOrientation( Qt::Vertical ); 1722 mExtensionBarSplitter->setOrientation( Qt::Vertical );
1723 1723
1724 mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); 1724 mDetailsSplitter = new QSplitter( mExtensionBarSplitter );
1725 1725
1726 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1726 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1727 mIncSearchWidget = new IncSearchWidget( viewSpace ); 1727 mIncSearchWidget = new IncSearchWidget( viewSpace );
1728 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1728 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1729 SLOT( incrementalSearch( const QString& ) ) ); 1729 SLOT( incrementalSearch( const QString& ) ) );
1730 1730
1731 mViewManager = new ViewManager( this, viewSpace ); 1731 mViewManager = new ViewManager( this, viewSpace );
1732 viewSpace->setStretchFactor( mViewManager, 1 ); 1732 viewSpace->setStretchFactor( mViewManager, 1 );
1733 1733
1734 mDetails = new ViewContainer( mDetailsSplitter ); 1734 mDetails = new ViewContainer( mDetailsSplitter );
1735 1735
1736 mJumpButtonBar = new JumpButtonBar( this, this ); 1736 mJumpButtonBar = new JumpButtonBar( this, this );
1737 1737
1738 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1738 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1739 1739
1740 topLayout->addWidget( mExtensionBarSplitter ); 1740 topLayout->addWidget( mExtensionBarSplitter );
1741 topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); 1741 topLayout->setStretchFactor( mExtensionBarSplitter, 100 );
1742 topLayout->addWidget( mJumpButtonBar ); 1742 topLayout->addWidget( mJumpButtonBar );
1743 //topLayout->setStretchFactor( mJumpButtonBar, 1 ); 1743 //topLayout->setStretchFactor( mJumpButtonBar, 1 );
1744 1744
1745 mXXPortManager = new XXPortManager( this, this ); 1745 mXXPortManager = new XXPortManager( this, this );
1746 1746
1747#else //KAB_EMBEDDED 1747#else //KAB_EMBEDDED
1748 //US initialize viewMenu before settingup viewmanager. 1748 //US initialize viewMenu before settingup viewmanager.
1749 // Viewmanager needs this menu to plugin submenues. 1749 // Viewmanager needs this menu to plugin submenues.
1750 viewMenu = new QPopupMenu( this ); 1750 viewMenu = new QPopupMenu( this );
1751 settingsMenu = new QPopupMenu( this ); 1751 settingsMenu = new QPopupMenu( this );
1752 //filterMenu = new QPopupMenu( this ); 1752 //filterMenu = new QPopupMenu( this );
1753 ImportMenu = new QPopupMenu( this ); 1753 ImportMenu = new QPopupMenu( this );
1754 ExportMenu = new QPopupMenu( this ); 1754 ExportMenu = new QPopupMenu( this );
1755 syncMenu = new QPopupMenu( this ); 1755 syncMenu = new QPopupMenu( this );
1756 changeMenu= new QPopupMenu( this ); 1756 changeMenu= new QPopupMenu( this );
1757 beamMenu= new QPopupMenu( this ); 1757 beamMenu= new QPopupMenu( this );
1758 1758
1759//US since we have no splitter for the embedded system, setup 1759//US since we have no splitter for the embedded system, setup
1760// a layout with two frames. One left and one right. 1760// a layout with two frames. One left and one right.
1761 1761
1762 QBoxLayout *topLayout; 1762 QBoxLayout *topLayout;
1763 1763
1764 // = new QHBoxLayout( this ); 1764 // = new QHBoxLayout( this );
1765// QBoxLayout *topLayout = (QBoxLayout*)layout(); 1765// QBoxLayout *topLayout = (QBoxLayout*)layout();
1766 1766
1767// QWidget *mainBox = new QWidget( this ); 1767// QWidget *mainBox = new QWidget( this );
1768// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); 1768// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
1769 1769
1770#ifdef DESKTOP_VERSION 1770#ifdef DESKTOP_VERSION
1771 topLayout = new QHBoxLayout( this ); 1771 topLayout = new QHBoxLayout( this );
1772 1772
1773 1773
1774 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1774 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1775 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1775 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1776 1776
1777 topLayout->addWidget(mMiniSplitter ); 1777 topLayout->addWidget(mMiniSplitter );
1778 1778
1779 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); 1779 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter );
1780 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1780 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1781 mViewManager = new ViewManager( this, mExtensionBarSplitter ); 1781 mViewManager = new ViewManager( this, mExtensionBarSplitter );
1782 mDetails = new ViewContainer( mMiniSplitter ); 1782 mDetails = new ViewContainer( mMiniSplitter );
1783 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1783 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1784#else 1784#else
1785 if ( QApplication::desktop()->width() > 480 ) { 1785 if ( QApplication::desktop()->width() > 480 ) {
1786 topLayout = new QHBoxLayout( this ); 1786 topLayout = new QHBoxLayout( this );
1787 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1787 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1788 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1788 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1789 } else { 1789 } else {
1790 1790
1791 topLayout = new QHBoxLayout( this ); 1791 topLayout = new QHBoxLayout( this );
1792 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); 1792 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
1793 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1793 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1794 } 1794 }
1795 1795
1796 topLayout->addWidget(mMiniSplitter ); 1796 topLayout->addWidget(mMiniSplitter );
1797 mViewManager = new ViewManager( this, mMiniSplitter ); 1797 mViewManager = new ViewManager( this, mMiniSplitter );
1798 mDetails = new ViewContainer( mMiniSplitter ); 1798 mDetails = new ViewContainer( mMiniSplitter );
1799 1799
1800 1800
1801 mExtensionManager = new ExtensionManager( this, mMiniSplitter ); 1801 mExtensionManager = new ExtensionManager( this, mMiniSplitter );
1802#endif 1802#endif
1803 //eh->hide(); 1803 //eh->hide();
1804 // topLayout->addWidget(mExtensionManager ); 1804 // topLayout->addWidget(mExtensionManager );
1805 1805
1806 1806
1807/*US 1807/*US
1808#ifndef KAB_NOSPLITTER 1808#ifndef KAB_NOSPLITTER
1809 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1809 QHBoxLayout *topLayout = new QHBoxLayout( this );
1810//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1810//US topLayout->setSpacing( KDialogBase::spacingHint() );
1811 topLayout->setSpacing( 10 ); 1811 topLayout->setSpacing( 10 );
1812 1812
1813 mDetailsSplitter = new QSplitter( this ); 1813 mDetailsSplitter = new QSplitter( this );
1814 1814
1815 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1815 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1816 1816
1817 mViewManager = new ViewManager( this, viewSpace ); 1817 mViewManager = new ViewManager( this, viewSpace );
1818 viewSpace->setStretchFactor( mViewManager, 1 ); 1818 viewSpace->setStretchFactor( mViewManager, 1 );
1819 1819
1820 mDetails = new ViewContainer( mDetailsSplitter ); 1820 mDetails = new ViewContainer( mDetailsSplitter );
1821 1821
1822 topLayout->addWidget( mDetailsSplitter ); 1822 topLayout->addWidget( mDetailsSplitter );
1823 topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1823 topLayout->setStretchFactor( mDetailsSplitter, 100 );
1824#else //KAB_NOSPLITTER 1824#else //KAB_NOSPLITTER
1825 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1825 QHBoxLayout *topLayout = new QHBoxLayout( this );
1826//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1826//US topLayout->setSpacing( KDialogBase::spacingHint() );
1827 topLayout->setSpacing( 10 ); 1827 topLayout->setSpacing( 10 );
1828 1828
1829// mDetailsSplitter = new QSplitter( this ); 1829// mDetailsSplitter = new QSplitter( this );
1830 1830
1831 QVBox *viewSpace = new QVBox( this ); 1831 QVBox *viewSpace = new QVBox( this );
1832 1832
1833 mViewManager = new ViewManager( this, viewSpace ); 1833 mViewManager = new ViewManager( this, viewSpace );
1834 viewSpace->setStretchFactor( mViewManager, 1 ); 1834 viewSpace->setStretchFactor( mViewManager, 1 );
1835 1835
1836 mDetails = new ViewContainer( this ); 1836 mDetails = new ViewContainer( this );
1837 1837
1838 topLayout->addWidget( viewSpace ); 1838 topLayout->addWidget( viewSpace );
1839// topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1839// topLayout->setStretchFactor( mDetailsSplitter, 100 );
1840 topLayout->addWidget( mDetails ); 1840 topLayout->addWidget( mDetails );
1841#endif //KAB_NOSPLITTER 1841#endif //KAB_NOSPLITTER
1842*/ 1842*/
1843 1843
1844 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 1844 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
1845 syncManager->setBlockSave(false); 1845 syncManager->setBlockSave(false);
1846 1846
1847 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 1847 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
1848 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 1848 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
1849 QString sync_file = sentSyncFile(); 1849 QString sync_file = sentSyncFile();
1850 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1()); 1850 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1());
1851 syncManager->setDefaultFileName( sync_file ); 1851 syncManager->setDefaultFileName( sync_file );
1852 //connect(syncManager , SIGNAL( ), this, SLOT( ) ); 1852 //connect(syncManager , SIGNAL( ), this, SLOT( ) );
1853 1853
1854#endif //KAB_EMBEDDED 1854#endif //KAB_EMBEDDED
1855 initActions(); 1855 initActions();
1856 1856
1857#ifdef KAB_EMBEDDED 1857#ifdef KAB_EMBEDDED
1858 addActionsManually(); 1858 addActionsManually();
1859 //US make sure the export and import menues are initialized before creating the xxPortManager. 1859 //US make sure the export and import menues are initialized before creating the xxPortManager.
1860 mXXPortManager = new XXPortManager( this, this ); 1860 mXXPortManager = new XXPortManager( this, this );
1861 1861
1862 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); 1862 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() );
1863 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); 1863 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget);
1864 // mActionQuit->plug ( mMainWindow->toolBar()); 1864 // mActionQuit->plug ( mMainWindow->toolBar());
1865 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); 1865 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() );
1866 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); 1866 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget);
1867 // mIncSearchWidget->hide(); 1867 // mIncSearchWidget->hide();
1868 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1868 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1869 SLOT( incrementalSearch( const QString& ) ) ); 1869 SLOT( incrementalSearch( const QString& ) ) );
1870 connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) ); 1870 connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) );
1871 connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) ); 1871 connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) );
1872 1872
1873 mJumpButtonBar = new JumpButtonBar( this, this ); 1873 mJumpButtonBar = new JumpButtonBar( this, this );
1874 1874
1875 topLayout->addWidget( mJumpButtonBar ); 1875 topLayout->addWidget( mJumpButtonBar );
1876//US topLayout->setStretchFactor( mJumpButtonBar, 10 ); 1876//US topLayout->setStretchFactor( mJumpButtonBar, 10 );
1877 1877
1878// mMainWindow->getIconToolBar()->raise(); 1878// mMainWindow->getIconToolBar()->raise();
1879 1879
1880#endif //KAB_EMBEDDED 1880#endif //KAB_EMBEDDED
1881 1881
1882} 1882}
1883void KABCore::initActions() 1883void KABCore::initActions()
1884{ 1884{
1885//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1885//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1886 1886
1887#ifndef KAB_EMBEDDED 1887#ifndef KAB_EMBEDDED
1888 connect( QApplication::clipboard(), SIGNAL( dataChanged() ), 1888 connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
1889 SLOT( clipboardDataChanged() ) ); 1889 SLOT( clipboardDataChanged() ) );
1890#endif //KAB_EMBEDDED 1890#endif //KAB_EMBEDDED
1891 1891
1892 // file menu 1892 // file menu
1893 1893
1894 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); 1894 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() );
1895 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); 1895 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
1896 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager, 1896 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager,
1897 SLOT( printView() ), actionCollection(), "kaddressbook_print" ); 1897 SLOT( printView() ), actionCollection(), "kaddressbook_print" );
1898 1898
1899 1899
1900 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails, 1900 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails,
1901 SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); 1901 SLOT( printView() ), actionCollection(), "kaddressbook_print2" );
1902 1902
1903 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, 1903 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this,
1904 SLOT( save() ), actionCollection(), "file_sync" ); 1904 SLOT( save() ), actionCollection(), "file_sync" );
1905 1905
1906 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, 1906 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this,
1907 SLOT( newContact() ), actionCollection(), "file_new_contact" ); 1907 SLOT( newContact() ), actionCollection(), "file_new_contact" );
1908 1908
1909 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, 1909 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0,
1910 this, SLOT( mailVCard() ), 1910 this, SLOT( mailVCard() ),
1911 actionCollection(), "file_mail_vcard"); 1911 actionCollection(), "file_mail_vcard");
1912 1912
1913 mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this, 1913 mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this,
1914 SLOT( export2phone() ), actionCollection(), 1914 SLOT( export2phone() ), actionCollection(),
1915 "kaddressbook_ex2phone" ); 1915 "kaddressbook_ex2phone" );
1916 1916
1917 mActionBeamVCard = 0; 1917 mActionBeamVCard = 0;
1918 mActionBeam = 0; 1918 mActionBeam = 0;
1919 1919
1920#ifndef DESKTOP_VERSION 1920#ifndef DESKTOP_VERSION
1921 if ( Ir::supported() ) { 1921 if ( Ir::supported() ) {
1922 mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this, 1922 mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this,
1923 SLOT( beamVCard() ), actionCollection(), 1923 SLOT( beamVCard() ), actionCollection(),
1924 "kaddressbook_beam_vcard" ); 1924 "kaddressbook_beam_vcard" );
1925 1925
1926 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, 1926 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this,
1927 SLOT( beamMySelf() ), actionCollection(), 1927 SLOT( beamMySelf() ), actionCollection(),
1928 "kaddressbook_beam_myself" ); 1928 "kaddressbook_beam_myself" );
1929 } 1929 }
1930#endif 1930#endif
1931 1931
1932 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, 1932 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0,
1933 this, SLOT( editContact2() ), 1933 this, SLOT( editContact2() ),
1934 actionCollection(), "file_properties" ); 1934 actionCollection(), "file_properties" );
1935 1935
1936#ifdef KAB_EMBEDDED 1936#ifdef KAB_EMBEDDED
1937 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); 1937 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() );
1938 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, 1938 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0,
1939 mMainWindow, SLOT( exit() ), 1939 mMainWindow, SLOT( exit() ),
1940 actionCollection(), "quit" ); 1940 actionCollection(), "quit" );
1941#endif //KAB_EMBEDDED 1941#endif //KAB_EMBEDDED
1942 1942
1943 // edit menu 1943 // edit menu
1944 if ( mIsPart ) { 1944 if ( mIsPart ) {
1945 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, 1945 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this,
1946 SLOT( copyContacts() ), actionCollection(), 1946 SLOT( copyContacts() ), actionCollection(),
1947 "kaddressbook_copy" ); 1947 "kaddressbook_copy" );
1948 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, 1948 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this,
1949 SLOT( cutContacts() ), actionCollection(), 1949 SLOT( cutContacts() ), actionCollection(),
1950 "kaddressbook_cut" ); 1950 "kaddressbook_cut" );
1951 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, 1951 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this,
1952 SLOT( pasteContacts() ), actionCollection(), 1952 SLOT( pasteContacts() ), actionCollection(),
1953 "kaddressbook_paste" ); 1953 "kaddressbook_paste" );
1954 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, 1954 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this,
1955 SLOT( selectAllContacts() ), actionCollection(), 1955 SLOT( selectAllContacts() ), actionCollection(),
1956 "kaddressbook_select_all" ); 1956 "kaddressbook_select_all" );
1957 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, 1957 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this,
1958 SLOT( undo() ), actionCollection(), 1958 SLOT( undo() ), actionCollection(),
1959 "kaddressbook_undo" ); 1959 "kaddressbook_undo" );
1960 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, 1960 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z,
1961 this, SLOT( redo() ), actionCollection(), 1961 this, SLOT( redo() ), actionCollection(),
1962 "kaddressbook_redo" ); 1962 "kaddressbook_redo" );
1963 } else { 1963 } else {
1964 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); 1964 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() );
1965 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); 1965 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() );
1966 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); 1966 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() );
1967 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); 1967 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() );
1968 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); 1968 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() );
1969 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); 1969 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() );
1970 } 1970 }
1971 1971
1972 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", 1972 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
1973 Key_Delete, this, SLOT( deleteContacts() ), 1973 Key_Delete, this, SLOT( deleteContacts() ),
1974 actionCollection(), "edit_delete" ); 1974 actionCollection(), "edit_delete" );
1975 1975
1976 mActionUndo->setEnabled( false ); 1976 mActionUndo->setEnabled( false );
1977 mActionRedo->setEnabled( false ); 1977 mActionRedo->setEnabled( false );
1978 1978
1979 // settings menu 1979 // settings menu
1980#ifdef KAB_EMBEDDED 1980#ifdef KAB_EMBEDDED
1981//US special menuentry to configure the addressbook resources. On KDE 1981//US special menuentry to configure the addressbook resources. On KDE
1982// you do that through the control center !!! 1982// you do that through the control center !!!
1983 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, 1983 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this,
1984 SLOT( configureResources() ), actionCollection(), 1984 SLOT( configureResources() ), actionCollection(),
1985 "kaddressbook_configure_resources" ); 1985 "kaddressbook_configure_resources" );
1986#endif //KAB_EMBEDDED 1986#endif //KAB_EMBEDDED
1987 1987
1988 if ( mIsPart ) { 1988 if ( mIsPart ) {
1989 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, 1989 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this,
1990 SLOT( openConfigDialog() ), actionCollection(), 1990 SLOT( openConfigDialog() ), actionCollection(),
1991 "kaddressbook_configure" ); 1991 "kaddressbook_configure" );
1992 1992
1993 //US not implemented yet 1993 //US not implemented yet
1994 //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, 1994 //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0,
1995 // this, SLOT( configureKeyBindings() ), actionCollection(), 1995 // this, SLOT( configureKeyBindings() ), actionCollection(),
1996 // "kaddressbook_configure_shortcuts" ); 1996 // "kaddressbook_configure_shortcuts" );
1997#ifdef KAB_EMBEDDED 1997#ifdef KAB_EMBEDDED
1998 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); 1998 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() );
1999 mActionConfigureToolbars->setEnabled( false ); 1999 mActionConfigureToolbars->setEnabled( false );
2000#endif //KAB_EMBEDDED 2000#endif //KAB_EMBEDDED
2001 2001
2002 } else { 2002 } else {
2003 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); 2003 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() );
2004 2004
2005 //US not implemented yet 2005 //US not implemented yet
2006 //mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); 2006 //mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() );
2007 } 2007 }
2008 2008
2009 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, 2009 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0,
2010 actionCollection(), "options_show_jump_bar" ); 2010 actionCollection(), "options_show_jump_bar" );
2011 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) ); 2011 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) );
2012 2012
2013 mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, 2013 mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0,
2014 actionCollection(), "options_show_details" ); 2014 actionCollection(), "options_show_details" );
2015 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); 2015 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) );
2016 2016
2017 2017
2018 mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this, 2018 mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this,
2019 SLOT( toggleBeamReceive() ), actionCollection(), 2019 SLOT( toggleBeamReceive() ), actionCollection(),
2020 "kaddressbook_beam_rec" ); 2020 "kaddressbook_beam_rec" );
2021 2021
2022 2022
2023 // misc 2023 // misc
2024 // only enable LDAP lookup if we can handle the protocol 2024 // only enable LDAP lookup if we can handle the protocol
2025#ifndef KAB_EMBEDDED 2025#ifndef KAB_EMBEDDED
2026 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { 2026 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) {
2027 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, 2027 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0,
2028 this, SLOT( openLDAPDialog() ), actionCollection(), 2028 this, SLOT( openLDAPDialog() ), actionCollection(),
2029 "ldap_lookup" ); 2029 "ldap_lookup" );
2030 } 2030 }
2031#else //KAB_EMBEDDED 2031#else //KAB_EMBEDDED
2032 //qDebug("KABCore::initActions() LDAP has to be implemented"); 2032 //qDebug("KABCore::initActions() LDAP has to be implemented");
2033#endif //KAB_EMBEDDED 2033#endif //KAB_EMBEDDED
2034 2034
2035 2035
2036 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, 2036 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this,
2037 SLOT( setWhoAmI() ), actionCollection(), 2037 SLOT( setWhoAmI() ), actionCollection(),
2038 "set_personal" ); 2038 "set_personal" );
2039 2039
2040 2040
2041 mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, 2041 mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this,
2042 SLOT( setCategories() ), actionCollection(), 2042 SLOT( setCategories() ), actionCollection(),
2043 "edit_set_categories" ); 2043 "edit_set_categories" );
2044 mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, 2044 mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this,
2045 SLOT( editCategories() ), actionCollection(), 2045 SLOT( editCategories() ), actionCollection(),
2046 "edit__categories" ); 2046 "edit__categories" );
2047 2047
2048 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, 2048 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
2049 SLOT( removeVoice() ), actionCollection(), 2049 SLOT( removeVoice() ), actionCollection(),
2050 "remove_voice" ); 2050 "remove_voice" );
2051 mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, 2051 mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this,
2052 SLOT( setFormattedName() ), actionCollection(), 2052 SLOT( setFormattedName() ), actionCollection(),
2053 "set_formatted" ); 2053 "set_formatted" );
2054 2054
2055 mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, 2055 mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this,
2056 SLOT( manageCategories() ), actionCollection(), 2056 SLOT( manageCategories() ), actionCollection(),
2057 "remove_voice" ); 2057 "remove_voice" );
2058 2058
2059 2059
2060 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, 2060 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this,
2061 SLOT( importFromOL() ), actionCollection(), 2061 SLOT( importFromOL() ), actionCollection(),
2062 "import_OL" ); 2062 "import_OL" );
2063#ifdef KAB_EMBEDDED 2063#ifdef KAB_EMBEDDED
2064 mActionLicence = new KAction( i18n( "Licence" ), 0, 2064 mActionLicence = new KAction( i18n( "Licence" ), 0,
2065 this, SLOT( showLicence() ), actionCollection(), 2065 this, SLOT( showLicence() ), actionCollection(),
2066 "licence_about_data" ); 2066 "licence_about_data" );
2067 mActionFaq = new KAction( i18n( "Faq" ), 0, 2067 mActionFaq = new KAction( i18n( "Faq" ), 0,
2068 this, SLOT( faq() ), actionCollection(), 2068 this, SLOT( faq() ), actionCollection(),
2069 "faq_about_data" ); 2069 "faq_about_data" );
2070 mActionWN = new KAction( i18n( "What's New?" ), 0, 2070 mActionWN = new KAction( i18n( "What's New?" ), 0,
2071 this, SLOT( whatsnew() ), actionCollection(), 2071 this, SLOT( whatsnew() ), actionCollection(),
2072 "wn" ); 2072 "wn" );
2073 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, 2073 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0,
2074 this, SLOT( synchowto() ), actionCollection(), 2074 this, SLOT( synchowto() ), actionCollection(),
2075 "sync" ); 2075 "sync" );
2076 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, 2076 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0,
2077 this, SLOT( kdesynchowto() ), actionCollection(), 2077 this, SLOT( kdesynchowto() ), actionCollection(),
2078 "kdesync" ); 2078 "kdesync" );
2079 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, 2079 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0,
2080 this, SLOT( multisynchowto() ), actionCollection(), 2080 this, SLOT( multisynchowto() ), actionCollection(),
2081 "multisync" ); 2081 "multisync" );
2082 2082
2083 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, 2083 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
2084 this, SLOT( createAboutData() ), actionCollection(), 2084 this, SLOT( createAboutData() ), actionCollection(),
2085 "kaddressbook_about_data" ); 2085 "kaddressbook_about_data" );
2086#endif //KAB_EMBEDDED 2086#endif //KAB_EMBEDDED
2087 2087
2088 clipboardDataChanged(); 2088 clipboardDataChanged();
2089 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2089 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2090 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2090 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2091} 2091}
2092 2092
2093//US we need this function, to plug all actions into the correct menues. 2093//US we need this function, to plug all actions into the correct menues.
2094// KDE uses a XML format to plug the actions, but we work her without this overhead. 2094// KDE uses a XML format to plug the actions, but we work her without this overhead.
2095void KABCore::addActionsManually() 2095void KABCore::addActionsManually()
2096{ 2096{
2097//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 2097//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
2098 2098
2099#ifdef KAB_EMBEDDED 2099#ifdef KAB_EMBEDDED
2100 QPopupMenu *fileMenu = new QPopupMenu( this ); 2100 QPopupMenu *fileMenu = new QPopupMenu( this );
2101 QPopupMenu *editMenu = new QPopupMenu( this ); 2101 QPopupMenu *editMenu = new QPopupMenu( this );
2102 QPopupMenu *helpMenu = new QPopupMenu( this ); 2102 QPopupMenu *helpMenu = new QPopupMenu( this );
2103 2103
2104 KToolBar* tb = mMainWindow->toolBar(); 2104 KToolBar* tb = mMainWindow->toolBar();
2105 2105
2106#ifndef DESKTOP_VERSION 2106#ifndef DESKTOP_VERSION
2107 if ( KABPrefs::instance()->mFullMenuBarVisible ) { 2107 if ( KABPrefs::instance()->mFullMenuBarVisible ) {
2108#endif 2108#endif
2109 QMenuBar* mb = mMainWindow->menuBar(); 2109 QMenuBar* mb = mMainWindow->menuBar();
2110 2110
2111 //US setup menubar. 2111 //US setup menubar.
2112 //Disable the following block if you do not want to have a menubar. 2112 //Disable the following block if you do not want to have a menubar.
2113 mb->insertItem( i18n("&File"), fileMenu ); 2113 mb->insertItem( i18n("&File"), fileMenu );
2114 mb->insertItem( i18n("&Edit"), editMenu ); 2114 mb->insertItem( i18n("&Edit"), editMenu );
2115 mb->insertItem( i18n("&View"), viewMenu ); 2115 mb->insertItem( i18n("&View"), viewMenu );
2116 mb->insertItem( i18n("&Settings"), settingsMenu ); 2116 mb->insertItem( i18n("&Settings"), settingsMenu );
2117#ifdef DESKTOP_VERSION 2117#ifdef DESKTOP_VERSION
2118 mb->insertItem( i18n("Synchronize"), syncMenu ); 2118 mb->insertItem( i18n("Synchronize"), syncMenu );
2119#else 2119#else
2120 mb->insertItem( i18n("Sync"), syncMenu ); 2120 mb->insertItem( i18n("Sync"), syncMenu );
2121#endif 2121#endif
2122 //mb->insertItem( i18n("&Change"), changeMenu ); 2122 //mb->insertItem( i18n("&Change"), changeMenu );
2123 mb->insertItem( i18n("&Help"), helpMenu ); 2123 mb->insertItem( i18n("&Help"), helpMenu );
2124 mIncSearchWidget = new IncSearchWidget( tb ); 2124 mIncSearchWidget = new IncSearchWidget( tb );
2125 // tb->insertWidget(-1, 0, mIncSearchWidget); 2125 // tb->insertWidget(-1, 0, mIncSearchWidget);
2126#ifndef DESKTOP_VERSION 2126#ifndef DESKTOP_VERSION
2127 } else { 2127 } else {
2128 //US setup toolbar 2128 //US setup toolbar
2129 QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); 2129 QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
2130 QPopupMenu *popupBarTB = new QPopupMenu( this ); 2130 QPopupMenu *popupBarTB = new QPopupMenu( this );
2131 menuBarTB->insertItem( "ME", popupBarTB); 2131 menuBarTB->insertItem( "ME", popupBarTB);
2132 tb->insertWidget(-1, 0, menuBarTB); 2132 tb->insertWidget(-1, 0, menuBarTB);
2133 mIncSearchWidget = new IncSearchWidget( tb ); 2133 mIncSearchWidget = new IncSearchWidget( tb );
2134 2134
2135 tb->enableMoving(false); 2135 tb->enableMoving(false);
2136 popupBarTB->insertItem( i18n("&File"), fileMenu ); 2136 popupBarTB->insertItem( i18n("&File"), fileMenu );
2137 popupBarTB->insertItem( i18n("&Edit"), editMenu ); 2137 popupBarTB->insertItem( i18n("&Edit"), editMenu );
2138 popupBarTB->insertItem( i18n("&View"), viewMenu ); 2138 popupBarTB->insertItem( i18n("&View"), viewMenu );
2139 popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); 2139 popupBarTB->insertItem( i18n("&Settings"), settingsMenu );
2140 popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); 2140 popupBarTB->insertItem( i18n("Synchronize"), syncMenu );
2141 mViewManager->getFilterAction()->plug ( popupBarTB); 2141 mViewManager->getFilterAction()->plug ( popupBarTB);
2142 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); 2142 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu );
2143 popupBarTB->insertItem( i18n("&Help"), helpMenu ); 2143 popupBarTB->insertItem( i18n("&Help"), helpMenu );
2144 if (QApplication::desktop()->width() > 320 ) { 2144 if (QApplication::desktop()->width() > 320 ) {
2145 // mViewManager->getFilterAction()->plug ( tb); 2145 // mViewManager->getFilterAction()->plug ( tb);
2146 } 2146 }
2147 } 2147 }
2148#endif 2148#endif
2149 // mActionQuit->plug ( mMainWindow->toolBar()); 2149 // mActionQuit->plug ( mMainWindow->toolBar());
2150 2150
2151 2151
2152 2152
2153 //US Now connect the actions with the menue entries. 2153 //US Now connect the actions with the menue entries.
2154#ifdef DESKTOP_VERSION 2154#ifdef DESKTOP_VERSION
2155 mActionPrint->plug( fileMenu ); 2155 mActionPrint->plug( fileMenu );
2156 mActionPrintDetails->plug( fileMenu ); 2156 mActionPrintDetails->plug( fileMenu );
2157 fileMenu->insertSeparator(); 2157 fileMenu->insertSeparator();
2158#endif 2158#endif
2159 mActionMail->plug( fileMenu ); 2159 mActionMail->plug( fileMenu );
2160 fileMenu->insertSeparator(); 2160 fileMenu->insertSeparator();
2161 2161
2162 mActionNewContact->plug( fileMenu ); 2162 mActionNewContact->plug( fileMenu );
2163 mActionNewContact->plug( tb ); 2163 mActionNewContact->plug( tb );
2164 2164
2165 mActionEditAddressee->plug( fileMenu ); 2165 mActionEditAddressee->plug( fileMenu );
2166 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || 2166 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
2167 // (!KABPrefs::instance()->mMultipleViewsAtOnce )) 2167 // (!KABPrefs::instance()->mMultipleViewsAtOnce ))
2168 mActionEditAddressee->plug( tb ); 2168 mActionEditAddressee->plug( tb );
2169 2169
2170 fileMenu->insertSeparator(); 2170 fileMenu->insertSeparator();
2171 mActionSave->plug( fileMenu ); 2171 mActionSave->plug( fileMenu );
2172 fileMenu->insertItem( "&Import", ImportMenu ); 2172 fileMenu->insertItem( "&Import", ImportMenu );
2173 fileMenu->insertItem( "&Export", ExportMenu ); 2173 fileMenu->insertItem( "&Export", ExportMenu );
2174 fileMenu->insertItem( i18n("&Change"), changeMenu ); 2174 fileMenu->insertItem( i18n("&Change"), changeMenu );
2175#ifndef DESKTOP_VERSION 2175#ifndef DESKTOP_VERSION
2176 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); 2176 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu );
2177#endif 2177#endif
2178#if 0 2178#if 0
2179 // PENDING fix MailVCard 2179 // PENDING fix MailVCard
2180 fileMenu->insertSeparator(); 2180 fileMenu->insertSeparator();
2181 mActionMailVCard->plug( fileMenu ); 2181 mActionMailVCard->plug( fileMenu );
2182#endif 2182#endif
2183#ifndef DESKTOP_VERSION 2183#ifndef DESKTOP_VERSION
2184 if ( Ir::supported() ) mActionBR->plug( beamMenu ); 2184 if ( Ir::supported() ) mActionBR->plug( beamMenu );
2185 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); 2185 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu );
2186 if ( Ir::supported() ) mActionBeam->plug( beamMenu ); 2186 if ( Ir::supported() ) mActionBeam->plug( beamMenu );
2187#endif 2187#endif
2188 fileMenu->insertSeparator(); 2188 fileMenu->insertSeparator();
2189 mActionQuit->plug( fileMenu ); 2189 mActionQuit->plug( fileMenu );
2190#ifdef _OL_IMPORT_ 2190#ifdef _OL_IMPORT_
2191 mActionImportOL->plug( ImportMenu ); 2191 mActionImportOL->plug( ImportMenu );
2192#endif 2192#endif
2193 // edit menu 2193 // edit menu
2194 mActionUndo->plug( editMenu ); 2194 mActionUndo->plug( editMenu );
2195 mActionRedo->plug( editMenu ); 2195 mActionRedo->plug( editMenu );
2196 editMenu->insertSeparator(); 2196 editMenu->insertSeparator();
2197 mActionCut->plug( editMenu ); 2197 mActionCut->plug( editMenu );
2198 mActionCopy->plug( editMenu ); 2198 mActionCopy->plug( editMenu );
2199 mActionPaste->plug( editMenu ); 2199 mActionPaste->plug( editMenu );
2200 mActionDelete->plug( editMenu ); 2200 mActionDelete->plug( editMenu );
2201 editMenu->insertSeparator(); 2201 editMenu->insertSeparator();
2202 mActionSelectAll->plug( editMenu ); 2202 mActionSelectAll->plug( editMenu );
2203 2203
2204 mActionSetFormattedName->plug( changeMenu ); 2204 mActionSetFormattedName->plug( changeMenu );
2205 mActionRemoveVoice->plug( changeMenu ); 2205 mActionRemoveVoice->plug( changeMenu );
2206 // settings menu 2206 // settings menu
2207//US special menuentry to configure the addressbook resources. On KDE 2207//US special menuentry to configure the addressbook resources. On KDE
2208// you do that through the control center !!! 2208// you do that through the control center !!!
2209 mActionConfigResources->plug( settingsMenu ); 2209 mActionConfigResources->plug( settingsMenu );
2210 settingsMenu->insertSeparator(); 2210 settingsMenu->insertSeparator();
2211 2211
2212 mActionConfigKAddressbook->plug( settingsMenu ); 2212 mActionConfigKAddressbook->plug( settingsMenu );
2213 2213
2214 if ( mIsPart ) { 2214 if ( mIsPart ) {
2215 //US not implemented yet 2215 //US not implemented yet
2216 //mActionConfigShortcuts->plug( settingsMenu ); 2216 //mActionConfigShortcuts->plug( settingsMenu );
2217 //mActionConfigureToolbars->plug( settingsMenu ); 2217 //mActionConfigureToolbars->plug( settingsMenu );
2218 2218
2219 } else { 2219 } else {
2220 //US not implemented yet 2220 //US not implemented yet
2221 //mActionKeyBindings->plug( settingsMenu ); 2221 //mActionKeyBindings->plug( settingsMenu );
2222 } 2222 }
2223 2223
2224 settingsMenu->insertSeparator(); 2224 settingsMenu->insertSeparator();
2225 2225
2226 mActionJumpBar->plug( settingsMenu ); 2226 mActionJumpBar->plug( settingsMenu );
2227 mActionDetails->plug( settingsMenu ); 2227 mActionDetails->plug( settingsMenu );
2228 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) 2228 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
2229 mActionDetails->plug( tb ); 2229 mActionDetails->plug( tb );
2230 settingsMenu->insertSeparator(); 2230 settingsMenu->insertSeparator();
2231#ifndef DESKTOP_VERSION 2231#ifndef DESKTOP_VERSION
2232 if ( Ir::supported() ) mActionBR->plug(settingsMenu ); 2232 if ( Ir::supported() ) mActionBR->plug(settingsMenu );
2233 settingsMenu->insertSeparator(); 2233 settingsMenu->insertSeparator();
2234#endif 2234#endif
2235 2235
2236 mActionWhoAmI->plug( settingsMenu ); 2236 mActionWhoAmI->plug( settingsMenu );
2237 mActionEditCategories->plug( settingsMenu ); 2237 mActionEditCategories->plug( settingsMenu );
2238 mActionEditCategories->plug( changeMenu ); 2238 mActionEditCategories->plug( changeMenu );
2239 mActionCategories->plug( changeMenu ); 2239 mActionCategories->plug( changeMenu );
2240 mActionManageCategories->plug( changeMenu ); 2240 mActionManageCategories->plug( changeMenu );
2241 2241
2242 mActionCategories->plug( settingsMenu ); 2242 mActionCategories->plug( settingsMenu );
2243 mActionManageCategories->plug( settingsMenu ); 2243 mActionManageCategories->plug( settingsMenu );
2244 2244
2245 2245
2246 mActionWN->plug( helpMenu ); 2246 mActionWN->plug( helpMenu );
2247 mActionSyncHowto->plug( helpMenu ); 2247 mActionSyncHowto->plug( helpMenu );
2248 mActionKdeSyncHowto->plug( helpMenu ); 2248 mActionKdeSyncHowto->plug( helpMenu );
2249 mActionMultiSyncHowto->plug( helpMenu ); 2249 mActionMultiSyncHowto->plug( helpMenu );
2250 mActionFaq->plug( helpMenu ); 2250 mActionFaq->plug( helpMenu );
2251 mActionLicence->plug( helpMenu ); 2251 mActionLicence->plug( helpMenu );
2252 mActionAboutKAddressbook->plug( helpMenu ); 2252 mActionAboutKAddressbook->plug( helpMenu );
2253 2253
2254 if (KGlobal::getDesktopSize() > KGlobal::Small ) { 2254 if (KGlobal::getDesktopSize() > KGlobal::Small ) {
2255 2255
2256 mActionSave->plug( tb ); 2256 mActionSave->plug( tb );
2257 mViewManager->getFilterAction()->plug ( tb); 2257 mViewManager->getFilterAction()->plug ( tb);
2258 //LR hide filteraction on started in 480x640 2258 //LR hide filteraction on started in 480x640
2259 if (QApplication::desktop()->width() == 480 ) { 2259 if (QApplication::desktop()->width() == 480 ) {
2260 mViewManager->getFilterAction()->setComboWidth( 0 ); 2260 mViewManager->getFilterAction()->setComboWidth( 0 );
2261 } 2261 }
2262 mActionUndo->plug( tb ); 2262 mActionUndo->plug( tb );
2263 mActionDelete->plug( tb ); 2263 mActionDelete->plug( tb );
2264 mActionRedo->plug( tb ); 2264 mActionRedo->plug( tb );
2265 } else { 2265 } else {
2266 mActionSave->plug( tb ); 2266 mActionSave->plug( tb );
2267 tb->enableMoving(false); 2267 tb->enableMoving(false);
2268 } 2268 }
2269 //mActionQuit->plug ( tb ); 2269 //mActionQuit->plug ( tb );
2270 // tb->insertWidget(-1, 0, mIncSearchWidget, 6); 2270 // tb->insertWidget(-1, 0, mIncSearchWidget, 6);
2271 2271
2272 //US link the searchwidget first to this. 2272 //US link the searchwidget first to this.
2273 // The real linkage to the toolbar happens later. 2273 // The real linkage to the toolbar happens later.
2274//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); 2274//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
2275//US tb->insertItem( mIncSearchWidget ); 2275//US tb->insertItem( mIncSearchWidget );
2276/*US 2276/*US
2277 mIncSearchWidget = new IncSearchWidget( tb ); 2277 mIncSearchWidget = new IncSearchWidget( tb );
2278 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 2278 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
2279 SLOT( incrementalSearch( const QString& ) ) ); 2279 SLOT( incrementalSearch( const QString& ) ) );
2280 2280
2281 mJumpButtonBar = new JumpButtonBar( this, this ); 2281 mJumpButtonBar = new JumpButtonBar( this, this );
2282 2282
2283//US topLayout->addWidget( mJumpButtonBar ); 2283//US topLayout->addWidget( mJumpButtonBar );
2284 this->layout()->add( mJumpButtonBar ); 2284 this->layout()->add( mJumpButtonBar );
2285*/ 2285*/
2286 2286
2287#endif //KAB_EMBEDDED 2287#endif //KAB_EMBEDDED
2288 2288
2289 mActionExport2phone->plug( ExportMenu ); 2289 mActionExport2phone->plug( ExportMenu );
2290 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); 2290 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) );
2291 syncManager->fillSyncMenu(); 2291 syncManager->fillSyncMenu();
2292 2292
2293} 2293}
2294void KABCore::showLicence() 2294void KABCore::showLicence()
2295{ 2295{
2296 KApplication::showLicence(); 2296 KApplication::showLicence();
2297} 2297}
2298 2298
2299void KABCore::manageCategories( ) 2299void KABCore::manageCategories( )
2300{ 2300{
2301 KABCatPrefs* cp = new KABCatPrefs(); 2301 KABCatPrefs* cp = new KABCatPrefs();
2302 cp->show(); 2302 cp->show();
2303 int w =cp->sizeHint().width() ; 2303 int w =cp->sizeHint().width() ;
2304 int h = cp->sizeHint().height() ; 2304 int h = cp->sizeHint().height() ;
2305 int dw = QApplication::desktop()->width(); 2305 int dw = QApplication::desktop()->width();
2306 int dh = QApplication::desktop()->height(); 2306 int dh = QApplication::desktop()->height();
2307 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2307 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2308 if ( !cp->exec() ) { 2308 if ( !cp->exec() ) {
2309 delete cp; 2309 delete cp;
2310 return; 2310 return;
2311 } 2311 }
2312 int count = 0; 2312 int count = 0;
2313 int cc = 0; 2313 int cc = 0;
2314 message( i18n("Please wait, processing categories...")); 2314 message( i18n("Please wait, processing categories..."));
2315 if ( cp->addCat() ) { 2315 if ( cp->addCat() ) {
2316 KABC::AddressBook::Iterator it; 2316 KABC::AddressBook::Iterator it;
2317 QStringList catList = KABPrefs::instance()->mCustomCategories; 2317 QStringList catList = KABPrefs::instance()->mCustomCategories;
2318 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2318 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2319 ++cc; 2319 ++cc;
2320 if ( cc %10 == 0) 2320 if ( cc %10 == 0)
2321 message(i18n("Processing contact #%1").arg(cc)); 2321 message(i18n("Processing contact #%1").arg(cc));
2322 QStringList catIncList = (*it).categories(); 2322 QStringList catIncList = (*it).categories();
2323 int i; 2323 int i;
2324 for( i = 0; i< catIncList.count(); ++i ) { 2324 for( i = 0; i< catIncList.count(); ++i ) {
2325 if ( !catList.contains (catIncList[i])) { 2325 if ( !catList.contains (catIncList[i])) {
2326 catList.append( catIncList[i] ); 2326 catList.append( catIncList[i] );
2327 //qDebug("add cat %s ", catIncList[i].latin1()); 2327 //qDebug("add cat %s ", catIncList[i].latin1());
2328 ++count; 2328 ++count;
2329 } 2329 }
2330 } 2330 }
2331 } 2331 }
2332 catList.sort(); 2332 catList.sort();
2333 KABPrefs::instance()->mCustomCategories = catList; 2333 KABPrefs::instance()->mCustomCategories = catList;
2334 KABPrefs::instance()->writeConfig(); 2334 KABPrefs::instance()->writeConfig();
2335 message(QString::number( count )+ i18n(" categories added to list! ")); 2335 message(QString::number( count )+ i18n(" categories added to list! "));
2336 } else { 2336 } else {
2337 QStringList catList = KABPrefs::instance()->mCustomCategories; 2337 QStringList catList = KABPrefs::instance()->mCustomCategories;
2338 QStringList catIncList; 2338 QStringList catIncList;
2339 QStringList newCatList; 2339 QStringList newCatList;
2340 KABC::AddressBook::Iterator it; 2340 KABC::AddressBook::Iterator it;
2341 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2341 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2342 ++cc; 2342 ++cc;
2343 if ( cc %10 == 0) 2343 if ( cc %10 == 0)
2344 message(i18n("Processing contact #%1").arg(cc)); 2344 message(i18n("Processing contact #%1").arg(cc));
2345 QStringList catIncList = (*it).categories(); 2345 QStringList catIncList = (*it).categories();
2346 int i; 2346 int i;
2347 if ( catIncList.count() ) { 2347 if ( catIncList.count() ) {
2348 newCatList.clear(); 2348 newCatList.clear();
2349 for( i = 0; i< catIncList.count(); ++i ) { 2349 for( i = 0; i< catIncList.count(); ++i ) {
2350 if ( catList.contains (catIncList[i])) { 2350 if ( catList.contains (catIncList[i])) {
2351 newCatList.append( catIncList[i] ); 2351 newCatList.append( catIncList[i] );
2352 } 2352 }
2353 } 2353 }
2354 newCatList.sort(); 2354 newCatList.sort();
2355 (*it).setCategories( newCatList ); 2355 (*it).setCategories( newCatList );
2356 mAddressBook->insertAddressee( (*it) ); 2356 mAddressBook->insertAddressee( (*it) );
2357 } 2357 }
2358 } 2358 }
2359 setModified( true ); 2359 setModified( true );
2360 mViewManager->refreshView(); 2360 mViewManager->refreshView();
2361 message( i18n("Removing categories done!")); 2361 message( i18n("Removing categories done!"));
2362 } 2362 }
2363 delete cp; 2363 delete cp;
2364} 2364}
2365void KABCore::removeVoice() 2365void KABCore::removeVoice()
2366{ 2366{
2367 if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) 2367 if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No )
2368 return; 2368 return;
2369 XXPortSelectDialog dlg( this, false, this ); 2369 XXPortSelectDialog dlg( this, false, this );
2370 if ( !dlg.exec() ) 2370 if ( !dlg.exec() )
2371 return; 2371 return;
2372 mAddressBook->setUntagged(); 2372 mAddressBook->setUntagged();
2373 dlg.tagSelected(); 2373 dlg.tagSelected();
2374 message(i18n("Removing voice..."), false ); 2374 message(i18n("Removing voice..."), false );
2375 KABC::AddressBook::Iterator it; 2375 KABC::AddressBook::Iterator it;
2376 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2376 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2377 if ( (*it).tagged() ) { 2377 if ( (*it).tagged() ) {
2378 (*it).removeVoice(); 2378 (*it).removeVoice();
2379 } 2379 }
2380 } 2380 }
2381 message(i18n("Refreshing view...") ); 2381 message(i18n("Refreshing view...") );
2382 qApp->processEvents(); 2382 qApp->processEvents();
2383 mViewManager->refreshView( "" ); 2383 mViewManager->refreshView( "" );
2384 Addressee add; 2384 Addressee add;
2385 mDetails->setAddressee( add ); 2385 mDetails->setAddressee( add );
2386 message(i18n("Remove voice completed!") ); 2386 message(i18n("Remove voice completed!") );
2387 2387
2388 2388
2389 2389
2390} 2390}
2391 2391
2392void KABCore::setFormattedName() 2392void KABCore::setFormattedName()
2393{ 2393{
2394 KABFormatPrefs setpref; 2394 KABFormatPrefs setpref;
2395 if ( !setpref.exec() ) { 2395 if ( !setpref.exec() ) {
2396 return; 2396 return;
2397 } 2397 }
2398 XXPortSelectDialog dlg( this, false, this ); 2398 XXPortSelectDialog dlg( this, false, this );
2399 if ( !dlg.exec() ) 2399 if ( !dlg.exec() )
2400 return; 2400 return;
2401 mAddressBook->setUntagged(); 2401 mAddressBook->setUntagged();
2402 dlg.tagSelected(); 2402 dlg.tagSelected();
2403 int count = 0; 2403 int count = 0;
2404 KABC::AddressBook::Iterator it; 2404 KABC::AddressBook::Iterator it;
2405 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2405 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2406 if ( (*it).tagged() ) { 2406 if ( (*it).tagged() ) {
2407 ++count; 2407 ++count;
2408 if ( count %10 == 0 ) 2408 if ( count %10 == 0 )
2409 message(i18n("Changing contact #%1").arg( count ) ); 2409 message(i18n("Changing contact #%1").arg( count ) );
2410 qApp->processEvents(); 2410 qApp->processEvents();
2411 QString fName; 2411 QString fName;
2412 if ( setpref.simple->isChecked() ) 2412 if ( setpref.simple->isChecked() )
2413 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); 2413 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName );
2414 else if ( setpref.full->isChecked() ) 2414 else if ( setpref.full->isChecked() )
2415 fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); 2415 fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName );
2416 else if ( setpref.reverse->isChecked() ) 2416 else if ( setpref.reverse->isChecked() )
2417 fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); 2417 fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName );
2418 else 2418 else
2419 fName = (*it).organization(); 2419 fName = (*it).organization();
2420 if ( setpref.setCompany->isChecked() ) 2420 if ( setpref.setCompany->isChecked() )
2421 if ( fName.isEmpty() || fName =="," ) 2421 if ( fName.isEmpty() || fName =="," )
2422 fName = (*it).organization(); 2422 fName = (*it).organization();
2423 (*it).setFormattedName( fName ); 2423 (*it).setFormattedName( fName );
2424 } 2424 }
2425 } 2425 }
2426 message(i18n("Refreshing view...") ); 2426 message(i18n("Refreshing view...") );
2427 qApp->processEvents(); 2427 qApp->processEvents();
2428 mViewManager->refreshView( "" ); 2428 mViewManager->refreshView( "" );
2429 Addressee add; 2429 Addressee add;
2430 mDetails->setAddressee( add ); 2430 mDetails->setAddressee( add );
2431 message(i18n("Setting formatted name completed!") ); 2431 message(i18n("Setting formatted name completed!") );
2432} 2432}
2433 2433
2434void KABCore::clipboardDataChanged() 2434void KABCore::clipboardDataChanged()
2435{ 2435{
2436 2436
2437 if ( mReadWrite ) 2437 if ( mReadWrite )
2438 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); 2438 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() );
2439 2439
2440} 2440}
2441 2441
2442void KABCore::updateActionMenu() 2442void KABCore::updateActionMenu()
2443{ 2443{
2444 UndoStack *undo = UndoStack::instance(); 2444 UndoStack *undo = UndoStack::instance();
2445 RedoStack *redo = RedoStack::instance(); 2445 RedoStack *redo = RedoStack::instance();
2446 2446
2447 if ( undo->isEmpty() ) 2447 if ( undo->isEmpty() )
2448 mActionUndo->setText( i18n( "Undo" ) ); 2448 mActionUndo->setText( i18n( "Undo" ) );
2449 else 2449 else
2450 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); 2450 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) );
2451 2451
2452 mActionUndo->setEnabled( !undo->isEmpty() ); 2452 mActionUndo->setEnabled( !undo->isEmpty() );
2453 2453
2454 if ( !redo->top() ) 2454 if ( !redo->top() )
2455 mActionRedo->setText( i18n( "Redo" ) ); 2455 mActionRedo->setText( i18n( "Redo" ) );
2456 else 2456 else
2457 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); 2457 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) );
2458 2458
2459 mActionRedo->setEnabled( !redo->isEmpty() ); 2459 mActionRedo->setEnabled( !redo->isEmpty() );
2460} 2460}
2461 2461
2462void KABCore::configureKeyBindings() 2462void KABCore::configureKeyBindings()
2463{ 2463{
2464#ifndef KAB_EMBEDDED 2464#ifndef KAB_EMBEDDED
2465 KKeyDialog::configure( actionCollection(), true ); 2465 KKeyDialog::configure( actionCollection(), true );
2466#else //KAB_EMBEDDED 2466#else //KAB_EMBEDDED
2467 qDebug("KABCore::configureKeyBindings() not implemented"); 2467 qDebug("KABCore::configureKeyBindings() not implemented");
2468#endif //KAB_EMBEDDED 2468#endif //KAB_EMBEDDED
2469} 2469}
2470 2470
2471#ifdef KAB_EMBEDDED 2471#ifdef KAB_EMBEDDED
2472void KABCore::configureResources() 2472void KABCore::configureResources()
2473{ 2473{
2474 KRES::KCMKResources dlg( this, "" , 0 ); 2474 KRES::KCMKResources dlg( this, "" , 0 );
2475 2475
2476 if ( !dlg.exec() ) 2476 if ( !dlg.exec() )
2477 return; 2477 return;
2478 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); 2478 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
2479} 2479}
2480#endif //KAB_EMBEDDED 2480#endif //KAB_EMBEDDED
2481 2481
2482 2482
2483/* this method will be called through the QCop interface from Ko/Pi to select addresses 2483/* this method will be called through the QCop interface from Ko/Pi to select addresses
2484 * for the attendees list of an event. 2484 * for the attendees list of an event.
2485 */ 2485 */
2486void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) 2486void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
2487{ 2487{
2488 QStringList nameList; 2488 QStringList nameList;
2489 QStringList emailList; 2489 QStringList emailList;
2490 QStringList uidList; 2490 QStringList uidList;
2491 2491
2492 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2492 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
2493 uint i=0; 2493 uint i=0;
2494 for (i=0; i < list.count(); i++) 2494 for (i=0; i < list.count(); i++)
2495 { 2495 {
2496 nameList.append(list[i].realName()); 2496 nameList.append(list[i].realName());
2497 emailList.append(list[i].preferredEmail()); 2497 emailList.append(list[i].preferredEmail());
2498 uidList.append(list[i].uid()); 2498 uidList.append(list[i].uid());
2499 } 2499 }
2500 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); 2500 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
2501 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); 2501 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList);
2502 2502
2503} 2503}
2504 2504
2505/* this method will be called through the QCop interface from Ko/Pi to select birthdays 2505/* this method will be called through the QCop interface from Ko/Pi to select birthdays
2506 * to put them into the calendar. 2506 * to put them into the calendar.
2507 */ 2507 */
2508void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) 2508void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid)
2509{ 2509{
2510 // qDebug("KABCore::requestForBirthdayList"); 2510 // qDebug("KABCore::requestForBirthdayList");
2511 QStringList birthdayList; 2511 QStringList birthdayList;
2512 QStringList anniversaryList; 2512 QStringList anniversaryList;
2513 QStringList realNameList; 2513 QStringList realNameList;
2514 QStringList preferredEmailList; 2514 QStringList preferredEmailList;
2515 QStringList assembledNameList; 2515 QStringList assembledNameList;
2516 QStringList uidList; 2516 QStringList uidList;
2517 2517
2518 KABC::AddressBook::Iterator it; 2518 KABC::AddressBook::Iterator it;
2519 2519
2520 int count = 0; 2520 int count = 0;
2521 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2521 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2522 ++count; 2522 ++count;
2523 } 2523 }
2524 QProgressBar bar(count,0 ); 2524 QProgressBar bar(count,0 );
2525 int w = 300; 2525 int w = 300;
2526 if ( QApplication::desktop()->width() < 320 ) 2526 if ( QApplication::desktop()->width() < 320 )
2527 w = 220; 2527 w = 220;
2528 int h = bar.sizeHint().height() ; 2528 int h = bar.sizeHint().height() ;
2529 int dw = QApplication::desktop()->width(); 2529 int dw = QApplication::desktop()->width();
2530 int dh = QApplication::desktop()->height(); 2530 int dh = QApplication::desktop()->height();
2531 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2531 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2532 bar.show(); 2532 bar.show();
2533 bar.setCaption (i18n("Collecting birthdays - close to abort!") ); 2533 bar.setCaption (i18n("Collecting birthdays - close to abort!") );
2534 qApp->processEvents(); 2534 qApp->processEvents();
2535 2535
2536 QDate bday; 2536 QDate bday;
2537 QString anni; 2537 QString anni;
2538 QString formattedbday; 2538 QString formattedbday;
2539 2539
2540 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) 2540 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it )
2541 { 2541 {
2542 if ( ! bar.isVisible() ) 2542 if ( ! bar.isVisible() )
2543 return; 2543 return;
2544 bar.setProgress( count++ ); 2544 bar.setProgress( count++ );
2545 qApp->processEvents(); 2545 qApp->processEvents();
2546 bday = (*it).birthday().date(); 2546 bday = (*it).birthday().date();
2547 anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); 2547 anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" );
2548 2548
2549 if ( bday.isValid() || !anni.isEmpty()) 2549 if ( bday.isValid() || !anni.isEmpty())
2550 { 2550 {
2551 if (bday.isValid()) 2551 if (bday.isValid())
2552 formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); 2552 formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate);
2553 else 2553 else
2554 formattedbday = "NOTVALID"; 2554 formattedbday = "NOTVALID";
2555 if (anni.isEmpty()) 2555 if (anni.isEmpty())
2556 anni = "INVALID"; 2556 anni = "INVALID";
2557 2557
2558 birthdayList.append(formattedbday); 2558 birthdayList.append(formattedbday);
2559 anniversaryList.append(anni); //should be ISODate 2559 anniversaryList.append(anni); //should be ISODate
2560 realNameList.append((*it).realName()); 2560 realNameList.append((*it).realName());
2561 preferredEmailList.append((*it).preferredEmail()); 2561 preferredEmailList.append((*it).preferredEmail());
2562 assembledNameList.append((*it).assembledName()); 2562 assembledNameList.append((*it).assembledName());
2563 uidList.append((*it).uid()); 2563 uidList.append((*it).uid());
2564 2564
2565 //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() ); 2565 //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() );
2566 } 2566 }
2567 } 2567 }
2568 2568
2569 bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); 2569 bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList);
2570 2570
2571} 2571}
2572 2572
2573/* this method will be called through the QCop interface from other apps to show details of a contact. 2573/* this method will be called through the QCop interface from other apps to show details of a contact.
2574 */ 2574 */
2575void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) 2575void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid)
2576{ 2576{
2577 //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); 2577 //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1());
2578 2578
2579 QString foundUid = QString::null; 2579 QString foundUid = QString::null;
2580 if ( ! uid.isEmpty() ) { 2580 if ( ! uid.isEmpty() ) {
2581 Addressee adrr = mAddressBook->findByUid( uid ); 2581 Addressee adrr = mAddressBook->findByUid( uid );
2582 if ( !adrr.isEmpty() ) { 2582 if ( !adrr.isEmpty() ) {
2583 foundUid = uid; 2583 foundUid = uid;
2584 } 2584 }
2585 if ( email == "sendbacklist" ) { 2585 if ( email == "sendbacklist" ) {
2586 //qDebug("ssssssssssssssssssssssend "); 2586 //qDebug("ssssssssssssssssssssssend ");
2587 QStringList nameList; 2587 QStringList nameList;
2588 QStringList emailList; 2588 QStringList emailList;
2589 QStringList uidList; 2589 QStringList uidList;
2590 nameList.append(adrr.realName()); 2590 nameList.append(adrr.realName());
2591 emailList = adrr.emails(); 2591 emailList = adrr.emails();
2592 uidList.append( adrr.preferredEmail()); 2592 uidList.append( adrr.preferredEmail());
2593 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); 2593 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList);
2594 return; 2594 return;
2595 } 2595 }
2596 2596
2597 } 2597 }
2598 2598
2599 if ( email == "sendbacklist" ) 2599 if ( email == "sendbacklist" )
2600 return; 2600 return;
2601 if (foundUid.isEmpty()) 2601 if (foundUid.isEmpty())
2602 { 2602 {
2603 //find the uid of the person first 2603 //find the uid of the person first
2604 Addressee::List namelist; 2604 Addressee::List namelist;
2605 Addressee::List emaillist; 2605 Addressee::List emaillist;
2606 2606
2607 if (!name.isEmpty()) 2607 if (!name.isEmpty())
2608 namelist = mAddressBook->findByName( name ); 2608 namelist = mAddressBook->findByName( name );
2609 2609
2610 if (!email.isEmpty()) 2610 if (!email.isEmpty())
2611 emaillist = mAddressBook->findByEmail( email ); 2611 emaillist = mAddressBook->findByEmail( email );
2612 //qDebug("count %d %d ", namelist.count(),emaillist.count() ); 2612 //qDebug("count %d %d ", namelist.count(),emaillist.count() );
2613 //check if we have a match in Namelist and Emaillist 2613 //check if we have a match in Namelist and Emaillist
2614 if ((namelist.count() == 0) && (emaillist.count() > 0)) { 2614 if ((namelist.count() == 0) && (emaillist.count() > 0)) {
2615 foundUid = emaillist[0].uid(); 2615 foundUid = emaillist[0].uid();
2616 } 2616 }
2617 else if ((namelist.count() > 0) && (emaillist.count() == 0)) 2617 else if ((namelist.count() > 0) && (emaillist.count() == 0))
2618 foundUid = namelist[0].uid(); 2618 foundUid = namelist[0].uid();
2619 else 2619 else
2620 { 2620 {
2621 for (int i = 0; i < namelist.count(); i++) 2621 for (int i = 0; i < namelist.count(); i++)
2622 { 2622 {
2623 for (int j = 0; j < emaillist.count(); j++) 2623 for (int j = 0; j < emaillist.count(); j++)
2624 { 2624 {
2625 if (namelist[i] == emaillist[j]) 2625 if (namelist[i] == emaillist[j])
2626 { 2626 {
2627 foundUid = namelist[i].uid(); 2627 foundUid = namelist[i].uid();
2628 } 2628 }
2629 } 2629 }
2630 } 2630 }
2631 } 2631 }
2632 } 2632 }
2633 else 2633 else
2634 { 2634 {
2635 foundUid = uid; 2635 foundUid = uid;
2636 } 2636 }
2637 2637
2638 if (!foundUid.isEmpty()) 2638 if (!foundUid.isEmpty())
2639 { 2639 {
2640 2640
2641 // raise Ka/Pi if it is in the background 2641 // raise Ka/Pi if it is in the background
2642#ifndef DESKTOP_VERSION 2642#ifndef DESKTOP_VERSION
2643#ifndef KORG_NODCOP 2643#ifndef KORG_NODCOP
2644 //QCopEnvelope e("QPE/Application/kapi", "raise()"); 2644 //QCopEnvelope e("QPE/Application/kapi", "raise()");
2645#endif 2645#endif
2646#endif 2646#endif
2647 2647
2648 mMainWindow->showMaximized(); 2648 mMainWindow->showMaximized();
2649 mMainWindow-> raise(); 2649 mMainWindow-> raise();
2650 2650
2651 mViewManager->setSelected( "", false); 2651 mViewManager->setSelected( "", false);
2652 mViewManager->refreshView( "" ); 2652 mViewManager->refreshView( "" );
2653 mViewManager->setSelected( foundUid, true ); 2653 mViewManager->setSelected( foundUid, true );
2654 mViewManager->refreshView( foundUid ); 2654 mViewManager->refreshView( foundUid );
2655 2655
2656 if ( !mMultipleViewsAtOnce ) 2656 if ( !mMultipleViewsAtOnce )
2657 { 2657 {
2658 setDetailsVisible( true ); 2658 setDetailsVisible( true );
2659 mActionDetails->setChecked(true); 2659 mActionDetails->setChecked(true);
2660 } 2660 }
2661 } 2661 }
2662} 2662}
2663 2663
2664void KABCore::whatsnew() 2664void KABCore::whatsnew()
2665{ 2665{
2666 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 2666 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
2667} 2667}
2668void KABCore::synchowto() 2668void KABCore::synchowto()
2669{ 2669{
2670 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 2670 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
2671} 2671}
2672void KABCore::kdesynchowto() 2672void KABCore::kdesynchowto()
2673{ 2673{
2674 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 2674 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
2675} 2675}
2676void KABCore::multisynchowto() 2676void KABCore::multisynchowto()
2677{ 2677{
2678 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 2678 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
2679} 2679}
2680void KABCore::faq() 2680void KABCore::faq()
2681{ 2681{
2682 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); 2682 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" );
2683} 2683}
2684 2684
2685#include <libkcal/syncdefines.h> 2685#include <libkcal/syncdefines.h>
2686 2686
2687KABC::Addressee KABCore::getLastSyncAddressee() 2687KABC::Addressee KABCore::getLastSyncAddressee()
2688{ 2688{
2689 Addressee lse; 2689 Addressee lse;
2690 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2690 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2691 2691
2692 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); 2692 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
2693 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2693 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice );
2694 if (lse.isEmpty()) { 2694 if (lse.isEmpty()) {
2695 qDebug("KA: Creating new last-syncAddressee "); 2695 qDebug("KA: Creating new last-syncAddressee ");
2696 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2696 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice );
2697 QString sum = ""; 2697 QString sum = "";
2698 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) 2698 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
2699 sum = "E: "; 2699 sum = "E: ";
2700 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); 2700 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
2701 lse.setRevision( mLastAddressbookSync ); 2701 lse.setRevision( mLastAddressbookSync );
2702 lse.setCategories( i18n("SyncEvent") ); 2702 lse.setCategories( i18n("SyncEvent") );
2703 mAddressBook->insertAddressee( lse ); 2703 mAddressBook->insertAddressee( lse );
2704 } 2704 }
2705 return lse; 2705 return lse;
2706} 2706}
2707int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) 2707int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full )
2708{ 2708{
2709 2709
2710 //void setZaurusId(int id); 2710 //void setZaurusId(int id);
2711 // int zaurusId() const; 2711 // int zaurusId() const;
2712 // void setZaurusUid(int id); 2712 // void setZaurusUid(int id);
2713 // int zaurusUid() const; 2713 // int zaurusUid() const;
2714 // void setZaurusStat(int id); 2714 // void setZaurusStat(int id);
2715 // int zaurusStat() const; 2715 // int zaurusStat() const;
2716 // 0 equal 2716 // 0 equal
2717 // 1 take local 2717 // 1 take local
2718 // 2 take remote 2718 // 2 take remote
2719 // 3 cancel 2719 // 3 cancel
2720 QDateTime lastSync = mLastAddressbookSync; 2720 QDateTime lastSync = mLastAddressbookSync;
2721 QDateTime localMod = local->revision(); 2721 QDateTime localMod = local->revision();
2722 QDateTime remoteMod = remote->revision(); 2722 QDateTime remoteMod = remote->revision();
2723 2723
2724 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2724 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2725 2725
2726 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2726 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2727 bool remCh, locCh; 2727 bool remCh, locCh;
2728 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 2728 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
2729 //if ( remCh ) 2729 //if ( remCh )
2730 // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); 2730 // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
2731 locCh = ( localMod > mLastAddressbookSync ); 2731 locCh = ( localMod > mLastAddressbookSync );
2732 //qDebug("cahnged rem %d loc %d",remCh, locCh ); 2732 //qDebug("cahnged rem %d loc %d",remCh, locCh );
2733 if ( !remCh && ! locCh ) { 2733 if ( !remCh && ! locCh ) {
2734 //qDebug("both not changed "); 2734 //qDebug("both not changed ");
2735 lastSync = localMod.addDays(1); 2735 lastSync = localMod.addDays(1);
2736 if ( mode <= SYNC_PREF_ASK ) 2736 if ( mode <= SYNC_PREF_ASK )
2737 return 0; 2737 return 0;
2738 } else { 2738 } else {
2739 if ( locCh ) { 2739 if ( locCh ) {
2740 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); 2740 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1());
2741 lastSync = localMod.addDays( -1 ); 2741 lastSync = localMod.addDays( -1 );
2742 if ( !remCh ) 2742 if ( !remCh )
2743 remoteMod =( lastSync.addDays( -1 ) ); 2743 remoteMod =( lastSync.addDays( -1 ) );
2744 } else { 2744 } else {
2745 //qDebug(" not loc changed "); 2745 //qDebug(" not loc changed ");
2746 lastSync = localMod.addDays( 1 ); 2746 lastSync = localMod.addDays( 1 );
2747 if ( remCh ) { 2747 if ( remCh ) {
2748 //qDebug("rem changed "); 2748 //qDebug("rem changed ");
2749 remoteMod =( lastSync.addDays( 1 ) ); 2749 remoteMod =( lastSync.addDays( 1 ) );
2750 } 2750 }
2751 2751
2752 } 2752 }
2753 } 2753 }
2754 full = true; 2754 full = true;
2755 if ( mode < SYNC_PREF_ASK ) 2755 if ( mode < SYNC_PREF_ASK )
2756 mode = SYNC_PREF_ASK; 2756 mode = SYNC_PREF_ASK;
2757 } else { 2757 } else {
2758 if ( localMod == remoteMod ) 2758 if ( localMod == remoteMod )
2759 return 0; 2759 return 0;
2760 2760
2761 } 2761 }
2762 //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); 2762 //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec());
2763 //qDebug("lastsync %s ", lastSync.toString().latin1() ); 2763 //qDebug("lastsync %s ", lastSync.toString().latin1() );
2764 //full = true; //debug only 2764 //full = true; //debug only
2765 if ( full ) { 2765 if ( full ) {
2766 bool equ = ( (*local) == (*remote) ); 2766 bool equ = ( (*local) == (*remote) );
2767 if ( equ ) { 2767 if ( equ ) {
2768 //qDebug("equal "); 2768 //qDebug("equal ");
2769 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2769 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2770 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); 2770 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) );
2771 } 2771 }
2772 if ( mode < SYNC_PREF_FORCE_LOCAL ) 2772 if ( mode < SYNC_PREF_FORCE_LOCAL )
2773 return 0; 2773 return 0;
2774 2774
2775 }//else //debug only 2775 }//else //debug only
2776 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); 2776 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1());
2777 } 2777 }
2778 int result; 2778 int result;
2779 bool localIsNew; 2779 bool localIsNew;
2780 //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() ); 2780 //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() );
2781 2781
2782 if ( full && mode < SYNC_PREF_NEWEST ) 2782 if ( full && mode < SYNC_PREF_NEWEST )
2783 mode = SYNC_PREF_ASK; 2783 mode = SYNC_PREF_ASK;
2784 2784
2785 switch( mode ) { 2785 switch( mode ) {
2786 case SYNC_PREF_LOCAL: 2786 case SYNC_PREF_LOCAL:
2787 if ( lastSync > remoteMod ) 2787 if ( lastSync > remoteMod )
2788 return 1; 2788 return 1;
2789 if ( lastSync > localMod ) 2789 if ( lastSync > localMod )
2790 return 2; 2790 return 2;
2791 return 1; 2791 return 1;
2792 break; 2792 break;
2793 case SYNC_PREF_REMOTE: 2793 case SYNC_PREF_REMOTE:
2794 if ( lastSync > remoteMod ) 2794 if ( lastSync > remoteMod )
2795 return 1; 2795 return 1;
2796 if ( lastSync > localMod ) 2796 if ( lastSync > localMod )
2797 return 2; 2797 return 2;
2798 return 2; 2798 return 2;
2799 break; 2799 break;
2800 case SYNC_PREF_NEWEST: 2800 case SYNC_PREF_NEWEST:
2801 if ( localMod > remoteMod ) 2801 if ( localMod > remoteMod )
2802 return 1; 2802 return 1;
2803 else 2803 else
2804 return 2; 2804 return 2;
2805 break; 2805 break;
2806 case SYNC_PREF_ASK: 2806 case SYNC_PREF_ASK:
2807 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 2807 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
2808 if ( lastSync > remoteMod ) 2808 if ( lastSync > remoteMod )
2809 return 1; 2809 return 1;
2810 if ( lastSync > localMod ) { 2810 if ( lastSync > localMod ) {
2811 return 2; 2811 return 2;
2812 } 2812 }
2813 localIsNew = localMod >= remoteMod; 2813 localIsNew = localMod >= remoteMod;
2814 //qDebug("conflict! ************************************** "); 2814 //qDebug("conflict! ************************************** ");
2815 { 2815 {
2816 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this ); 2816 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this );
2817 result = acd.executeD(localIsNew); 2817 result = acd.executeD(localIsNew);
2818 return result; 2818 return result;
2819 } 2819 }
2820 break; 2820 break;
2821 case SYNC_PREF_FORCE_LOCAL: 2821 case SYNC_PREF_FORCE_LOCAL:
2822 return 1; 2822 return 1;
2823 break; 2823 break;
2824 case SYNC_PREF_FORCE_REMOTE: 2824 case SYNC_PREF_FORCE_REMOTE:
2825 return 2; 2825 return 2;
2826 break; 2826 break;
2827 2827
2828 default: 2828 default:
2829 // SYNC_PREF_TAKE_BOTH not implemented 2829 // SYNC_PREF_TAKE_BOTH not implemented
2830 break; 2830 break;
2831 } 2831 }
2832 return 0; 2832 return 0;
2833} 2833}
2834 2834
2835 2835
2836bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) 2836bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode)
2837{ 2837{
2838 bool syncOK = true; 2838 bool syncOK = true;
2839 int addedAddressee = 0; 2839 int addedAddressee = 0;
2840 int addedAddresseeR = 0; 2840 int addedAddresseeR = 0;
2841 int deletedAddresseeR = 0; 2841 int deletedAddresseeR = 0;
2842 int deletedAddresseeL = 0; 2842 int deletedAddresseeL = 0;
2843 int changedLocal = 0; 2843 int changedLocal = 0;
2844 int changedRemote = 0; 2844 int changedRemote = 0;
2845 int filteredIN = 0; 2845 int filteredIN = 0;
2846 int filteredOUT = 0; 2846 int filteredOUT = 0;
2847 2847
2848 QString mCurrentSyncName = syncManager->getCurrentSyncName(); 2848 QString mCurrentSyncName = syncManager->getCurrentSyncName();
2849 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2849 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2850 2850
2851 //QPtrList<Addressee> el = local->rawAddressees(); 2851 //QPtrList<Addressee> el = local->rawAddressees();
2852 Addressee addresseeR; 2852 Addressee addresseeR;
2853 QString uid; 2853 QString uid;
2854 int take; 2854 int take;
2855 Addressee addresseeL; 2855 Addressee addresseeL;
2856 Addressee addresseeRSync; 2856 Addressee addresseeRSync;
2857 Addressee addresseeLSync; 2857 Addressee addresseeLSync;
2858 // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); 2858 // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees();
2859 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); 2859 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees();
2860 bool fullDateRange = false; 2860 bool fullDateRange = false;
2861 local->resetTempSyncStat(); 2861 local->resetTempSyncStat();
2862 mLastAddressbookSync = QDateTime::currentDateTime(); 2862 mLastAddressbookSync = QDateTime::currentDateTime();
2863 if ( syncManager->syncWithDesktop() ) { 2863 if ( syncManager->syncWithDesktop() ) {
2864 // remote->removeSyncInfo( QString());//remove all info 2864 // remote->removeSyncInfo( QString());//remove all info
2865 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 2865 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
2866 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; 2866 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent;
2867 qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); 2867 qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() );
2868 } else { 2868 } else {
2869 qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime "); 2869 qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime ");
2870 } 2870 }
2871 } 2871 }
2872 QDateTime modifiedCalendar = mLastAddressbookSync; 2872 QDateTime modifiedCalendar = mLastAddressbookSync;
2873 addresseeLSync = getLastSyncAddressee(); 2873 addresseeLSync = getLastSyncAddressee();
2874 qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1()); 2874 qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1());
2875 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); 2875 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName );
2876 if ( !addresseeR.isEmpty() ) { 2876 if ( !addresseeR.isEmpty() ) {
2877 addresseeRSync = addresseeR; 2877 addresseeRSync = addresseeR;
2878 remote->removeAddressee(addresseeR ); 2878 remote->removeAddressee(addresseeR );
2879 2879
2880 } else { 2880 } else {
2881 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2881 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2882 addresseeRSync = addresseeLSync ; 2882 addresseeRSync = addresseeLSync ;
2883 } else { 2883 } else {
2884 //qDebug("FULLDATE 1"); 2884 //qDebug("FULLDATE 1");
2885 fullDateRange = true; 2885 fullDateRange = true;
2886 Addressee newAdd; 2886 Addressee newAdd;
2887 addresseeRSync = newAdd; 2887 addresseeRSync = newAdd;
2888 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); 2888 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee"));
2889 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); 2889 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName );
2890 addresseeRSync.setRevision( mLastAddressbookSync ); 2890 addresseeRSync.setRevision( mLastAddressbookSync );
2891 addresseeRSync.setCategories( i18n("SyncAddressee") ); 2891 addresseeRSync.setCategories( i18n("SyncAddressee") );
2892 } 2892 }
2893 } 2893 }
2894 if ( addresseeLSync.revision() == mLastAddressbookSync ) { 2894 if ( addresseeLSync.revision() == mLastAddressbookSync ) {
2895 // qDebug("FULLDATE 2"); 2895 // qDebug("FULLDATE 2");
2896 fullDateRange = true; 2896 fullDateRange = true;
2897 } 2897 }
2898 if ( ! fullDateRange ) { 2898 if ( ! fullDateRange ) {
2899 if ( addresseeLSync.revision() != addresseeRSync.revision() ) { 2899 if ( addresseeLSync.revision() != addresseeRSync.revision() ) {
2900 2900
2901 // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() ); 2901 // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() );
2902 //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec()); 2902 //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec());
2903 fullDateRange = true; 2903 fullDateRange = true;
2904 //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() ); 2904 //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() );
2905 } 2905 }
2906 } 2906 }
2907 // fullDateRange = true; // debug only! 2907 // fullDateRange = true; // debug only!
2908 if ( fullDateRange ) 2908 if ( fullDateRange )
2909 mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365); 2909 mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365);
2910 else 2910 else
2911 mLastAddressbookSync = addresseeLSync.revision(); 2911 mLastAddressbookSync = addresseeLSync.revision();
2912 // for resyncing if own file has changed 2912 // for resyncing if own file has changed
2913 // PENDING fixme later when implemented 2913 // PENDING fixme later when implemented
2914#if 0 2914#if 0
2915 if ( mCurrentSyncDevice == "deleteaftersync" ) { 2915 if ( mCurrentSyncDevice == "deleteaftersync" ) {
2916 mLastAddressbookSync = loadedFileVersion; 2916 mLastAddressbookSync = loadedFileVersion;
2917 qDebug("setting mLastAddressbookSync "); 2917 qDebug("setting mLastAddressbookSync ");
2918 } 2918 }
2919#endif 2919#endif
2920 2920
2921 2921
2922 // ********** setting filters **************** 2922 // ********** setting filters ****************
2923 Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB ); 2923 Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB );
2924 Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB ); 2924 Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB );
2925 2925
2926 //qDebug("*************************** "); 2926 //qDebug("*************************** ");
2927 // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); 2927 // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() );
2928 QStringList er = remote->uidList(); 2928 QStringList er = remote->uidList();
2929 Addressee inR ;//= er.first(); 2929 Addressee inR ;//= er.first();
2930 Addressee inL; 2930 Addressee inL;
2931 2931
2932 syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count()); 2932 syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count());
2933 2933
2934 int modulo = (er.count()/10)+1; 2934 int modulo = (er.count()/10)+1;
2935 int incCounter = 0; 2935 int incCounter = 0;
2936 while ( incCounter < er.count()) { 2936 while ( incCounter < er.count()) {
2937 if (syncManager->isProgressBarCanceled()) 2937 if (syncManager->isProgressBarCanceled())
2938 return false; 2938 return false;
2939 if ( incCounter % modulo == 0 ) 2939 if ( incCounter % modulo == 0 )
2940 syncManager->showProgressBar(incCounter); 2940 syncManager->showProgressBar(incCounter);
2941 2941
2942 uid = er[ incCounter ]; 2942 uid = er[ incCounter ];
2943 bool skipIncidence = false; 2943 bool skipIncidence = false;
2944 if ( uid.left(19) == QString("last-syncAddressee-") ) 2944 if ( uid.left(19) == QString("last-syncAddressee-") )
2945 skipIncidence = true; 2945 skipIncidence = true;
2946 QString idS,OidS; 2946 QString idS,OidS;
2947 qApp->processEvents(); 2947 qApp->processEvents();
2948 if ( !skipIncidence ) { 2948 if ( !skipIncidence ) {
2949 inL = local->findByUid( uid ); 2949 inL = local->findByUid( uid );
2950 inR = remote->findByUid( uid ); 2950 inR = remote->findByUid( uid );
2951 //inL.setResource( 0 ); 2951 //inL.setResource( 0 );
2952 //inR.setResource( 0 ); 2952 //inR.setResource( 0 );
2953 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars 2953 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars
2954 if ( !inL.resource() || inL.resource()->includeInSync() ) { 2954 if ( !inL.resource() || inL.resource()->includeInSync() ) {
2955 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) { 2955 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) {
2956 //qDebug("take %d %s ", take, inL.summary().latin1()); 2956 //qDebug("take %d %s ", take, inL.summary().latin1());
2957 if ( take == 3 ) 2957 if ( take == 3 )
2958 return false; 2958 return false;
2959 if ( take == 1 ) {// take local ********************** 2959 if ( take == 1 ) {// take local **********************
2960 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2960 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2961 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 2961 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
2962 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 2962 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
2963 local->insertAddressee( inL, false ); 2963 local->insertAddressee( inL, false );
2964 idS = inR.externalUID(); 2964 idS = inR.externalUID();
2965 OidS = inR.originalExternalUID(); 2965 OidS = inR.originalExternalUID();
2966 } 2966 }
2967 else 2967 else
2968 idS = inR.IDStr(); 2968 idS = inR.IDStr();
2969 remote->removeAddressee( inR ); 2969 remote->removeAddressee( inR );
2970 inR = inL; 2970 inR = inL;
2971 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 2971 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
2972 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2972 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2973 inR.setOriginalExternalUID( OidS ); 2973 inR.setOriginalExternalUID( OidS );
2974 inR.setExternalUID( idS ); 2974 inR.setExternalUID( idS );
2975 if ( syncManager->syncWithDesktop() ) { 2975 if ( syncManager->syncWithDesktop() ) {
2976 inR.setIDStr("changed" ); 2976 inR.setIDStr("changed" );
2977 } 2977 }
2978 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); 2978 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" );
2979 } else { 2979 } else {
2980 inR.setIDStr( idS ); 2980 inR.setIDStr( idS );
2981 } 2981 }
2982 inR.setResource( 0 ); 2982 inR.setResource( 0 );
2983 remote->insertAddressee( inR , false); 2983 remote->insertAddressee( inR , false);
2984 ++changedRemote; 2984 ++changedRemote;
2985 } else { // take == 2 take remote ********************** 2985 } else { // take == 2 take remote **********************
2986 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2986 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2987 if ( inR.revision().date().year() < 2004 ) 2987 if ( inR.revision().date().year() < 2004 )
2988 inR.setRevision( modifiedCalendar ); 2988 inR.setRevision( modifiedCalendar );
2989 } 2989 }
2990 idS = inL.IDStr(); 2990 idS = inL.IDStr();
2991 local->removeAddressee( inL ); 2991 local->removeAddressee( inL );
2992 inL = inR; 2992 inL = inR;
2993 inL.setIDStr( idS ); 2993 inL.setIDStr( idS );
2994 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2994 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2995 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 2995 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
2996 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 2996 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
2997 } 2997 }
2998 inL.setResource( 0 ); 2998 inL.setResource( 0 );
2999 local->insertAddressee( inL , false ); 2999 local->insertAddressee( inL , false );
3000 ++changedLocal; 3000 ++changedLocal;
3001 } 3001 }
3002 } 3002 }
3003 } 3003 }
3004 } else { // no conflict ********** add or delete remote 3004 } else { // no conflict ********** add or delete remote
3005 if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) { 3005 if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) {
3006 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3006 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3007 QString des = addresseeLSync.note(); 3007 QString des = addresseeLSync.note();
3008 if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it 3008 if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
3009 inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); 3009 inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE );
3010 remote->insertAddressee( inR, false ); 3010 remote->insertAddressee( inR, false );
3011 ++deletedAddresseeR; 3011 ++deletedAddresseeR;
3012 } else { 3012 } else {
3013 inR.setRevision( modifiedCalendar ); 3013 inR.setRevision( modifiedCalendar );
3014 remote->insertAddressee( inR, false ); 3014 remote->insertAddressee( inR, false );
3015 inL = inR; 3015 inL = inR;
3016 inL.setIDStr( ":" ); 3016 inL.setIDStr( ":" );
3017 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3017 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3018 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3018 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3019 inL.setResource( 0 ); 3019 inL.setResource( 0 );
3020 local->insertAddressee( inL , false); 3020 local->insertAddressee( inL , false);
3021 ++addedAddressee; 3021 ++addedAddressee;
3022 } 3022 }
3023 } else { 3023 } else {
3024 if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { 3024 if ( inR.revision() > mLastAddressbookSync || mode == 5 ) {
3025 inR.setRevision( modifiedCalendar ); 3025 inR.setRevision( modifiedCalendar );
3026 remote->insertAddressee( inR, false ); 3026 remote->insertAddressee( inR, false );
3027 inR.setResource( 0 ); 3027 inR.setResource( 0 );
3028 local->insertAddressee( inR, false ); 3028 local->insertAddressee( inR, false );
3029 ++addedAddressee; 3029 ++addedAddressee;
3030 } else { 3030 } else {
3031 // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); 3031 // pending checkExternSyncAddressee(addresseeRSyncSharp, inR);
3032 remote->removeAddressee( inR ); 3032 remote->removeAddressee( inR );
3033 ++deletedAddresseeR; 3033 ++deletedAddresseeR;
3034 } 3034 }
3035 } 3035 }
3036 } else { 3036 } else {
3037 ++filteredIN; 3037 ++filteredIN;
3038 } 3038 }
3039 } 3039 }
3040 } 3040 }
3041 ++incCounter; 3041 ++incCounter;
3042 } 3042 }
3043 er.clear(); 3043 er.clear();
3044 QStringList el = local->uidList(); 3044 QStringList el = local->uidList();
3045 modulo = (el.count()/10)+1; 3045 modulo = (el.count()/10)+1;
3046 3046
3047 syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); 3047 syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count());
3048 incCounter = 0; 3048 incCounter = 0;
3049 while ( incCounter < el.count()) { 3049 while ( incCounter < el.count()) {
3050 qApp->processEvents(); 3050 qApp->processEvents();
3051 if (syncManager->isProgressBarCanceled()) 3051 if (syncManager->isProgressBarCanceled())
3052 return false; 3052 return false;
3053 if ( incCounter % modulo == 0 ) 3053 if ( incCounter % modulo == 0 )
3054 syncManager->showProgressBar(incCounter); 3054 syncManager->showProgressBar(incCounter);
3055 uid = el[ incCounter ]; 3055 uid = el[ incCounter ];
3056 bool skipIncidence = false; 3056 bool skipIncidence = false;
3057 if ( uid.left(19) == QString("last-syncAddressee-") ) 3057 if ( uid.left(19) == QString("last-syncAddressee-") )
3058 skipIncidence = true; 3058 skipIncidence = true;
3059 if ( !skipIncidence ) { 3059 if ( !skipIncidence ) {
3060 inL = local->findByUid( uid ); 3060 inL = local->findByUid( uid );
3061 if ( !inL.resource() || inL.resource()->includeInSync() ) { 3061 if ( !inL.resource() || inL.resource()->includeInSync() ) {
3062 inR = remote->findByUid( uid ); 3062 inR = remote->findByUid( uid );
3063 if ( inR.isEmpty() ){ 3063 if ( inR.isEmpty() ){
3064 if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) { 3064 if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) {
3065 // no conflict ********** add or delete local 3065 // no conflict ********** add or delete local
3066 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3066 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3067 if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { 3067 if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {
3068 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 3068 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
3069 local->removeAddressee( inL ); 3069 local->removeAddressee( inL );
3070 ++deletedAddresseeL; 3070 ++deletedAddresseeL;
3071 } else { 3071 } else {
3072 if ( ! syncManager->mWriteBackExistingOnly ) { 3072 if ( ! syncManager->mWriteBackExistingOnly ) {
3073 inL.removeID(mCurrentSyncDevice ); 3073 inL.removeID(mCurrentSyncDevice );
3074 ++addedAddresseeR; 3074 ++addedAddresseeR;
3075 inL.setRevision( modifiedCalendar ); 3075 inL.setRevision( modifiedCalendar );
3076 local->insertAddressee( inL, false ); 3076 local->insertAddressee( inL, false );
3077 inR = inL; 3077 inR = inL;
3078 inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); 3078 inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL );
3079 inR.setResource( 0 ); 3079 inR.setResource( 0 );
3080 remote->insertAddressee( inR, false ); 3080 remote->insertAddressee( inR, false );
3081 } 3081 }
3082 } 3082 }
3083 } else { 3083 } else {
3084 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { 3084 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) {
3085 //qDebug("data %s ", inL.revision().toString().latin1()); 3085 //qDebug("data %s ", inL.revision().toString().latin1());
3086 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 3086 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
3087 local->removeAddressee( inL ); 3087 local->removeAddressee( inL );
3088 ++deletedAddresseeL; 3088 ++deletedAddresseeL;
3089 } else { 3089 } else {
3090 if ( ! syncManager->mWriteBackExistingOnly ) { 3090 if ( ! syncManager->mWriteBackExistingOnly ) {
3091 ++addedAddresseeR; 3091 ++addedAddresseeR;
3092 inL.setRevision( modifiedCalendar ); 3092 inL.setRevision( modifiedCalendar );
3093 local->insertAddressee( inL, false ); 3093 local->insertAddressee( inL, false );
3094 inR = inL; 3094 inR = inL;
3095 inR.setIDStr( ":" ); 3095 inR.setIDStr( ":" );
3096 inR.setResource( 0 ); 3096 inR.setResource( 0 );
3097 remote->insertAddressee( inR, false ); 3097 remote->insertAddressee( inR, false );
3098 } 3098 }
3099 } 3099 }
3100 } 3100 }
3101 } else { 3101 } else {
3102 ++filteredOUT; 3102 ++filteredOUT;
3103 } 3103 }
3104 } 3104 }
3105 } 3105 }
3106 } 3106 }
3107 ++incCounter; 3107 ++incCounter;
3108 } 3108 }
3109 el.clear(); 3109 el.clear();
3110 syncManager->hideProgressBar(); 3110 syncManager->hideProgressBar();
3111 mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); 3111 mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 );
3112 // get rid of micro seconds 3112 // get rid of micro seconds
3113 QTime t = mLastAddressbookSync.time(); 3113 QTime t = mLastAddressbookSync.time();
3114 mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); 3114 mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) );
3115 addresseeLSync.setRevision( mLastAddressbookSync ); 3115 addresseeLSync.setRevision( mLastAddressbookSync );
3116 addresseeRSync.setRevision( mLastAddressbookSync ); 3116 addresseeRSync.setRevision( mLastAddressbookSync );
3117 addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; 3117 addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ;
3118 addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); 3118 addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName );
3119 addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; 3119 addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ;
3120 addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); 3120 addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") );
3121 addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; 3121 addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ;
3122 addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); 3122 addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() );
3123 addresseeRSync.setNote( "" ) ; 3123 addresseeRSync.setNote( "" ) ;
3124 addresseeLSync.setNote( "" ); 3124 addresseeLSync.setNote( "" );
3125 3125
3126 if ( mGlobalSyncMode == SYNC_MODE_NORMAL) 3126 if ( mGlobalSyncMode == SYNC_MODE_NORMAL)
3127 remote->insertAddressee( addresseeRSync, false ); 3127 remote->insertAddressee( addresseeRSync, false );
3128 local->insertAddressee( addresseeLSync, false ); 3128 local->insertAddressee( addresseeLSync, false );
3129 QString mes; 3129 QString mes;
3130 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 %d incoming filtered out\n %d outgoing filtered out"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR, filteredIN, filteredOUT ); 3130 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 %d incoming filtered out\n %d outgoing filtered out"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR, filteredIN, filteredOUT );
3131 qDebug( mes ); 3131 qDebug( mes );
3132 mes = i18n("Local addressbook changed!\n") +mes; 3132 mes = i18n("Local addressbook changed!\n") +mes;
3133 if ( syncManager->mShowSyncSummary ) { 3133 if ( syncManager->mShowSyncSummary ) {
3134 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, 3134 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
3135 i18n("KA/Pi Synchronization"),i18n("Write back"))) { 3135 i18n("KA/Pi Synchronization"),i18n("Write back"))) {
3136 qDebug("KA: WB cancelled "); 3136 qDebug("KA: WB cancelled ");
3137 return false; 3137 syncManager->mWriteBackFile = false;
3138 return syncOK;
3138 } 3139 }
3139 } 3140 }
3140 return syncOK; 3141 return syncOK;
3141} 3142}
3142 3143
3143 3144
3144//this is a overwritten callbackmethods from the syncinterface 3145//this is a overwritten callbackmethods from the syncinterface
3145bool KABCore::sync(KSyncManager* manager, QString filename, int mode) 3146bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
3146{ 3147{
3147 3148
3148 //pending prepare addresseeview for output 3149 //pending prepare addresseeview for output
3149 //pending detect, if remote file has REV field. if not switch to external sync 3150 //pending detect, if remote file has REV field. if not switch to external sync
3150 mGlobalSyncMode = SYNC_MODE_NORMAL; 3151 mGlobalSyncMode = SYNC_MODE_NORMAL;
3151 if ( manager != syncManager ) 3152 if ( manager != syncManager )
3152 qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); 3153 qDebug("KABCore::sync:: ERROR! :: manager != syncManager ");
3153 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3154 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3154 3155
3155 AddressBook abLocal(filename,"syncContact"); 3156 AddressBook abLocal(filename,"syncContact");
3156 bool syncOK = false; 3157 bool syncOK = false;
3157 if ( abLocal.load() ) { 3158 if ( abLocal.load() ) {
3158 qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); 3159 qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode );
3159 bool external = false; 3160 bool external = false;
3160 bool isXML = false; 3161 bool isXML = false;
3161 if ( filename.right(4) == ".xml") { 3162 if ( filename.right(4) == ".xml") {
3162 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3163 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3163 isXML = true; 3164 isXML = true;
3164 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3165 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3165 } else { 3166 } else {
3166 external = !manager->mIsKapiFile; 3167 external = !manager->mIsKapiFile;
3167 if ( external ) { 3168 if ( external ) {
3168 qDebug("KA: Sync::Setting vcf mode to external "); 3169 qDebug("KA: Sync::Setting vcf mode to external ");
3169 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3170 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3170 AddressBook::Iterator it; 3171 AddressBook::Iterator it;
3171 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 3172 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
3172 (*it).setID( mCurrentSyncDevice, (*it).uid() ); 3173 (*it).setID( mCurrentSyncDevice, (*it).uid() );
3173 (*it).computeCsum( mCurrentSyncDevice ); 3174 (*it).computeCsum( mCurrentSyncDevice );
3174 } 3175 }
3175 } 3176 }
3176 } 3177 }
3177 //AddressBook::Iterator it; 3178 //AddressBook::Iterator it;
3178 //QStringList vcards; 3179 //QStringList vcards;
3179 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 3180 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
3180 // qDebug("Name %s ", (*it).familyName().latin1()); 3181 // qDebug("Name %s ", (*it).familyName().latin1());
3181 //} 3182 //}
3182 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); 3183 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode );
3183 if ( syncOK ) { 3184 if ( syncOK ) {
3184 if ( syncManager->mWriteBackFile ) 3185 if ( syncManager->mWriteBackFile )
3185 { 3186 {
3186 if ( external ) 3187 if ( external )
3187 abLocal.removeSyncAddressees( !isXML); 3188 abLocal.removeSyncAddressees( !isXML);
3188 qDebug("KA: Sync::Saving remote AB "); 3189 qDebug("KA: Sync::Saving remote AB ");
3189 if ( ! abLocal.saveAB()) 3190 if ( ! abLocal.saveAB())
3190 qDebug("KA: sync::Error writing back AB to file "); 3191 qDebug("KA: sync::Error writing back AB to file ");
3191 if ( external ) { 3192 if ( external ) {
3192 // afterwrite processing 3193 // afterwrite processing
3193 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); 3194 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML);
3194 } 3195 }
3195 } 3196 }
3196 } 3197 }
3197 setModified(); 3198 setModified();
3198 3199
3199 } 3200 }
3200 abLocal.removeResources(); 3201 abLocal.removeResources();
3201 if ( syncOK ) 3202 if ( syncOK )
3202 mViewManager->refreshView(); 3203 mViewManager->refreshView();
3203 return syncOK; 3204 return syncOK;
3204 3205
3205} 3206}
3206void KABCore::removeSyncInfo( QString syncProfile) 3207void KABCore::removeSyncInfo( QString syncProfile)
3207{ 3208{
3208 qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); 3209 qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1());
3209 mAddressBook->removeSyncInfo( syncProfile ); 3210 mAddressBook->removeSyncInfo( syncProfile );
3210 setModified(); 3211 setModified();
3211} 3212}
3212 3213
3213 3214
3214//this is a overwritten callbackmethods from the syncinterface 3215//this is a overwritten callbackmethods from the syncinterface
3215bool KABCore::syncExternal(KSyncManager* manager, QString resource) 3216bool KABCore::syncExternal(KSyncManager* manager, QString resource)
3216{ 3217{
3217 if ( resource == "phone" ) 3218 if ( resource == "phone" )
3218 return syncPhone(); 3219 return syncPhone();
3219 disableBR( true ); 3220 disableBR( true );
3220 if ( manager != syncManager ) 3221 if ( manager != syncManager )
3221 qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); 3222 qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager ");
3222 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3223 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3223 3224
3224 AddressBook abLocal( resource,"syncContact"); 3225 AddressBook abLocal( resource,"syncContact");
3225 bool syncOK = false; 3226 bool syncOK = false;
3226 message(i18n("Loading DTM address data..."), false); 3227 message(i18n("Loading DTM address data..."), false);
3227 if ( abLocal.load() ) { 3228 if ( abLocal.load() ) {
3228 qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3229 qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
3229 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3230 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3230 message(i18n("Sync preprocessing..."),false); 3231 message(i18n("Sync preprocessing..."),false);
3231 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); 3232 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false );
3232 message(i18n("Synchronizing..."),false); 3233 message(i18n("Synchronizing..."),false);
3233 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3234 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3234 if ( syncOK ) { 3235 if ( syncOK ) {
3235 if ( syncManager->mWriteBackFile ) { 3236 if ( syncManager->mWriteBackFile ) {
3236 abLocal.removeSyncAddressees( false ); 3237 abLocal.removeSyncAddressees( false );
3237 message(i18n("Saving DTM address data..."),false); 3238 message(i18n("Saving DTM address data..."),false);
3238 abLocal.saveAB(); 3239 abLocal.saveAB();
3239 message(i18n("Sync postprocessing..."),false); 3240 message(i18n("Sync postprocessing..."),false);
3240 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3241 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3241 } 3242 }
3242 } else 3243 } else
3243 message( i18n("Sync cancelled or failed.") ); 3244 message( i18n("Sync cancelled or failed.") );
3244 setModified(); 3245 setModified();
3245 } 3246 }
3246 abLocal.removeResources(); 3247 abLocal.removeResources();
3247 if ( syncOK ) { 3248 if ( syncOK ) {
3248 mViewManager->refreshView(); 3249 mViewManager->refreshView();
3249 message(i18n("DTM syncing finished.")); 3250 message(i18n("DTM syncing finished."));
3250 } 3251 }
3251 disableBR( false ); 3252 disableBR( false );
3252 return syncOK; 3253 return syncOK;
3253 3254
3254} 3255}
3255void KABCore::message( QString m, bool startTimer) 3256void KABCore::message( QString m, bool startTimer)
3256{ 3257{
3257 topLevelWidget()->setCaption( m ); 3258 topLevelWidget()->setCaption( m );
3258 qApp->processEvents(); 3259 qApp->processEvents();
3259 if ( startTimer ) 3260 if ( startTimer )
3260 mMessageTimer->start( 15000, true ); 3261 mMessageTimer->start( 15000, true );
3261 else 3262 else
3262 mMessageTimer->stop(); 3263 mMessageTimer->stop();
3263} 3264}
3264bool KABCore::syncPhone() 3265bool KABCore::syncPhone()
3265{ 3266{
3266 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 3267 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
3267 QString fileName = getPhoneFile(); 3268 QString fileName = getPhoneFile();
3268 if ( !PhoneAccess::readFromPhone( fileName) ) { 3269 if ( !PhoneAccess::readFromPhone( fileName) ) {
3269 message(i18n("Phone access failed!")); 3270 message(i18n("Phone access failed!"));
3270 return false; 3271 return false;
3271 } 3272 }
3272 AddressBook abLocal( fileName,"syncContact"); 3273 AddressBook abLocal( fileName,"syncContact");
3273 bool syncOK = false; 3274 bool syncOK = false;
3274 { 3275 {
3275 abLocal.importFromFile( fileName ); 3276 abLocal.importFromFile( fileName );
3276 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3277 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1());
3277 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3278 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3278 abLocal.preparePhoneSync( mCurrentSyncDevice, true ); 3279 abLocal.preparePhoneSync( mCurrentSyncDevice, true );
3279 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3280 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3280 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3281 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3281 if ( syncOK ) { 3282 if ( syncOK ) {
3282 if ( syncManager->mWriteBackFile ) { 3283 if ( syncManager->mWriteBackFile ) {
3283 abLocal.removeSyncAddressees( true ); 3284 abLocal.removeSyncAddressees( true );
3284 abLocal.saveABphone( fileName ); 3285 abLocal.saveABphone( fileName );
3285 abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); 3286 abLocal.findNewExtIds( fileName, mCurrentSyncDevice );
3286 //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); 3287 //abLocal.preparePhoneSync( mCurrentSyncDevice, false );
3287 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3288 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3288 } 3289 }
3289 } 3290 }
3290 setModified(); 3291 setModified();
3291 } 3292 }
3292 abLocal.removeResources(); 3293 abLocal.removeResources();
3293 if ( syncOK ) 3294 if ( syncOK )
3294 mViewManager->refreshView(); 3295 mViewManager->refreshView();
3295 return syncOK; 3296 return syncOK;
3296} 3297}
3297void KABCore::getFile( bool success ) 3298void KABCore::getFile( bool success )
3298{ 3299{
3299 if ( ! success ) { 3300 if ( ! success ) {
3300 message( i18n("Error receiving file. Nothing changed!") ); 3301 message( i18n("Error receiving file. Nothing changed!") );
3301 return; 3302 return;
3302 } 3303 }
3303 int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); 3304 int count = mAddressBook->importFromFile( sentSyncFile() , false, true );
3304 if ( count ) 3305 if ( count )
3305 setModified( true ); 3306 setModified( true );
3306 message( i18n("Pi-Sync successful!") ); 3307 message( i18n("Pi-Sync successful!") );
3307 mViewManager->refreshView(); 3308 mViewManager->refreshView();
3308} 3309}
3309void KABCore::syncFileRequest() 3310void KABCore::syncFileRequest()
3310{ 3311{
3311 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { 3312 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) {
3312 syncManager->slotSyncMenu( 999 ); 3313 syncManager->slotSyncMenu( 999 );
3313 } 3314 }
3314 mAddressBook->export2File( sentSyncFile() ); 3315 mAddressBook->export2File( sentSyncFile() );
3315} 3316}
3316QString KABCore::sentSyncFile() 3317QString KABCore::sentSyncFile()
3317{ 3318{
3318#ifdef DESKTOP_VERSION 3319#ifdef DESKTOP_VERSION
3319 return locateLocal( "tmp", "copysyncab.vcf" ); 3320 return locateLocal( "tmp", "copysyncab.vcf" );
3320#else 3321#else
3321 return QString( "/tmp/copysyncab.vcf" ); 3322 return QString( "/tmp/copysyncab.vcf" );
3322#endif 3323#endif
3323} 3324}
3324 3325
3325void KABCore::setCaptionBack() 3326void KABCore::setCaptionBack()
3326{ 3327{
3327 mMessageTimer->stop(); 3328 mMessageTimer->stop();
3328 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); 3329 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") );
3329} 3330}
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index a9de65a..7c8316f 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1,3911 +1,3912 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 3
4 Requires the Qt and KDE widget libraries, available at no cost at 4 Requires the Qt and KDE widget libraries, available at no cost at
5 http://www.troll.no and http://www.kde.org respectively 5 http://www.troll.no and http://www.kde.org respectively
6 6
7 Copyright (c) 1997, 1998, 1999 7 Copyright (c) 1997, 1998, 1999
8 Preston Brown (preston.brown@yale.edu) 8 Preston Brown (preston.brown@yale.edu)
9 Fester Zigterman (F.J.F.ZigtermanRustenburg@student.utwente.nl) 9 Fester Zigterman (F.J.F.ZigtermanRustenburg@student.utwente.nl)
10 Ian Dawes (iadawes@globalserve.net) 10 Ian Dawes (iadawes@globalserve.net)
11 Laszlo Boloni (boloni@cs.purdue.edu) 11 Laszlo Boloni (boloni@cs.purdue.edu)
12 12
13 Copyright (c) 2000, 2001, 2002 13 Copyright (c) 2000, 2001, 2002
14 Cornelius Schumacher <schumacher@kde.org> 14 Cornelius Schumacher <schumacher@kde.org>
15 15
16 This program is free software; you can redistribute it and/or modify 16 This program is free software; you can redistribute it and/or modify
17 it under the terms of the GNU General Public License as published by 17 it under the terms of the GNU General Public License as published by
18 the Free Software Foundation; either version 2 of the License, or 18 the Free Software Foundation; either version 2 of the License, or
19 (at your option) any later version. 19 (at your option) any later version.
20 20
21 This program is distributed in the hope that it will be useful, 21 This program is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of 22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the 23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
24 GNU General Public License for more details. 24 GNU General Public License for more details.
25 25
26 You should have received a copy of the GNU General Public License 26 You should have received a copy of the GNU General Public License
27 along with this program; if not, write to the Free Software 27 along with this program; if not, write to the Free Software
28 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 28 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include <stdlib.h> 31#include <stdlib.h>
32 32
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qradiobutton.h> 34#include <qradiobutton.h>
35#include <qbuttongroup.h> 35#include <qbuttongroup.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qclipboard.h> 37#include <qclipboard.h>
38#include <qcursor.h> 38#include <qcursor.h>
39#include <qmessagebox.h> 39#include <qmessagebox.h>
40#include <qprogressbar.h> 40#include <qprogressbar.h>
41#include <qmultilineedit.h> 41#include <qmultilineedit.h>
42#include <qtimer.h> 42#include <qtimer.h>
43#include <qwidgetstack.h> 43#include <qwidgetstack.h>
44#include <qptrlist.h> 44#include <qptrlist.h>
45#include <qregexp.h> 45#include <qregexp.h>
46#include <qgroupbox.h> 46#include <qgroupbox.h>
47#include <qfile.h> 47#include <qfile.h>
48#include <qdir.h> 48#include <qdir.h>
49#ifndef KORG_NOSPLITTER 49#ifndef KORG_NOSPLITTER
50#include <qsplitter.h> 50#include <qsplitter.h>
51#endif 51#endif
52 52
53#include <kglobal.h> 53#include <kglobal.h>
54#include <kdebug.h> 54#include <kdebug.h>
55#include <kstandarddirs.h> 55#include <kstandarddirs.h>
56#include <kfiledialog.h> 56#include <kfiledialog.h>
57#include <kmessagebox.h> 57#include <kmessagebox.h>
58#include <knotifyclient.h> 58#include <knotifyclient.h>
59#include <kconfig.h> 59#include <kconfig.h>
60 60
61#include <libkdepim/ksyncprefsdialog.h> 61#include <libkdepim/ksyncprefsdialog.h>
62#include <krun.h> 62#include <krun.h>
63#include <kdirwatch.h> 63#include <kdirwatch.h>
64#include <libkdepim/kdatepicker.h> 64#include <libkdepim/kdatepicker.h>
65#include <libkdepim/ksyncprofile.h> 65#include <libkdepim/ksyncprofile.h>
66#include <libkdepim/kpimglobalprefs.h> 66#include <libkdepim/kpimglobalprefs.h>
67 67
68#include <libkcal/vcaldrag.h> 68#include <libkcal/vcaldrag.h>
69#include <libkcal/icaldrag.h> 69#include <libkcal/icaldrag.h>
70#include <libkcal/icalformat.h> 70#include <libkcal/icalformat.h>
71#include <libkcal/vcalformat.h> 71#include <libkcal/vcalformat.h>
72#include <libkcal/scheduler.h> 72#include <libkcal/scheduler.h>
73#include <libkcal/calendarlocal.h> 73#include <libkcal/calendarlocal.h>
74#include <libkcal/journal.h> 74#include <libkcal/journal.h>
75#include <libkcal/calfilter.h> 75#include <libkcal/calfilter.h>
76#include <libkcal/attendee.h> 76#include <libkcal/attendee.h>
77#include <libkcal/dndfactory.h> 77#include <libkcal/dndfactory.h>
78#include <libkcal/freebusy.h> 78#include <libkcal/freebusy.h>
79#include <libkcal/filestorage.h> 79#include <libkcal/filestorage.h>
80#include <libkcal/calendarresources.h> 80#include <libkcal/calendarresources.h>
81#include <libkcal/qtopiaformat.h> 81#include <libkcal/qtopiaformat.h>
82#include "../kalarmd/alarmdialog.h" 82#include "../kalarmd/alarmdialog.h"
83 83
84#ifndef DESKTOP_VERSION 84#ifndef DESKTOP_VERSION
85#include <libkcal/sharpformat.h> 85#include <libkcal/sharpformat.h>
86#include <externalapphandler.h> 86#include <externalapphandler.h>
87#endif 87#endif
88#include <libkcal/phoneformat.h> 88#include <libkcal/phoneformat.h>
89#ifndef KORG_NOMAIL 89#ifndef KORG_NOMAIL
90#include "komailclient.h" 90#include "komailclient.h"
91#endif 91#endif
92#ifndef KORG_NOPRINTER 92#ifndef KORG_NOPRINTER
93#include "calprinter.h" 93#include "calprinter.h"
94#endif 94#endif
95#ifndef KORG_NOPLUGINS 95#ifndef KORG_NOPLUGINS
96#include "kocore.h" 96#include "kocore.h"
97#endif 97#endif
98#include "koeventeditor.h" 98#include "koeventeditor.h"
99#include "kotodoeditor.h" 99#include "kotodoeditor.h"
100#include "koprefs.h" 100#include "koprefs.h"
101#include "koeventviewerdialog.h" 101#include "koeventviewerdialog.h"
102#include "publishdialog.h" 102#include "publishdialog.h"
103#include "kofilterview.h" 103#include "kofilterview.h"
104#include "koglobals.h" 104#include "koglobals.h"
105#include "koviewmanager.h" 105#include "koviewmanager.h"
106#include "koagendaview.h" 106#include "koagendaview.h"
107#include "kodialogmanager.h" 107#include "kodialogmanager.h"
108#include "outgoingdialog.h" 108#include "outgoingdialog.h"
109#include "incomingdialog.h" 109#include "incomingdialog.h"
110#include "statusdialog.h" 110#include "statusdialog.h"
111#include "kdatenavigator.h" 111#include "kdatenavigator.h"
112#include "kotodoview.h" 112#include "kotodoview.h"
113#include "datenavigator.h" 113#include "datenavigator.h"
114#include "resourceview.h" 114#include "resourceview.h"
115#include "navigatorbar.h" 115#include "navigatorbar.h"
116#include "searchdialog.h" 116#include "searchdialog.h"
117#include "mainwindow.h" 117#include "mainwindow.h"
118 118
119#include "calendarview.h" 119#include "calendarview.h"
120#ifndef DESKTOP_VERSION 120#ifndef DESKTOP_VERSION
121#include <qtopia/alarmserver.h> 121#include <qtopia/alarmserver.h>
122#endif 122#endif
123#ifndef _WIN32_ 123#ifndef _WIN32_
124#include <stdlib.h> 124#include <stdlib.h>
125#include <stdio.h> 125#include <stdio.h>
126#include <unistd.h> 126#include <unistd.h>
127#else 127#else
128#include <qprocess.h> 128#include <qprocess.h>
129#endif 129#endif
130 130
131#ifdef DESKTOP_VERSION 131#ifdef DESKTOP_VERSION
132#include <kabc/stdaddressbook.h> 132#include <kabc/stdaddressbook.h>
133#endif 133#endif
134using namespace KOrg; 134using namespace KOrg;
135using namespace KCal; 135using namespace KCal;
136extern int globalFlagBlockAgenda; 136extern int globalFlagBlockAgenda;
137extern int globalFlagBlockStartup; 137extern int globalFlagBlockStartup;
138 138
139 139
140 140
141class KOBeamPrefs : public QDialog 141class KOBeamPrefs : public QDialog
142{ 142{
143 public: 143 public:
144 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) : 144 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) :
145 QDialog( parent, name, true ) 145 QDialog( parent, name, true )
146 { 146 {
147 setCaption( i18n("Beam Options") ); 147 setCaption( i18n("Beam Options") );
148 QVBoxLayout* lay = new QVBoxLayout( this ); 148 QVBoxLayout* lay = new QVBoxLayout( this );
149 lay->setSpacing( 3 ); 149 lay->setSpacing( 3 );
150 lay->setMargin( 3 ); 150 lay->setMargin( 3 );
151 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); 151 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this );
152 lay->addWidget( format ); 152 lay->addWidget( format );
153 format->setExclusive ( true ) ; 153 format->setExclusive ( true ) ;
154 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); 154 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this );
155 lay->addWidget( time ); time->setExclusive ( true ) ; 155 lay->addWidget( time ); time->setExclusive ( true ) ;
156 vcal = new QRadioButton(" vCalendar ", format ); 156 vcal = new QRadioButton(" vCalendar ", format );
157 ical = new QRadioButton(" iCalendar ", format ); 157 ical = new QRadioButton(" iCalendar ", format );
158 vcal->setChecked( true ); 158 vcal->setChecked( true );
159 tz = new QRadioButton(i18n(" With timezone "), time ); 159 tz = new QRadioButton(i18n(" With timezone "), time );
160 local = new QRadioButton(i18n(" Local time "), time ); 160 local = new QRadioButton(i18n(" Local time "), time );
161 tz->setChecked( true ); 161 tz->setChecked( true );
162 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this ); 162 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this );
163 lay->addWidget( ok ); 163 lay->addWidget( ok );
164 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 164 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
165 lay->addWidget( cancel ); 165 lay->addWidget( cancel );
166 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 166 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
167 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 167 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
168 resize( 200, 200 ); 168 resize( 200, 200 );
169 } 169 }
170 170
171 bool beamVcal() { return vcal->isChecked(); } 171 bool beamVcal() { return vcal->isChecked(); }
172 bool beamLocal() { return local->isChecked(); } 172 bool beamLocal() { return local->isChecked(); }
173private: 173private:
174 QRadioButton* vcal, *ical, *local, *tz; 174 QRadioButton* vcal, *ical, *local, *tz;
175}; 175};
176class KOCatPrefs : public QDialog 176class KOCatPrefs : public QDialog
177{ 177{
178 public: 178 public:
179 KOCatPrefs( QWidget *parent=0, const char *name=0 ) : 179 KOCatPrefs( QWidget *parent=0, const char *name=0 ) :
180 QDialog( parent, name, true ) 180 QDialog( parent, name, true )
181 { 181 {
182 setCaption( i18n("Manage new Categories") ); 182 setCaption( i18n("Manage new Categories") );
183 QVBoxLayout* lay = new QVBoxLayout( this ); 183 QVBoxLayout* lay = new QVBoxLayout( this );
184 lay->setSpacing( 3 ); 184 lay->setSpacing( 3 );
185 lay->setMargin( 3 ); 185 lay->setMargin( 3 );
186 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 186 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
187 lay->addWidget( lab ); 187 lay->addWidget( lab );
188 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 188 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
189 lay->addWidget( format ); 189 lay->addWidget( format );
190 format->setExclusive ( true ) ; 190 format->setExclusive ( true ) ;
191 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 191 addCatBut = new QRadioButton(i18n("Add to category list"), format );
192 new QRadioButton(i18n("Remove from Events/Todos"), format ); 192 new QRadioButton(i18n("Remove from Events/Todos"), format );
193 addCatBut->setChecked( true ); 193 addCatBut->setChecked( true );
194 QPushButton * ok = new QPushButton( i18n("OK"), this ); 194 QPushButton * ok = new QPushButton( i18n("OK"), this );
195 lay->addWidget( ok ); 195 lay->addWidget( ok );
196 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 196 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
197 lay->addWidget( cancel ); 197 lay->addWidget( cancel );
198 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 198 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
199 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 199 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
200 resize( 200, 200 ); 200 resize( 200, 200 );
201 } 201 }
202 202
203 bool addCat() { return addCatBut->isChecked(); } 203 bool addCat() { return addCatBut->isChecked(); }
204private: 204private:
205 QRadioButton* addCatBut; 205 QRadioButton* addCatBut;
206}; 206};
207 207
208 208
209 209
210CalendarView::CalendarView( CalendarResources *calendar, 210CalendarView::CalendarView( CalendarResources *calendar,
211 QWidget *parent, const char *name ) 211 QWidget *parent, const char *name )
212 : CalendarViewBase( parent, name ), 212 : CalendarViewBase( parent, name ),
213 mCalendar( calendar ), 213 mCalendar( calendar ),
214 mResourceManager( calendar->resourceManager() ) 214 mResourceManager( calendar->resourceManager() )
215{ 215{
216 216
217 mEventEditor = 0; 217 mEventEditor = 0;
218 mTodoEditor = 0; 218 mTodoEditor = 0;
219 219
220 init(); 220 init();
221} 221}
222 222
223CalendarView::CalendarView( Calendar *calendar, 223CalendarView::CalendarView( Calendar *calendar,
224 QWidget *parent, const char *name ) 224 QWidget *parent, const char *name )
225 : CalendarViewBase( parent, name ), 225 : CalendarViewBase( parent, name ),
226 mCalendar( calendar ), 226 mCalendar( calendar ),
227 mResourceManager( 0 ) 227 mResourceManager( 0 )
228{ 228{
229 229
230 mEventEditor = 0; 230 mEventEditor = 0;
231 mTodoEditor = 0; 231 mTodoEditor = 0;
232 init();} 232 init();}
233 233
234void CalendarView::init() 234void CalendarView::init()
235{ 235{
236 mBlockShowDates = false; 236 mBlockShowDates = false;
237 beamDialog = new KOBeamPrefs(); 237 beamDialog = new KOBeamPrefs();
238 mDatePickerMode = 0; 238 mDatePickerMode = 0;
239 mCurrentSyncDevice = ""; 239 mCurrentSyncDevice = "";
240 writeLocale(); 240 writeLocale();
241 mViewManager = new KOViewManager( this ); 241 mViewManager = new KOViewManager( this );
242 mDialogManager = new KODialogManager( this ); 242 mDialogManager = new KODialogManager( this );
243 mEventViewerDialog = 0; 243 mEventViewerDialog = 0;
244 mModified = false; 244 mModified = false;
245 mReadOnly = false; 245 mReadOnly = false;
246 mSelectedIncidence = 0; 246 mSelectedIncidence = 0;
247 mCalPrinter = 0; 247 mCalPrinter = 0;
248 mFilters.setAutoDelete(true); 248 mFilters.setAutoDelete(true);
249 249
250 mCalendar->registerObserver( this ); 250 mCalendar->registerObserver( this );
251 // TODO: Make sure that view is updated, when calendar is changed. 251 // TODO: Make sure that view is updated, when calendar is changed.
252 252
253 mStorage = new FileStorage( mCalendar ); 253 mStorage = new FileStorage( mCalendar );
254 mNavigator = new DateNavigator( this, "datevav", mViewManager ); 254 mNavigator = new DateNavigator( this, "datevav", mViewManager );
255 255
256 QBoxLayout *topLayout = (QBoxLayout*)layout(); 256 QBoxLayout *topLayout = (QBoxLayout*)layout();
257#ifndef KORG_NOSPLITTER 257#ifndef KORG_NOSPLITTER
258 // create the main layout frames. 258 // create the main layout frames.
259 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); 259 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner");
260 topLayout->addWidget(mPanner); 260 topLayout->addWidget(mPanner);
261 261
262 mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, 262 mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner,
263 "CalendarView::LeftFrame"); 263 "CalendarView::LeftFrame");
264 mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); 264 mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize);
265 265
266 mDateNavigator = new KDateNavigator(mLeftSplitter, mCalendar, TRUE, 266 mDateNavigator = new KDateNavigator(mLeftSplitter, mCalendar, TRUE,
267 "CalendarView::DateNavigator", QDate::currentDate() ); 267 "CalendarView::DateNavigator", QDate::currentDate() );
268 mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); 268 mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize);
269 mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); 269 mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2");
270 mTodoList->setNavigator( mNavigator ); 270 mTodoList->setNavigator( mNavigator );
271 mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); 271 mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView");
272 272
273#ifdef KORG_NORESOURCEVIEW 273#ifdef KORG_NORESOURCEVIEW
274 mResourceView = 0; 274 mResourceView = 0;
275#else 275#else
276 if ( mResourceManager ) { 276 if ( mResourceManager ) {
277 mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); 277 mResourceView = new ResourceView( mResourceManager, mLeftSplitter );
278 mResourceView->updateView(); 278 mResourceView->updateView();
279 connect( mResourceView, SIGNAL( resourcesChanged() ), 279 connect( mResourceView, SIGNAL( resourcesChanged() ),
280 SLOT( updateView() ) ); 280 SLOT( updateView() ) );
281 } else { 281 } else {
282 mResourceView = 0; 282 mResourceView = 0;
283 } 283 }
284#endif 284#endif
285 QWidget *rightBox = new QWidget( mPanner ); 285 QWidget *rightBox = new QWidget( mPanner );
286 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 286 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
287 287
288 mRightFrame = new QWidgetStack( rightBox ); 288 mRightFrame = new QWidgetStack( rightBox );
289 rightLayout->addWidget( mRightFrame, 1 ); 289 rightLayout->addWidget( mRightFrame, 1 );
290 290
291 mLeftFrame = mLeftSplitter; 291 mLeftFrame = mLeftSplitter;
292#else 292#else
293 QWidget *mainBox = new QWidget( this ); 293 QWidget *mainBox = new QWidget( this );
294 QWidget *leftFrame = new QWidget( mainBox ); 294 QWidget *leftFrame = new QWidget( mainBox );
295 295
296 QBoxLayout * mainBoxLayout; 296 QBoxLayout * mainBoxLayout;
297 QBoxLayout * leftFrameLayout; 297 QBoxLayout * leftFrameLayout;
298 if ( KOPrefs::instance()->mVerticalScreen ) { 298 if ( KOPrefs::instance()->mVerticalScreen ) {
299 mainBoxLayout = new QVBoxLayout(mainBox); 299 mainBoxLayout = new QVBoxLayout(mainBox);
300 leftFrameLayout = new QHBoxLayout(leftFrame ); 300 leftFrameLayout = new QHBoxLayout(leftFrame );
301 } else { 301 } else {
302 mainBoxLayout = new QHBoxLayout(mainBox); 302 mainBoxLayout = new QHBoxLayout(mainBox);
303 leftFrameLayout = new QVBoxLayout(leftFrame ); 303 leftFrameLayout = new QVBoxLayout(leftFrame );
304 } 304 }
305 topLayout->addWidget( mainBox ); 305 topLayout->addWidget( mainBox );
306 mainBoxLayout->addWidget (leftFrame); 306 mainBoxLayout->addWidget (leftFrame);
307 mDateNavigator = new KDateNavigator(leftFrame, mCalendar, TRUE, 307 mDateNavigator = new KDateNavigator(leftFrame, mCalendar, TRUE,
308 "CalendarView::DateNavigator", QDate::currentDate()); 308 "CalendarView::DateNavigator", QDate::currentDate());
309 // mDateNavigator->blockSignals( true ); 309 // mDateNavigator->blockSignals( true );
310 leftFrameLayout->addWidget( mDateNavigator ); 310 leftFrameLayout->addWidget( mDateNavigator );
311 mFilterView = new KOFilterView(&mFilters,leftFrame,"CalendarView::FilterView"); 311 mFilterView = new KOFilterView(&mFilters,leftFrame,"CalendarView::FilterView");
312 mTodoList = new KOTodoView(mCalendar, leftFrame, "todolistsmall"); 312 mTodoList = new KOTodoView(mCalendar, leftFrame, "todolistsmall");
313 mTodoList->setNavigator( mNavigator ); 313 mTodoList->setNavigator( mNavigator );
314 314
315 if ( QApplication::desktop()->width() < 480 ) { 315 if ( QApplication::desktop()->width() < 480 ) {
316 leftFrameLayout->addWidget(mFilterView); 316 leftFrameLayout->addWidget(mFilterView);
317 leftFrameLayout->addWidget(mTodoList, 2 ); 317 leftFrameLayout->addWidget(mTodoList, 2 );
318 318
319 } else { 319 } else {
320 leftFrameLayout->addWidget(mTodoList,2 ); 320 leftFrameLayout->addWidget(mTodoList,2 );
321 leftFrameLayout->addWidget(mFilterView ); 321 leftFrameLayout->addWidget(mFilterView );
322 } 322 }
323 mFilterView->hide(); 323 mFilterView->hide();
324 QWidget *rightBox = new QWidget( mainBox ); 324 QWidget *rightBox = new QWidget( mainBox );
325 mainBoxLayout->addWidget ( rightBox, 10 ); 325 mainBoxLayout->addWidget ( rightBox, 10 );
326 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 326 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
327 mRightFrame = new QWidgetStack( rightBox ); 327 mRightFrame = new QWidgetStack( rightBox );
328 rightLayout->addWidget( mRightFrame, 10 ); 328 rightLayout->addWidget( mRightFrame, 10 );
329 329
330 mLeftFrame = leftFrame; 330 mLeftFrame = leftFrame;
331 if ( KOPrefs::instance()->mVerticalScreen ) { 331 if ( KOPrefs::instance()->mVerticalScreen ) {
332 mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); 332 mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() );
333 leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); 333 leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() );
334 } else { 334 } else {
335 mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); 335 mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() );
336 leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); 336 leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() );
337 } 337 }
338 if ( !KOPrefs::instance()->mShowDateNavigator) 338 if ( !KOPrefs::instance()->mShowDateNavigator)
339 mDateNavigator->hide(); 339 mDateNavigator->hide();
340 //qDebug("Calendarview Size %d %d ", width(), height()); 340 //qDebug("Calendarview Size %d %d ", width(), height());
341#endif 341#endif
342 342
343 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 343 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
344 SLOT( showDates( const KCal::DateList & ) ) ); 344 SLOT( showDates( const KCal::DateList & ) ) );
345 345
346 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 346 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
347 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 347 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
348 348
349 349
350 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), 350 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ),
351 mNavigator, SLOT( selectWeek( const QDate & ) ) ); 351 mNavigator, SLOT( selectWeek( const QDate & ) ) );
352 352
353 connect( mDateNavigator, SIGNAL( goPrevYear() ), 353 connect( mDateNavigator, SIGNAL( goPrevYear() ),
354 mNavigator, SLOT( selectPreviousYear() ) ); 354 mNavigator, SLOT( selectPreviousYear() ) );
355 connect( mDateNavigator, SIGNAL( goNextYear() ), 355 connect( mDateNavigator, SIGNAL( goNextYear() ),
356 mNavigator, SLOT( selectNextYear() ) ); 356 mNavigator, SLOT( selectNextYear() ) );
357 connect( mDateNavigator, SIGNAL( goPrevMonth() ), 357 connect( mDateNavigator, SIGNAL( goPrevMonth() ),
358 mNavigator, SLOT( selectPreviousMonth() ) ); 358 mNavigator, SLOT( selectPreviousMonth() ) );
359 connect( mDateNavigator, SIGNAL( goNextMonth() ), 359 connect( mDateNavigator, SIGNAL( goNextMonth() ),
360 mNavigator, SLOT( selectNextMonth() ) ); 360 mNavigator, SLOT( selectNextMonth() ) );
361 361
362 connect( mDateNavigator, SIGNAL( goPrevious() ), 362 connect( mDateNavigator, SIGNAL( goPrevious() ),
363 mNavigator, SLOT( selectPrevious() ) ); 363 mNavigator, SLOT( selectPrevious() ) );
364 connect( mDateNavigator, SIGNAL( goNext() ), 364 connect( mDateNavigator, SIGNAL( goNext() ),
365 mNavigator, SLOT( selectNext() ) ); 365 mNavigator, SLOT( selectNext() ) );
366 connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), 366 connect( mDateNavigator, SIGNAL( monthSelected ( int ) ),
367 mNavigator, SLOT( slotMonthSelect( int ) ) ); 367 mNavigator, SLOT( slotMonthSelect( int ) ) );
368 368
369 connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 369 connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
370 mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 370 mNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
371 371
372 connect( mDateNavigator, SIGNAL( eventDropped( Event * ) ), 372 connect( mDateNavigator, SIGNAL( eventDropped( Event * ) ),
373 SLOT( eventAdded( Event *) ) ); 373 SLOT( eventAdded( Event *) ) );
374 374
375 connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); 375 connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView()));
376 376
377 connect( this, SIGNAL( configChanged() ), 377 connect( this, SIGNAL( configChanged() ),
378 mDateNavigator, SLOT( updateConfig() ) ); 378 mDateNavigator, SLOT( updateConfig() ) );
379 379
380 connect( mTodoList, SIGNAL( newTodoSignal() ), 380 connect( mTodoList, SIGNAL( newTodoSignal() ),
381 SLOT( newTodo() ) ); 381 SLOT( newTodo() ) );
382 connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), 382 connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ),
383 SLOT( newSubTodo( Todo * ) ) ); 383 SLOT( newSubTodo( Todo * ) ) );
384 connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), 384 connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ),
385 SLOT( editTodo( Todo * ) ) ); 385 SLOT( editTodo( Todo * ) ) );
386 connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), 386 connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ),
387 SLOT( showTodo( Todo *) ) ); 387 SLOT( showTodo( Todo *) ) );
388 connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), 388 connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ),
389 SLOT( deleteTodo( Todo *) ) ); 389 SLOT( deleteTodo( Todo *) ) );
390 connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); 390 connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) );
391 connect( mTodoList, SIGNAL( purgeCompletedSignal() ), 391 connect( mTodoList, SIGNAL( purgeCompletedSignal() ),
392 SLOT( purgeCompleted() ) ); 392 SLOT( purgeCompleted() ) );
393 connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), 393 connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ),
394 SIGNAL( todoModified( Todo *, int ) ) ); 394 SIGNAL( todoModified( Todo *, int ) ) );
395 395
396 connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), 396 connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ),
397 this, SLOT ( cloneIncidence( Incidence * ) ) ); 397 this, SLOT ( cloneIncidence( Incidence * ) ) );
398 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), 398 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ),
399 this, SLOT (cancelIncidence( Incidence * ) ) ); 399 this, SLOT (cancelIncidence( Incidence * ) ) );
400 400
401 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), 401 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ),
402 this, SLOT ( moveIncidence( Incidence * ) ) ); 402 this, SLOT ( moveIncidence( Incidence * ) ) );
403 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), 403 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ),
404 this, SLOT ( beamIncidence( Incidence * ) ) ); 404 this, SLOT ( beamIncidence( Incidence * ) ) );
405 405
406 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), 406 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ),
407 this, SLOT ( todo_unsub( Todo * ) ) ); 407 this, SLOT ( todo_unsub( Todo * ) ) );
408 408
409 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), 409 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
410 this, SLOT ( todo_resub( Todo *,Todo * ) ) ); 410 this, SLOT ( todo_resub( Todo *,Todo * ) ) );
411 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, 411 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList,
412 SLOT( updateTodo( Todo *, int ) ) ); 412 SLOT( updateTodo( Todo *, int ) ) );
413 connect( this, SIGNAL( todoModified( Todo *, int )), this, 413 connect( this, SIGNAL( todoModified( Todo *, int )), this,
414 SLOT( changeTodoDisplay( Todo *, int ) ) ); 414 SLOT( changeTodoDisplay( Todo *, int ) ) );
415 415
416 416
417 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); 417 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) );
418 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); 418 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) );
419 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); 419 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) );
420 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); 420 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) );
421 421
422 422
423 423
424 424
425 425
426 connect(QApplication::clipboard(),SIGNAL(dataChanged()), 426 connect(QApplication::clipboard(),SIGNAL(dataChanged()),
427 SLOT(checkClipboard())); 427 SLOT(checkClipboard()));
428 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), 428 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ),
429 SLOT( processTodoListSelection( Incidence * ) ) ); 429 SLOT( processTodoListSelection( Incidence * ) ) );
430 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); 430 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool)));
431 431
432 // kdDebug() << "CalendarView::CalendarView() done" << endl; 432 // kdDebug() << "CalendarView::CalendarView() done" << endl;
433 433
434 mDateFrame = new QVBox(0,0,WType_Popup); 434 mDateFrame = new QVBox(0,0,WType_Popup);
435 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 435 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
436 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); 436 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
437 mDateFrame->setLineWidth(3); 437 mDateFrame->setLineWidth(3);
438 mDateFrame->hide(); 438 mDateFrame->hide();
439 mDateFrame->setCaption( i18n( "Pick a date to display")); 439 mDateFrame->setCaption( i18n( "Pick a date to display"));
440 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); 440 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() );
441 441
442 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); 442 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate)));
443 443
444 mEventEditor = mDialogManager->getEventEditor(); 444 mEventEditor = mDialogManager->getEventEditor();
445 mTodoEditor = mDialogManager->getTodoEditor(); 445 mTodoEditor = mDialogManager->getTodoEditor();
446 446
447 mFlagEditDescription = false; 447 mFlagEditDescription = false;
448 448
449 mSuspendTimer = new QTimer( this ); 449 mSuspendTimer = new QTimer( this );
450 mAlarmTimer = new QTimer( this ); 450 mAlarmTimer = new QTimer( this );
451 mRecheckAlarmTimer = new QTimer( this ); 451 mRecheckAlarmTimer = new QTimer( this );
452 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); 452 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) );
453 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); 453 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) );
454 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); 454 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) );
455 mAlarmDialog = new AlarmDialog( this ); 455 mAlarmDialog = new AlarmDialog( this );
456 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); 456 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) );
457 mAlarmDialog->setServerNotification( false ); 457 mAlarmDialog->setServerNotification( false );
458 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); 458 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime );
459 459
460 460
461#ifndef DESKTOP_VERSION 461#ifndef DESKTOP_VERSION
462//US listen for arriving address resultsets 462//US listen for arriving address resultsets
463 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), 463 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)),
464 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); 464 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
465#endif 465#endif
466 466
467} 467}
468 468
469 469
470CalendarView::~CalendarView() 470CalendarView::~CalendarView()
471{ 471{
472 // kdDebug() << "~CalendarView()" << endl; 472 // kdDebug() << "~CalendarView()" << endl;
473 //qDebug("CalendarView::~CalendarView() "); 473 //qDebug("CalendarView::~CalendarView() ");
474 delete mDialogManager; 474 delete mDialogManager;
475 delete mViewManager; 475 delete mViewManager;
476 delete mStorage; 476 delete mStorage;
477 delete mDateFrame ; 477 delete mDateFrame ;
478 delete beamDialog; 478 delete beamDialog;
479 //kdDebug() << "~CalendarView() done" << endl; 479 //kdDebug() << "~CalendarView() done" << endl;
480} 480}
481 481
482void CalendarView::showDay( QDate d ) 482void CalendarView::showDay( QDate d )
483{ 483{
484 dateNavigator()->blockSignals( true ); 484 dateNavigator()->blockSignals( true );
485 dateNavigator()->selectDate( d ); 485 dateNavigator()->selectDate( d );
486 dateNavigator()->blockSignals( false ); 486 dateNavigator()->blockSignals( false );
487 mViewManager->showDayView(); 487 mViewManager->showDayView();
488 //dateNavigator()->selectDate( d ); 488 //dateNavigator()->selectDate( d );
489} 489}
490void CalendarView::timerAlarm() 490void CalendarView::timerAlarm()
491{ 491{
492 //qDebug("CalendarView::timerAlarm() "); 492 //qDebug("CalendarView::timerAlarm() ");
493 computeAlarm(mAlarmNotification ); 493 computeAlarm(mAlarmNotification );
494} 494}
495 495
496void CalendarView::suspendAlarm() 496void CalendarView::suspendAlarm()
497{ 497{
498 //qDebug(" CalendarView::suspendAlarm() "); 498 //qDebug(" CalendarView::suspendAlarm() ");
499 computeAlarm(mSuspendAlarmNotification ); 499 computeAlarm(mSuspendAlarmNotification );
500 500
501} 501}
502 502
503void CalendarView::startAlarm( QString mess , QString filename) 503void CalendarView::startAlarm( QString mess , QString filename)
504{ 504{
505 mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); 505 mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount );
506 QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) ); 506 QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) );
507 507
508} 508}
509 509
510void CalendarView::checkNextTimerAlarm() 510void CalendarView::checkNextTimerAlarm()
511{ 511{
512 mCalendar->checkAlarmForIncidence( 0, true ); 512 mCalendar->checkAlarmForIncidence( 0, true );
513} 513}
514 514
515void CalendarView::computeAlarm( QString msg ) 515void CalendarView::computeAlarm( QString msg )
516{ 516{
517 517
518 QString mess = msg; 518 QString mess = msg;
519 QString mAlarmMessage = mess.mid( 9 ); 519 QString mAlarmMessage = mess.mid( 9 );
520 QString filename = MainWindow::resourcePath(); 520 QString filename = MainWindow::resourcePath();
521 filename += "koalarm.wav"; 521 filename += "koalarm.wav";
522 QString tempfilename; 522 QString tempfilename;
523 if ( mess.left( 13 ) == "suspend_alarm") { 523 if ( mess.left( 13 ) == "suspend_alarm") {
524 bool error = false; 524 bool error = false;
525 int len = mess.mid( 13 ).find("+++"); 525 int len = mess.mid( 13 ).find("+++");
526 if ( len < 2 ) 526 if ( len < 2 )
527 error = true; 527 error = true;
528 else { 528 else {
529 tempfilename = mess.mid( 13, len ); 529 tempfilename = mess.mid( 13, len );
530 if ( !QFile::exists( tempfilename ) ) 530 if ( !QFile::exists( tempfilename ) )
531 error = true; 531 error = true;
532 } 532 }
533 if ( ! error ) { 533 if ( ! error ) {
534 filename = tempfilename; 534 filename = tempfilename;
535 } 535 }
536 mAlarmMessage = mess.mid( 13+len+3 ); 536 mAlarmMessage = mess.mid( 13+len+3 );
537 //qDebug("suspend file %s ",tempfilename.latin1() ); 537 //qDebug("suspend file %s ",tempfilename.latin1() );
538 startAlarm( mAlarmMessage, filename); 538 startAlarm( mAlarmMessage, filename);
539 return; 539 return;
540 } 540 }
541 if ( mess.left( 11 ) == "timer_alarm") { 541 if ( mess.left( 11 ) == "timer_alarm") {
542 //mTimerTime = 0; 542 //mTimerTime = 0;
543 startAlarm( mess.mid( 11 ), filename ); 543 startAlarm( mess.mid( 11 ), filename );
544 return; 544 return;
545 } 545 }
546 if ( mess.left( 10 ) == "proc_alarm") { 546 if ( mess.left( 10 ) == "proc_alarm") {
547 bool error = false; 547 bool error = false;
548 int len = mess.mid( 10 ).find("+++"); 548 int len = mess.mid( 10 ).find("+++");
549 if ( len < 2 ) 549 if ( len < 2 )
550 error = true; 550 error = true;
551 else { 551 else {
552 tempfilename = mess.mid( 10, len ); 552 tempfilename = mess.mid( 10, len );
553 if ( !QFile::exists( tempfilename ) ) 553 if ( !QFile::exists( tempfilename ) )
554 error = true; 554 error = true;
555 } 555 }
556 if ( error ) { 556 if ( error ) {
557 mAlarmMessage = "Procedure Alarm\nError - File not found\n"; 557 mAlarmMessage = "Procedure Alarm\nError - File not found\n";
558 mAlarmMessage += mess.mid( 10+len+3+9 ); 558 mAlarmMessage += mess.mid( 10+len+3+9 );
559 } else { 559 } else {
560 //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); 560 //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
561 //qDebug("-----system command %s ",tempfilename.latin1() ); 561 //qDebug("-----system command %s ",tempfilename.latin1() );
562#ifndef _WIN32_ 562#ifndef _WIN32_
563 if ( vfork () == 0 ) { 563 if ( vfork () == 0 ) {
564 execl ( tempfilename.latin1(), 0 ); 564 execl ( tempfilename.latin1(), 0 );
565 return; 565 return;
566 } 566 }
567#else 567#else
568 QProcess* p = new QProcess(); 568 QProcess* p = new QProcess();
569 p->addArgument( tempfilename.latin1() ); 569 p->addArgument( tempfilename.latin1() );
570 p->start(); 570 p->start();
571 return; 571 return;
572#endif 572#endif
573 573
574 return; 574 return;
575 } 575 }
576 576
577 //qDebug("+++++++system command %s ",tempfilename.latin1() ); 577 //qDebug("+++++++system command %s ",tempfilename.latin1() );
578 } 578 }
579 if ( mess.left( 11 ) == "audio_alarm") { 579 if ( mess.left( 11 ) == "audio_alarm") {
580 bool error = false; 580 bool error = false;
581 int len = mess.mid( 11 ).find("+++"); 581 int len = mess.mid( 11 ).find("+++");
582 if ( len < 2 ) 582 if ( len < 2 )
583 error = true; 583 error = true;
584 else { 584 else {
585 tempfilename = mess.mid( 11, len ); 585 tempfilename = mess.mid( 11, len );
586 if ( !QFile::exists( tempfilename ) ) 586 if ( !QFile::exists( tempfilename ) )
587 error = true; 587 error = true;
588 } 588 }
589 if ( ! error ) { 589 if ( ! error ) {
590 filename = tempfilename; 590 filename = tempfilename;
591 } 591 }
592 mAlarmMessage = mess.mid( 11+len+3+9 ); 592 mAlarmMessage = mess.mid( 11+len+3+9 );
593 //qDebug("audio file command %s ",tempfilename.latin1() ); 593 //qDebug("audio file command %s ",tempfilename.latin1() );
594 } 594 }
595 if ( mess.left( 9 ) == "cal_alarm") { 595 if ( mess.left( 9 ) == "cal_alarm") {
596 mAlarmMessage = mess.mid( 9 ) ; 596 mAlarmMessage = mess.mid( 9 ) ;
597 } 597 }
598 598
599 startAlarm( mAlarmMessage, filename ); 599 startAlarm( mAlarmMessage, filename );
600 600
601 601
602} 602}
603 603
604void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti ) 604void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
605{ 605{
606 //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 606 //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
607 607
608 mSuspendAlarmNotification = noti; 608 mSuspendAlarmNotification = noti;
609 int ms = QDateTime::currentDateTime().secsTo( qdt )*1000; 609 int ms = QDateTime::currentDateTime().secsTo( qdt )*1000;
610 //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000); 610 //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000);
611 mSuspendTimer->start( ms , true ); 611 mSuspendTimer->start( ms , true );
612 612
613} 613}
614 614
615void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti ) 615void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
616{ 616{
617 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 617 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
618 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 618 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
619#ifndef DESKTOP_VERSION 619#ifndef DESKTOP_VERSION
620 AlarmServer::addAlarm ( qdt,"koalarm", noti.latin1() ); 620 AlarmServer::addAlarm ( qdt,"koalarm", noti.latin1() );
621#endif 621#endif
622 return; 622 return;
623 } 623 }
624 int maxSec; 624 int maxSec;
625 //maxSec = 5; //testing only 625 //maxSec = 5; //testing only
626 maxSec = 86400+3600; // one day+1hour 626 maxSec = 86400+3600; // one day+1hour
627 mAlarmNotification = noti; 627 mAlarmNotification = noti;
628 int sec = QDateTime::currentDateTime().secsTo( qdt ); 628 int sec = QDateTime::currentDateTime().secsTo( qdt );
629 if ( sec > maxSec ) { 629 if ( sec > maxSec ) {
630 mRecheckAlarmTimer->start( maxSec * 1000 ); 630 mRecheckAlarmTimer->start( maxSec * 1000 );
631 // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec ); 631 // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec );
632 return; 632 return;
633 } else { 633 } else {
634 mRecheckAlarmTimer->stop(); 634 mRecheckAlarmTimer->stop();
635 } 635 }
636 //qDebug("Alarm timer started with secs: %d ", sec); 636 //qDebug("Alarm timer started with secs: %d ", sec);
637 mAlarmTimer->start( sec *1000 , true ); 637 mAlarmTimer->start( sec *1000 , true );
638 638
639} 639}
640// called by mRecheckAlarmTimer to get next alarm 640// called by mRecheckAlarmTimer to get next alarm
641// we need this, because a QTimer has only a max range of 25 days 641// we need this, because a QTimer has only a max range of 25 days
642void CalendarView::recheckTimerAlarm() 642void CalendarView::recheckTimerAlarm()
643{ 643{
644 mAlarmTimer->stop(); 644 mAlarmTimer->stop();
645 mRecheckAlarmTimer->stop(); 645 mRecheckAlarmTimer->stop();
646 mCalendar->checkAlarmForIncidence( 0, true ); 646 mCalendar->checkAlarmForIncidence( 0, true );
647} 647}
648void CalendarView::removeAlarm(const QDateTime &qdt, const QString &noti ) 648void CalendarView::removeAlarm(const QDateTime &qdt, const QString &noti )
649{ 649{
650 //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 650 //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
651 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 651 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
652#ifndef DESKTOP_VERSION 652#ifndef DESKTOP_VERSION
653 AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() ); 653 AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() );
654#endif 654#endif
655 return; 655 return;
656 } 656 }
657 mAlarmTimer->stop(); 657 mAlarmTimer->stop();
658} 658}
659void CalendarView::selectWeekNum ( int num ) 659void CalendarView::selectWeekNum ( int num )
660{ 660{
661 dateNavigator()->blockSignals( true ); 661 dateNavigator()->blockSignals( true );
662 dateNavigator()->selectWeek( num ); 662 dateNavigator()->selectWeek( num );
663 dateNavigator()->blockSignals( false ); 663 dateNavigator()->blockSignals( false );
664 mViewManager->showWeekView(); 664 mViewManager->showWeekView();
665} 665}
666KOViewManager *CalendarView::viewManager() 666KOViewManager *CalendarView::viewManager()
667{ 667{
668 return mViewManager; 668 return mViewManager;
669} 669}
670 670
671KODialogManager *CalendarView::dialogManager() 671KODialogManager *CalendarView::dialogManager()
672{ 672{
673 return mDialogManager; 673 return mDialogManager;
674} 674}
675 675
676QDate CalendarView::startDate() 676QDate CalendarView::startDate()
677{ 677{
678 DateList dates = mNavigator->selectedDates(); 678 DateList dates = mNavigator->selectedDates();
679 679
680 return dates.first(); 680 return dates.first();
681} 681}
682 682
683QDate CalendarView::endDate() 683QDate CalendarView::endDate()
684{ 684{
685 DateList dates = mNavigator->selectedDates(); 685 DateList dates = mNavigator->selectedDates();
686 686
687 return dates.last(); 687 return dates.last();
688} 688}
689 689
690 690
691void CalendarView::createPrinter() 691void CalendarView::createPrinter()
692{ 692{
693#ifndef KORG_NOPRINTER 693#ifndef KORG_NOPRINTER
694 if (!mCalPrinter) { 694 if (!mCalPrinter) {
695 mCalPrinter = new CalPrinter(this, mCalendar); 695 mCalPrinter = new CalPrinter(this, mCalendar);
696 connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig())); 696 connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig()));
697 } 697 }
698#endif 698#endif
699} 699}
700 700
701 701
702//KOPrefs::instance()->mWriteBackFile 702//KOPrefs::instance()->mWriteBackFile
703//KOPrefs::instance()->mWriteBackExistingOnly 703//KOPrefs::instance()->mWriteBackExistingOnly
704 704
705// 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 705// 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
706// 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 706// 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
707// 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 707// 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
708// 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 708// 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
709// 4 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 709// 4 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
710// 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 710// 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
711 711
712int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full ) 712int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full )
713{ 713{
714 714
715 // 0 equal 715 // 0 equal
716 // 1 take local 716 // 1 take local
717 // 2 take remote 717 // 2 take remote
718 // 3 cancel 718 // 3 cancel
719 QDateTime lastSync = mLastCalendarSync; 719 QDateTime lastSync = mLastCalendarSync;
720 QDateTime localMod = local->lastModified(); 720 QDateTime localMod = local->lastModified();
721 QDateTime remoteMod = remote->lastModified(); 721 QDateTime remoteMod = remote->lastModified();
722 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 722 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
723 bool remCh, locCh; 723 bool remCh, locCh;
724 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 724 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
725 //if ( remCh ) 725 //if ( remCh )
726 //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); 726 //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
727 locCh = ( localMod > mLastCalendarSync ); 727 locCh = ( localMod > mLastCalendarSync );
728 if ( !remCh && ! locCh ) { 728 if ( !remCh && ! locCh ) {
729 //qDebug("both not changed "); 729 //qDebug("both not changed ");
730 lastSync = localMod.addDays(1); 730 lastSync = localMod.addDays(1);
731 if ( mode <= SYNC_PREF_ASK ) 731 if ( mode <= SYNC_PREF_ASK )
732 return 0; 732 return 0;
733 } else { 733 } else {
734 if ( locCh ) { 734 if ( locCh ) {
735 //qDebug("loc changed %d %s %s", local->revision() , localMod.toString().latin1(), mLastCalendarSync.toString().latin1()); 735 //qDebug("loc changed %d %s %s", local->revision() , localMod.toString().latin1(), mLastCalendarSync.toString().latin1());
736 lastSync = localMod.addDays( -1 ); 736 lastSync = localMod.addDays( -1 );
737 if ( !remCh ) 737 if ( !remCh )
738 remoteMod = ( lastSync.addDays( -1 ) ); 738 remoteMod = ( lastSync.addDays( -1 ) );
739 } else { 739 } else {
740 //qDebug(" not loc changed "); 740 //qDebug(" not loc changed ");
741 lastSync = localMod.addDays( 1 ); 741 lastSync = localMod.addDays( 1 );
742 if ( remCh ) 742 if ( remCh )
743 remoteMod =( lastSync.addDays( 1 ) ); 743 remoteMod =( lastSync.addDays( 1 ) );
744 744
745 } 745 }
746 } 746 }
747 full = true; 747 full = true;
748 if ( mode < SYNC_PREF_ASK ) 748 if ( mode < SYNC_PREF_ASK )
749 mode = SYNC_PREF_ASK; 749 mode = SYNC_PREF_ASK;
750 } else { 750 } else {
751 if ( localMod == remoteMod ) 751 if ( localMod == remoteMod )
752 // if ( local->revision() == remote->revision() ) 752 // if ( local->revision() == remote->revision() )
753 return 0; 753 return 0;
754 754
755 } 755 }
756 // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); 756 // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() );
757 757
758 //qDebug("%s %d %s %d", localMod.toString().latin1() , local->revision(), remoteMod.toString().latin1(), remote->revision()); 758 //qDebug("%s %d %s %d", localMod.toString().latin1() , local->revision(), remoteMod.toString().latin1(), remote->revision());
759 //qDebug("%d %d %d %d ", localMod.time().second(), localMod.time().msec(), remoteMod.time().second(), remoteMod.time().msec() ); 759 //qDebug("%d %d %d %d ", localMod.time().second(), localMod.time().msec(), remoteMod.time().second(), remoteMod.time().msec() );
760 //full = true; //debug only 760 //full = true; //debug only
761 if ( full ) { 761 if ( full ) {
762 bool equ = false; 762 bool equ = false;
763 if ( local->type() == "Event" ) { 763 if ( local->type() == "Event" ) {
764 equ = (*((Event*) local) == *((Event*) remote)); 764 equ = (*((Event*) local) == *((Event*) remote));
765 } 765 }
766 else if ( local->type() =="Todo" ) 766 else if ( local->type() =="Todo" )
767 equ = (*((Todo*) local) == (*(Todo*) remote)); 767 equ = (*((Todo*) local) == (*(Todo*) remote));
768 else if ( local->type() =="Journal" ) 768 else if ( local->type() =="Journal" )
769 equ = (*((Journal*) local) == *((Journal*) remote)); 769 equ = (*((Journal*) local) == *((Journal*) remote));
770 if ( equ ) { 770 if ( equ ) {
771 //qDebug("equal "); 771 //qDebug("equal ");
772 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 772 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
773 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); 773 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) );
774 } 774 }
775 if ( mode < SYNC_PREF_FORCE_LOCAL ) 775 if ( mode < SYNC_PREF_FORCE_LOCAL )
776 return 0; 776 return 0;
777 777
778 }//else //debug only 778 }//else //debug only
779 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); 779 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1());
780 } 780 }
781 int result; 781 int result;
782 bool localIsNew; 782 bool localIsNew;
783 //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , localMod.toString().latin1() , remoteMod.toString().latin1() ); 783 //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , localMod.toString().latin1() , remoteMod.toString().latin1() );
784 784
785 if ( full && mode < SYNC_PREF_NEWEST ) 785 if ( full && mode < SYNC_PREF_NEWEST )
786 mode = SYNC_PREF_ASK; 786 mode = SYNC_PREF_ASK;
787 787
788 switch( mode ) { 788 switch( mode ) {
789 case SYNC_PREF_LOCAL: 789 case SYNC_PREF_LOCAL:
790 if ( lastSync > remoteMod ) 790 if ( lastSync > remoteMod )
791 return 1; 791 return 1;
792 if ( lastSync > localMod ) 792 if ( lastSync > localMod )
793 return 2; 793 return 2;
794 return 1; 794 return 1;
795 break; 795 break;
796 case SYNC_PREF_REMOTE: 796 case SYNC_PREF_REMOTE:
797 if ( lastSync > remoteMod ) 797 if ( lastSync > remoteMod )
798 return 1; 798 return 1;
799 if ( lastSync > localMod ) 799 if ( lastSync > localMod )
800 return 2; 800 return 2;
801 return 2; 801 return 2;
802 break; 802 break;
803 case SYNC_PREF_NEWEST: 803 case SYNC_PREF_NEWEST:
804 if ( localMod > remoteMod ) 804 if ( localMod > remoteMod )
805 return 1; 805 return 1;
806 else 806 else
807 return 2; 807 return 2;
808 break; 808 break;
809 case SYNC_PREF_ASK: 809 case SYNC_PREF_ASK:
810 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 810 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
811 if ( lastSync > remoteMod ) 811 if ( lastSync > remoteMod )
812 return 1; 812 return 1;
813 if ( lastSync > localMod ) 813 if ( lastSync > localMod )
814 return 2; 814 return 2;
815 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 815 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
816 localIsNew = localMod >= remoteMod; 816 localIsNew = localMod >= remoteMod;
817 if ( localIsNew ) 817 if ( localIsNew )
818 getEventViewerDialog()->setColorMode( 1 ); 818 getEventViewerDialog()->setColorMode( 1 );
819 else 819 else
820 getEventViewerDialog()->setColorMode( 2 ); 820 getEventViewerDialog()->setColorMode( 2 );
821 getEventViewerDialog()->setIncidence(local); 821 getEventViewerDialog()->setIncidence(local);
822 if ( localIsNew ) 822 if ( localIsNew )
823 getEventViewerDialog()->setColorMode( 2 ); 823 getEventViewerDialog()->setColorMode( 2 );
824 else 824 else
825 getEventViewerDialog()->setColorMode( 1 ); 825 getEventViewerDialog()->setColorMode( 1 );
826 getEventViewerDialog()->addIncidence(remote); 826 getEventViewerDialog()->addIncidence(remote);
827 getEventViewerDialog()->setColorMode( 0 ); 827 getEventViewerDialog()->setColorMode( 0 );
828 //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() ); 828 //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() );
829 getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!")); 829 getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!"));
830 getEventViewerDialog()->showMe(); 830 getEventViewerDialog()->showMe();
831 result = getEventViewerDialog()->executeS( localIsNew ); 831 result = getEventViewerDialog()->executeS( localIsNew );
832 return result; 832 return result;
833 833
834 break; 834 break;
835 case SYNC_PREF_FORCE_LOCAL: 835 case SYNC_PREF_FORCE_LOCAL:
836 return 1; 836 return 1;
837 break; 837 break;
838 case SYNC_PREF_FORCE_REMOTE: 838 case SYNC_PREF_FORCE_REMOTE:
839 return 2; 839 return 2;
840 break; 840 break;
841 841
842 default: 842 default:
843 // SYNC_PREF_TAKE_BOTH not implemented 843 // SYNC_PREF_TAKE_BOTH not implemented
844 break; 844 break;
845 } 845 }
846 return 0; 846 return 0;
847} 847}
848Event* CalendarView::getLastSyncEvent() 848Event* CalendarView::getLastSyncEvent()
849{ 849{
850 Event* lse; 850 Event* lse;
851 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); 851 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
852 lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); 852 lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice );
853 if (!lse) { 853 if (!lse) {
854 lse = new Event(); 854 lse = new Event();
855 lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); 855 lse->setUid( "last-syncEvent-"+mCurrentSyncDevice );
856 QString sum = ""; 856 QString sum = "";
857 if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) 857 if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) )
858 sum = "E: "; 858 sum = "E: ";
859 lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); 859 lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event"));
860 lse->setDtStart( mLastCalendarSync ); 860 lse->setDtStart( mLastCalendarSync );
861 lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); 861 lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) );
862 lse->setCategories( i18n("SyncEvent") ); 862 lse->setCategories( i18n("SyncEvent") );
863 lse->setReadOnly( true ); 863 lse->setReadOnly( true );
864 mCalendar->addEvent( lse ); 864 mCalendar->addEvent( lse );
865 } 865 }
866 866
867 return lse; 867 return lse;
868 868
869} 869}
870 870
871// we check, if the to delete event has a id for a profile 871// we check, if the to delete event has a id for a profile
872// if yes, we set this id in the profile to delete 872// if yes, we set this id in the profile to delete
873void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) 873void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete )
874{ 874{
875 if ( lastSync.count() == 0 ) { 875 if ( lastSync.count() == 0 ) {
876 //qDebug(" lastSync.count() == 0"); 876 //qDebug(" lastSync.count() == 0");
877 return; 877 return;
878 } 878 }
879 if ( toDelete->type() == "Journal" ) 879 if ( toDelete->type() == "Journal" )
880 return; 880 return;
881 881
882 Event* eve = lastSync.first(); 882 Event* eve = lastSync.first();
883 883
884 while ( eve ) { 884 while ( eve ) {
885 QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name 885 QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name
886 if ( !id.isEmpty() ) { 886 if ( !id.isEmpty() ) {
887 QString des = eve->description(); 887 QString des = eve->description();
888 QString pref = "e"; 888 QString pref = "e";
889 if ( toDelete->type() == "Todo" ) 889 if ( toDelete->type() == "Todo" )
890 pref = "t"; 890 pref = "t";
891 des += pref+ id + ","; 891 des += pref+ id + ",";
892 eve->setReadOnly( false ); 892 eve->setReadOnly( false );
893 eve->setDescription( des ); 893 eve->setDescription( des );
894 //qDebug("setdes %s ", des.latin1()); 894 //qDebug("setdes %s ", des.latin1());
895 eve->setReadOnly( true ); 895 eve->setReadOnly( true );
896 } 896 }
897 eve = lastSync.next(); 897 eve = lastSync.next();
898 } 898 }
899 899
900} 900}
901void CalendarView::checkExternalId( Incidence * inc ) 901void CalendarView::checkExternalId( Incidence * inc )
902{ 902{
903 QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; 903 QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ;
904 checkExternSyncEvent( lastSync, inc ); 904 checkExternSyncEvent( lastSync, inc );
905 905
906} 906}
907bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) 907bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode )
908{ 908{
909 bool syncOK = true; 909 bool syncOK = true;
910 int addedEvent = 0; 910 int addedEvent = 0;
911 int addedEventR = 0; 911 int addedEventR = 0;
912 int deletedEventR = 0; 912 int deletedEventR = 0;
913 int deletedEventL = 0; 913 int deletedEventL = 0;
914 int changedLocal = 0; 914 int changedLocal = 0;
915 int changedRemote = 0; 915 int changedRemote = 0;
916 int filteredIN = 0; 916 int filteredIN = 0;
917 int filteredOUT = 0; 917 int filteredOUT = 0;
918 //QPtrList<Event> el = local->rawEvents(); 918 //QPtrList<Event> el = local->rawEvents();
919 Event* eventR; 919 Event* eventR;
920 QString uid; 920 QString uid;
921 int take; 921 int take;
922 Event* eventL; 922 Event* eventL;
923 Event* eventRSync; 923 Event* eventRSync;
924 Event* eventLSync; 924 Event* eventLSync;
925 QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); 925 QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents();
926 QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); 926 QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents();
927 bool fullDateRange = false; 927 bool fullDateRange = false;
928 local->resetTempSyncStat(); 928 local->resetTempSyncStat();
929 mLastCalendarSync = QDateTime::currentDateTime(); 929 mLastCalendarSync = QDateTime::currentDateTime();
930 if ( mSyncManager->syncWithDesktop() ) { 930 if ( mSyncManager->syncWithDesktop() ) {
931 remote->resetPilotStat(1); 931 remote->resetPilotStat(1);
932 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 932 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
933 mLastCalendarSync = KSyncManager::mRequestedSyncEvent; 933 mLastCalendarSync = KSyncManager::mRequestedSyncEvent;
934 qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); 934 qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() );
935 } else { 935 } else {
936 qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); 936 qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime ");
937 } 937 }
938 } 938 }
939 QDateTime modifiedCalendar = mLastCalendarSync; 939 QDateTime modifiedCalendar = mLastCalendarSync;
940 eventLSync = getLastSyncEvent(); 940 eventLSync = getLastSyncEvent();
941 eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); 941 eventR = remote->event("last-syncEvent-"+mCurrentSyncName );
942 if ( eventR ) { 942 if ( eventR ) {
943 eventRSync = (Event*) eventR->clone(); 943 eventRSync = (Event*) eventR->clone();
944 remote->deleteEvent(eventR ); 944 remote->deleteEvent(eventR );
945 945
946 } else { 946 } else {
947 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { 947 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) {
948 eventRSync = (Event*)eventLSync->clone(); 948 eventRSync = (Event*)eventLSync->clone();
949 } else { 949 } else {
950 fullDateRange = true; 950 fullDateRange = true;
951 eventRSync = new Event(); 951 eventRSync = new Event();
952 eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); 952 eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event"));
953 eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); 953 eventRSync->setUid("last-syncEvent-"+mCurrentSyncName );
954 eventRSync->setDtStart( mLastCalendarSync ); 954 eventRSync->setDtStart( mLastCalendarSync );
955 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); 955 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) );
956 eventRSync->setCategories( i18n("SyncEvent") ); 956 eventRSync->setCategories( i18n("SyncEvent") );
957 } 957 }
958 } 958 }
959 if ( eventLSync->dtStart() == mLastCalendarSync ) 959 if ( eventLSync->dtStart() == mLastCalendarSync )
960 fullDateRange = true; 960 fullDateRange = true;
961 961
962 if ( ! fullDateRange ) { 962 if ( ! fullDateRange ) {
963 if ( eventLSync->dtStart() != eventRSync->dtStart() ) { 963 if ( eventLSync->dtStart() != eventRSync->dtStart() ) {
964 964
965 // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); 965 // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() );
966 //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); 966 //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec());
967 fullDateRange = true; 967 fullDateRange = true;
968 } 968 }
969 } 969 }
970 if ( mSyncManager->syncWithDesktop() ) { 970 if ( mSyncManager->syncWithDesktop() ) {
971 fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); 971 fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync );
972 } 972 }
973 if ( fullDateRange ) 973 if ( fullDateRange )
974 mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); 974 mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365);
975 else 975 else
976 mLastCalendarSync = eventLSync->dtStart(); 976 mLastCalendarSync = eventLSync->dtStart();
977 // for resyncing if own file has changed 977 // for resyncing if own file has changed
978 if ( mCurrentSyncDevice == "deleteaftersync" ) { 978 if ( mCurrentSyncDevice == "deleteaftersync" ) {
979 mLastCalendarSync = loadedFileVersion; 979 mLastCalendarSync = loadedFileVersion;
980 //qDebug("setting mLastCalendarSync "); 980 //qDebug("setting mLastCalendarSync ");
981 } 981 }
982 //qDebug("*************************** "); 982 //qDebug("*************************** ");
983 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); 983 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange);
984 QPtrList<Incidence> er = remote->rawIncidences(); 984 QPtrList<Incidence> er = remote->rawIncidences();
985 Incidence* inR = er.first(); 985 Incidence* inR = er.first();
986 Incidence* inL; 986 Incidence* inL;
987 QProgressBar bar( er.count(),0 ); 987 QProgressBar bar( er.count(),0 );
988 bar.setCaption (i18n("Syncing - close to abort!") ); 988 bar.setCaption (i18n("Syncing - close to abort!") );
989 989
990 // ************** setting up filter ************* 990 // ************** setting up filter *************
991 CalFilter *filterIN = 0; 991 CalFilter *filterIN = 0;
992 CalFilter *filterOUT = 0; 992 CalFilter *filterOUT = 0;
993 CalFilter *filter = mFilters.first(); 993 CalFilter *filter = mFilters.first();
994 while(filter) { 994 while(filter) {
995 if ( filter->name() == mSyncManager->mFilterInCal ) 995 if ( filter->name() == mSyncManager->mFilterInCal )
996 filterIN = filter; 996 filterIN = filter;
997 if ( filter->name() == mSyncManager->mFilterOutCal ) 997 if ( filter->name() == mSyncManager->mFilterOutCal )
998 filterOUT = filter; 998 filterOUT = filter;
999 filter = mFilters.next(); 999 filter = mFilters.next();
1000 } 1000 }
1001 int w = 300; 1001 int w = 300;
1002 if ( QApplication::desktop()->width() < 320 ) 1002 if ( QApplication::desktop()->width() < 320 )
1003 w = 220; 1003 w = 220;
1004 int h = bar.sizeHint().height() ; 1004 int h = bar.sizeHint().height() ;
1005 int dw = QApplication::desktop()->width(); 1005 int dw = QApplication::desktop()->width();
1006 int dh = QApplication::desktop()->height(); 1006 int dh = QApplication::desktop()->height();
1007 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 1007 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
1008 bar.show(); 1008 bar.show();
1009 int modulo = (er.count()/10)+1; 1009 int modulo = (er.count()/10)+1;
1010 int incCounter = 0; 1010 int incCounter = 0;
1011 while ( inR ) { 1011 while ( inR ) {
1012 if ( ! bar.isVisible() ) 1012 if ( ! bar.isVisible() )
1013 return false; 1013 return false;
1014 if ( incCounter % modulo == 0 ) 1014 if ( incCounter % modulo == 0 )
1015 bar.setProgress( incCounter ); 1015 bar.setProgress( incCounter );
1016 ++incCounter; 1016 ++incCounter;
1017 uid = inR->uid(); 1017 uid = inR->uid();
1018 bool skipIncidence = false; 1018 bool skipIncidence = false;
1019 if ( uid.left(15) == QString("last-syncEvent-") ) 1019 if ( uid.left(15) == QString("last-syncEvent-") )
1020 skipIncidence = true; 1020 skipIncidence = true;
1021 QString idS; 1021 QString idS;
1022 qApp->processEvents(); 1022 qApp->processEvents();
1023 if ( !skipIncidence ) { 1023 if ( !skipIncidence ) {
1024 inL = local->incidence( uid ); 1024 inL = local->incidence( uid );
1025 if ( inL ) { // maybe conflict - same uid in both calendars 1025 if ( inL ) { // maybe conflict - same uid in both calendars
1026 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { 1026 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) {
1027 //qDebug("take %d %s ", take, inL->summary().latin1()); 1027 //qDebug("take %d %s ", take, inL->summary().latin1());
1028 if ( take == 3 ) 1028 if ( take == 3 )
1029 return false; 1029 return false;
1030 if ( take == 1 ) {// take local ********************** 1030 if ( take == 1 ) {// take local **********************
1031 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) 1031 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
1032 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1032 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1033 else 1033 else
1034 idS = inR->IDStr(); 1034 idS = inR->IDStr();
1035 remote->deleteIncidence( inR ); 1035 remote->deleteIncidence( inR );
1036 inR = inL->clone(); 1036 inR = inL->clone();
1037 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1037 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1038 if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) 1038 if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL )
1039 inR->setIDStr( idS ); 1039 inR->setIDStr( idS );
1040 remote->addIncidence( inR ); 1040 remote->addIncidence( inR );
1041 if ( mSyncManager->syncWithDesktop() ) 1041 if ( mSyncManager->syncWithDesktop() )
1042 inR->setPilotId( 2 ); 1042 inR->setPilotId( 2 );
1043 ++changedRemote; 1043 ++changedRemote;
1044 } else {// take remote ********************** 1044 } else {// take remote **********************
1045 idS = inL->IDStr(); 1045 idS = inL->IDStr();
1046 int pid = inL->pilotId(); 1046 int pid = inL->pilotId();
1047 local->deleteIncidence( inL ); 1047 local->deleteIncidence( inL );
1048 inL = inR->clone(); 1048 inL = inR->clone();
1049 if ( mSyncManager->syncWithDesktop() ) 1049 if ( mSyncManager->syncWithDesktop() )
1050 inL->setPilotId( pid ); 1050 inL->setPilotId( pid );
1051 inL->setIDStr( idS ); 1051 inL->setIDStr( idS );
1052 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1052 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1053 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1053 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1054 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); 1054 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
1055 } 1055 }
1056 local->addIncidence( inL ); 1056 local->addIncidence( inL );
1057 ++changedLocal; 1057 ++changedLocal;
1058 } 1058 }
1059 } 1059 }
1060 } else { // no conflict ********** add or delete remote 1060 } else { // no conflict ********** add or delete remote
1061 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ 1061 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
1062 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1062 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1063 QString des = eventLSync->description(); 1063 QString des = eventLSync->description();
1064 QString pref = "e"; 1064 QString pref = "e";
1065 if ( inR->type() == "Todo" ) 1065 if ( inR->type() == "Todo" )
1066 pref = "t"; 1066 pref = "t";
1067 if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it 1067 if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
1068 inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); 1068 inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE );
1069 //remote->deleteIncidence( inR ); 1069 //remote->deleteIncidence( inR );
1070 ++deletedEventR; 1070 ++deletedEventR;
1071 } else { 1071 } else {
1072 inR->setLastModified( modifiedCalendar ); 1072 inR->setLastModified( modifiedCalendar );
1073 inL = inR->clone(); 1073 inL = inR->clone();
1074 inL->setIDStr( ":" ); 1074 inL->setIDStr( ":" );
1075 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1075 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1076 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); 1076 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
1077 local->addIncidence( inL ); 1077 local->addIncidence( inL );
1078 ++addedEvent; 1078 ++addedEvent;
1079 1079
1080 } 1080 }
1081 } else { 1081 } else {
1082 if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { 1082 if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) {
1083 inR->setLastModified( modifiedCalendar ); 1083 inR->setLastModified( modifiedCalendar );
1084 inL = inR->clone(); 1084 inL = inR->clone();
1085 inL->setIDStr( ":" ); 1085 inL->setIDStr( ":" );
1086 local->addIncidence( inL ); 1086 local->addIncidence( inL );
1087 ++addedEvent; 1087 ++addedEvent;
1088 1088
1089 } else { 1089 } else {
1090 checkExternSyncEvent(eventRSyncSharp, inR); 1090 checkExternSyncEvent(eventRSyncSharp, inR);
1091 remote->deleteIncidence( inR ); 1091 remote->deleteIncidence( inR );
1092 ++deletedEventR; 1092 ++deletedEventR;
1093 } 1093 }
1094 } 1094 }
1095 } else { 1095 } else {
1096 ++filteredIN; 1096 ++filteredIN;
1097 } 1097 }
1098 } 1098 }
1099 } 1099 }
1100 inR = er.next(); 1100 inR = er.next();
1101 } 1101 }
1102 QPtrList<Incidence> el = local->rawIncidences(); 1102 QPtrList<Incidence> el = local->rawIncidences();
1103 inL = el.first(); 1103 inL = el.first();
1104 modulo = (el.count()/10)+1; 1104 modulo = (el.count()/10)+1;
1105 bar.setCaption (i18n("Add / remove events") ); 1105 bar.setCaption (i18n("Add / remove events") );
1106 bar.setTotalSteps ( el.count() ) ; 1106 bar.setTotalSteps ( el.count() ) ;
1107 bar.show(); 1107 bar.show();
1108 incCounter = 0; 1108 incCounter = 0;
1109 1109
1110 while ( inL ) { 1110 while ( inL ) {
1111 1111
1112 qApp->processEvents(); 1112 qApp->processEvents();
1113 if ( ! bar.isVisible() ) 1113 if ( ! bar.isVisible() )
1114 return false; 1114 return false;
1115 if ( incCounter % modulo == 0 ) 1115 if ( incCounter % modulo == 0 )
1116 bar.setProgress( incCounter ); 1116 bar.setProgress( incCounter );
1117 ++incCounter; 1117 ++incCounter;
1118 uid = inL->uid(); 1118 uid = inL->uid();
1119 bool skipIncidence = false; 1119 bool skipIncidence = false;
1120 if ( uid.left(15) == QString("last-syncEvent-") ) 1120 if ( uid.left(15) == QString("last-syncEvent-") )
1121 skipIncidence = true; 1121 skipIncidence = true;
1122 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->type() == "Journal" ) 1122 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->type() == "Journal" )
1123 skipIncidence = true; 1123 skipIncidence = true;
1124 if ( !skipIncidence ) { 1124 if ( !skipIncidence ) {
1125 inR = remote->incidence( uid ); 1125 inR = remote->incidence( uid );
1126 if ( ! inR ) { 1126 if ( ! inR ) {
1127 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ 1127 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
1128 // no conflict ********** add or delete local 1128 // no conflict ********** add or delete local
1129 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1129 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1130 if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { 1130 if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {
1131 checkExternSyncEvent(eventLSyncSharp, inL); 1131 checkExternSyncEvent(eventLSyncSharp, inL);
1132 local->deleteIncidence( inL ); 1132 local->deleteIncidence( inL );
1133 ++deletedEventL; 1133 ++deletedEventL;
1134 } else { 1134 } else {
1135 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1135 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1136 inL->removeID(mCurrentSyncDevice ); 1136 inL->removeID(mCurrentSyncDevice );
1137 ++addedEventR; 1137 ++addedEventR;
1138 //qDebug("remote added Incidence %s ", inL->summary().latin1()); 1138 //qDebug("remote added Incidence %s ", inL->summary().latin1());
1139 inL->setLastModified( modifiedCalendar ); 1139 inL->setLastModified( modifiedCalendar );
1140 inR = inL->clone(); 1140 inR = inL->clone();
1141 inR->setIDStr( ":" ); 1141 inR->setIDStr( ":" );
1142 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1142 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1143 remote->addIncidence( inR ); 1143 remote->addIncidence( inR );
1144 } 1144 }
1145 } 1145 }
1146 } else { 1146 } else {
1147 if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { 1147 if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) {
1148 checkExternSyncEvent(eventLSyncSharp, inL); 1148 checkExternSyncEvent(eventLSyncSharp, inL);
1149 local->deleteIncidence( inL ); 1149 local->deleteIncidence( inL );
1150 ++deletedEventL; 1150 ++deletedEventL;
1151 } else { 1151 } else {
1152 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1152 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1153 ++addedEventR; 1153 ++addedEventR;
1154 inL->setLastModified( modifiedCalendar ); 1154 inL->setLastModified( modifiedCalendar );
1155 inR = inL->clone(); 1155 inR = inL->clone();
1156 inR->setIDStr( ":" ); 1156 inR->setIDStr( ":" );
1157 remote->addIncidence( inR ); 1157 remote->addIncidence( inR );
1158 } 1158 }
1159 } 1159 }
1160 } 1160 }
1161 } else { 1161 } else {
1162 ++filteredOUT; 1162 ++filteredOUT;
1163 } 1163 }
1164 } 1164 }
1165 } 1165 }
1166 inL = el.next(); 1166 inL = el.next();
1167 } 1167 }
1168 int delFut = 0; 1168 int delFut = 0;
1169 int remRem = 0; 1169 int remRem = 0;
1170 if ( mSyncManager->mWriteBackInFuture ) { 1170 if ( mSyncManager->mWriteBackInFuture ) {
1171 er = remote->rawIncidences(); 1171 er = remote->rawIncidences();
1172 remRem = er.count(); 1172 remRem = er.count();
1173 inR = er.first(); 1173 inR = er.first();
1174 QDateTime dt; 1174 QDateTime dt;
1175 QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); 1175 QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) );
1176 QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); 1176 QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 );
1177 while ( inR ) { 1177 while ( inR ) {
1178 if ( inR->type() == "Todo" ) { 1178 if ( inR->type() == "Todo" ) {
1179 Todo * t = (Todo*)inR; 1179 Todo * t = (Todo*)inR;
1180 if ( t->hasDueDate() ) 1180 if ( t->hasDueDate() )
1181 dt = t->dtDue(); 1181 dt = t->dtDue();
1182 else 1182 else
1183 dt = cur.addSecs( 62 ); 1183 dt = cur.addSecs( 62 );
1184 } 1184 }
1185 else if (inR->type() == "Event" ) { 1185 else if (inR->type() == "Event" ) {
1186 bool ok; 1186 bool ok;
1187 dt = inR->getNextOccurence( cur, &ok ); 1187 dt = inR->getNextOccurence( cur, &ok );
1188 if ( !ok ) 1188 if ( !ok )
1189 dt = cur.addSecs( -62 ); 1189 dt = cur.addSecs( -62 );
1190 } 1190 }
1191 else 1191 else
1192 dt = inR->dtStart(); 1192 dt = inR->dtStart();
1193 if ( dt < cur || dt > end ) { 1193 if ( dt < cur || dt > end ) {
1194 remote->deleteIncidence( inR ); 1194 remote->deleteIncidence( inR );
1195 ++delFut; 1195 ++delFut;
1196 } 1196 }
1197 inR = er.next(); 1197 inR = er.next();
1198 } 1198 }
1199 } 1199 }
1200 bar.hide(); 1200 bar.hide();
1201 mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); 1201 mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 );
1202 eventLSync->setReadOnly( false ); 1202 eventLSync->setReadOnly( false );
1203 eventLSync->setDtStart( mLastCalendarSync ); 1203 eventLSync->setDtStart( mLastCalendarSync );
1204 eventRSync->setDtStart( mLastCalendarSync ); 1204 eventRSync->setDtStart( mLastCalendarSync );
1205 eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); 1205 eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
1206 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); 1206 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
1207 eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; 1207 eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ;
1208 eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); 1208 eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName );
1209 eventLSync->setReadOnly( true ); 1209 eventLSync->setReadOnly( true );
1210 qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); 1210 qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL );
1211 if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... 1211 if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal...
1212 remote->addEvent( eventRSync ); 1212 remote->addEvent( eventRSync );
1213 else 1213 else
1214 delete eventRSync; 1214 delete eventRSync;
1215 qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); 1215 qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() );
1216 QString mes; 1216 QString mes;
1217 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 %d incoming filtered out\n %d outgoing filtered out\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR, filteredIN, filteredOUT ); 1217 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 %d incoming filtered out\n %d outgoing filtered out\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR, filteredIN, filteredOUT );
1218 QString delmess; 1218 QString delmess;
1219 if ( delFut ) { 1219 if ( delFut ) {
1220 delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut); 1220 delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut);
1221 mes += delmess; 1221 mes += delmess;
1222 } 1222 }
1223 mes = i18n("Local calendar changed!\n") +mes; 1223 mes = i18n("Local calendar changed!\n") +mes;
1224 mCalendar->checkAlarmForIncidence( 0, true ); 1224 mCalendar->checkAlarmForIncidence( 0, true );
1225 qDebug( mes ); 1225 qDebug( mes );
1226 if ( mSyncManager->mShowSyncSummary ) { 1226 if ( mSyncManager->mShowSyncSummary ) {
1227 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, 1227 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
1228 i18n("KO/Pi Synchronization"),i18n("Write back"))) { 1228 i18n("KO/Pi Synchronization"),i18n("Write back"))) {
1229 qDebug("KO: WB cancelled "); 1229 qDebug("KO: WB cancelled ");
1230 return false; 1230 mSyncManager->mWriteBackFile = false;
1231 return syncOK;
1231 } 1232 }
1232 } 1233 }
1233 return syncOK; 1234 return syncOK;
1234} 1235}
1235 1236
1236void CalendarView::setSyncDevice( QString s ) 1237void CalendarView::setSyncDevice( QString s )
1237{ 1238{
1238 mCurrentSyncDevice= s; 1239 mCurrentSyncDevice= s;
1239} 1240}
1240void CalendarView::setSyncName( QString s ) 1241void CalendarView::setSyncName( QString s )
1241{ 1242{
1242 mCurrentSyncName= s; 1243 mCurrentSyncName= s;
1243} 1244}
1244bool CalendarView::syncCalendar(QString filename, int mode) 1245bool CalendarView::syncCalendar(QString filename, int mode)
1245{ 1246{
1246 //qDebug("syncCalendar %s ", filename.latin1()); 1247 //qDebug("syncCalendar %s ", filename.latin1());
1247 mGlobalSyncMode = SYNC_MODE_NORMAL; 1248 mGlobalSyncMode = SYNC_MODE_NORMAL;
1248 CalendarLocal* calendar = new CalendarLocal(); 1249 CalendarLocal* calendar = new CalendarLocal();
1249 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 1250 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1250 FileStorage* storage = new FileStorage( calendar ); 1251 FileStorage* storage = new FileStorage( calendar );
1251 bool syncOK = false; 1252 bool syncOK = false;
1252 storage->setFileName( filename ); 1253 storage->setFileName( filename );
1253 // qDebug("loading ... "); 1254 // qDebug("loading ... ");
1254 if ( storage->load() ) { 1255 if ( storage->load() ) {
1255 getEventViewerDialog()->setSyncMode( true ); 1256 getEventViewerDialog()->setSyncMode( true );
1256 syncOK = synchronizeCalendar( mCalendar, calendar, mode ); 1257 syncOK = synchronizeCalendar( mCalendar, calendar, mode );
1257 getEventViewerDialog()->setSyncMode( false ); 1258 getEventViewerDialog()->setSyncMode( false );
1258 if ( syncOK ) { 1259 if ( syncOK ) {
1259 if ( mSyncManager->mWriteBackFile ) 1260 if ( mSyncManager->mWriteBackFile )
1260 { 1261 {
1261 storage->setSaveFormat( new ICalFormat() ); 1262 storage->setSaveFormat( new ICalFormat() );
1262 storage->save(); 1263 storage->save();
1263 } 1264 }
1264 } 1265 }
1265 setModified( true ); 1266 setModified( true );
1266 } 1267 }
1267 delete storage; 1268 delete storage;
1268 delete calendar; 1269 delete calendar;
1269 if ( syncOK ) 1270 if ( syncOK )
1270 updateView(); 1271 updateView();
1271 return syncOK; 1272 return syncOK;
1272} 1273}
1273 1274
1274void CalendarView::syncExternal( int mode ) 1275void CalendarView::syncExternal( int mode )
1275{ 1276{
1276 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 1277 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
1277 1278
1278 qApp->processEvents(); 1279 qApp->processEvents();
1279 CalendarLocal* calendar = new CalendarLocal(); 1280 CalendarLocal* calendar = new CalendarLocal();
1280 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 1281 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1281 bool syncOK = false; 1282 bool syncOK = false;
1282 bool loadSuccess = false; 1283 bool loadSuccess = false;
1283 PhoneFormat* phoneFormat = 0; 1284 PhoneFormat* phoneFormat = 0;
1284 emit tempDisableBR(true); 1285 emit tempDisableBR(true);
1285#ifndef DESKTOP_VERSION 1286#ifndef DESKTOP_VERSION
1286 SharpFormat* sharpFormat = 0; 1287 SharpFormat* sharpFormat = 0;
1287 if ( mode == 0 ) { // sharp 1288 if ( mode == 0 ) { // sharp
1288 sharpFormat = new SharpFormat () ; 1289 sharpFormat = new SharpFormat () ;
1289 loadSuccess = sharpFormat->load( calendar, mCalendar ); 1290 loadSuccess = sharpFormat->load( calendar, mCalendar );
1290 1291
1291 } else 1292 } else
1292#endif 1293#endif
1293 if ( mode == 1 ) { // phone 1294 if ( mode == 1 ) { // phone
1294 phoneFormat = new PhoneFormat (mCurrentSyncDevice, 1295 phoneFormat = new PhoneFormat (mCurrentSyncDevice,
1295 mSyncManager->mPhoneDevice, 1296 mSyncManager->mPhoneDevice,
1296 mSyncManager->mPhoneConnection, 1297 mSyncManager->mPhoneConnection,
1297 mSyncManager->mPhoneModel); 1298 mSyncManager->mPhoneModel);
1298 loadSuccess = phoneFormat->load( calendar,mCalendar); 1299 loadSuccess = phoneFormat->load( calendar,mCalendar);
1299 1300
1300 } else { 1301 } else {
1301 emit tempDisableBR(false); 1302 emit tempDisableBR(false);
1302 return; 1303 return;
1303 } 1304 }
1304 if ( loadSuccess ) { 1305 if ( loadSuccess ) {
1305 getEventViewerDialog()->setSyncMode( true ); 1306 getEventViewerDialog()->setSyncMode( true );
1306 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); 1307 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs );
1307 getEventViewerDialog()->setSyncMode( false ); 1308 getEventViewerDialog()->setSyncMode( false );
1308 qApp->processEvents(); 1309 qApp->processEvents();
1309 if ( syncOK ) { 1310 if ( syncOK ) {
1310 if ( mSyncManager->mWriteBackFile ) 1311 if ( mSyncManager->mWriteBackFile )
1311 { 1312 {
1312 QPtrList<Incidence> iL = mCalendar->rawIncidences(); 1313 QPtrList<Incidence> iL = mCalendar->rawIncidences();
1313 Incidence* inc = iL.first(); 1314 Incidence* inc = iL.first();
1314 if ( phoneFormat ) { 1315 if ( phoneFormat ) {
1315 while ( inc ) { 1316 while ( inc ) {
1316 inc->removeID(mCurrentSyncDevice); 1317 inc->removeID(mCurrentSyncDevice);
1317 inc = iL.next(); 1318 inc = iL.next();
1318 } 1319 }
1319 } 1320 }
1320#ifndef DESKTOP_VERSION 1321#ifndef DESKTOP_VERSION
1321 if ( sharpFormat ) 1322 if ( sharpFormat )
1322 sharpFormat->save(calendar); 1323 sharpFormat->save(calendar);
1323#endif 1324#endif
1324 if ( phoneFormat ) 1325 if ( phoneFormat )
1325 phoneFormat->save(calendar); 1326 phoneFormat->save(calendar);
1326 iL = calendar->rawIncidences(); 1327 iL = calendar->rawIncidences();
1327 inc = iL.first(); 1328 inc = iL.first();
1328 Incidence* loc; 1329 Incidence* loc;
1329 while ( inc ) { 1330 while ( inc ) {
1330 if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { 1331 if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) {
1331 loc = mCalendar->incidence(inc->uid() ); 1332 loc = mCalendar->incidence(inc->uid() );
1332 if ( loc ) { 1333 if ( loc ) {
1333 loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); 1334 loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) );
1334 loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); 1335 loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) );
1335 } 1336 }
1336 } 1337 }
1337 inc = iL.next(); 1338 inc = iL.next();
1338 } 1339 }
1339 Incidence* lse = getLastSyncEvent(); 1340 Incidence* lse = getLastSyncEvent();
1340 if ( lse ) { 1341 if ( lse ) {
1341 lse->setReadOnly( false ); 1342 lse->setReadOnly( false );
1342 lse->setDescription( "" ); 1343 lse->setDescription( "" );
1343 lse->setReadOnly( true ); 1344 lse->setReadOnly( true );
1344 } 1345 }
1345 } 1346 }
1346 } else { 1347 } else {
1347 topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); 1348 topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") );
1348 } 1349 }
1349 setModified( true ); 1350 setModified( true );
1350 } else { 1351 } else {
1351 QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; 1352 QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ;
1352 QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), 1353 QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"),
1353 question, i18n("Ok")) ; 1354 question, i18n("Ok")) ;
1354 1355
1355 } 1356 }
1356 delete calendar; 1357 delete calendar;
1357 updateView(); 1358 updateView();
1358 emit tempDisableBR(false); 1359 emit tempDisableBR(false);
1359 return ;//syncOK; 1360 return ;//syncOK;
1360 1361
1361} 1362}
1362 1363
1363bool CalendarView::importBday() 1364bool CalendarView::importBday()
1364{ 1365{
1365#ifndef KORG_NOKABC 1366#ifndef KORG_NOKABC
1366 1367
1367#ifdef DESKTOP_VERSION 1368#ifdef DESKTOP_VERSION
1368 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); 1369 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
1369 KABC::AddressBook::Iterator it; 1370 KABC::AddressBook::Iterator it;
1370 int count = 0; 1371 int count = 0;
1371 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 1372 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
1372 ++count; 1373 ++count;
1373 } 1374 }
1374 QProgressBar bar(count,0 ); 1375 QProgressBar bar(count,0 );
1375 int w = 300; 1376 int w = 300;
1376 if ( QApplication::desktop()->width() < 320 ) 1377 if ( QApplication::desktop()->width() < 320 )
1377 w = 220; 1378 w = 220;
1378 int h = bar.sizeHint().height() ; 1379 int h = bar.sizeHint().height() ;
1379 int dw = QApplication::desktop()->width(); 1380 int dw = QApplication::desktop()->width();
1380 int dh = QApplication::desktop()->height(); 1381 int dh = QApplication::desktop()->height();
1381 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 1382 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
1382 bar.show(); 1383 bar.show();
1383 bar.setCaption (i18n("Reading addressbook - close to abort!") ); 1384 bar.setCaption (i18n("Reading addressbook - close to abort!") );
1384 qApp->processEvents(); 1385 qApp->processEvents();
1385 count = 0; 1386 count = 0;
1386 int addCount = 0; 1387 int addCount = 0;
1387 KCal::Attendee* a = 0; 1388 KCal::Attendee* a = 0;
1388 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 1389 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
1389 if ( ! bar.isVisible() ) 1390 if ( ! bar.isVisible() )
1390 return false; 1391 return false;
1391 bar.setProgress( count++ ); 1392 bar.setProgress( count++ );
1392 qApp->processEvents(); 1393 qApp->processEvents();
1393 //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); 1394 //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() );
1394 if ( (*it).birthday().date().isValid() ){ 1395 if ( (*it).birthday().date().isValid() ){
1395 a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; 1396 a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ;
1396 if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) 1397 if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) )
1397 ++addCount; 1398 ++addCount;
1398 } 1399 }
1399 QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); 1400 QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d");
1400 if ( anni.isValid() ){ 1401 if ( anni.isValid() ){
1401 a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; 1402 a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ;
1402 if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) 1403 if ( addAnniversary( anni, (*it).assembledName(), a, false ) )
1403 ++addCount; 1404 ++addCount;
1404 } 1405 }
1405 } 1406 }
1406 updateView(); 1407 updateView();
1407 topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); 1408 topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!"));
1408#else //DESKTOP_VERSION 1409#else //DESKTOP_VERSION
1409 1410
1410 ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); 1411 ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
1411 // the result should now arrive through method insertBirthdays 1412 // the result should now arrive through method insertBirthdays
1412 1413
1413#endif //DESKTOP_VERSION 1414#endif //DESKTOP_VERSION
1414 1415
1415#endif //KORG_NOKABC 1416#endif //KORG_NOKABC
1416 1417
1417 1418
1418 return true; 1419 return true;
1419} 1420}
1420 1421
1421// This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI 1422// This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI
1422void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, 1423void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList,
1423 const QStringList& anniversaryList, const QStringList& realNameList, 1424 const QStringList& anniversaryList, const QStringList& realNameList,
1424 const QStringList& emailList, const QStringList& assembledNameList, 1425 const QStringList& emailList, const QStringList& assembledNameList,
1425 const QStringList& uidList) 1426 const QStringList& uidList)
1426{ 1427{
1427 //qDebug("KO::CalendarView::insertBirthdays"); 1428 //qDebug("KO::CalendarView::insertBirthdays");
1428 if (uid == this->name()) 1429 if (uid == this->name())
1429 { 1430 {
1430 int count = birthdayList.count(); 1431 int count = birthdayList.count();
1431 int addCount = 0; 1432 int addCount = 0;
1432 KCal::Attendee* a = 0; 1433 KCal::Attendee* a = 0;
1433 1434
1434 //qDebug("CalView 1 %i", count); 1435 //qDebug("CalView 1 %i", count);
1435 1436
1436 QProgressBar bar(count,0 ); 1437 QProgressBar bar(count,0 );
1437 int w = 300; 1438 int w = 300;
1438 if ( QApplication::desktop()->width() < 320 ) 1439 if ( QApplication::desktop()->width() < 320 )
1439 w = 220; 1440 w = 220;
1440 int h = bar.sizeHint().height() ; 1441 int h = bar.sizeHint().height() ;
1441 int dw = QApplication::desktop()->width(); 1442 int dw = QApplication::desktop()->width();
1442 int dh = QApplication::desktop()->height(); 1443 int dh = QApplication::desktop()->height();
1443 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 1444 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
1444 bar.show(); 1445 bar.show();
1445 bar.setCaption (i18n("inserting birthdays - close to abort!") ); 1446 bar.setCaption (i18n("inserting birthdays - close to abort!") );
1446 qApp->processEvents(); 1447 qApp->processEvents();
1447 1448
1448 QDate birthday; 1449 QDate birthday;
1449 QDate anniversary; 1450 QDate anniversary;
1450 QString realName; 1451 QString realName;
1451 QString email; 1452 QString email;
1452 QString assembledName; 1453 QString assembledName;
1453 QString uid; 1454 QString uid;
1454 bool ok = true; 1455 bool ok = true;
1455 for ( int i = 0; i < count; i++) 1456 for ( int i = 0; i < count; i++)
1456 { 1457 {
1457 if ( ! bar.isVisible() ) 1458 if ( ! bar.isVisible() )
1458 return; 1459 return;
1459 bar.setProgress( i ); 1460 bar.setProgress( i );
1460 qApp->processEvents(); 1461 qApp->processEvents();
1461 1462
1462 birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); 1463 birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok);
1463 if (!ok) { 1464 if (!ok) {
1464 ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); 1465 ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1());
1465 } 1466 }
1466 1467
1467 anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); 1468 anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok);
1468 if (!ok) { 1469 if (!ok) {
1469 ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); 1470 ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1());
1470 } 1471 }
1471 realName = realNameList[i]; 1472 realName = realNameList[i];
1472 email = emailList[i]; 1473 email = emailList[i];
1473 assembledName = assembledNameList[i]; 1474 assembledName = assembledNameList[i];
1474 uid = uidList[i]; 1475 uid = uidList[i];
1475 //qDebug("insert birthday in KO/Pi: %s,%s,%s,%s: %s, %s", realName.latin1(), email.latin1(), assembledName.latin1(), uid.latin1(), birthdayList[i].latin1(), anniversaryList[i].latin1() ); 1476 //qDebug("insert birthday in KO/Pi: %s,%s,%s,%s: %s, %s", realName.latin1(), email.latin1(), assembledName.latin1(), uid.latin1(), birthdayList[i].latin1(), anniversaryList[i].latin1() );
1476 1477
1477 if ( birthday.isValid() ){ 1478 if ( birthday.isValid() ){
1478 a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, 1479 a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction,
1479 KCal::Attendee::ReqParticipant,uid) ; 1480 KCal::Attendee::ReqParticipant,uid) ;
1480 if ( addAnniversary( birthday, assembledName, a, true ) ) 1481 if ( addAnniversary( birthday, assembledName, a, true ) )
1481 ++addCount; 1482 ++addCount;
1482 } 1483 }
1483 1484
1484 if ( anniversary.isValid() ){ 1485 if ( anniversary.isValid() ){
1485 a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, 1486 a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction,
1486 KCal::Attendee::ReqParticipant,uid) ; 1487 KCal::Attendee::ReqParticipant,uid) ;
1487 if ( addAnniversary( anniversary, assembledName, a, false ) ) 1488 if ( addAnniversary( anniversary, assembledName, a, false ) )
1488 ++addCount; 1489 ++addCount;
1489 } 1490 }
1490 } 1491 }
1491 1492
1492 updateView(); 1493 updateView();
1493 topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); 1494 topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!"));
1494 1495
1495 } 1496 }
1496 1497
1497} 1498}
1498 1499
1499 1500
1500 1501
1501bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) 1502bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday)
1502{ 1503{
1503 //qDebug("addAnni "); 1504 //qDebug("addAnni ");
1504 Event * ev = new Event(); 1505 Event * ev = new Event();
1505 ev->setOrganizer(KOPrefs::instance()->email()); 1506 ev->setOrganizer(KOPrefs::instance()->email());
1506 if ( a ) { 1507 if ( a ) {
1507 ev->addAttendee( a ); 1508 ev->addAttendee( a );
1508 } 1509 }
1509 QString kind; 1510 QString kind;
1510 if ( birthday ) { 1511 if ( birthday ) {
1511 kind = i18n( "Birthday" ); 1512 kind = i18n( "Birthday" );
1512 ev->setSummary( name + " (" + QString::number(date.year()) +")"); 1513 ev->setSummary( name + " (" + QString::number(date.year()) +")");
1513 } 1514 }
1514 else { 1515 else {
1515 kind = i18n( "Anniversary" ); 1516 kind = i18n( "Anniversary" );
1516 ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); 1517 ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind );
1517 } 1518 }
1518 ev->setCategories( kind ); 1519 ev->setCategories( kind );
1519 ev->setDtStart( QDateTime(date) ); 1520 ev->setDtStart( QDateTime(date) );
1520 ev->setDtEnd( QDateTime(date) ); 1521 ev->setDtEnd( QDateTime(date) );
1521 ev->setFloats( true ); 1522 ev->setFloats( true );
1522 Recurrence * rec = ev->recurrence(); 1523 Recurrence * rec = ev->recurrence();
1523 rec->setYearly(Recurrence::rYearlyMonth,1,-1); 1524 rec->setYearly(Recurrence::rYearlyMonth,1,-1);
1524 rec->addYearlyNum( date.month() ); 1525 rec->addYearlyNum( date.month() );
1525 if ( !mCalendar->addAnniversaryNoDup( ev ) ) { 1526 if ( !mCalendar->addAnniversaryNoDup( ev ) ) {
1526 delete ev; 1527 delete ev;
1527 return false; 1528 return false;
1528 } 1529 }
1529 return true; 1530 return true;
1530 1531
1531} 1532}
1532bool CalendarView::importQtopia( const QString &categories, 1533bool CalendarView::importQtopia( const QString &categories,
1533 const QString &datebook, 1534 const QString &datebook,
1534 const QString &todolist ) 1535 const QString &todolist )
1535{ 1536{
1536 1537
1537 QtopiaFormat qtopiaFormat; 1538 QtopiaFormat qtopiaFormat;
1538 qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); 1539 qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories));
1539 if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); 1540 if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories );
1540 if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); 1541 if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook );
1541 if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); 1542 if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist );
1542 1543
1543 updateView(); 1544 updateView();
1544 return true; 1545 return true;
1545 1546
1546#if 0 1547#if 0
1547 mGlobalSyncMode = SYNC_MODE_QTOPIA; 1548 mGlobalSyncMode = SYNC_MODE_QTOPIA;
1548 mCurrentSyncDevice = "qtopia-XML"; 1549 mCurrentSyncDevice = "qtopia-XML";
1549 if ( mSyncManager->mAskForPreferences ) 1550 if ( mSyncManager->mAskForPreferences )
1550 edit_sync_options(); 1551 edit_sync_options();
1551 qApp->processEvents(); 1552 qApp->processEvents();
1552 CalendarLocal* calendar = new CalendarLocal(); 1553 CalendarLocal* calendar = new CalendarLocal();
1553 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 1554 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1554 bool syncOK = false; 1555 bool syncOK = false;
1555 QtopiaFormat qtopiaFormat; 1556 QtopiaFormat qtopiaFormat;
1556 qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); 1557 qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories));
1557 bool loadOk = true; 1558 bool loadOk = true;
1558 if ( !categories.isEmpty() ) 1559 if ( !categories.isEmpty() )
1559 loadOk = qtopiaFormat.load( calendar, categories ); 1560 loadOk = qtopiaFormat.load( calendar, categories );
1560 if ( loadOk && !datebook.isEmpty() ) 1561 if ( loadOk && !datebook.isEmpty() )
1561 loadOk = qtopiaFormat.load( calendar, datebook ); 1562 loadOk = qtopiaFormat.load( calendar, datebook );
1562 if ( loadOk && !todolist.isEmpty() ) 1563 if ( loadOk && !todolist.isEmpty() )
1563 loadOk = qtopiaFormat.load( calendar, todolist ); 1564 loadOk = qtopiaFormat.load( calendar, todolist );
1564 1565
1565 if ( loadOk ) { 1566 if ( loadOk ) {
1566 getEventViewerDialog()->setSyncMode( true ); 1567 getEventViewerDialog()->setSyncMode( true );
1567 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); 1568 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs );
1568 getEventViewerDialog()->setSyncMode( false ); 1569 getEventViewerDialog()->setSyncMode( false );
1569 qApp->processEvents(); 1570 qApp->processEvents();
1570 if ( syncOK ) { 1571 if ( syncOK ) {
1571 if ( mSyncManager->mWriteBackFile ) 1572 if ( mSyncManager->mWriteBackFile )
1572 { 1573 {
1573 // write back XML file 1574 // write back XML file
1574 1575
1575 } 1576 }
1576 setModified( true ); 1577 setModified( true );
1577 } 1578 }
1578 } else { 1579 } else {
1579 QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; 1580 QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ;
1580 QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), 1581 QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"),
1581 question, i18n("Ok")) ; 1582 question, i18n("Ok")) ;
1582 } 1583 }
1583 delete calendar; 1584 delete calendar;
1584 updateView(); 1585 updateView();
1585 return syncOK; 1586 return syncOK;
1586 1587
1587 1588
1588#endif 1589#endif
1589 1590
1590} 1591}
1591 1592
1592void CalendarView::setSyncEventsReadOnly() 1593void CalendarView::setSyncEventsReadOnly()
1593{ 1594{
1594 Event * ev; 1595 Event * ev;
1595 QPtrList<Event> eL = mCalendar->rawEvents(); 1596 QPtrList<Event> eL = mCalendar->rawEvents();
1596 ev = eL.first(); 1597 ev = eL.first();
1597 while ( ev ) { 1598 while ( ev ) {
1598 if ( ev->uid().left(15) == QString("last-syncEvent-") ) 1599 if ( ev->uid().left(15) == QString("last-syncEvent-") )
1599 ev->setReadOnly( true ); 1600 ev->setReadOnly( true );
1600 ev = eL.next(); 1601 ev = eL.next();
1601 } 1602 }
1602} 1603}
1603bool CalendarView::openCalendar(QString filename, bool merge) 1604bool CalendarView::openCalendar(QString filename, bool merge)
1604{ 1605{
1605 1606
1606 if (filename.isEmpty()) { 1607 if (filename.isEmpty()) {
1607 return false; 1608 return false;
1608 } 1609 }
1609 1610
1610 if (!QFile::exists(filename)) { 1611 if (!QFile::exists(filename)) {
1611 KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); 1612 KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename));
1612 return false; 1613 return false;
1613 } 1614 }
1614 1615
1615 globalFlagBlockAgenda = 1; 1616 globalFlagBlockAgenda = 1;
1616 if (!merge) mCalendar->close(); 1617 if (!merge) mCalendar->close();
1617 1618
1618 mStorage->setFileName( filename ); 1619 mStorage->setFileName( filename );
1619 1620
1620 if ( mStorage->load() ) { 1621 if ( mStorage->load() ) {
1621 if ( merge ) ;//setModified( true ); 1622 if ( merge ) ;//setModified( true );
1622 else { 1623 else {
1623 //setModified( true ); 1624 //setModified( true );
1624 mViewManager->setDocumentId( filename ); 1625 mViewManager->setDocumentId( filename );
1625 mDialogManager->setDocumentId( filename ); 1626 mDialogManager->setDocumentId( filename );
1626 mTodoList->setDocumentId( filename ); 1627 mTodoList->setDocumentId( filename );
1627 } 1628 }
1628 globalFlagBlockAgenda = 2; 1629 globalFlagBlockAgenda = 2;
1629 // if ( getLastSyncEvent() ) 1630 // if ( getLastSyncEvent() )
1630 // getLastSyncEvent()->setReadOnly( true ); 1631 // getLastSyncEvent()->setReadOnly( true );
1631 mCalendar->reInitAlarmSettings(); 1632 mCalendar->reInitAlarmSettings();
1632 setSyncEventsReadOnly(); 1633 setSyncEventsReadOnly();
1633 updateUnmanagedViews(); 1634 updateUnmanagedViews();
1634 updateView(); 1635 updateView();
1635 if ( filename != MainWindow::defaultFileName() ) { 1636 if ( filename != MainWindow::defaultFileName() ) {
1636 saveCalendar( MainWindow::defaultFileName() ); 1637 saveCalendar( MainWindow::defaultFileName() );
1637 } else { 1638 } else {
1638 QFileInfo finf ( MainWindow::defaultFileName()); 1639 QFileInfo finf ( MainWindow::defaultFileName());
1639 if ( finf.exists() ) { 1640 if ( finf.exists() ) {
1640 setLoadedFileVersion( finf.lastModified () ); 1641 setLoadedFileVersion( finf.lastModified () );
1641 } 1642 }
1642 } 1643 }
1643 return true; 1644 return true;
1644 } else { 1645 } else {
1645 // while failing to load, the calendar object could 1646 // while failing to load, the calendar object could
1646 // have become partially populated. Clear it out. 1647 // have become partially populated. Clear it out.
1647 if ( !merge ) { 1648 if ( !merge ) {
1648 mCalendar->close(); 1649 mCalendar->close();
1649 mViewManager->setDocumentId( filename ); 1650 mViewManager->setDocumentId( filename );
1650 mDialogManager->setDocumentId( filename ); 1651 mDialogManager->setDocumentId( filename );
1651 mTodoList->setDocumentId( filename ); 1652 mTodoList->setDocumentId( filename );
1652 } 1653 }
1653 1654
1654 //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); 1655 //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename));
1655 1656
1656 QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); 1657 QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) );
1657 globalFlagBlockAgenda = 2; 1658 globalFlagBlockAgenda = 2;
1658 mCalendar->reInitAlarmSettings(); 1659 mCalendar->reInitAlarmSettings();
1659 setSyncEventsReadOnly(); 1660 setSyncEventsReadOnly();
1660 updateUnmanagedViews(); 1661 updateUnmanagedViews();
1661 updateView(); 1662 updateView();
1662 } 1663 }
1663 return false; 1664 return false;
1664} 1665}
1665void CalendarView::showOpenError() 1666void CalendarView::showOpenError()
1666{ 1667{
1667 KMessageBox::error(this,i18n("Couldn't load calendar\n.")); 1668 KMessageBox::error(this,i18n("Couldn't load calendar\n."));
1668} 1669}
1669void CalendarView::setLoadedFileVersion(QDateTime dt) 1670void CalendarView::setLoadedFileVersion(QDateTime dt)
1670{ 1671{
1671 loadedFileVersion = dt; 1672 loadedFileVersion = dt;
1672} 1673}
1673bool CalendarView::checkFileChanged(QString fn) 1674bool CalendarView::checkFileChanged(QString fn)
1674{ 1675{
1675 QFileInfo finf ( fn ); 1676 QFileInfo finf ( fn );
1676 if ( !finf.exists() ) 1677 if ( !finf.exists() )
1677 return true; 1678 return true;
1678 QDateTime dt = finf.lastModified (); 1679 QDateTime dt = finf.lastModified ();
1679 if ( dt <= loadedFileVersion ) 1680 if ( dt <= loadedFileVersion )
1680 return false; 1681 return false;
1681 return true; 1682 return true;
1682 1683
1683} 1684}
1684void CalendarView::watchSavedFile() 1685void CalendarView::watchSavedFile()
1685{ 1686{
1686 QFileInfo finf ( MainWindow::defaultFileName()); 1687 QFileInfo finf ( MainWindow::defaultFileName());
1687 if ( !finf.exists() ) 1688 if ( !finf.exists() )
1688 return; 1689 return;
1689 QDateTime dt = finf.lastModified (); 1690 QDateTime dt = finf.lastModified ();
1690 if ( dt < loadedFileVersion ) { 1691 if ( dt < loadedFileVersion ) {
1691 //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); 1692 //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1());
1692 QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); 1693 QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) );
1693 return; 1694 return;
1694 } 1695 }
1695 loadedFileVersion = dt; 1696 loadedFileVersion = dt;
1696} 1697}
1697 1698
1698bool CalendarView::checkFileVersion(QString fn) 1699bool CalendarView::checkFileVersion(QString fn)
1699{ 1700{
1700 QFileInfo finf ( fn ); 1701 QFileInfo finf ( fn );
1701 if ( !finf.exists() ) 1702 if ( !finf.exists() )
1702 return true; 1703 return true;
1703 QDateTime dt = finf.lastModified (); 1704 QDateTime dt = finf.lastModified ();
1704 //qDebug("loaded file version %s",loadedFileVersion.toString().latin1()); 1705 //qDebug("loaded file version %s",loadedFileVersion.toString().latin1());
1705 //qDebug("file on disk version %s",dt.toString().latin1()); 1706 //qDebug("file on disk version %s",dt.toString().latin1());
1706 if ( dt <= loadedFileVersion ) 1707 if ( dt <= loadedFileVersion )
1707 return true; 1708 return true;
1708 int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , 1709 int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) ,
1709 i18n("KO/Pi Warning"),i18n("Overwrite"), 1710 i18n("KO/Pi Warning"),i18n("Overwrite"),
1710 i18n("Sync+save")); 1711 i18n("Sync+save"));
1711 1712
1712 if ( km == KMessageBox::Cancel ) 1713 if ( km == KMessageBox::Cancel )
1713 return false; 1714 return false;
1714 if ( km == KMessageBox::Yes ) 1715 if ( km == KMessageBox::Yes )
1715 return true; 1716 return true;
1716 1717
1717 setSyncDevice("deleteaftersync" ); 1718 setSyncDevice("deleteaftersync" );
1718 mSyncManager->mAskForPreferences = true; 1719 mSyncManager->mAskForPreferences = true;
1719 mSyncManager->mSyncAlgoPrefs = 3; 1720 mSyncManager->mSyncAlgoPrefs = 3;
1720 mSyncManager->mWriteBackFile = false; 1721 mSyncManager->mWriteBackFile = false;
1721 mSyncManager->mWriteBackExistingOnly = false; 1722 mSyncManager->mWriteBackExistingOnly = false;
1722 mSyncManager->mShowSyncSummary = false; 1723 mSyncManager->mShowSyncSummary = false;
1723 syncCalendar( fn, 3 ); 1724 syncCalendar( fn, 3 );
1724 Event * e = getLastSyncEvent(); 1725 Event * e = getLastSyncEvent();
1725 mCalendar->deleteEvent ( e ); 1726 mCalendar->deleteEvent ( e );
1726 updateView(); 1727 updateView();
1727 return true; 1728 return true;
1728} 1729}
1729 1730
1730bool CalendarView::saveCalendar( QString filename ) 1731bool CalendarView::saveCalendar( QString filename )
1731{ 1732{
1732 1733
1733 // Store back all unsaved data into calendar object 1734 // Store back all unsaved data into calendar object
1734 // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); 1735 // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() );
1735 if ( mViewManager->currentView() ) 1736 if ( mViewManager->currentView() )
1736 mViewManager->currentView()->flushView(); 1737 mViewManager->currentView()->flushView();
1737 1738
1738 1739
1739 QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); 1740 QDateTime lfv = QDateTime::currentDateTime().addSecs( -2);
1740 mStorage->setSaveFormat( new ICalFormat() ); 1741 mStorage->setSaveFormat( new ICalFormat() );
1741 mStorage->setFileName( filename ); 1742 mStorage->setFileName( filename );
1742 bool success; 1743 bool success;
1743 success = mStorage->save(); 1744 success = mStorage->save();
1744 if ( !success ) { 1745 if ( !success ) {
1745 return false; 1746 return false;
1746 } 1747 }
1747 if ( filename == MainWindow::defaultFileName() ) { 1748 if ( filename == MainWindow::defaultFileName() ) {
1748 setLoadedFileVersion( lfv ); 1749 setLoadedFileVersion( lfv );
1749 watchSavedFile(); 1750 watchSavedFile();
1750 } 1751 }
1751 return true; 1752 return true;
1752} 1753}
1753 1754
1754void CalendarView::closeCalendar() 1755void CalendarView::closeCalendar()
1755{ 1756{
1756 1757
1757 // child windows no longer valid 1758 // child windows no longer valid
1758 emit closingDown(); 1759 emit closingDown();
1759 1760
1760 mCalendar->close(); 1761 mCalendar->close();
1761 setModified(false); 1762 setModified(false);
1762 updateView(); 1763 updateView();
1763} 1764}
1764 1765
1765void CalendarView::archiveCalendar() 1766void CalendarView::archiveCalendar()
1766{ 1767{
1767 mDialogManager->showArchiveDialog(); 1768 mDialogManager->showArchiveDialog();
1768} 1769}
1769 1770
1770 1771
1771void CalendarView::readSettings() 1772void CalendarView::readSettings()
1772{ 1773{
1773 1774
1774 1775
1775 // mViewManager->showAgendaView(); 1776 // mViewManager->showAgendaView();
1776 QString str; 1777 QString str;
1777 //qDebug("CalendarView::readSettings() "); 1778 //qDebug("CalendarView::readSettings() ");
1778 // read settings from the KConfig, supplying reasonable 1779 // read settings from the KConfig, supplying reasonable
1779 // defaults where none are to be found 1780 // defaults where none are to be found
1780 KConfig *config = KOGlobals::config(); 1781 KConfig *config = KOGlobals::config();
1781#ifndef KORG_NOSPLITTER 1782#ifndef KORG_NOSPLITTER
1782 config->setGroup("KOrganizer Geometry"); 1783 config->setGroup("KOrganizer Geometry");
1783 1784
1784 QValueList<int> sizes = config->readIntListEntry("Separator1"); 1785 QValueList<int> sizes = config->readIntListEntry("Separator1");
1785 if (sizes.count() != 2) { 1786 if (sizes.count() != 2) {
1786 sizes << mDateNavigator->minimumSizeHint().width(); 1787 sizes << mDateNavigator->minimumSizeHint().width();
1787 sizes << 300; 1788 sizes << 300;
1788 } 1789 }
1789 mPanner->setSizes(sizes); 1790 mPanner->setSizes(sizes);
1790 1791
1791 sizes = config->readIntListEntry("Separator2"); 1792 sizes = config->readIntListEntry("Separator2");
1792 if ( ( mResourceView && sizes.count() == 4 ) || 1793 if ( ( mResourceView && sizes.count() == 4 ) ||
1793 ( !mResourceView && sizes.count() == 3 ) ) { 1794 ( !mResourceView && sizes.count() == 3 ) ) {
1794 mLeftSplitter->setSizes(sizes); 1795 mLeftSplitter->setSizes(sizes);
1795 } 1796 }
1796#endif 1797#endif
1797 globalFlagBlockAgenda = 1; 1798 globalFlagBlockAgenda = 1;
1798 mViewManager->showAgendaView(); 1799 mViewManager->showAgendaView();
1799 //mViewManager->readSettings( config ); 1800 //mViewManager->readSettings( config );
1800 mTodoList->restoreLayout(config,QString("Todo Layout")); 1801 mTodoList->restoreLayout(config,QString("Todo Layout"));
1801 readFilterSettings(config); 1802 readFilterSettings(config);
1802 config->setGroup( "Views" ); 1803 config->setGroup( "Views" );
1803 int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); 1804 int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
1804 if ( dateCount == 5 ) mNavigator->selectWorkWeek(); 1805 if ( dateCount == 5 ) mNavigator->selectWorkWeek();
1805 else if ( dateCount == 7 ) mNavigator->selectWeek(); 1806 else if ( dateCount == 7 ) mNavigator->selectWeek();
1806 else mNavigator->selectDates( dateCount ); 1807 else mNavigator->selectDates( dateCount );
1807 // mViewManager->readSettings( config ); 1808 // mViewManager->readSettings( config );
1808 updateConfig(); 1809 updateConfig();
1809 globalFlagBlockAgenda = 2; 1810 globalFlagBlockAgenda = 2;
1810 mViewManager->readSettings( config ); 1811 mViewManager->readSettings( config );
1811#ifdef DESKTOP_VERSION 1812#ifdef DESKTOP_VERSION
1812 config->setGroup("WidgetLayout"); 1813 config->setGroup("WidgetLayout");
1813 QStringList list; 1814 QStringList list;
1814 list = config->readListEntry("MainLayout"); 1815 list = config->readListEntry("MainLayout");
1815 int x,y,w,h; 1816 int x,y,w,h;
1816 if ( ! list.isEmpty() ) { 1817 if ( ! list.isEmpty() ) {
1817 x = list[0].toInt(); 1818 x = list[0].toInt();
1818 y = list[1].toInt(); 1819 y = list[1].toInt();
1819 w = list[2].toInt(); 1820 w = list[2].toInt();
1820 h = list[3].toInt(); 1821 h = list[3].toInt();
1821 topLevelWidget()->setGeometry(x,y,w,h); 1822 topLevelWidget()->setGeometry(x,y,w,h);
1822 1823
1823 } else { 1824 } else {
1824 topLevelWidget()->setGeometry( 40 ,40 , 640, 440); 1825 topLevelWidget()->setGeometry( 40 ,40 , 640, 440);
1825 } 1826 }
1826 list = config->readListEntry("EditEventLayout"); 1827 list = config->readListEntry("EditEventLayout");
1827 if ( ! list.isEmpty() ) { 1828 if ( ! list.isEmpty() ) {
1828 x = list[0].toInt(); 1829 x = list[0].toInt();
1829 y = list[1].toInt(); 1830 y = list[1].toInt();
1830 w = list[2].toInt(); 1831 w = list[2].toInt();
1831 h = list[3].toInt(); 1832 h = list[3].toInt();
1832 mEventEditor->setGeometry(x,y,w,h); 1833 mEventEditor->setGeometry(x,y,w,h);
1833 1834
1834 } 1835 }
1835 list = config->readListEntry("EditTodoLayout"); 1836 list = config->readListEntry("EditTodoLayout");
1836 if ( ! list.isEmpty() ) { 1837 if ( ! list.isEmpty() ) {
1837 x = list[0].toInt(); 1838 x = list[0].toInt();
1838 y = list[1].toInt(); 1839 y = list[1].toInt();
1839 w = list[2].toInt(); 1840 w = list[2].toInt();
1840 h = list[3].toInt(); 1841 h = list[3].toInt();
1841 mTodoEditor->setGeometry(x,y,w,h); 1842 mTodoEditor->setGeometry(x,y,w,h);
1842 1843
1843 } 1844 }
1844 list = config->readListEntry("ViewerLayout"); 1845 list = config->readListEntry("ViewerLayout");
1845 if ( ! list.isEmpty() ) { 1846 if ( ! list.isEmpty() ) {
1846 x = list[0].toInt(); 1847 x = list[0].toInt();
1847 y = list[1].toInt(); 1848 y = list[1].toInt();
1848 w = list[2].toInt(); 1849 w = list[2].toInt();
1849 h = list[3].toInt(); 1850 h = list[3].toInt();
1850 getEventViewerDialog()->setGeometry(x,y,w,h); 1851 getEventViewerDialog()->setGeometry(x,y,w,h);
1851 } 1852 }
1852#endif 1853#endif
1853 1854
1854} 1855}
1855 1856
1856 1857
1857void CalendarView::writeSettings() 1858void CalendarView::writeSettings()
1858{ 1859{
1859 // kdDebug() << "CalendarView::writeSettings" << endl; 1860 // kdDebug() << "CalendarView::writeSettings" << endl;
1860 1861
1861 KConfig *config = KOGlobals::config(); 1862 KConfig *config = KOGlobals::config();
1862 1863
1863#ifndef KORG_NOSPLITTER 1864#ifndef KORG_NOSPLITTER
1864 config->setGroup("KOrganizer Geometry"); 1865 config->setGroup("KOrganizer Geometry");
1865 1866
1866 QValueList<int> list = mPanner->sizes(); 1867 QValueList<int> list = mPanner->sizes();
1867 config->writeEntry("Separator1",list); 1868 config->writeEntry("Separator1",list);
1868 1869
1869 list = mLeftSplitter->sizes(); 1870 list = mLeftSplitter->sizes();
1870 config->writeEntry("Separator2",list); 1871 config->writeEntry("Separator2",list);
1871#endif 1872#endif
1872 1873
1873 mViewManager->writeSettings( config ); 1874 mViewManager->writeSettings( config );
1874 mTodoList->saveLayout(config,QString("Todo Layout")); 1875 mTodoList->saveLayout(config,QString("Todo Layout"));
1875 mDialogManager->writeSettings( config ); 1876 mDialogManager->writeSettings( config );
1876 //KOPrefs::instance()->usrWriteConfig(); 1877 //KOPrefs::instance()->usrWriteConfig();
1877 KOPrefs::instance()->writeConfig(); 1878 KOPrefs::instance()->writeConfig();
1878 1879
1879 writeFilterSettings(config); 1880 writeFilterSettings(config);
1880 1881
1881 config->setGroup( "Views" ); 1882 config->setGroup( "Views" );
1882 config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); 1883 config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() );
1883 1884
1884#ifdef DESKTOP_VERSION 1885#ifdef DESKTOP_VERSION
1885 config->setGroup("WidgetLayout"); 1886 config->setGroup("WidgetLayout");
1886 QStringList list ;//= config->readListEntry("MainLayout"); 1887 QStringList list ;//= config->readListEntry("MainLayout");
1887 int x,y,w,h; 1888 int x,y,w,h;
1888 QWidget* wid; 1889 QWidget* wid;
1889 wid = topLevelWidget(); 1890 wid = topLevelWidget();
1890 x = wid->geometry().x(); 1891 x = wid->geometry().x();
1891 y = wid->geometry().y(); 1892 y = wid->geometry().y();
1892 w = wid->width(); 1893 w = wid->width();
1893 h = wid->height(); 1894 h = wid->height();
1894 list.clear(); 1895 list.clear();
1895 list << QString::number( x ); 1896 list << QString::number( x );
1896 list << QString::number( y ); 1897 list << QString::number( y );
1897 list << QString::number( w ); 1898 list << QString::number( w );
1898 list << QString::number( h ); 1899 list << QString::number( h );
1899 config->writeEntry("MainLayout",list ); 1900 config->writeEntry("MainLayout",list );
1900 1901
1901 wid = mEventEditor; 1902 wid = mEventEditor;
1902 x = wid->geometry().x(); 1903 x = wid->geometry().x();
1903 y = wid->geometry().y(); 1904 y = wid->geometry().y();
1904 w = wid->width(); 1905 w = wid->width();
1905 h = wid->height(); 1906 h = wid->height();
1906 list.clear(); 1907 list.clear();
1907 list << QString::number( x ); 1908 list << QString::number( x );
1908 list << QString::number( y ); 1909 list << QString::number( y );
1909 list << QString::number( w ); 1910 list << QString::number( w );
1910 list << QString::number( h ); 1911 list << QString::number( h );
1911 config->writeEntry("EditEventLayout",list ); 1912 config->writeEntry("EditEventLayout",list );
1912 1913
1913 wid = mTodoEditor; 1914 wid = mTodoEditor;
1914 x = wid->geometry().x(); 1915 x = wid->geometry().x();
1915 y = wid->geometry().y(); 1916 y = wid->geometry().y();
1916 w = wid->width(); 1917 w = wid->width();
1917 h = wid->height(); 1918 h = wid->height();
1918 list.clear(); 1919 list.clear();
1919 list << QString::number( x ); 1920 list << QString::number( x );
1920 list << QString::number( y ); 1921 list << QString::number( y );
1921 list << QString::number( w ); 1922 list << QString::number( w );
1922 list << QString::number( h ); 1923 list << QString::number( h );
1923 config->writeEntry("EditTodoLayout",list ); 1924 config->writeEntry("EditTodoLayout",list );
1924 wid = getEventViewerDialog(); 1925 wid = getEventViewerDialog();
1925 x = wid->geometry().x(); 1926 x = wid->geometry().x();
1926 y = wid->geometry().y(); 1927 y = wid->geometry().y();
1927 w = wid->width(); 1928 w = wid->width();
1928 h = wid->height(); 1929 h = wid->height();
1929 list.clear(); 1930 list.clear();
1930 list << QString::number( x ); 1931 list << QString::number( x );
1931 list << QString::number( y ); 1932 list << QString::number( y );
1932 list << QString::number( w ); 1933 list << QString::number( w );
1933 list << QString::number( h ); 1934 list << QString::number( h );
1934 config->writeEntry("ViewerLayout",list ); 1935 config->writeEntry("ViewerLayout",list );
1935 wid = mDialogManager->getSearchDialog(); 1936 wid = mDialogManager->getSearchDialog();
1936 if ( wid ) { 1937 if ( wid ) {
1937 x = wid->geometry().x(); 1938 x = wid->geometry().x();
1938 y = wid->geometry().y(); 1939 y = wid->geometry().y();
1939 w = wid->width(); 1940 w = wid->width();
1940 h = wid->height(); 1941 h = wid->height();
1941 list.clear(); 1942 list.clear();
1942 list << QString::number( x ); 1943 list << QString::number( x );
1943 list << QString::number( y ); 1944 list << QString::number( y );
1944 list << QString::number( w ); 1945 list << QString::number( w );
1945 list << QString::number( h ); 1946 list << QString::number( h );
1946 config->writeEntry("SearchLayout",list ); 1947 config->writeEntry("SearchLayout",list );
1947 } 1948 }
1948#endif 1949#endif
1949 1950
1950 1951
1951 config->sync(); 1952 config->sync();
1952} 1953}
1953 1954
1954void CalendarView::readFilterSettings(KConfig *config) 1955void CalendarView::readFilterSettings(KConfig *config)
1955{ 1956{
1956 // kdDebug() << "CalendarView::readFilterSettings()" << endl; 1957 // kdDebug() << "CalendarView::readFilterSettings()" << endl;
1957 1958
1958 mFilters.clear(); 1959 mFilters.clear();
1959 1960
1960 config->setGroup("General"); 1961 config->setGroup("General");
1961 QStringList filterList = config->readListEntry("CalendarFilters"); 1962 QStringList filterList = config->readListEntry("CalendarFilters");
1962 1963
1963 QStringList::ConstIterator it = filterList.begin(); 1964 QStringList::ConstIterator it = filterList.begin();
1964 QStringList::ConstIterator end = filterList.end(); 1965 QStringList::ConstIterator end = filterList.end();
1965 while(it != end) { 1966 while(it != end) {
1966 // kdDebug() << " filter: " << (*it) << endl; 1967 // kdDebug() << " filter: " << (*it) << endl;
1967 1968
1968 CalFilter *filter; 1969 CalFilter *filter;
1969 filter = new CalFilter(*it); 1970 filter = new CalFilter(*it);
1970 config->setGroup("Filter_" + (*it)); 1971 config->setGroup("Filter_" + (*it));
1971 //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); 1972 //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) );
1972 filter->setCriteria(config->readNumEntry("Criteria",0)); 1973 filter->setCriteria(config->readNumEntry("Criteria",0));
1973 filter->setCategoryList(config->readListEntry("CategoryList")); 1974 filter->setCategoryList(config->readListEntry("CategoryList"));
1974 mFilters.append(filter); 1975 mFilters.append(filter);
1975 1976
1976 ++it; 1977 ++it;
1977 } 1978 }
1978 1979
1979 if (mFilters.count() == 0) { 1980 if (mFilters.count() == 0) {
1980 CalFilter *filter = new CalFilter(i18n("Default")); 1981 CalFilter *filter = new CalFilter(i18n("Default"));
1981 mFilters.append(filter); 1982 mFilters.append(filter);
1982 } 1983 }
1983 mFilterView->updateFilters(); 1984 mFilterView->updateFilters();
1984 config->setGroup("FilterView"); 1985 config->setGroup("FilterView");
1985 1986
1986 mFilterView->blockSignals(true); 1987 mFilterView->blockSignals(true);
1987 mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled")); 1988 mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled"));
1988 mFilterView->setSelectedFilter(config->readEntry("Current Filter")); 1989 mFilterView->setSelectedFilter(config->readEntry("Current Filter"));
1989 mFilterView->blockSignals(false); 1990 mFilterView->blockSignals(false);
1990 // We do it manually to avoid it being done twice by the above calls 1991 // We do it manually to avoid it being done twice by the above calls
1991 updateFilter(); 1992 updateFilter();
1992} 1993}
1993 1994
1994void CalendarView::writeFilterSettings(KConfig *config) 1995void CalendarView::writeFilterSettings(KConfig *config)
1995{ 1996{
1996 // kdDebug() << "CalendarView::writeFilterSettings()" << endl; 1997 // kdDebug() << "CalendarView::writeFilterSettings()" << endl;
1997 1998
1998 QStringList filterList; 1999 QStringList filterList;
1999 2000
2000 CalFilter *filter = mFilters.first(); 2001 CalFilter *filter = mFilters.first();
2001 while(filter) { 2002 while(filter) {
2002 // kdDebug() << " fn: " << filter->name() << endl; 2003 // kdDebug() << " fn: " << filter->name() << endl;
2003 filterList << filter->name(); 2004 filterList << filter->name();
2004 config->setGroup("Filter_" + filter->name()); 2005 config->setGroup("Filter_" + filter->name());
2005 config->writeEntry("Criteria",filter->criteria()); 2006 config->writeEntry("Criteria",filter->criteria());
2006 config->writeEntry("CategoryList",filter->categoryList()); 2007 config->writeEntry("CategoryList",filter->categoryList());
2007 filter = mFilters.next(); 2008 filter = mFilters.next();
2008 } 2009 }
2009 config->setGroup("General"); 2010 config->setGroup("General");
2010 config->writeEntry("CalendarFilters",filterList); 2011 config->writeEntry("CalendarFilters",filterList);
2011 2012
2012 config->setGroup("FilterView"); 2013 config->setGroup("FilterView");
2013 config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); 2014 config->writeEntry("FilterEnabled",mFilterView->filtersEnabled());
2014 config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); 2015 config->writeEntry("Current Filter",mFilterView->selectedFilter()->name());
2015} 2016}
2016 2017
2017 2018
2018void CalendarView::goToday() 2019void CalendarView::goToday()
2019{ 2020{
2020 if ( mViewManager->currentView()->isMonthView() ) 2021 if ( mViewManager->currentView()->isMonthView() )
2021 mNavigator->selectTodayMonth(); 2022 mNavigator->selectTodayMonth();
2022 else 2023 else
2023 mNavigator->selectToday(); 2024 mNavigator->selectToday();
2024} 2025}
2025 2026
2026void CalendarView::goNext() 2027void CalendarView::goNext()
2027{ 2028{
2028 mNavigator->selectNext(); 2029 mNavigator->selectNext();
2029} 2030}
2030 2031
2031void CalendarView::goPrevious() 2032void CalendarView::goPrevious()
2032{ 2033{
2033 mNavigator->selectPrevious(); 2034 mNavigator->selectPrevious();
2034} 2035}
2035void CalendarView::goNextMonth() 2036void CalendarView::goNextMonth()
2036{ 2037{
2037 mNavigator->selectNextMonth(); 2038 mNavigator->selectNextMonth();
2038} 2039}
2039 2040
2040void CalendarView::goPreviousMonth() 2041void CalendarView::goPreviousMonth()
2041{ 2042{
2042 mNavigator->selectPreviousMonth(); 2043 mNavigator->selectPreviousMonth();
2043} 2044}
2044void CalendarView::writeLocale() 2045void CalendarView::writeLocale()
2045{ 2046{
2046 //KPimGlobalPrefs::instance()->setGlobalConfig(); 2047 //KPimGlobalPrefs::instance()->setGlobalConfig();
2047#if 0 2048#if 0
2048 KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); 2049 KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime );
2049 KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday ); 2050 KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday );
2050 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate ); 2051 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate );
2051 KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); 2052 KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage );
2052 QString dummy = KOPrefs::instance()->mUserDateFormatLong; 2053 QString dummy = KOPrefs::instance()->mUserDateFormatLong;
2053 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); 2054 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
2054 dummy = KOPrefs::instance()->mUserDateFormatShort; 2055 dummy = KOPrefs::instance()->mUserDateFormatShort;
2055 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); 2056 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
2056 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, 2057 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving,
2057 KOPrefs::instance()->mDaylightsavingStart, 2058 KOPrefs::instance()->mDaylightsavingStart,
2058 KOPrefs::instance()->mDaylightsavingEnd ); 2059 KOPrefs::instance()->mDaylightsavingEnd );
2059 KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId ); 2060 KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId );
2060#endif 2061#endif
2061} 2062}
2062void CalendarView::updateConfig() 2063void CalendarView::updateConfig()
2063{ 2064{
2064 writeLocale(); 2065 writeLocale();
2065 if ( KOPrefs::instance()->mUseAppColors ) 2066 if ( KOPrefs::instance()->mUseAppColors )
2066 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 2067 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
2067 emit configChanged(); 2068 emit configChanged();
2068 mTodoList->updateConfig(); 2069 mTodoList->updateConfig();
2069 // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); 2070 // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont);
2070 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 2071 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2071 // To make the "fill window" configurations work 2072 // To make the "fill window" configurations work
2072 //mViewManager->raiseCurrentView(); 2073 //mViewManager->raiseCurrentView();
2073} 2074}
2074 2075
2075 2076
2076void CalendarView::eventChanged(Event *event) 2077void CalendarView::eventChanged(Event *event)
2077{ 2078{
2078 changeEventDisplay(event,KOGlobals::EVENTEDITED); 2079 changeEventDisplay(event,KOGlobals::EVENTEDITED);
2079 //updateUnmanagedViews(); 2080 //updateUnmanagedViews();
2080} 2081}
2081 2082
2082void CalendarView::eventAdded(Event *event) 2083void CalendarView::eventAdded(Event *event)
2083{ 2084{
2084 changeEventDisplay(event,KOGlobals::EVENTADDED); 2085 changeEventDisplay(event,KOGlobals::EVENTADDED);
2085} 2086}
2086 2087
2087void CalendarView::eventToBeDeleted(Event *) 2088void CalendarView::eventToBeDeleted(Event *)
2088{ 2089{
2089 kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; 2090 kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl;
2090} 2091}
2091 2092
2092void CalendarView::eventDeleted() 2093void CalendarView::eventDeleted()
2093{ 2094{
2094 changeEventDisplay(0,KOGlobals::EVENTDELETED); 2095 changeEventDisplay(0,KOGlobals::EVENTDELETED);
2095} 2096}
2096void CalendarView::changeTodoDisplay(Todo *which, int action) 2097void CalendarView::changeTodoDisplay(Todo *which, int action)
2097{ 2098{
2098 changeIncidenceDisplay((Incidence *)which, action); 2099 changeIncidenceDisplay((Incidence *)which, action);
2099 mDateNavigator->updateView(); //LR 2100 mDateNavigator->updateView(); //LR
2100 //mDialogManager->updateSearchDialog(); 2101 //mDialogManager->updateSearchDialog();
2101 2102
2102 if (which) { 2103 if (which) {
2103 mViewManager->updateWNview(); 2104 mViewManager->updateWNview();
2104 //mTodoList->updateView(); 2105 //mTodoList->updateView();
2105 } 2106 }
2106 2107
2107} 2108}
2108 2109
2109void CalendarView::changeIncidenceDisplay(Incidence *which, int action) 2110void CalendarView::changeIncidenceDisplay(Incidence *which, int action)
2110{ 2111{
2111 updateUnmanagedViews(); 2112 updateUnmanagedViews();
2112 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); 2113 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action );
2113 if ( action == KOGlobals::EVENTDELETED ) { //delete 2114 if ( action == KOGlobals::EVENTDELETED ) { //delete
2114 mCalendar->checkAlarmForIncidence( 0, true ); 2115 mCalendar->checkAlarmForIncidence( 0, true );
2115 if ( mEventViewerDialog ) 2116 if ( mEventViewerDialog )
2116 mEventViewerDialog->hide(); 2117 mEventViewerDialog->hide();
2117 } 2118 }
2118 else 2119 else
2119 mCalendar->checkAlarmForIncidence( which , false ); 2120 mCalendar->checkAlarmForIncidence( which , false );
2120} 2121}
2121 2122
2122// most of the changeEventDisplays() right now just call the view's 2123// most of the changeEventDisplays() right now just call the view's
2123// total update mode, but they SHOULD be recoded to be more refresh-efficient. 2124// total update mode, but they SHOULD be recoded to be more refresh-efficient.
2124void CalendarView::changeEventDisplay(Event *which, int action) 2125void CalendarView::changeEventDisplay(Event *which, int action)
2125{ 2126{
2126 // kdDebug() << "CalendarView::changeEventDisplay" << endl; 2127 // kdDebug() << "CalendarView::changeEventDisplay" << endl;
2127 changeIncidenceDisplay((Incidence *)which, action); 2128 changeIncidenceDisplay((Incidence *)which, action);
2128 mDateNavigator->updateView(); 2129 mDateNavigator->updateView();
2129 //mDialogManager->updateSearchDialog(); 2130 //mDialogManager->updateSearchDialog();
2130 2131
2131 if (which) { 2132 if (which) {
2132 // If there is an event view visible update the display 2133 // If there is an event view visible update the display
2133 mViewManager->currentView()->changeEventDisplay(which,action); 2134 mViewManager->currentView()->changeEventDisplay(which,action);
2134 // TODO: check, if update needed 2135 // TODO: check, if update needed
2135 // if (which->getTodoStatus()) { 2136 // if (which->getTodoStatus()) {
2136 mTodoList->updateView(); 2137 mTodoList->updateView();
2137 // } 2138 // }
2138 } else { 2139 } else {
2139 mViewManager->currentView()->updateView(); 2140 mViewManager->currentView()->updateView();
2140 } 2141 }
2141} 2142}
2142 2143
2143 2144
2144void CalendarView::updateTodoViews() 2145void CalendarView::updateTodoViews()
2145{ 2146{
2146 mTodoList->updateView(); 2147 mTodoList->updateView();
2147 mViewManager->currentView()->updateView(); 2148 mViewManager->currentView()->updateView();
2148 2149
2149} 2150}
2150 2151
2151 2152
2152void CalendarView::updateView(const QDate &start, const QDate &end) 2153void CalendarView::updateView(const QDate &start, const QDate &end)
2153{ 2154{
2154 mTodoList->updateView(); 2155 mTodoList->updateView();
2155 mViewManager->updateView(start, end); 2156 mViewManager->updateView(start, end);
2156 //mDateNavigator->updateView(); 2157 //mDateNavigator->updateView();
2157} 2158}
2158 2159
2159void CalendarView::updateView() 2160void CalendarView::updateView()
2160{ 2161{
2161 DateList tmpList = mNavigator->selectedDates(); 2162 DateList tmpList = mNavigator->selectedDates();
2162 2163
2163 if ( KOPrefs::instance()->mHideNonStartedTodos ) 2164 if ( KOPrefs::instance()->mHideNonStartedTodos )
2164 mTodoList->updateView(); 2165 mTodoList->updateView();
2165 // We assume that the navigator only selects consecutive days. 2166 // We assume that the navigator only selects consecutive days.
2166 updateView( tmpList.first(), tmpList.last() ); 2167 updateView( tmpList.first(), tmpList.last() );
2167} 2168}
2168 2169
2169void CalendarView::updateUnmanagedViews() 2170void CalendarView::updateUnmanagedViews()
2170{ 2171{
2171 mDateNavigator->updateDayMatrix(); 2172 mDateNavigator->updateDayMatrix();
2172} 2173}
2173 2174
2174int CalendarView::msgItemDelete(const QString name) 2175int CalendarView::msgItemDelete(const QString name)
2175{ 2176{
2176 return KMessageBox::warningContinueCancel(this,name +"\n\n"+ 2177 return KMessageBox::warningContinueCancel(this,name +"\n\n"+
2177 i18n("This item will be\npermanently deleted."), 2178 i18n("This item will be\npermanently deleted."),
2178 i18n("KO/Pi Confirmation"),i18n("Delete")); 2179 i18n("KO/Pi Confirmation"),i18n("Delete"));
2179} 2180}
2180 2181
2181 2182
2182void CalendarView::edit_cut() 2183void CalendarView::edit_cut()
2183{ 2184{
2184 Event *anEvent=0; 2185 Event *anEvent=0;
2185 2186
2186 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2187 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2187 2188
2188 if (mViewManager->currentView()->isEventView()) { 2189 if (mViewManager->currentView()->isEventView()) {
2189 if ( incidence && incidence->type() == "Event" ) { 2190 if ( incidence && incidence->type() == "Event" ) {
2190 anEvent = static_cast<Event *>(incidence); 2191 anEvent = static_cast<Event *>(incidence);
2191 } 2192 }
2192 } 2193 }
2193 2194
2194 if (!anEvent) { 2195 if (!anEvent) {
2195 KNotifyClient::beep(); 2196 KNotifyClient::beep();
2196 return; 2197 return;
2197 } 2198 }
2198 DndFactory factory( mCalendar ); 2199 DndFactory factory( mCalendar );
2199 factory.cutIncidence(anEvent); 2200 factory.cutIncidence(anEvent);
2200 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 2201 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
2201} 2202}
2202 2203
2203void CalendarView::edit_copy() 2204void CalendarView::edit_copy()
2204{ 2205{
2205 Event *anEvent=0; 2206 Event *anEvent=0;
2206 2207
2207 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2208 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2208 2209
2209 if (mViewManager->currentView()->isEventView()) { 2210 if (mViewManager->currentView()->isEventView()) {
2210 if ( incidence && incidence->type() == "Event" ) { 2211 if ( incidence && incidence->type() == "Event" ) {
2211 anEvent = static_cast<Event *>(incidence); 2212 anEvent = static_cast<Event *>(incidence);
2212 } 2213 }
2213 } 2214 }
2214 2215
2215 if (!anEvent) { 2216 if (!anEvent) {
2216 KNotifyClient::beep(); 2217 KNotifyClient::beep();
2217 return; 2218 return;
2218 } 2219 }
2219 DndFactory factory( mCalendar ); 2220 DndFactory factory( mCalendar );
2220 factory.copyIncidence(anEvent); 2221 factory.copyIncidence(anEvent);
2221} 2222}
2222 2223
2223void CalendarView::edit_paste() 2224void CalendarView::edit_paste()
2224{ 2225{
2225 QDate date = mNavigator->selectedDates().first(); 2226 QDate date = mNavigator->selectedDates().first();
2226 2227
2227 DndFactory factory( mCalendar ); 2228 DndFactory factory( mCalendar );
2228 Event *pastedEvent = (Event *)factory.pasteIncidence( date ); 2229 Event *pastedEvent = (Event *)factory.pasteIncidence( date );
2229 2230
2230 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); 2231 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED );
2231} 2232}
2232 2233
2233void CalendarView::edit_options() 2234void CalendarView::edit_options()
2234{ 2235{
2235 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; 2236 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId;
2236 emit save(); 2237 emit save();
2237 emit saveStopTimer(); 2238 emit saveStopTimer();
2238 mDialogManager->showOptionsDialog(); 2239 mDialogManager->showOptionsDialog();
2239 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { 2240 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) {
2240 emit saveStopTimer(); 2241 emit saveStopTimer();
2241 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), 2242 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"),
2242 i18n("Timezone settings"),i18n("Reload"))) { 2243 i18n("Timezone settings"),i18n("Reload"))) {
2243 qDebug("KO: TZ reload cancelled "); 2244 qDebug("KO: TZ reload cancelled ");
2244 return; 2245 return;
2245 } 2246 }
2246 qDebug("KO: Timezone change "); 2247 qDebug("KO: Timezone change ");
2247 openCalendar( MainWindow::defaultFileName() ); 2248 openCalendar( MainWindow::defaultFileName() );
2248 setModified(true); 2249 setModified(true);
2249 } 2250 }
2250 else 2251 else
2251 qDebug("KO: No tz change "); 2252 qDebug("KO: No tz change ");
2252 2253
2253} 2254}
2254 2255
2255 2256
2256void CalendarView::slotSelectPickerDate( QDate d) 2257void CalendarView::slotSelectPickerDate( QDate d)
2257{ 2258{
2258 mDateFrame->hide(); 2259 mDateFrame->hide();
2259 if ( mDatePickerMode == 1 ) { 2260 if ( mDatePickerMode == 1 ) {
2260 mNavigator->slotDaySelect( d ); 2261 mNavigator->slotDaySelect( d );
2261 } else if ( mDatePickerMode == 2 ) { 2262 } else if ( mDatePickerMode == 2 ) {
2262 if ( mMoveIncidence->type() == "Todo" ) { 2263 if ( mMoveIncidence->type() == "Todo" ) {
2263 Todo * to = (Todo *) mMoveIncidence; 2264 Todo * to = (Todo *) mMoveIncidence;
2264 QTime tim; 2265 QTime tim;
2265 if ( to->hasDueDate() ) 2266 if ( to->hasDueDate() )
2266 tim = to->dtDue().time(); 2267 tim = to->dtDue().time();
2267 else { 2268 else {
2268 tim = QTime ( 0,0,0 ); 2269 tim = QTime ( 0,0,0 );
2269 to->setFloats( true ); 2270 to->setFloats( true );
2270 to->setHasDueDate( true ); 2271 to->setHasDueDate( true );
2271 } 2272 }
2272 QDateTime dt ( d,tim ); 2273 QDateTime dt ( d,tim );
2273 to->setDtDue( dt ); 2274 to->setDtDue( dt );
2274 todoChanged( to ); 2275 todoChanged( to );
2275 } else { 2276 } else {
2276 if ( mMoveIncidence->doesRecur() ) { 2277 if ( mMoveIncidence->doesRecur() ) {
2277#if 0 2278#if 0
2278 // PENDING implement this 2279 // PENDING implement this
2279 Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); 2280 Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate );
2280 mCalendar()->addIncidence( newInc ); 2281 mCalendar()->addIncidence( newInc );
2281 if ( mMoveIncidence->type() == "Todo" ) 2282 if ( mMoveIncidence->type() == "Todo" )
2282 emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); 2283 emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED );
2283 else 2284 else
2284 emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); 2285 emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED);
2285 mMoveIncidence = newInc; 2286 mMoveIncidence = newInc;
2286 2287
2287#endif 2288#endif
2288 } 2289 }
2289 QTime tim = mMoveIncidence->dtStart().time(); 2290 QTime tim = mMoveIncidence->dtStart().time();
2290 int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); 2291 int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd());
2291 QDateTime dt ( d,tim ); 2292 QDateTime dt ( d,tim );
2292 mMoveIncidence->setDtStart( dt ); 2293 mMoveIncidence->setDtStart( dt );
2293 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); 2294 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) );
2294 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); 2295 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED);
2295 } 2296 }
2296 2297
2297 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); 2298 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 );
2298 } 2299 }
2299} 2300}
2300 2301
2301void CalendarView::removeCategories() 2302void CalendarView::removeCategories()
2302{ 2303{
2303 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 2304 QPtrList<Incidence> incList = mCalendar->rawIncidences();
2304 QStringList catList = KOPrefs::instance()->mCustomCategories; 2305 QStringList catList = KOPrefs::instance()->mCustomCategories;
2305 QStringList catIncList; 2306 QStringList catIncList;
2306 QStringList newCatList; 2307 QStringList newCatList;
2307 Incidence* inc = incList.first(); 2308 Incidence* inc = incList.first();
2308 int i; 2309 int i;
2309 int count = 0; 2310 int count = 0;
2310 while ( inc ) { 2311 while ( inc ) {
2311 newCatList.clear(); 2312 newCatList.clear();
2312 catIncList = inc->categories() ; 2313 catIncList = inc->categories() ;
2313 for( i = 0; i< catIncList.count(); ++i ) { 2314 for( i = 0; i< catIncList.count(); ++i ) {
2314 if ( catList.contains (catIncList[i])) 2315 if ( catList.contains (catIncList[i]))
2315 newCatList.append( catIncList[i] ); 2316 newCatList.append( catIncList[i] );
2316 } 2317 }
2317 newCatList.sort(); 2318 newCatList.sort();
2318 inc->setCategories( newCatList.join(",") ); 2319 inc->setCategories( newCatList.join(",") );
2319 inc = incList.next(); 2320 inc = incList.next();
2320 } 2321 }
2321} 2322}
2322 2323
2323int CalendarView::addCategories() 2324int CalendarView::addCategories()
2324{ 2325{
2325 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 2326 QPtrList<Incidence> incList = mCalendar->rawIncidences();
2326 QStringList catList = KOPrefs::instance()->mCustomCategories; 2327 QStringList catList = KOPrefs::instance()->mCustomCategories;
2327 QStringList catIncList; 2328 QStringList catIncList;
2328 Incidence* inc = incList.first(); 2329 Incidence* inc = incList.first();
2329 int i; 2330 int i;
2330 int count = 0; 2331 int count = 0;
2331 while ( inc ) { 2332 while ( inc ) {
2332 catIncList = inc->categories() ; 2333 catIncList = inc->categories() ;
2333 for( i = 0; i< catIncList.count(); ++i ) { 2334 for( i = 0; i< catIncList.count(); ++i ) {
2334 if ( !catList.contains (catIncList[i])) { 2335 if ( !catList.contains (catIncList[i])) {
2335 catList.append( catIncList[i] ); 2336 catList.append( catIncList[i] );
2336 //qDebug("add cat %s ", catIncList[i].latin1()); 2337 //qDebug("add cat %s ", catIncList[i].latin1());
2337 ++count; 2338 ++count;
2338 } 2339 }
2339 } 2340 }
2340 inc = incList.next(); 2341 inc = incList.next();
2341 } 2342 }
2342 catList.sort(); 2343 catList.sort();
2343 KOPrefs::instance()->mCustomCategories = catList; 2344 KOPrefs::instance()->mCustomCategories = catList;
2344 return count; 2345 return count;
2345} 2346}
2346 2347
2347void CalendarView::manageCategories() 2348void CalendarView::manageCategories()
2348{ 2349{
2349 KOCatPrefs* cp = new KOCatPrefs(); 2350 KOCatPrefs* cp = new KOCatPrefs();
2350 cp->show(); 2351 cp->show();
2351 int w =cp->sizeHint().width() ; 2352 int w =cp->sizeHint().width() ;
2352 int h = cp->sizeHint().height() ; 2353 int h = cp->sizeHint().height() ;
2353 int dw = QApplication::desktop()->width(); 2354 int dw = QApplication::desktop()->width();
2354 int dh = QApplication::desktop()->height(); 2355 int dh = QApplication::desktop()->height();
2355 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2356 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2356 if ( !cp->exec() ) { 2357 if ( !cp->exec() ) {
2357 delete cp; 2358 delete cp;
2358 return; 2359 return;
2359 } 2360 }
2360 int count = 0; 2361 int count = 0;
2361 if ( cp->addCat() ) { 2362 if ( cp->addCat() ) {
2362 count = addCategories(); 2363 count = addCategories();
2363 if ( count ) { 2364 if ( count ) {
2364 topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); 2365 topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! "));
2365 writeSettings(); 2366 writeSettings();
2366 } else 2367 } else
2367 topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); 2368 topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! "));
2368 } else { 2369 } else {
2369 removeCategories(); 2370 removeCategories();
2370 updateView(); 2371 updateView();
2371 } 2372 }
2372 delete cp; 2373 delete cp;
2373} 2374}
2374 2375
2375void CalendarView::beamIncidence(Incidence * Inc) 2376void CalendarView::beamIncidence(Incidence * Inc)
2376{ 2377{
2377 QPtrList<Incidence> delSel ; 2378 QPtrList<Incidence> delSel ;
2378 delSel.append(Inc); 2379 delSel.append(Inc);
2379 beamIncidenceList( delSel ); 2380 beamIncidenceList( delSel );
2380} 2381}
2381void CalendarView::beamCalendar() 2382void CalendarView::beamCalendar()
2382{ 2383{
2383 QPtrList<Incidence> delSel = mCalendar->rawIncidences(); 2384 QPtrList<Incidence> delSel = mCalendar->rawIncidences();
2384 //qDebug("beamCalendar() "); 2385 //qDebug("beamCalendar() ");
2385 beamIncidenceList( delSel ); 2386 beamIncidenceList( delSel );
2386} 2387}
2387void CalendarView::beamFilteredCalendar() 2388void CalendarView::beamFilteredCalendar()
2388{ 2389{
2389 QPtrList<Incidence> delSel = mCalendar->incidences(); 2390 QPtrList<Incidence> delSel = mCalendar->incidences();
2390 //qDebug("beamFilteredCalendar() "); 2391 //qDebug("beamFilteredCalendar() ");
2391 beamIncidenceList( delSel ); 2392 beamIncidenceList( delSel );
2392} 2393}
2393void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) 2394void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2394{ 2395{
2395 if ( beamDialog->exec () == QDialog::Rejected ) 2396 if ( beamDialog->exec () == QDialog::Rejected )
2396 return; 2397 return;
2397#ifdef DESKTOP_VERSION 2398#ifdef DESKTOP_VERSION
2398 QString fn = locateLocal( "tmp", "kopibeamfile" ); 2399 QString fn = locateLocal( "tmp", "kopibeamfile" );
2399#else 2400#else
2400 QString fn = "/tmp/kopibeamfile"; 2401 QString fn = "/tmp/kopibeamfile";
2401#endif 2402#endif
2402 QString mes; 2403 QString mes;
2403 bool createbup = true; 2404 bool createbup = true;
2404 if ( createbup ) { 2405 if ( createbup ) {
2405 QString description = "\n"; 2406 QString description = "\n";
2406 CalendarLocal* cal = new CalendarLocal(); 2407 CalendarLocal* cal = new CalendarLocal();
2407 if ( beamDialog->beamLocal() ) 2408 if ( beamDialog->beamLocal() )
2408 cal->setLocalTime(); 2409 cal->setLocalTime();
2409 else 2410 else
2410 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 2411 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2411 Incidence *incidence = delSel.first(); 2412 Incidence *incidence = delSel.first();
2412 bool addText = false; 2413 bool addText = false;
2413 if ( delSel.count() < 10 ) 2414 if ( delSel.count() < 10 )
2414 addText = true; 2415 addText = true;
2415 else { 2416 else {
2416 description.sprintf(i18n(" %d items?"),delSel.count() ); 2417 description.sprintf(i18n(" %d items?"),delSel.count() );
2417 } 2418 }
2418 while ( incidence ) { 2419 while ( incidence ) {
2419 Incidence *in = incidence->clone(); 2420 Incidence *in = incidence->clone();
2420 if ( ! in->summary().isEmpty() ) { 2421 if ( ! in->summary().isEmpty() ) {
2421 in->setDescription(""); 2422 in->setDescription("");
2422 } else { 2423 } else {
2423 in->setSummary( in->description().left(20)); 2424 in->setSummary( in->description().left(20));
2424 in->setDescription(""); 2425 in->setDescription("");
2425 } 2426 }
2426 if ( addText ) 2427 if ( addText )
2427 description += in->summary() + "\n"; 2428 description += in->summary() + "\n";
2428 cal->addIncidence( in ); 2429 cal->addIncidence( in );
2429 incidence = delSel.next(); 2430 incidence = delSel.next();
2430 } 2431 }
2431 if ( beamDialog->beamVcal() ) { 2432 if ( beamDialog->beamVcal() ) {
2432 fn += ".vcs"; 2433 fn += ".vcs";
2433 FileStorage storage( cal, fn, new VCalFormat ); 2434 FileStorage storage( cal, fn, new VCalFormat );
2434 storage.save(); 2435 storage.save();
2435 } else { 2436 } else {
2436 fn += ".ics"; 2437 fn += ".ics";
2437 FileStorage storage( cal, fn, new ICalFormat( ) ); 2438 FileStorage storage( cal, fn, new ICalFormat( ) );
2438 storage.save(); 2439 storage.save();
2439 } 2440 }
2440 delete cal; 2441 delete cal;
2441 mes = i18n("KO/Pi: Ready for beaming"); 2442 mes = i18n("KO/Pi: Ready for beaming");
2442 topLevelWidget()->setCaption(mes); 2443 topLevelWidget()->setCaption(mes);
2443 KApplication::convert2latin1( fn ); 2444 KApplication::convert2latin1( fn );
2444#ifndef DESKTOP_VERSION 2445#ifndef DESKTOP_VERSION
2445 Ir *ir = new Ir( this ); 2446 Ir *ir = new Ir( this );
2446 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 2447 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
2447 ir->send( fn, description, "text/x-vCalendar" ); 2448 ir->send( fn, description, "text/x-vCalendar" );
2448#endif 2449#endif
2449 } 2450 }
2450} 2451}
2451void CalendarView::beamDone( Ir *ir ) 2452void CalendarView::beamDone( Ir *ir )
2452{ 2453{
2453#ifndef DESKTOP_VERSION 2454#ifndef DESKTOP_VERSION
2454 delete ir; 2455 delete ir;
2455#endif 2456#endif
2456 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); 2457 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") );
2457 topLevelWidget()->raise(); 2458 topLevelWidget()->raise();
2458} 2459}
2459 2460
2460void CalendarView::moveIncidence(Incidence * inc ) 2461void CalendarView::moveIncidence(Incidence * inc )
2461{ 2462{
2462 if ( !inc ) return; 2463 if ( !inc ) return;
2463 showDatePickerPopup(); 2464 showDatePickerPopup();
2464 mDatePickerMode = 2; 2465 mDatePickerMode = 2;
2465 mMoveIncidence = inc ; 2466 mMoveIncidence = inc ;
2466 QDate da; 2467 QDate da;
2467 if ( mMoveIncidence->type() == "Todo" ) { 2468 if ( mMoveIncidence->type() == "Todo" ) {
2468 Todo * to = (Todo *) mMoveIncidence; 2469 Todo * to = (Todo *) mMoveIncidence;
2469 if ( to->hasDueDate() ) 2470 if ( to->hasDueDate() )
2470 da = to->dtDue().date(); 2471 da = to->dtDue().date();
2471 else 2472 else
2472 da = QDate::currentDate(); 2473 da = QDate::currentDate();
2473 } else { 2474 } else {
2474 da = mMoveIncidence->dtStart().date(); 2475 da = mMoveIncidence->dtStart().date();
2475 } 2476 }
2476 //PENDING set date for recurring incidence to date of recurrence 2477 //PENDING set date for recurring incidence to date of recurrence
2477 //mMoveIncidenceOldDate; 2478 //mMoveIncidenceOldDate;
2478 mDatePicker->setDate( da ); 2479 mDatePicker->setDate( da );
2479} 2480}
2480void CalendarView::showDatePickerPopup() 2481void CalendarView::showDatePickerPopup()
2481{ 2482{
2482 if ( mDateFrame->isVisible() ) 2483 if ( mDateFrame->isVisible() )
2483 mDateFrame->hide(); 2484 mDateFrame->hide();
2484 else { 2485 else {
2485 int offX = 0, offY = 0; 2486 int offX = 0, offY = 0;
2486#ifdef DESKTOP_VERSION 2487#ifdef DESKTOP_VERSION
2487 int w =mDatePicker->sizeHint().width() ; 2488 int w =mDatePicker->sizeHint().width() ;
2488 int h = mDatePicker->sizeHint().height() ; 2489 int h = mDatePicker->sizeHint().height() ;
2489 int dw = topLevelWidget()->width(); 2490 int dw = topLevelWidget()->width();
2490 int dh = topLevelWidget()->height(); 2491 int dh = topLevelWidget()->height();
2491 offX = topLevelWidget()->x(); 2492 offX = topLevelWidget()->x();
2492 offY = topLevelWidget()->y(); 2493 offY = topLevelWidget()->y();
2493#else 2494#else
2494 int w =mDatePicker->sizeHint().width() ; 2495 int w =mDatePicker->sizeHint().width() ;
2495 int h = mDatePicker->sizeHint().height() ; 2496 int h = mDatePicker->sizeHint().height() ;
2496 int dw = QApplication::desktop()->width(); 2497 int dw = QApplication::desktop()->width();
2497 int dh = QApplication::desktop()->height(); 2498 int dh = QApplication::desktop()->height();
2498#endif 2499#endif
2499 mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); 2500 mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h );
2500 mDateFrame->show(); 2501 mDateFrame->show();
2501 } 2502 }
2502} 2503}
2503void CalendarView::showDatePicker( ) 2504void CalendarView::showDatePicker( )
2504{ 2505{
2505 showDatePickerPopup(); 2506 showDatePickerPopup();
2506 mDatePickerMode = 1; 2507 mDatePickerMode = 1;
2507 mDatePicker->setDate( mNavigator->selectedDates().first() ); 2508 mDatePicker->setDate( mNavigator->selectedDates().first() );
2508} 2509}
2509 2510
2510void CalendarView::showEventEditor() 2511void CalendarView::showEventEditor()
2511{ 2512{
2512#ifdef DESKTOP_VERSION 2513#ifdef DESKTOP_VERSION
2513 mEventEditor->show(); 2514 mEventEditor->show();
2514#else 2515#else
2515 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { 2516 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
2516 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2517 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2517 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); 2518 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
2518 qApp->processEvents(); 2519 qApp->processEvents();
2519 delete mEventEditor; 2520 delete mEventEditor;
2520 mEventEditor = mDialogManager->getEventEditor(); 2521 mEventEditor = mDialogManager->getEventEditor();
2521 topLevelWidget()->setCaption( i18n("") ); 2522 topLevelWidget()->setCaption( i18n("") );
2522 } 2523 }
2523 mEventEditor->showMaximized(); 2524 mEventEditor->showMaximized();
2524#endif 2525#endif
2525} 2526}
2526void CalendarView::showTodoEditor() 2527void CalendarView::showTodoEditor()
2527{ 2528{
2528#ifdef DESKTOP_VERSION 2529#ifdef DESKTOP_VERSION
2529 mTodoEditor->show(); 2530 mTodoEditor->show();
2530#else 2531#else
2531 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { 2532 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
2532 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2533 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2533 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); 2534 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
2534 qApp->processEvents(); 2535 qApp->processEvents();
2535 delete mTodoEditor; 2536 delete mTodoEditor;
2536 mTodoEditor = mDialogManager->getTodoEditor(); 2537 mTodoEditor = mDialogManager->getTodoEditor();
2537 topLevelWidget()->setCaption( i18n("") ); 2538 topLevelWidget()->setCaption( i18n("") );
2538 } 2539 }
2539 mTodoEditor->showMaximized(); 2540 mTodoEditor->showMaximized();
2540#endif 2541#endif
2541} 2542}
2542 2543
2543void CalendarView::cloneIncidence() 2544void CalendarView::cloneIncidence()
2544{ 2545{
2545 Incidence *incidence = currentSelection(); 2546 Incidence *incidence = currentSelection();
2546 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2547 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2547 if ( incidence ) { 2548 if ( incidence ) {
2548 cloneIncidence(incidence); 2549 cloneIncidence(incidence);
2549 } 2550 }
2550} 2551}
2551void CalendarView::moveIncidence() 2552void CalendarView::moveIncidence()
2552{ 2553{
2553 Incidence *incidence = currentSelection(); 2554 Incidence *incidence = currentSelection();
2554 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2555 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2555 if ( incidence ) { 2556 if ( incidence ) {
2556 moveIncidence(incidence); 2557 moveIncidence(incidence);
2557 } 2558 }
2558} 2559}
2559void CalendarView::beamIncidence() 2560void CalendarView::beamIncidence()
2560{ 2561{
2561 Incidence *incidence = currentSelection(); 2562 Incidence *incidence = currentSelection();
2562 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2563 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2563 if ( incidence ) { 2564 if ( incidence ) {
2564 beamIncidence(incidence); 2565 beamIncidence(incidence);
2565 } 2566 }
2566} 2567}
2567void CalendarView::toggleCancelIncidence() 2568void CalendarView::toggleCancelIncidence()
2568{ 2569{
2569 Incidence *incidence = currentSelection(); 2570 Incidence *incidence = currentSelection();
2570 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2571 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2571 if ( incidence ) { 2572 if ( incidence ) {
2572 cancelIncidence(incidence); 2573 cancelIncidence(incidence);
2573 } 2574 }
2574} 2575}
2575 2576
2576 2577
2577void CalendarView::cancelIncidence(Incidence * inc ) 2578void CalendarView::cancelIncidence(Incidence * inc )
2578{ 2579{
2579 inc->setCancelled( ! inc->cancelled() ); 2580 inc->setCancelled( ! inc->cancelled() );
2580 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); 2581 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED );
2581 updateView(); 2582 updateView();
2582} 2583}
2583void CalendarView::cloneIncidence(Incidence * orgInc ) 2584void CalendarView::cloneIncidence(Incidence * orgInc )
2584{ 2585{
2585 Incidence * newInc = orgInc->clone(); 2586 Incidence * newInc = orgInc->clone();
2586 newInc->recreate(); 2587 newInc->recreate();
2587 2588
2588 if ( newInc->type() == "Todo" ) { 2589 if ( newInc->type() == "Todo" ) {
2589 Todo* t = (Todo*) newInc; 2590 Todo* t = (Todo*) newInc;
2590 showTodoEditor(); 2591 showTodoEditor();
2591 mTodoEditor->editTodo( t ); 2592 mTodoEditor->editTodo( t );
2592 if ( mTodoEditor->exec() ) { 2593 if ( mTodoEditor->exec() ) {
2593 mCalendar->addTodo( t ); 2594 mCalendar->addTodo( t );
2594 updateView(); 2595 updateView();
2595 } else { 2596 } else {
2596 delete t; 2597 delete t;
2597 } 2598 }
2598 } 2599 }
2599 else { 2600 else {
2600 Event* e = (Event*) newInc; 2601 Event* e = (Event*) newInc;
2601 showEventEditor(); 2602 showEventEditor();
2602 mEventEditor->editEvent( e ); 2603 mEventEditor->editEvent( e );
2603 if ( mEventEditor->exec() ) { 2604 if ( mEventEditor->exec() ) {
2604 mCalendar->addEvent( e ); 2605 mCalendar->addEvent( e );
2605 updateView(); 2606 updateView();
2606 } else { 2607 } else {
2607 delete e; 2608 delete e;
2608 } 2609 }
2609 } 2610 }
2610} 2611}
2611 2612
2612void CalendarView::newEvent() 2613void CalendarView::newEvent()
2613{ 2614{
2614 // TODO: Replace this code by a common eventDurationHint of KOBaseView. 2615 // TODO: Replace this code by a common eventDurationHint of KOBaseView.
2615 KOAgendaView *aView = mViewManager->agendaView(); 2616 KOAgendaView *aView = mViewManager->agendaView();
2616 if (aView) { 2617 if (aView) {
2617 if (aView->selectionStart().isValid()) { 2618 if (aView->selectionStart().isValid()) {
2618 if (aView->selectedIsAllDay()) { 2619 if (aView->selectedIsAllDay()) {
2619 newEvent(aView->selectionStart(),aView->selectionEnd(),true); 2620 newEvent(aView->selectionStart(),aView->selectionEnd(),true);
2620 } else { 2621 } else {
2621 newEvent(aView->selectionStart(),aView->selectionEnd()); 2622 newEvent(aView->selectionStart(),aView->selectionEnd());
2622 } 2623 }
2623 return; 2624 return;
2624 } 2625 }
2625 } 2626 }
2626 2627
2627 QDate date = mNavigator->selectedDates().first(); 2628 QDate date = mNavigator->selectedDates().first();
2628 QDateTime current = QDateTime::currentDateTime(); 2629 QDateTime current = QDateTime::currentDateTime();
2629 if ( date <= current.date() ) { 2630 if ( date <= current.date() ) {
2630 int hour = current.time().hour() +1; 2631 int hour = current.time().hour() +1;
2631 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), 2632 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ),
2632 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 2633 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
2633 } else 2634 } else
2634 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), 2635 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ),
2635 QDateTime( date, QTime( KOPrefs::instance()->mStartTime + 2636 QDateTime( date, QTime( KOPrefs::instance()->mStartTime +
2636 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 2637 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
2637} 2638}
2638 2639
2639void CalendarView::newEvent(QDateTime fh) 2640void CalendarView::newEvent(QDateTime fh)
2640{ 2641{
2641 newEvent(fh, 2642 newEvent(fh,
2642 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); 2643 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration)));
2643} 2644}
2644 2645
2645void CalendarView::newEvent(QDate dt) 2646void CalendarView::newEvent(QDate dt)
2646{ 2647{
2647 newEvent(QDateTime(dt, QTime(0,0,0)), 2648 newEvent(QDateTime(dt, QTime(0,0,0)),
2648 QDateTime(dt, QTime(0,0,0)), true); 2649 QDateTime(dt, QTime(0,0,0)), true);
2649} 2650}
2650void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) 2651void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint)
2651{ 2652{
2652 newEvent(fromHint, toHint, false); 2653 newEvent(fromHint, toHint, false);
2653} 2654}
2654void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) 2655void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
2655{ 2656{
2656 2657
2657 showEventEditor(); 2658 showEventEditor();
2658 mEventEditor->newEvent(fromHint,toHint,allDay); 2659 mEventEditor->newEvent(fromHint,toHint,allDay);
2659 if ( mFilterView->filtersEnabled() ) { 2660 if ( mFilterView->filtersEnabled() ) {
2660 CalFilter *filter = mFilterView->selectedFilter(); 2661 CalFilter *filter = mFilterView->selectedFilter();
2661 if (filter && filter->showCategories()) { 2662 if (filter && filter->showCategories()) {
2662 mEventEditor->setCategories(filter->categoryList().join(",") ); 2663 mEventEditor->setCategories(filter->categoryList().join(",") );
2663 } 2664 }
2664 if ( filter ) 2665 if ( filter )
2665 mEventEditor->setSecrecy( filter->getSecrecy() ); 2666 mEventEditor->setSecrecy( filter->getSecrecy() );
2666 } 2667 }
2667} 2668}
2668void CalendarView::todoAdded(Todo * t) 2669void CalendarView::todoAdded(Todo * t)
2669{ 2670{
2670 2671
2671 changeTodoDisplay ( t ,KOGlobals::EVENTADDED); 2672 changeTodoDisplay ( t ,KOGlobals::EVENTADDED);
2672 updateTodoViews(); 2673 updateTodoViews();
2673} 2674}
2674void CalendarView::todoChanged(Todo * t) 2675void CalendarView::todoChanged(Todo * t)
2675{ 2676{
2676 emit todoModified( t, 4 ); 2677 emit todoModified( t, 4 );
2677 // updateTodoViews(); 2678 // updateTodoViews();
2678} 2679}
2679void CalendarView::todoToBeDeleted(Todo *) 2680void CalendarView::todoToBeDeleted(Todo *)
2680{ 2681{
2681 //qDebug("todoToBeDeleted(Todo *) "); 2682 //qDebug("todoToBeDeleted(Todo *) ");
2682 updateTodoViews(); 2683 updateTodoViews();
2683} 2684}
2684void CalendarView::todoDeleted() 2685void CalendarView::todoDeleted()
2685{ 2686{
2686 //qDebug(" todoDeleted()"); 2687 //qDebug(" todoDeleted()");
2687 updateTodoViews(); 2688 updateTodoViews();
2688} 2689}
2689 2690
2690 2691
2691void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) 2692void CalendarView::newTodoDateTime( QDateTime dt, bool allday )
2692{ 2693{
2693 showTodoEditor(); 2694 showTodoEditor();
2694 mTodoEditor->newTodo(dt,0,allday); 2695 mTodoEditor->newTodo(dt,0,allday);
2695 if ( mFilterView->filtersEnabled() ) { 2696 if ( mFilterView->filtersEnabled() ) {
2696 CalFilter *filter = mFilterView->selectedFilter(); 2697 CalFilter *filter = mFilterView->selectedFilter();
2697 if (filter && filter->showCategories()) { 2698 if (filter && filter->showCategories()) {
2698 mTodoEditor->setCategories(filter->categoryList().join(",") ); 2699 mTodoEditor->setCategories(filter->categoryList().join(",") );
2699 } 2700 }
2700 if ( filter ) 2701 if ( filter )
2701 mTodoEditor->setSecrecy( filter->getSecrecy() ); 2702 mTodoEditor->setSecrecy( filter->getSecrecy() );
2702 } 2703 }
2703} 2704}
2704 2705
2705void CalendarView::newTodo() 2706void CalendarView::newTodo()
2706{ 2707{
2707 newTodoDateTime( QDateTime(),true ); 2708 newTodoDateTime( QDateTime(),true );
2708} 2709}
2709 2710
2710void CalendarView::newSubTodo() 2711void CalendarView::newSubTodo()
2711{ 2712{
2712 Todo *todo = selectedTodo(); 2713 Todo *todo = selectedTodo();
2713 if ( todo ) newSubTodo( todo ); 2714 if ( todo ) newSubTodo( todo );
2714} 2715}
2715 2716
2716void CalendarView::newSubTodo(Todo *parentEvent) 2717void CalendarView::newSubTodo(Todo *parentEvent)
2717{ 2718{
2718 2719
2719 showTodoEditor(); 2720 showTodoEditor();
2720 mTodoEditor->newTodo(QDateTime(),parentEvent,true); 2721 mTodoEditor->newTodo(QDateTime(),parentEvent,true);
2721} 2722}
2722 2723
2723void CalendarView::newFloatingEvent() 2724void CalendarView::newFloatingEvent()
2724{ 2725{
2725 DateList tmpList = mNavigator->selectedDates(); 2726 DateList tmpList = mNavigator->selectedDates();
2726 QDate date = tmpList.first(); 2727 QDate date = tmpList.first();
2727 2728
2728 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), 2729 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ),
2729 QDateTime( date, QTime( 12, 0, 0 ) ), true ); 2730 QDateTime( date, QTime( 12, 0, 0 ) ), true );
2730} 2731}
2731 2732
2732 2733
2733void CalendarView::editEvent( Event *event ) 2734void CalendarView::editEvent( Event *event )
2734{ 2735{
2735 2736
2736 if ( !event ) return; 2737 if ( !event ) return;
2737 if ( event->isReadOnly() ) { 2738 if ( event->isReadOnly() ) {
2738 showEvent( event ); 2739 showEvent( event );
2739 return; 2740 return;
2740 } 2741 }
2741 showEventEditor(); 2742 showEventEditor();
2742 mEventEditor->editEvent( event , mFlagEditDescription); 2743 mEventEditor->editEvent( event , mFlagEditDescription);
2743} 2744}
2744void CalendarView::editJournal( Journal *jour ) 2745void CalendarView::editJournal( Journal *jour )
2745{ 2746{
2746 if ( !jour ) return; 2747 if ( !jour ) return;
2747 mDialogManager->hideSearchDialog(); 2748 mDialogManager->hideSearchDialog();
2748 mViewManager->showJournalView(); 2749 mViewManager->showJournalView();
2749 mNavigator->slotDaySelect( jour->dtStart().date() ); 2750 mNavigator->slotDaySelect( jour->dtStart().date() );
2750} 2751}
2751void CalendarView::editTodo( Todo *todo ) 2752void CalendarView::editTodo( Todo *todo )
2752{ 2753{
2753 if ( !todo ) return; 2754 if ( !todo ) return;
2754 2755
2755 if ( todo->isReadOnly() ) { 2756 if ( todo->isReadOnly() ) {
2756 showTodo( todo ); 2757 showTodo( todo );
2757 return; 2758 return;
2758 } 2759 }
2759 showTodoEditor(); 2760 showTodoEditor();
2760 mTodoEditor->editTodo( todo ,mFlagEditDescription); 2761 mTodoEditor->editTodo( todo ,mFlagEditDescription);
2761 2762
2762} 2763}
2763 2764
2764KOEventViewerDialog* CalendarView::getEventViewerDialog() 2765KOEventViewerDialog* CalendarView::getEventViewerDialog()
2765{ 2766{
2766 if ( !mEventViewerDialog ) { 2767 if ( !mEventViewerDialog ) {
2767 mEventViewerDialog = new KOEventViewerDialog(this); 2768 mEventViewerDialog = new KOEventViewerDialog(this);
2768 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); 2769 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
2769 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); 2770 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
2770 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), 2771 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
2771 dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); 2772 dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
2772 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), 2773 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
2773 viewManager(), SLOT( showAgendaView( bool ) ) ); 2774 viewManager(), SLOT( showAgendaView( bool ) ) );
2774 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), 2775 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ),
2775 this, SLOT( todoChanged(Todo *) ) ); 2776 this, SLOT( todoChanged(Todo *) ) );
2776 mEventViewerDialog->resize( 640, 480 ); 2777 mEventViewerDialog->resize( 640, 480 );
2777 2778
2778 } 2779 }
2779 return mEventViewerDialog; 2780 return mEventViewerDialog;
2780} 2781}
2781void CalendarView::showEvent(Event *event) 2782void CalendarView::showEvent(Event *event)
2782{ 2783{
2783 getEventViewerDialog()->setEvent(event); 2784 getEventViewerDialog()->setEvent(event);
2784 getEventViewerDialog()->showMe(); 2785 getEventViewerDialog()->showMe();
2785} 2786}
2786 2787
2787void CalendarView::showTodo(Todo *event) 2788void CalendarView::showTodo(Todo *event)
2788{ 2789{
2789 getEventViewerDialog()->setTodo(event); 2790 getEventViewerDialog()->setTodo(event);
2790 getEventViewerDialog()->showMe(); 2791 getEventViewerDialog()->showMe();
2791} 2792}
2792void CalendarView::showJournal( Journal *jour ) 2793void CalendarView::showJournal( Journal *jour )
2793{ 2794{
2794 getEventViewerDialog()->setJournal(jour); 2795 getEventViewerDialog()->setJournal(jour);
2795 getEventViewerDialog()->showMe(); 2796 getEventViewerDialog()->showMe();
2796 2797
2797} 2798}
2798// void CalendarView::todoModified (Todo *event, int changed) 2799// void CalendarView::todoModified (Todo *event, int changed)
2799// { 2800// {
2800// // if (mDialogList.find (event) != mDialogList.end ()) { 2801// // if (mDialogList.find (event) != mDialogList.end ()) {
2801// // kdDebug() << "Todo modified and open" << endl; 2802// // kdDebug() << "Todo modified and open" << endl;
2802// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; 2803// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event];
2803// // temp->modified (changed); 2804// // temp->modified (changed);
2804 2805
2805// // } 2806// // }
2806 2807
2807// mViewManager->updateView(); 2808// mViewManager->updateView();
2808// } 2809// }
2809 2810
2810void CalendarView::appointment_show() 2811void CalendarView::appointment_show()
2811{ 2812{
2812 Event *anEvent = 0; 2813 Event *anEvent = 0;
2813 2814
2814 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2815 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2815 2816
2816 if (mViewManager->currentView()->isEventView()) { 2817 if (mViewManager->currentView()->isEventView()) {
2817 if ( incidence && incidence->type() == "Event" ) { 2818 if ( incidence && incidence->type() == "Event" ) {
2818 anEvent = static_cast<Event *>(incidence); 2819 anEvent = static_cast<Event *>(incidence);
2819 } 2820 }
2820 } 2821 }
2821 2822
2822 if (!anEvent) { 2823 if (!anEvent) {
2823 KNotifyClient::beep(); 2824 KNotifyClient::beep();
2824 return; 2825 return;
2825 } 2826 }
2826 2827
2827 showEvent(anEvent); 2828 showEvent(anEvent);
2828} 2829}
2829 2830
2830void CalendarView::appointment_edit() 2831void CalendarView::appointment_edit()
2831{ 2832{
2832 Event *anEvent = 0; 2833 Event *anEvent = 0;
2833 2834
2834 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2835 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2835 2836
2836 if (mViewManager->currentView()->isEventView()) { 2837 if (mViewManager->currentView()->isEventView()) {
2837 if ( incidence && incidence->type() == "Event" ) { 2838 if ( incidence && incidence->type() == "Event" ) {
2838 anEvent = static_cast<Event *>(incidence); 2839 anEvent = static_cast<Event *>(incidence);
2839 } 2840 }
2840 } 2841 }
2841 2842
2842 if (!anEvent) { 2843 if (!anEvent) {
2843 KNotifyClient::beep(); 2844 KNotifyClient::beep();
2844 return; 2845 return;
2845 } 2846 }
2846 2847
2847 editEvent(anEvent); 2848 editEvent(anEvent);
2848} 2849}
2849 2850
2850void CalendarView::appointment_delete() 2851void CalendarView::appointment_delete()
2851{ 2852{
2852 Event *anEvent = 0; 2853 Event *anEvent = 0;
2853 2854
2854 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2855 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2855 2856
2856 if (mViewManager->currentView()->isEventView()) { 2857 if (mViewManager->currentView()->isEventView()) {
2857 if ( incidence && incidence->type() == "Event" ) { 2858 if ( incidence && incidence->type() == "Event" ) {
2858 anEvent = static_cast<Event *>(incidence); 2859 anEvent = static_cast<Event *>(incidence);
2859 } 2860 }
2860 } 2861 }
2861 2862
2862 if (!anEvent) { 2863 if (!anEvent) {
2863 KNotifyClient::beep(); 2864 KNotifyClient::beep();
2864 return; 2865 return;
2865 } 2866 }
2866 2867
2867 deleteEvent(anEvent); 2868 deleteEvent(anEvent);
2868} 2869}
2869 2870
2870void CalendarView::todo_resub( Todo * parent, Todo * sub ) 2871void CalendarView::todo_resub( Todo * parent, Todo * sub )
2871{ 2872{
2872 if (!sub) return; 2873 if (!sub) return;
2873 if (!parent) return; 2874 if (!parent) return;
2874 if ( sub->relatedTo() ) 2875 if ( sub->relatedTo() )
2875 sub->relatedTo()->removeRelation(sub); 2876 sub->relatedTo()->removeRelation(sub);
2876 sub->setRelatedTo(parent); 2877 sub->setRelatedTo(parent);
2877 sub->setRelatedToUid(parent->uid()); 2878 sub->setRelatedToUid(parent->uid());
2878 parent->addRelation(sub); 2879 parent->addRelation(sub);
2879 sub->updated(); 2880 sub->updated();
2880 parent->updated(); 2881 parent->updated();
2881 setModified(true); 2882 setModified(true);
2882 updateView(); 2883 updateView();
2883} 2884}
2884void CalendarView::todo_unsub(Todo *anTodo ) 2885void CalendarView::todo_unsub(Todo *anTodo )
2885{ 2886{
2886 // Todo *anTodo = selectedTodo(); 2887 // Todo *anTodo = selectedTodo();
2887 if (!anTodo) return; 2888 if (!anTodo) return;
2888 if (!anTodo->relatedTo()) return; 2889 if (!anTodo->relatedTo()) return;
2889 anTodo->relatedTo()->removeRelation(anTodo); 2890 anTodo->relatedTo()->removeRelation(anTodo);
2890 anTodo->setRelatedTo(0); 2891 anTodo->setRelatedTo(0);
2891 anTodo->updated(); 2892 anTodo->updated();
2892 anTodo->setRelatedToUid(""); 2893 anTodo->setRelatedToUid("");
2893 setModified(true); 2894 setModified(true);
2894 updateView(); 2895 updateView();
2895} 2896}
2896 2897
2897void CalendarView::deleteTodo(Todo *todo) 2898void CalendarView::deleteTodo(Todo *todo)
2898{ 2899{
2899 if (!todo) { 2900 if (!todo) {
2900 KNotifyClient::beep(); 2901 KNotifyClient::beep();
2901 return; 2902 return;
2902 } 2903 }
2903 if (KOPrefs::instance()->mConfirm) { 2904 if (KOPrefs::instance()->mConfirm) {
2904 QString text = todo->summary().left(20); 2905 QString text = todo->summary().left(20);
2905 if (!todo->relations().isEmpty()) { 2906 if (!todo->relations().isEmpty()) {
2906 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); 2907 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!");
2907 2908
2908 } 2909 }
2909 switch (msgItemDelete(text)) { 2910 switch (msgItemDelete(text)) {
2910 case KMessageBox::Continue: // OK 2911 case KMessageBox::Continue: // OK
2911 bool deleteT = false; 2912 bool deleteT = false;
2912 if (!todo->relations().isEmpty()) { 2913 if (!todo->relations().isEmpty()) {
2913 deleteT = removeCompletedSubTodos( todo ); 2914 deleteT = removeCompletedSubTodos( todo );
2914 } 2915 }
2915 // deleteT == true: todo already deleted in removeCompletedSubTodos 2916 // deleteT == true: todo already deleted in removeCompletedSubTodos
2916 if ( !deleteT ) { 2917 if ( !deleteT ) {
2917 checkExternalId( todo ); 2918 checkExternalId( todo );
2918 calendar()->deleteTodo(todo); 2919 calendar()->deleteTodo(todo);
2919 changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); 2920 changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
2920 updateView(); 2921 updateView();
2921 } 2922 }
2922 break; 2923 break;
2923 } // switch 2924 } // switch
2924 } else { 2925 } else {
2925 checkExternalId( todo ); 2926 checkExternalId( todo );
2926 mCalendar->deleteTodo(todo); 2927 mCalendar->deleteTodo(todo);
2927 changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); 2928 changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
2928 updateView(); 2929 updateView();
2929 } 2930 }
2930 2931
2931 emit updateSearchDialog(); 2932 emit updateSearchDialog();
2932} 2933}
2933void CalendarView::deleteJournal(Journal *jour) 2934void CalendarView::deleteJournal(Journal *jour)
2934{ 2935{
2935 if (!jour) { 2936 if (!jour) {
2936 KNotifyClient::beep(); 2937 KNotifyClient::beep();
2937 return; 2938 return;
2938 } 2939 }
2939 if (KOPrefs::instance()->mConfirm) { 2940 if (KOPrefs::instance()->mConfirm) {
2940 switch (msgItemDelete( jour->description().left(20))) { 2941 switch (msgItemDelete( jour->description().left(20))) {
2941 case KMessageBox::Continue: // OK 2942 case KMessageBox::Continue: // OK
2942 calendar()->deleteJournal(jour); 2943 calendar()->deleteJournal(jour);
2943 updateView(); 2944 updateView();
2944 break; 2945 break;
2945 } // switch 2946 } // switch
2946 } else { 2947 } else {
2947 calendar()->deleteJournal(jour);; 2948 calendar()->deleteJournal(jour);;
2948 updateView(); 2949 updateView();
2949 } 2950 }
2950 emit updateSearchDialog(); 2951 emit updateSearchDialog();
2951} 2952}
2952 2953
2953void CalendarView::deleteEvent(Event *anEvent) 2954void CalendarView::deleteEvent(Event *anEvent)
2954{ 2955{
2955 if (!anEvent) { 2956 if (!anEvent) {
2956 KNotifyClient::beep(); 2957 KNotifyClient::beep();
2957 return; 2958 return;
2958 } 2959 }
2959 2960
2960 if (anEvent->recurrence()->doesRecur()) { 2961 if (anEvent->recurrence()->doesRecur()) {
2961 QDate itemDate = mViewManager->currentSelectionDate(); 2962 QDate itemDate = mViewManager->currentSelectionDate();
2962 int km; 2963 int km;
2963 if (!itemDate.isValid()) { 2964 if (!itemDate.isValid()) {
2964 //kdDebug() << "Date Not Valid" << endl; 2965 //kdDebug() << "Date Not Valid" << endl;
2965 if (KOPrefs::instance()->mConfirm) { 2966 if (KOPrefs::instance()->mConfirm) {
2966 km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + 2967 km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) +
2967 i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), 2968 i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"),
2968 i18n("KO/Pi Confirmation"),i18n("Delete All")); 2969 i18n("KO/Pi Confirmation"),i18n("Delete All"));
2969 if ( km == KMessageBox::Continue ) 2970 if ( km == KMessageBox::Continue )
2970 km = KMessageBox::No; // No = all below 2971 km = KMessageBox::No; // No = all below
2971 } else 2972 } else
2972 km = KMessageBox::No; 2973 km = KMessageBox::No;
2973 } else { 2974 } else {
2974 km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) + 2975 km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) +
2975 i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ 2976 i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+
2976 KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), 2977 KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"),
2977 i18n("KO/Pi Confirmation"),i18n("Current"), 2978 i18n("KO/Pi Confirmation"),i18n("Current"),
2978 i18n("All")); 2979 i18n("All"));
2979 } 2980 }
2980 switch(km) { 2981 switch(km) {
2981 2982
2982 case KMessageBox::No: // Continue // all 2983 case KMessageBox::No: // Continue // all
2983 //qDebug("KMessageBox::No "); 2984 //qDebug("KMessageBox::No ");
2984 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) 2985 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0)
2985 schedule(Scheduler::Cancel,anEvent); 2986 schedule(Scheduler::Cancel,anEvent);
2986 2987
2987 checkExternalId( anEvent); 2988 checkExternalId( anEvent);
2988 mCalendar->deleteEvent(anEvent); 2989 mCalendar->deleteEvent(anEvent);
2989 changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); 2990 changeEventDisplay(anEvent,KOGlobals::EVENTDELETED);
2990 break; 2991 break;
2991 2992
2992 // Disabled because it does not work 2993 // Disabled because it does not work
2993 //#if 0 2994 //#if 0
2994 case KMessageBox::Yes: // just this one 2995 case KMessageBox::Yes: // just this one
2995 //QDate qd = mNavigator->selectedDates().first(); 2996 //QDate qd = mNavigator->selectedDates().first();
2996 //if (!qd.isValid()) { 2997 //if (!qd.isValid()) {
2997 // kdDebug() << "no date selected, or invalid date" << endl; 2998 // kdDebug() << "no date selected, or invalid date" << endl;
2998 // KNotifyClient::beep(); 2999 // KNotifyClient::beep();
2999 // return; 3000 // return;
3000 //} 3001 //}
3001 //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); 3002 //while (!anEvent->recursOn(qd)) qd = qd.addDays(1);
3002 if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { 3003 if (itemDate!=QDate(1,1,1) || itemDate.isValid()) {
3003 anEvent->addExDate(itemDate); 3004 anEvent->addExDate(itemDate);
3004 int duration = anEvent->recurrence()->duration(); 3005 int duration = anEvent->recurrence()->duration();
3005 if ( duration > 0 ) { 3006 if ( duration > 0 ) {
3006 anEvent->recurrence()->setDuration( duration - 1 ); 3007 anEvent->recurrence()->setDuration( duration - 1 );
3007 } 3008 }
3008 changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); 3009 changeEventDisplay(anEvent, KOGlobals::EVENTEDITED);
3009 } 3010 }
3010 break; 3011 break;
3011 //#endif 3012 //#endif
3012 } // switch 3013 } // switch
3013 } else { 3014 } else {
3014 if (KOPrefs::instance()->mConfirm) { 3015 if (KOPrefs::instance()->mConfirm) {
3015 switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + 3016 switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) +
3016 i18n("\nAre you sure you want\nto delete this event?"), 3017 i18n("\nAre you sure you want\nto delete this event?"),
3017 i18n("KO/Pi Confirmation"),i18n("Delete"))) { 3018 i18n("KO/Pi Confirmation"),i18n("Delete"))) {
3018 case KMessageBox::Continue: // OK 3019 case KMessageBox::Continue: // OK
3019 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) 3020 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0)
3020 schedule(Scheduler::Cancel,anEvent); 3021 schedule(Scheduler::Cancel,anEvent);
3021 checkExternalId( anEvent); 3022 checkExternalId( anEvent);
3022 mCalendar->deleteEvent(anEvent); 3023 mCalendar->deleteEvent(anEvent);
3023 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 3024 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
3024 break; 3025 break;
3025 } // switch 3026 } // switch
3026 } else { 3027 } else {
3027 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) 3028 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0)
3028 schedule(Scheduler::Cancel,anEvent); 3029 schedule(Scheduler::Cancel,anEvent);
3029 checkExternalId( anEvent); 3030 checkExternalId( anEvent);
3030 mCalendar->deleteEvent(anEvent); 3031 mCalendar->deleteEvent(anEvent);
3031 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 3032 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
3032 } 3033 }
3033 } // if-else 3034 } // if-else
3034 emit updateSearchDialog(); 3035 emit updateSearchDialog();
3035} 3036}
3036 3037
3037bool CalendarView::deleteEvent(const QString &uid) 3038bool CalendarView::deleteEvent(const QString &uid)
3038{ 3039{
3039 Event *ev = mCalendar->event(uid); 3040 Event *ev = mCalendar->event(uid);
3040 if (ev) { 3041 if (ev) {
3041 deleteEvent(ev); 3042 deleteEvent(ev);
3042 return true; 3043 return true;
3043 } else { 3044 } else {
3044 return false; 3045 return false;
3045 } 3046 }
3046} 3047}
3047 3048
3048/*****************************************************************************/ 3049/*****************************************************************************/
3049 3050
3050void CalendarView::action_mail() 3051void CalendarView::action_mail()
3051{ 3052{
3052#ifndef KORG_NOMAIL 3053#ifndef KORG_NOMAIL
3053 KOMailClient mailClient; 3054 KOMailClient mailClient;
3054 3055
3055 Incidence *incidence = currentSelection(); 3056 Incidence *incidence = currentSelection();
3056 3057
3057 if (!incidence) { 3058 if (!incidence) {
3058 KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); 3059 KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected."));
3059 return; 3060 return;
3060 } 3061 }
3061 if(incidence->attendeeCount() == 0 ) { 3062 if(incidence->attendeeCount() == 0 ) {
3062 KMessageBox::sorry(this, 3063 KMessageBox::sorry(this,
3063 i18n("Can't generate mail:\nNo attendees defined.\n")); 3064 i18n("Can't generate mail:\nNo attendees defined.\n"));
3064 return; 3065 return;
3065 } 3066 }
3066 3067
3067 CalendarLocal cal_tmp; 3068 CalendarLocal cal_tmp;
3068 Event *event = 0; 3069 Event *event = 0;
3069 Event *ev = 0; 3070 Event *ev = 0;
3070 if ( incidence && incidence->type() == "Event" ) { 3071 if ( incidence && incidence->type() == "Event" ) {
3071 event = static_cast<Event *>(incidence); 3072 event = static_cast<Event *>(incidence);
3072 ev = new Event(*event); 3073 ev = new Event(*event);
3073 cal_tmp.addEvent(ev); 3074 cal_tmp.addEvent(ev);
3074 } 3075 }
3075 ICalFormat mForm(); 3076 ICalFormat mForm();
3076 QString attachment = mForm.toString( &cal_tmp ); 3077 QString attachment = mForm.toString( &cal_tmp );
3077 if (ev) delete(ev); 3078 if (ev) delete(ev);
3078 3079
3079 mailClient.mailAttendees(currentSelection(), attachment); 3080 mailClient.mailAttendees(currentSelection(), attachment);
3080 3081
3081#endif 3082#endif
3082 3083
3083#if 0 3084#if 0
3084 Event *anEvent = 0; 3085 Event *anEvent = 0;
3085 if (mViewManager->currentView()->isEventView()) { 3086 if (mViewManager->currentView()->isEventView()) {
3086 anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first()); 3087 anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first());
3087 } 3088 }
3088 3089
3089 if (!anEvent) { 3090 if (!anEvent) {
3090 KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); 3091 KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected."));
3091 return; 3092 return;
3092 } 3093 }
3093 if(anEvent->attendeeCount() == 0 ) { 3094 if(anEvent->attendeeCount() == 0 ) {
3094 KMessageBox::sorry(this, 3095 KMessageBox::sorry(this,
3095 i18n("Can't generate mail:\nNo attendees defined.\n")); 3096 i18n("Can't generate mail:\nNo attendees defined.\n"));
3096 return; 3097 return;
3097 } 3098 }
3098 3099
3099 mailobject.emailEvent(anEvent); 3100 mailobject.emailEvent(anEvent);
3100#endif 3101#endif
3101} 3102}
3102 3103
3103 3104
3104void CalendarView::schedule_publish(Incidence *incidence) 3105void CalendarView::schedule_publish(Incidence *incidence)
3105{ 3106{
3106 Event *event = 0; 3107 Event *event = 0;
3107 Todo *todo = 0; 3108 Todo *todo = 0;
3108 3109
3109 if (incidence == 0) { 3110 if (incidence == 0) {
3110 incidence = mViewManager->currentView()->selectedIncidences().first(); 3111 incidence = mViewManager->currentView()->selectedIncidences().first();
3111 if (incidence == 0) { 3112 if (incidence == 0) {
3112 incidence = mTodoList->selectedIncidences().first(); 3113 incidence = mTodoList->selectedIncidences().first();
3113 } 3114 }
3114 } 3115 }
3115 if ( incidence && incidence->type() == "Event" ) { 3116 if ( incidence && incidence->type() == "Event" ) {
3116 event = static_cast<Event *>(incidence); 3117 event = static_cast<Event *>(incidence);
3117 } else { 3118 } else {
3118 if ( incidence && incidence->type() == "Todo" ) { 3119 if ( incidence && incidence->type() == "Todo" ) {
3119 todo = static_cast<Todo *>(incidence); 3120 todo = static_cast<Todo *>(incidence);
3120 } 3121 }
3121 } 3122 }
3122 3123
3123 if (!event && !todo) { 3124 if (!event && !todo) {
3124 KMessageBox::sorry(this,i18n("No event selected.")); 3125 KMessageBox::sorry(this,i18n("No event selected."));
3125 return; 3126 return;
3126 } 3127 }
3127 3128
3128 PublishDialog *publishdlg = new PublishDialog(); 3129 PublishDialog *publishdlg = new PublishDialog();
3129 if (incidence->attendeeCount()>0) { 3130 if (incidence->attendeeCount()>0) {
3130 QPtrList<Attendee> attendees = incidence->attendees(); 3131 QPtrList<Attendee> attendees = incidence->attendees();
3131 attendees.first(); 3132 attendees.first();
3132 while ( attendees.current()!=0 ) { 3133 while ( attendees.current()!=0 ) {
3133 publishdlg->addAttendee(attendees.current()); 3134 publishdlg->addAttendee(attendees.current());
3134 attendees.next(); 3135 attendees.next();
3135 } 3136 }
3136 } 3137 }
3137 bool send = true; 3138 bool send = true;
3138 if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) { 3139 if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) {
3139 if ( publishdlg->exec() != QDialog::Accepted ) 3140 if ( publishdlg->exec() != QDialog::Accepted )
3140 send = false; 3141 send = false;
3141 } 3142 }
3142 if ( send ) { 3143 if ( send ) {
3143 OutgoingDialog *dlg = mDialogManager->outgoingDialog(); 3144 OutgoingDialog *dlg = mDialogManager->outgoingDialog();
3144 if ( event ) { 3145 if ( event ) {
3145 Event *ev = new Event(*event); 3146 Event *ev = new Event(*event);
3146 ev->registerObserver(0); 3147 ev->registerObserver(0);
3147 ev->clearAttendees(); 3148 ev->clearAttendees();
3148 if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { 3149 if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) {
3149 delete(ev); 3150 delete(ev);
3150 } 3151 }
3151 } else { 3152 } else {
3152 if ( todo ) { 3153 if ( todo ) {
3153 Todo *ev = new Todo(*todo); 3154 Todo *ev = new Todo(*todo);
3154 ev->registerObserver(0); 3155 ev->registerObserver(0);
3155 ev->clearAttendees(); 3156 ev->clearAttendees();
3156 if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { 3157 if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) {
3157 delete(ev); 3158 delete(ev);
3158 } 3159 }
3159 } 3160 }
3160 } 3161 }
3161 } 3162 }
3162 delete publishdlg; 3163 delete publishdlg;
3163} 3164}
3164 3165
3165void CalendarView::schedule_request(Incidence *incidence) 3166void CalendarView::schedule_request(Incidence *incidence)
3166{ 3167{
3167 schedule(Scheduler::Request,incidence); 3168 schedule(Scheduler::Request,incidence);
3168} 3169}
3169 3170
3170void CalendarView::schedule_refresh(Incidence *incidence) 3171void CalendarView::schedule_refresh(Incidence *incidence)
3171{ 3172{
3172 schedule(Scheduler::Refresh,incidence); 3173 schedule(Scheduler::Refresh,incidence);
3173} 3174}
3174 3175
3175void CalendarView::schedule_cancel(Incidence *incidence) 3176void CalendarView::schedule_cancel(Incidence *incidence)
3176{ 3177{
3177 schedule(Scheduler::Cancel,incidence); 3178 schedule(Scheduler::Cancel,incidence);
3178} 3179}
3179 3180
3180void CalendarView::schedule_add(Incidence *incidence) 3181void CalendarView::schedule_add(Incidence *incidence)
3181{ 3182{
3182 schedule(Scheduler::Add,incidence); 3183 schedule(Scheduler::Add,incidence);
3183} 3184}
3184 3185
3185void CalendarView::schedule_reply(Incidence *incidence) 3186void CalendarView::schedule_reply(Incidence *incidence)
3186{ 3187{
3187 schedule(Scheduler::Reply,incidence); 3188 schedule(Scheduler::Reply,incidence);
3188} 3189}
3189 3190
3190void CalendarView::schedule_counter(Incidence *incidence) 3191void CalendarView::schedule_counter(Incidence *incidence)
3191{ 3192{
3192 schedule(Scheduler::Counter,incidence); 3193 schedule(Scheduler::Counter,incidence);
3193} 3194}
3194 3195
3195void CalendarView::schedule_declinecounter(Incidence *incidence) 3196void CalendarView::schedule_declinecounter(Incidence *incidence)
3196{ 3197{
3197 schedule(Scheduler::Declinecounter,incidence); 3198 schedule(Scheduler::Declinecounter,incidence);
3198} 3199}
3199 3200
3200void CalendarView::schedule_publish_freebusy(int daysToPublish) 3201void CalendarView::schedule_publish_freebusy(int daysToPublish)
3201{ 3202{
3202 QDateTime start = QDateTime::currentDateTime(); 3203 QDateTime start = QDateTime::currentDateTime();
3203 QDateTime end = start.addDays(daysToPublish); 3204 QDateTime end = start.addDays(daysToPublish);
3204 3205
3205 FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); 3206 FreeBusy *freebusy = new FreeBusy(mCalendar, start, end);
3206 freebusy->setOrganizer(KOPrefs::instance()->email()); 3207 freebusy->setOrganizer(KOPrefs::instance()->email());
3207 3208
3208 3209
3209 PublishDialog *publishdlg = new PublishDialog(); 3210 PublishDialog *publishdlg = new PublishDialog();
3210 if ( publishdlg->exec() == QDialog::Accepted ) { 3211 if ( publishdlg->exec() == QDialog::Accepted ) {
3211 OutgoingDialog *dlg = mDialogManager->outgoingDialog(); 3212 OutgoingDialog *dlg = mDialogManager->outgoingDialog();
3212 if (!dlg->addMessage(freebusy,Scheduler::Publish,publishdlg->addresses())) { 3213 if (!dlg->addMessage(freebusy,Scheduler::Publish,publishdlg->addresses())) {
3213 delete(freebusy); 3214 delete(freebusy);
3214 } 3215 }
3215 } 3216 }
3216 delete publishdlg; 3217 delete publishdlg;
3217} 3218}
3218 3219
3219void CalendarView::schedule(Scheduler::Method method, Incidence *incidence) 3220void CalendarView::schedule(Scheduler::Method method, Incidence *incidence)
3220{ 3221{
3221 Event *event = 0; 3222 Event *event = 0;
3222 Todo *todo = 0; 3223 Todo *todo = 0;
3223 3224
3224 if (incidence == 0) { 3225 if (incidence == 0) {
3225 incidence = mViewManager->currentView()->selectedIncidences().first(); 3226 incidence = mViewManager->currentView()->selectedIncidences().first();
3226 if (incidence == 0) { 3227 if (incidence == 0) {
3227 incidence = mTodoList->selectedIncidences().first(); 3228 incidence = mTodoList->selectedIncidences().first();
3228 } 3229 }
3229 } 3230 }
3230 if ( incidence && incidence->type() == "Event" ) { 3231 if ( incidence && incidence->type() == "Event" ) {
3231 event = static_cast<Event *>(incidence); 3232 event = static_cast<Event *>(incidence);
3232 } 3233 }
3233 if ( incidence && incidence->type() == "Todo" ) { 3234 if ( incidence && incidence->type() == "Todo" ) {
3234 todo = static_cast<Todo *>(incidence); 3235 todo = static_cast<Todo *>(incidence);
3235 } 3236 }
3236 3237
3237 if (!event && !todo) { 3238 if (!event && !todo) {
3238 KMessageBox::sorry(this,i18n("No event selected.")); 3239 KMessageBox::sorry(this,i18n("No event selected."));
3239 return; 3240 return;
3240 } 3241 }
3241 3242
3242 if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) { 3243 if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) {
3243 KMessageBox::sorry(this,i18n("The event has no attendees.")); 3244 KMessageBox::sorry(this,i18n("The event has no attendees."));
3244 return; 3245 return;
3245 } 3246 }
3246 3247
3247 Event *ev = 0; 3248 Event *ev = 0;
3248 if (event) ev = new Event(*event); 3249 if (event) ev = new Event(*event);
3249 Todo *to = 0; 3250 Todo *to = 0;
3250 if (todo) to = new Todo(*todo); 3251 if (todo) to = new Todo(*todo);
3251 3252
3252 if (method == Scheduler::Reply || method == Scheduler::Refresh) { 3253 if (method == Scheduler::Reply || method == Scheduler::Refresh) {
3253 Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); 3254 Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email());
3254 if (!me) { 3255 if (!me) {
3255 KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails.")); 3256 KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails."));
3256 return; 3257 return;
3257 } 3258 }
3258 if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) { 3259 if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) {
3259 StatusDialog *statdlg = new StatusDialog(this); 3260 StatusDialog *statdlg = new StatusDialog(this);
3260 if (!statdlg->exec()==QDialog::Accepted) return; 3261 if (!statdlg->exec()==QDialog::Accepted) return;
3261 me->setStatus( statdlg->status() ); 3262 me->setStatus( statdlg->status() );
3262 delete(statdlg); 3263 delete(statdlg);
3263 } 3264 }
3264 Attendee *menew = new Attendee(*me); 3265 Attendee *menew = new Attendee(*me);
3265 if (ev) { 3266 if (ev) {
3266 ev->clearAttendees(); 3267 ev->clearAttendees();
3267 ev->addAttendee(menew,false); 3268 ev->addAttendee(menew,false);
3268 } else { 3269 } else {
3269 if (to) { 3270 if (to) {
3270 todo->clearAttendees(); 3271 todo->clearAttendees();
3271 todo->addAttendee(menew,false); 3272 todo->addAttendee(menew,false);
3272 } 3273 }
3273 } 3274 }
3274 } 3275 }
3275 3276
3276 OutgoingDialog *dlg = mDialogManager->outgoingDialog(); 3277 OutgoingDialog *dlg = mDialogManager->outgoingDialog();
3277 if (ev) { 3278 if (ev) {
3278 if ( !dlg->addMessage(ev,method) ) delete(ev); 3279 if ( !dlg->addMessage(ev,method) ) delete(ev);
3279 } else { 3280 } else {
3280 if (to) { 3281 if (to) {
3281 if ( !dlg->addMessage(to,method) ) delete(to); 3282 if ( !dlg->addMessage(to,method) ) delete(to);
3282 } 3283 }
3283 } 3284 }
3284} 3285}
3285 3286
3286void CalendarView::openAddressbook() 3287void CalendarView::openAddressbook()
3287{ 3288{
3288 KRun::runCommand("kaddressbook"); 3289 KRun::runCommand("kaddressbook");
3289} 3290}
3290 3291
3291void CalendarView::setModified(bool modified) 3292void CalendarView::setModified(bool modified)
3292{ 3293{
3293 if ( modified ) 3294 if ( modified )
3294 emit signalmodified(); 3295 emit signalmodified();
3295 if (mModified != modified) { 3296 if (mModified != modified) {
3296 mModified = modified; 3297 mModified = modified;
3297 emit modifiedChanged(mModified); 3298 emit modifiedChanged(mModified);
3298 } 3299 }
3299} 3300}
3300 3301
3301bool CalendarView::isReadOnly() 3302bool CalendarView::isReadOnly()
3302{ 3303{
3303 return mReadOnly; 3304 return mReadOnly;
3304} 3305}
3305 3306
3306void CalendarView::setReadOnly(bool readOnly) 3307void CalendarView::setReadOnly(bool readOnly)
3307{ 3308{
3308 if (mReadOnly != readOnly) { 3309 if (mReadOnly != readOnly) {
3309 mReadOnly = readOnly; 3310 mReadOnly = readOnly;
3310 emit readOnlyChanged(mReadOnly); 3311 emit readOnlyChanged(mReadOnly);
3311 } 3312 }
3312} 3313}
3313 3314
3314bool CalendarView::isModified() 3315bool CalendarView::isModified()
3315{ 3316{
3316 return mModified; 3317 return mModified;
3317} 3318}
3318 3319
3319void CalendarView::printSetup() 3320void CalendarView::printSetup()
3320{ 3321{
3321#ifndef KORG_NOPRINTER 3322#ifndef KORG_NOPRINTER
3322 createPrinter(); 3323 createPrinter();
3323 3324
3324 mCalPrinter->setupPrinter(); 3325 mCalPrinter->setupPrinter();
3325#endif 3326#endif
3326} 3327}
3327 3328
3328void CalendarView::print() 3329void CalendarView::print()
3329{ 3330{
3330#ifndef KORG_NOPRINTER 3331#ifndef KORG_NOPRINTER
3331 createPrinter(); 3332 createPrinter();
3332 3333
3333 DateList tmpDateList = mNavigator->selectedDates(); 3334 DateList tmpDateList = mNavigator->selectedDates();
3334 mCalPrinter->print(CalPrinter::Month, 3335 mCalPrinter->print(CalPrinter::Month,
3335 tmpDateList.first(), tmpDateList.last()); 3336 tmpDateList.first(), tmpDateList.last());
3336#endif 3337#endif
3337} 3338}
3338 3339
3339void CalendarView::printPreview() 3340void CalendarView::printPreview()
3340{ 3341{
3341#ifndef KORG_NOPRINTER 3342#ifndef KORG_NOPRINTER
3342 kdDebug() << "CalendarView::printPreview()" << endl; 3343 kdDebug() << "CalendarView::printPreview()" << endl;
3343 3344
3344 createPrinter(); 3345 createPrinter();
3345 3346
3346 DateList tmpDateList = mNavigator->selectedDates(); 3347 DateList tmpDateList = mNavigator->selectedDates();
3347 3348
3348 mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(), 3349 mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(),
3349 tmpDateList.last()); 3350 tmpDateList.last());
3350#endif 3351#endif
3351} 3352}
3352 3353
3353void CalendarView::exportICalendar() 3354void CalendarView::exportICalendar()
3354{ 3355{
3355 QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); 3356 QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this);
3356 3357
3357 // Force correct extension 3358 // Force correct extension
3358 if (filename.right(4) != ".ics") filename += ".ics"; 3359 if (filename.right(4) != ".ics") filename += ".ics";
3359 3360
3360 FileStorage storage( mCalendar, filename, new ICalFormat() ); 3361 FileStorage storage( mCalendar, filename, new ICalFormat() );
3361 storage.save(); 3362 storage.save();
3362} 3363}
3363 3364
3364bool CalendarView::exportVCalendar( QString filename ) 3365bool CalendarView::exportVCalendar( QString filename )
3365{ 3366{
3366 if (mCalendar->journals().count() > 0) { 3367 if (mCalendar->journals().count() > 0) {
3367 int result = KMessageBox::warningContinueCancel(this, 3368 int result = KMessageBox::warningContinueCancel(this,
3368 i18n("The journal entries can not be\nexported to a vCalendar file."), 3369 i18n("The journal entries can not be\nexported to a vCalendar file."),
3369 i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), 3370 i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"),
3370 true); 3371 true);
3371 if (result != KMessageBox::Continue) return false; 3372 if (result != KMessageBox::Continue) return false;
3372 } 3373 }
3373 3374
3374 //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this); 3375 //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this);
3375 3376
3376 // Force correct extension 3377 // Force correct extension
3377 if (filename.right(4) != ".vcs") filename += ".vcs"; 3378 if (filename.right(4) != ".vcs") filename += ".vcs";
3378 3379
3379 FileStorage storage( mCalendar, filename, new VCalFormat ); 3380 FileStorage storage( mCalendar, filename, new VCalFormat );
3380 return storage.save(); 3381 return storage.save();
3381 3382
3382} 3383}
3383 3384
3384void CalendarView::eventUpdated(Incidence *) 3385void CalendarView::eventUpdated(Incidence *)
3385{ 3386{
3386 setModified(); 3387 setModified();
3387 // Don't call updateView here. The code, which has caused the update of the 3388 // Don't call updateView here. The code, which has caused the update of the
3388 // event is responsible for updating the view. 3389 // event is responsible for updating the view.
3389 // updateView(); 3390 // updateView();
3390} 3391}
3391 3392
3392void CalendarView::adaptNavigationUnits() 3393void CalendarView::adaptNavigationUnits()
3393{ 3394{
3394 if (mViewManager->currentView()->isEventView()) { 3395 if (mViewManager->currentView()->isEventView()) {
3395 int days = mViewManager->currentView()->currentDateCount(); 3396 int days = mViewManager->currentView()->currentDateCount();
3396 if (days == 1) { 3397 if (days == 1) {
3397 emit changeNavStringPrev(i18n("&Previous Day")); 3398 emit changeNavStringPrev(i18n("&Previous Day"));
3398 emit changeNavStringNext(i18n("&Next Day")); 3399 emit changeNavStringNext(i18n("&Next Day"));
3399 } else { 3400 } else {
3400 emit changeNavStringPrev(i18n("&Previous Week")); 3401 emit changeNavStringPrev(i18n("&Previous Week"));
3401 emit changeNavStringNext(i18n("&Next Week")); 3402 emit changeNavStringNext(i18n("&Next Week"));
3402 } 3403 }
3403 } 3404 }
3404} 3405}
3405 3406
3406void CalendarView::processMainViewSelection( Incidence *incidence ) 3407void CalendarView::processMainViewSelection( Incidence *incidence )
3407{ 3408{
3408 if ( incidence ) mTodoList->clearSelection(); 3409 if ( incidence ) mTodoList->clearSelection();
3409 processIncidenceSelection( incidence ); 3410 processIncidenceSelection( incidence );
3410} 3411}
3411 3412
3412void CalendarView::processTodoListSelection( Incidence *incidence ) 3413void CalendarView::processTodoListSelection( Incidence *incidence )
3413{ 3414{
3414 if ( incidence && mViewManager->currentView() ) { 3415 if ( incidence && mViewManager->currentView() ) {
3415 mViewManager->currentView()->clearSelection(); 3416 mViewManager->currentView()->clearSelection();
3416 } 3417 }
3417 processIncidenceSelection( incidence ); 3418 processIncidenceSelection( incidence );
3418} 3419}
3419 3420
3420void CalendarView::processIncidenceSelection( Incidence *incidence ) 3421void CalendarView::processIncidenceSelection( Incidence *incidence )
3421{ 3422{
3422 if ( incidence == mSelectedIncidence ) return; 3423 if ( incidence == mSelectedIncidence ) return;
3423 3424
3424 mSelectedIncidence = incidence; 3425 mSelectedIncidence = incidence;
3425 3426
3426 emit incidenceSelected( mSelectedIncidence ); 3427 emit incidenceSelected( mSelectedIncidence );
3427 3428
3428 if ( incidence && incidence->type() == "Event" ) { 3429 if ( incidence && incidence->type() == "Event" ) {
3429 Event *event = static_cast<Event *>( incidence ); 3430 Event *event = static_cast<Event *>( incidence );
3430 if ( event->organizer() == KOPrefs::instance()->email() ) { 3431 if ( event->organizer() == KOPrefs::instance()->email() ) {
3431 emit organizerEventsSelected( true ); 3432 emit organizerEventsSelected( true );
3432 } else { 3433 } else {
3433 emit organizerEventsSelected(false); 3434 emit organizerEventsSelected(false);
3434 } 3435 }
3435 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, 3436 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
3436 KOPrefs::instance()->email() ) ) { 3437 KOPrefs::instance()->email() ) ) {
3437 emit groupEventsSelected( true ); 3438 emit groupEventsSelected( true );
3438 } else { 3439 } else {
3439 emit groupEventsSelected(false); 3440 emit groupEventsSelected(false);
3440 } 3441 }
3441 return; 3442 return;
3442 } else { 3443 } else {
3443 if ( incidence && incidence->type() == "Todo" ) { 3444 if ( incidence && incidence->type() == "Todo" ) {
3444 emit todoSelected( true ); 3445 emit todoSelected( true );
3445 Todo *event = static_cast<Todo *>( incidence ); 3446 Todo *event = static_cast<Todo *>( incidence );
3446 if ( event->organizer() == KOPrefs::instance()->email() ) { 3447 if ( event->organizer() == KOPrefs::instance()->email() ) {
3447 emit organizerEventsSelected( true ); 3448 emit organizerEventsSelected( true );
3448 } else { 3449 } else {
3449 emit organizerEventsSelected(false); 3450 emit organizerEventsSelected(false);
3450 } 3451 }
3451 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, 3452 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
3452 KOPrefs::instance()->email() ) ) { 3453 KOPrefs::instance()->email() ) ) {
3453 emit groupEventsSelected( true ); 3454 emit groupEventsSelected( true );
3454 } else { 3455 } else {
3455 emit groupEventsSelected(false); 3456 emit groupEventsSelected(false);
3456 } 3457 }
3457 return; 3458 return;
3458 } else { 3459 } else {
3459 emit todoSelected( false ); 3460 emit todoSelected( false );
3460 emit organizerEventsSelected(false); 3461 emit organizerEventsSelected(false);
3461 emit groupEventsSelected(false); 3462 emit groupEventsSelected(false);
3462 } 3463 }
3463 return; 3464 return;
3464 } 3465 }
3465 3466
3466 /* if ( incidence && incidence->type() == "Todo" ) { 3467 /* if ( incidence && incidence->type() == "Todo" ) {
3467 emit todoSelected( true ); 3468 emit todoSelected( true );
3468 } else { 3469 } else {
3469 emit todoSelected( false ); 3470 emit todoSelected( false );
3470 }*/ 3471 }*/
3471} 3472}
3472 3473
3473 3474
3474void CalendarView::checkClipboard() 3475void CalendarView::checkClipboard()
3475{ 3476{
3476#ifndef KORG_NODND 3477#ifndef KORG_NODND
3477 if (ICalDrag::canDecode(QApplication::clipboard()->data())) { 3478 if (ICalDrag::canDecode(QApplication::clipboard()->data())) {
3478 emit pasteEnabled(true); 3479 emit pasteEnabled(true);
3479 } else { 3480 } else {
3480 emit pasteEnabled(false); 3481 emit pasteEnabled(false);
3481 } 3482 }
3482#endif 3483#endif
3483} 3484}
3484 3485
3485void CalendarView::showDates(const DateList &selectedDates) 3486void CalendarView::showDates(const DateList &selectedDates)
3486{ 3487{
3487 // kdDebug() << "CalendarView::selectDates()" << endl; 3488 // kdDebug() << "CalendarView::selectDates()" << endl;
3488 3489
3489 3490
3490 if ( !mBlockShowDates ) { 3491 if ( !mBlockShowDates ) {
3491 if ( mViewManager->currentView() ) { 3492 if ( mViewManager->currentView() ) {
3492 updateView( selectedDates.first(), selectedDates.last() ); 3493 updateView( selectedDates.first(), selectedDates.last() );
3493 } else { 3494 } else {
3494 mViewManager->showAgendaView(); 3495 mViewManager->showAgendaView();
3495 } 3496 }
3496 } 3497 }
3497 3498
3498 QString selDates; 3499 QString selDates;
3499 selDates = KGlobal::locale()->formatDate( selectedDates.first(), true); 3500 selDates = KGlobal::locale()->formatDate( selectedDates.first(), true);
3500 if (selectedDates.first() < selectedDates.last() ) 3501 if (selectedDates.first() < selectedDates.last() )
3501 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); 3502 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true);
3502 else { 3503 else {
3503 QString addString; 3504 QString addString;
3504 if ( selectedDates.first() == QDateTime::currentDateTime().date() ) 3505 if ( selectedDates.first() == QDateTime::currentDateTime().date() )
3505 addString = i18n("Today"); 3506 addString = i18n("Today");
3506 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(1) ) 3507 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(1) )
3507 addString = i18n("Tomorrow"); 3508 addString = i18n("Tomorrow");
3508 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) 3509 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) )
3509 addString = i18n("Yesterday"); 3510 addString = i18n("Yesterday");
3510 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) 3511 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) )
3511 addString = i18n("Day before yesterday"); 3512 addString = i18n("Day before yesterday");
3512 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) 3513 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(2) )
3513 addString = i18n("Day after tomorrow"); 3514 addString = i18n("Day after tomorrow");
3514 if ( !addString.isEmpty() ) { 3515 if ( !addString.isEmpty() ) {
3515 topLevelWidget()->setCaption( addString+", " + selDates ); 3516 topLevelWidget()->setCaption( addString+", " + selDates );
3516 return; 3517 return;
3517 } 3518 }
3518 } 3519 }
3519 topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); 3520 topLevelWidget()->setCaption( i18n("Dates: ") + selDates );
3520 3521
3521} 3522}
3522 3523
3523QPtrList<CalFilter> CalendarView::filters() 3524QPtrList<CalFilter> CalendarView::filters()
3524{ 3525{
3525 return mFilters; 3526 return mFilters;
3526 3527
3527} 3528}
3528void CalendarView::editFilters() 3529void CalendarView::editFilters()
3529{ 3530{
3530 // kdDebug() << "CalendarView::editFilters()" << endl; 3531 // kdDebug() << "CalendarView::editFilters()" << endl;
3531 3532
3532 CalFilter *filter = mFilters.first(); 3533 CalFilter *filter = mFilters.first();
3533 while(filter) { 3534 while(filter) {
3534 kdDebug() << " Filter: " << filter->name() << endl; 3535 kdDebug() << " Filter: " << filter->name() << endl;
3535 filter = mFilters.next(); 3536 filter = mFilters.next();
3536 } 3537 }
3537 3538
3538 mDialogManager->showFilterEditDialog(&mFilters); 3539 mDialogManager->showFilterEditDialog(&mFilters);
3539} 3540}
3540void CalendarView::toggleFilter() 3541void CalendarView::toggleFilter()
3541{ 3542{
3542 showFilter(! mFilterView->isVisible()); 3543 showFilter(! mFilterView->isVisible());
3543} 3544}
3544 3545
3545KOFilterView *CalendarView::filterView() 3546KOFilterView *CalendarView::filterView()
3546{ 3547{
3547 return mFilterView; 3548 return mFilterView;
3548} 3549}
3549void CalendarView::selectFilter( int fil ) 3550void CalendarView::selectFilter( int fil )
3550{ 3551{
3551 mFilterView->setSelectedFilter( fil ); 3552 mFilterView->setSelectedFilter( fil );
3552} 3553}
3553void CalendarView::showFilter(bool visible) 3554void CalendarView::showFilter(bool visible)
3554{ 3555{
3555 if (visible) mFilterView->show(); 3556 if (visible) mFilterView->show();
3556 else mFilterView->hide(); 3557 else mFilterView->hide();
3557} 3558}
3558void CalendarView::toggleFilerEnabled( ) 3559void CalendarView::toggleFilerEnabled( )
3559{ 3560{
3560 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); 3561 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() );
3561 if ( !mFilterView->filtersEnabled() ) 3562 if ( !mFilterView->filtersEnabled() )
3562 topLevelWidget()->setCaption( i18n("Filter disabled ") ); 3563 topLevelWidget()->setCaption( i18n("Filter disabled ") );
3563 3564
3564} 3565}
3565void CalendarView::updateFilter() 3566void CalendarView::updateFilter()
3566{ 3567{
3567 CalFilter *filter = mFilterView->selectedFilter(); 3568 CalFilter *filter = mFilterView->selectedFilter();
3568 if (filter) { 3569 if (filter) {
3569 if (mFilterView->filtersEnabled()) { 3570 if (mFilterView->filtersEnabled()) {
3570 topLevelWidget()->setCaption( i18n("Filter selected: ")+filter->name() ); 3571 topLevelWidget()->setCaption( i18n("Filter selected: ")+filter->name() );
3571 filter->setEnabled(true); 3572 filter->setEnabled(true);
3572 } 3573 }
3573 else filter->setEnabled(false); 3574 else filter->setEnabled(false);
3574 mCalendar->setFilter(filter); 3575 mCalendar->setFilter(filter);
3575 updateView(); 3576 updateView();
3576 } 3577 }
3577} 3578}
3578 3579
3579void CalendarView::filterEdited() 3580void CalendarView::filterEdited()
3580{ 3581{
3581 mFilterView->updateFilters(); 3582 mFilterView->updateFilters();
3582 updateFilter(); 3583 updateFilter();
3583 writeSettings(); 3584 writeSettings();
3584} 3585}
3585 3586
3586 3587
3587void CalendarView::takeOverEvent() 3588void CalendarView::takeOverEvent()
3588{ 3589{
3589 Incidence *incidence = currentSelection(); 3590 Incidence *incidence = currentSelection();
3590 3591
3591 if (!incidence) return; 3592 if (!incidence) return;
3592 3593
3593 incidence->setOrganizer(KOPrefs::instance()->email()); 3594 incidence->setOrganizer(KOPrefs::instance()->email());
3594 incidence->recreate(); 3595 incidence->recreate();
3595 incidence->setReadOnly(false); 3596 incidence->setReadOnly(false);
3596 3597
3597 updateView(); 3598 updateView();
3598} 3599}
3599 3600
3600void CalendarView::takeOverCalendar() 3601void CalendarView::takeOverCalendar()
3601{ 3602{
3602 // TODO: Create Calendar::allIncidences() function and use it here 3603 // TODO: Create Calendar::allIncidences() function and use it here
3603 3604
3604 QPtrList<Event> events = mCalendar->events(); 3605 QPtrList<Event> events = mCalendar->events();
3605 for(uint i=0; i<events.count(); ++i) { 3606 for(uint i=0; i<events.count(); ++i) {
3606 events.at(i)->setOrganizer(KOPrefs::instance()->email()); 3607 events.at(i)->setOrganizer(KOPrefs::instance()->email());
3607 events.at(i)->recreate(); 3608 events.at(i)->recreate();
3608 events.at(i)->setReadOnly(false); 3609 events.at(i)->setReadOnly(false);
3609 } 3610 }
3610 3611
3611 QPtrList<Todo> todos = mCalendar->todos(); 3612 QPtrList<Todo> todos = mCalendar->todos();
3612 for(uint i=0; i<todos.count(); ++i) { 3613 for(uint i=0; i<todos.count(); ++i) {
3613 todos.at(i)->setOrganizer(KOPrefs::instance()->email()); 3614 todos.at(i)->setOrganizer(KOPrefs::instance()->email());
3614 todos.at(i)->recreate(); 3615 todos.at(i)->recreate();
3615 todos.at(i)->setReadOnly(false); 3616 todos.at(i)->setReadOnly(false);
3616 } 3617 }
3617 3618
3618 QPtrList<Journal> journals = mCalendar->journals(); 3619 QPtrList<Journal> journals = mCalendar->journals();
3619 for(uint i=0; i<journals.count(); ++i) { 3620 for(uint i=0; i<journals.count(); ++i) {
3620 journals.at(i)->setOrganizer(KOPrefs::instance()->email()); 3621 journals.at(i)->setOrganizer(KOPrefs::instance()->email());
3621 journals.at(i)->recreate(); 3622 journals.at(i)->recreate();
3622 journals.at(i)->setReadOnly(false); 3623 journals.at(i)->setReadOnly(false);
3623 } 3624 }
3624 3625
3625 updateView(); 3626 updateView();
3626} 3627}
3627 3628
3628void CalendarView::showIntro() 3629void CalendarView::showIntro()
3629{ 3630{
3630 kdDebug() << "To be implemented." << endl; 3631 kdDebug() << "To be implemented." << endl;
3631} 3632}
3632 3633
3633QWidgetStack *CalendarView::viewStack() 3634QWidgetStack *CalendarView::viewStack()
3634{ 3635{
3635 return mRightFrame; 3636 return mRightFrame;
3636} 3637}
3637 3638
3638QWidget *CalendarView::leftFrame() 3639QWidget *CalendarView::leftFrame()
3639{ 3640{
3640 return mLeftFrame; 3641 return mLeftFrame;
3641} 3642}
3642 3643
3643DateNavigator *CalendarView::dateNavigator() 3644DateNavigator *CalendarView::dateNavigator()
3644{ 3645{
3645 return mNavigator; 3646 return mNavigator;
3646} 3647}
3647 3648
3648KDateNavigator* CalendarView::dateNavigatorWidget() 3649KDateNavigator* CalendarView::dateNavigatorWidget()
3649{ 3650{
3650 return mDateNavigator; 3651 return mDateNavigator;
3651} 3652}
3652void CalendarView::toggleDateNavigatorWidget() 3653void CalendarView::toggleDateNavigatorWidget()
3653{ 3654{
3654 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; 3655 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ;
3655 if (!KOPrefs::instance()->mShowDateNavigator ) 3656 if (!KOPrefs::instance()->mShowDateNavigator )
3656 mDateNavigator->hide(); 3657 mDateNavigator->hide();
3657 else 3658 else
3658 mDateNavigator->show(); 3659 mDateNavigator->show();
3659} 3660}
3660void CalendarView::addView(KOrg::BaseView *view) 3661void CalendarView::addView(KOrg::BaseView *view)
3661{ 3662{
3662 mViewManager->addView(view); 3663 mViewManager->addView(view);
3663} 3664}
3664 3665
3665void CalendarView::showView(KOrg::BaseView *view) 3666void CalendarView::showView(KOrg::BaseView *view)
3666{ 3667{
3667 mViewManager->showView(view, mLeftFrame->isVisible()); 3668 mViewManager->showView(view, mLeftFrame->isVisible());
3668} 3669}
3669 3670
3670Incidence *CalendarView::currentSelection() 3671Incidence *CalendarView::currentSelection()
3671{ 3672{
3672 return mViewManager->currentSelection(); 3673 return mViewManager->currentSelection();
3673} 3674}
3674void CalendarView::toggleAllDaySize() 3675void CalendarView::toggleAllDaySize()
3675{ 3676{
3676 /* 3677 /*
3677 if ( KOPrefs::instance()->mAllDaySize > 47 ) 3678 if ( KOPrefs::instance()->mAllDaySize > 47 )
3678 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; 3679 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2;
3679 else 3680 else
3680 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; 3681 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2;
3681 */ 3682 */
3682 viewManager()->agendaView()->toggleAllDay(); 3683 viewManager()->agendaView()->toggleAllDay();
3683} 3684}
3684void CalendarView::toggleExpand() 3685void CalendarView::toggleExpand()
3685{ 3686{
3686 // if ( mLeftFrame->isHidden() ) { 3687 // if ( mLeftFrame->isHidden() ) {
3687 // mLeftFrame->show(); 3688 // mLeftFrame->show();
3688 // emit calendarViewExpanded( false ); 3689 // emit calendarViewExpanded( false );
3689 // } else { 3690 // } else {
3690 // mLeftFrame->hide(); 3691 // mLeftFrame->hide();
3691 // emit calendarViewExpanded( true ); 3692 // emit calendarViewExpanded( true );
3692 // } 3693 // }
3693 //qDebug(" CalendarView::toggleExpand()"); 3694 //qDebug(" CalendarView::toggleExpand()");
3694 globalFlagBlockAgenda = 1; 3695 globalFlagBlockAgenda = 1;
3695 emit calendarViewExpanded( !mLeftFrame->isHidden() ); 3696 emit calendarViewExpanded( !mLeftFrame->isHidden() );
3696 globalFlagBlockAgenda = 5; 3697 globalFlagBlockAgenda = 5;
3697 mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); 3698 mViewManager->raiseCurrentView( !mLeftFrame->isHidden() );
3698 //mViewManager->showView( 0, true ); 3699 //mViewManager->showView( 0, true );
3699} 3700}
3700 3701
3701void CalendarView::calendarModified( bool modified, Calendar * ) 3702void CalendarView::calendarModified( bool modified, Calendar * )
3702{ 3703{
3703 setModified( modified ); 3704 setModified( modified );
3704} 3705}
3705 3706
3706Todo *CalendarView::selectedTodo() 3707Todo *CalendarView::selectedTodo()
3707{ 3708{
3708 Incidence *incidence = currentSelection(); 3709 Incidence *incidence = currentSelection();
3709 if ( incidence && incidence->type() == "Todo" ) { 3710 if ( incidence && incidence->type() == "Todo" ) {
3710 return static_cast<Todo *>( incidence ); 3711 return static_cast<Todo *>( incidence );
3711 } 3712 }
3712 3713
3713 incidence = mTodoList->selectedIncidences().first(); 3714 incidence = mTodoList->selectedIncidences().first();
3714 if ( incidence && incidence->type() == "Todo" ) { 3715 if ( incidence && incidence->type() == "Todo" ) {
3715 return static_cast<Todo *>( incidence ); 3716 return static_cast<Todo *>( incidence );
3716 } 3717 }
3717 3718
3718 return 0; 3719 return 0;
3719} 3720}
3720 3721
3721void CalendarView::dialogClosing(Incidence *in) 3722void CalendarView::dialogClosing(Incidence *in)
3722{ 3723{
3723 // mDialogList.remove(in); 3724 // mDialogList.remove(in);
3724} 3725}
3725 3726
3726void CalendarView::showIncidence() 3727void CalendarView::showIncidence()
3727{ 3728{
3728 Incidence *incidence = currentSelection(); 3729 Incidence *incidence = currentSelection();
3729 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3730 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3730 if ( incidence ) { 3731 if ( incidence ) {
3731 ShowIncidenceVisitor v; 3732 ShowIncidenceVisitor v;
3732 v.act( incidence, this ); 3733 v.act( incidence, this );
3733 } 3734 }
3734} 3735}
3735void CalendarView::editIncidenceDescription() 3736void CalendarView::editIncidenceDescription()
3736{ 3737{
3737 mFlagEditDescription = true; 3738 mFlagEditDescription = true;
3738 editIncidence(); 3739 editIncidence();
3739 mFlagEditDescription = false; 3740 mFlagEditDescription = false;
3740} 3741}
3741void CalendarView::editIncidence() 3742void CalendarView::editIncidence()
3742{ 3743{
3743 // qDebug("editIncidence() "); 3744 // qDebug("editIncidence() ");
3744 Incidence *incidence = currentSelection(); 3745 Incidence *incidence = currentSelection();
3745 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3746 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3746 if ( incidence ) { 3747 if ( incidence ) {
3747 EditIncidenceVisitor v; 3748 EditIncidenceVisitor v;
3748 v.act( incidence, this ); 3749 v.act( incidence, this );
3749 } 3750 }
3750} 3751}
3751 3752
3752void CalendarView::deleteIncidence() 3753void CalendarView::deleteIncidence()
3753{ 3754{
3754 Incidence *incidence = currentSelection(); 3755 Incidence *incidence = currentSelection();
3755 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3756 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3756 if ( incidence ) { 3757 if ( incidence ) {
3757 deleteIncidence(incidence); 3758 deleteIncidence(incidence);
3758 } 3759 }
3759} 3760}
3760 3761
3761void CalendarView::showIncidence(Incidence *incidence) 3762void CalendarView::showIncidence(Incidence *incidence)
3762{ 3763{
3763 if ( incidence ) { 3764 if ( incidence ) {
3764 ShowIncidenceVisitor v; 3765 ShowIncidenceVisitor v;
3765 v.act( incidence, this ); 3766 v.act( incidence, this );
3766 } 3767 }
3767} 3768}
3768 3769
3769void CalendarView::editIncidence(Incidence *incidence) 3770void CalendarView::editIncidence(Incidence *incidence)
3770{ 3771{
3771 if ( incidence ) { 3772 if ( incidence ) {
3772 3773
3773 EditIncidenceVisitor v; 3774 EditIncidenceVisitor v;
3774 v.act( incidence, this ); 3775 v.act( incidence, this );
3775 3776
3776 } 3777 }
3777} 3778}
3778 3779
3779void CalendarView::deleteIncidence(Incidence *incidence) 3780void CalendarView::deleteIncidence(Incidence *incidence)
3780{ 3781{
3781 //qDebug(" CalendarView::deleteIncidence "); 3782 //qDebug(" CalendarView::deleteIncidence ");
3782 if ( incidence ) { 3783 if ( incidence ) {
3783 DeleteIncidenceVisitor v; 3784 DeleteIncidenceVisitor v;
3784 v.act( incidence, this ); 3785 v.act( incidence, this );
3785 } 3786 }
3786} 3787}
3787 3788
3788 3789
3789void CalendarView::lookForOutgoingMessages() 3790void CalendarView::lookForOutgoingMessages()
3790{ 3791{
3791 OutgoingDialog *ogd = mDialogManager->outgoingDialog(); 3792 OutgoingDialog *ogd = mDialogManager->outgoingDialog();
3792 ogd->loadMessages(); 3793 ogd->loadMessages();
3793} 3794}
3794 3795
3795void CalendarView::lookForIncomingMessages() 3796void CalendarView::lookForIncomingMessages()
3796{ 3797{
3797 IncomingDialog *icd = mDialogManager->incomingDialog(); 3798 IncomingDialog *icd = mDialogManager->incomingDialog();
3798 icd->retrieve(); 3799 icd->retrieve();
3799} 3800}
3800 3801
3801bool CalendarView::removeCompletedSubTodos( Todo* t ) 3802bool CalendarView::removeCompletedSubTodos( Todo* t )
3802{ 3803{
3803 bool deleteTodo = true; 3804 bool deleteTodo = true;
3804 QPtrList<Incidence> subTodos; 3805 QPtrList<Incidence> subTodos;
3805 Incidence *aTodo; 3806 Incidence *aTodo;
3806 subTodos = t->relations(); 3807 subTodos = t->relations();
3807 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { 3808 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) {
3808 if (! removeCompletedSubTodos( (Todo*) aTodo )) 3809 if (! removeCompletedSubTodos( (Todo*) aTodo ))
3809 deleteTodo = false; 3810 deleteTodo = false;
3810 } 3811 }
3811 if ( deleteTodo ) { 3812 if ( deleteTodo ) {
3812 if ( t->isCompleted() ) { 3813 if ( t->isCompleted() ) {
3813 checkExternalId( t ); 3814 checkExternalId( t );
3814 mCalendar->deleteTodo( t ); 3815 mCalendar->deleteTodo( t );
3815 changeTodoDisplay( t,KOGlobals::EVENTDELETED ); 3816 changeTodoDisplay( t,KOGlobals::EVENTDELETED );
3816 } 3817 }
3817 else 3818 else
3818 deleteTodo = false; 3819 deleteTodo = false;
3819 } 3820 }
3820 return deleteTodo; 3821 return deleteTodo;
3821 3822
3822} 3823}
3823void CalendarView::purgeCompleted() 3824void CalendarView::purgeCompleted()
3824{ 3825{
3825 int result = KMessageBox::warningContinueCancel(this, 3826 int result = KMessageBox::warningContinueCancel(this,
3826 i18n("Delete all\ncompleted To-Dos?"),i18n("Purge To-Dos"),i18n("Purge")); 3827 i18n("Delete all\ncompleted To-Dos?"),i18n("Purge To-Dos"),i18n("Purge"));
3827 3828
3828 if (result == KMessageBox::Continue) { 3829 if (result == KMessageBox::Continue) {
3829 3830
3830 QPtrList<Todo> todoCal; 3831 QPtrList<Todo> todoCal;
3831 QPtrList<Todo> rootTodos; 3832 QPtrList<Todo> rootTodos;
3832 //QPtrList<Incidence> rel; 3833 //QPtrList<Incidence> rel;
3833 Todo *aTodo;//, *rTodo; 3834 Todo *aTodo;//, *rTodo;
3834 Incidence *rIncidence; 3835 Incidence *rIncidence;
3835 bool childDelete = false; 3836 bool childDelete = false;
3836 bool deletedOne = true; 3837 bool deletedOne = true;
3837 todoCal = calendar()->todos(); 3838 todoCal = calendar()->todos();
3838 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { 3839 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) {
3839 if ( !aTodo->relatedTo() ) 3840 if ( !aTodo->relatedTo() )
3840 rootTodos.append( aTodo ); 3841 rootTodos.append( aTodo );
3841 } 3842 }
3842 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { 3843 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) {
3843 removeCompletedSubTodos( aTodo ); 3844 removeCompletedSubTodos( aTodo );
3844 } 3845 }
3845 3846
3846 updateView(); 3847 updateView();
3847 } 3848 }
3848} 3849}
3849 3850
3850void CalendarView::slotCalendarChanged() 3851void CalendarView::slotCalendarChanged()
3851{ 3852{
3852 ; 3853 ;
3853} 3854}
3854 3855
3855void CalendarView::keyPressEvent ( QKeyEvent *e) 3856void CalendarView::keyPressEvent ( QKeyEvent *e)
3856{ 3857{
3857 //qDebug(" alendarView::keyPressEvent "); 3858 //qDebug(" alendarView::keyPressEvent ");
3858 e->ignore(); 3859 e->ignore();
3859} 3860}
3860 3861
3861 3862
3862bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) 3863bool CalendarView::sync(KSyncManager* manager, QString filename, int mode)
3863{ 3864{
3864 // mSyncManager = manager; 3865 // mSyncManager = manager;
3865 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { 3866 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) {
3866 qDebug("KO: SyncKDE request detected!"); 3867 qDebug("KO: SyncKDE request detected!");
3867 } 3868 }
3868 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 3869 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
3869 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 3870 mCurrentSyncName = mSyncManager->getCurrentSyncName();
3870 return syncCalendar( filename, mode ); 3871 return syncCalendar( filename, mode );
3871} 3872}
3872bool CalendarView::syncExternal(KSyncManager* manager, QString resource) 3873bool CalendarView::syncExternal(KSyncManager* manager, QString resource)
3873{ 3874{
3874 //mSyncManager = manager; 3875 //mSyncManager = manager;
3875 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 3876 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
3876 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 3877 mCurrentSyncName = mSyncManager->getCurrentSyncName();
3877 if ( resource == "sharp" ) 3878 if ( resource == "sharp" )
3878 syncExternal( 0 ); 3879 syncExternal( 0 );
3879 if ( resource == "phone" ) 3880 if ( resource == "phone" )
3880 syncExternal( 1 ); 3881 syncExternal( 1 );
3881 // pending setmodified 3882 // pending setmodified
3882 return true; 3883 return true;
3883} 3884}
3884void CalendarView::setSyncManager(KSyncManager* manager) 3885void CalendarView::setSyncManager(KSyncManager* manager)
3885{ 3886{
3886 mSyncManager = manager; 3887 mSyncManager = manager;
3887} 3888}
3888 3889
3889void CalendarView::removeSyncInfo( QString syncProfile) 3890void CalendarView::removeSyncInfo( QString syncProfile)
3890{ 3891{
3891 qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); 3892 qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1());
3892 mCalendar->removeSyncInfo( syncProfile ); 3893 mCalendar->removeSyncInfo( syncProfile );
3893 3894
3894} 3895}
3895 3896
3896void CalendarView::undo_delete() 3897void CalendarView::undo_delete()
3897{ 3898{
3898 //qDebug("undo_delete() "); 3899 //qDebug("undo_delete() ");
3899 Incidence* undo = mCalendar->undoIncidence(); 3900 Incidence* undo = mCalendar->undoIncidence();
3900 if ( !undo ) { 3901 if ( !undo ) {
3901 KMessageBox::sorry(this,i18n("There is nothing to undo!"), 3902 KMessageBox::sorry(this,i18n("There is nothing to undo!"),
3902 i18n("KO/Pi")); 3903 i18n("KO/Pi"));
3903 return; 3904 return;
3904 } 3905 }
3905 if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,undo->summary().left(25) + 3906 if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,undo->summary().left(25) +
3906 i18n("\nAre you sure you want\nto restore this?"), 3907 i18n("\nAre you sure you want\nto restore this?"),
3907 i18n("KO/Pi Confirmation"),i18n("Restore"))) { 3908 i18n("KO/Pi Confirmation"),i18n("Restore"))) {
3908 mCalendar->undoDeleteIncidence(); 3909 mCalendar->undoDeleteIncidence();
3909 updateView(); 3910 updateView();
3910 } 3911 }
3911} 3912}
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index c8d0e0d..02e5587 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -1,1503 +1,1504 @@
1/* 1/*
2 This file is part of KDE-Pim/Pi. 2 This file is part of KDE-Pim/Pi.
3 Copyright (c) 2004 Ulf Schenk 3 Copyright (c) 2004 Ulf Schenk
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21// $Id$ 21// $Id$
22 22
23#include "ksyncmanager.h" 23#include "ksyncmanager.h"
24 24
25#include <stdlib.h> 25#include <stdlib.h>
26 26
27#ifndef _WIN32_ 27#ifndef _WIN32_
28#include <unistd.h> 28#include <unistd.h>
29#endif 29#endif
30 30
31 31
32#include "ksyncprofile.h" 32#include "ksyncprofile.h"
33#include "ksyncprefsdialog.h" 33#include "ksyncprefsdialog.h"
34#include "kpimprefs.h" 34#include "kpimprefs.h"
35#include <kmessagebox.h> 35#include <kmessagebox.h>
36 36
37#include <qdir.h> 37#include <qdir.h>
38#include <qprogressbar.h> 38#include <qprogressbar.h>
39#include <qpopupmenu.h> 39#include <qpopupmenu.h>
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qradiobutton.h> 41#include <qradiobutton.h>
42#include <qbuttongroup.h> 42#include <qbuttongroup.h>
43#include <qtimer.h> 43#include <qtimer.h>
44#include <qmessagebox.h> 44#include <qmessagebox.h>
45#include <qapplication.h> 45#include <qapplication.h>
46#include <qlineedit.h> 46#include <qlineedit.h>
47#include <qdialog.h> 47#include <qdialog.h>
48#include <qlayout.h> 48#include <qlayout.h>
49#include <qtextcodec.h> 49#include <qtextcodec.h>
50#include <qlabel.h> 50#include <qlabel.h>
51#include <qcheckbox.h> 51#include <qcheckbox.h>
52 52
53#include <klocale.h> 53#include <klocale.h>
54#include <kglobal.h> 54#include <kglobal.h>
55#include <kconfig.h> 55#include <kconfig.h>
56#include <kfiledialog.h> 56#include <kfiledialog.h>
57 57
58QDateTime KSyncManager::mRequestedSyncEvent; 58QDateTime KSyncManager::mRequestedSyncEvent;
59 59
60 60
61KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) 61KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu)
62 : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu) 62 : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu)
63{ 63{
64 mServerSocket = 0; 64 mServerSocket = 0;
65 bar = new QProgressBar ( 1, 0 ); 65 bar = new QProgressBar ( 1, 0 );
66 bar->setCaption (""); 66 bar->setCaption ("");
67 mWriteBackInPast = 2; 67 mWriteBackInPast = 2;
68 int w = 300; 68 int w = 300;
69 if ( QApplication::desktop()->width() < 320 ) 69 if ( QApplication::desktop()->width() < 320 )
70 w = 220; 70 w = 220;
71 int h = bar->sizeHint().height() ; 71 int h = bar->sizeHint().height() ;
72 int dw = QApplication::desktop()->width(); 72 int dw = QApplication::desktop()->width();
73 int dh = QApplication::desktop()->height(); 73 int dh = QApplication::desktop()->height();
74 bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 74 bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
75 75
76} 76}
77 77
78KSyncManager::~KSyncManager() 78KSyncManager::~KSyncManager()
79{ 79{
80 delete bar; 80 delete bar;
81} 81}
82 82
83void KSyncManager::setDefaultFileName( QString s) 83void KSyncManager::setDefaultFileName( QString s)
84{ 84{
85 mDefFileName = s ; 85 mDefFileName = s ;
86 if ( mPrefs->mPassiveSyncAutoStart ) 86 if ( mPrefs->mPassiveSyncAutoStart )
87 enableQuick( false ); 87 enableQuick( false );
88} 88}
89 89
90void KSyncManager::fillSyncMenu() 90void KSyncManager::fillSyncMenu()
91{ 91{
92 if ( mSyncMenu->count() ) 92 if ( mSyncMenu->count() )
93 mSyncMenu->clear(); 93 mSyncMenu->clear();
94 94
95 mSyncMenu->insertItem( i18n("Configure..."), 0 ); 95 mSyncMenu->insertItem( i18n("Configure..."), 0 );
96 mSyncMenu->insertSeparator(); 96 mSyncMenu->insertSeparator();
97 QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu ); 97 QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu );
98 mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 ); 98 mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 );
99 clearMenu->insertItem( i18n("For all profiles"), 1 ); 99 clearMenu->insertItem( i18n("For all profiles"), 1 );
100 clearMenu->insertSeparator(); 100 clearMenu->insertSeparator();
101 connect ( clearMenu, SIGNAL( activated ( int ) ), this, SLOT (slotClearMenu( int ) ) ); 101 connect ( clearMenu, SIGNAL( activated ( int ) ), this, SLOT (slotClearMenu( int ) ) );
102 mSyncMenu->insertSeparator(); 102 mSyncMenu->insertSeparator();
103 if ( mServerSocket == 0 ) { 103 if ( mServerSocket == 0 ) {
104 mSyncMenu->insertItem( i18n("Enable Pi-Sync"), 2 ); 104 mSyncMenu->insertItem( i18n("Enable Pi-Sync"), 2 );
105 } else { 105 } else {
106 mSyncMenu->insertItem( i18n("Disable Pi-Sync"), 3 ); 106 mSyncMenu->insertItem( i18n("Disable Pi-Sync"), 3 );
107 } 107 }
108 mSyncMenu->insertSeparator(); 108 mSyncMenu->insertSeparator();
109 mSyncMenu->insertItem( i18n("Multiple sync"), 1 ); 109 mSyncMenu->insertItem( i18n("Multiple sync"), 1 );
110 mSyncMenu->insertSeparator(); 110 mSyncMenu->insertSeparator();
111 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 111 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
112 config.setGroup("General"); 112 config.setGroup("General");
113 QStringList prof = config.readListEntry("SyncProfileNames"); 113 QStringList prof = config.readListEntry("SyncProfileNames");
114 mLocalMachineName = config.readEntry("LocalMachineName","undefined"); 114 mLocalMachineName = config.readEntry("LocalMachineName","undefined");
115 if ( prof.count() < 2 ) { 115 if ( prof.count() < 2 ) {
116 prof.clear(); 116 prof.clear();
117 QString externalName; 117 QString externalName;
118#ifdef DESKTOP_VERSION 118#ifdef DESKTOP_VERSION
119#ifdef _WIN32_ 119#ifdef _WIN32_
120 externalName = "OutLook(not_implemented)"; 120 externalName = "OutLook(not_implemented)";
121#else 121#else
122 externalName = "KDE_Desktop"; 122 externalName = "KDE_Desktop";
123#endif 123#endif
124#else 124#else
125 externalName = "Sharp_DTM"; 125 externalName = "Sharp_DTM";
126#endif 126#endif
127 prof << externalName; 127 prof << externalName;
128 prof << i18n("Local_file"); 128 prof << i18n("Local_file");
129 prof << i18n("Last_file"); 129 prof << i18n("Last_file");
130 KSyncProfile* temp = new KSyncProfile (); 130 KSyncProfile* temp = new KSyncProfile ();
131 temp->setName( prof[0] ); 131 temp->setName( prof[0] );
132 temp->writeConfig(&config); 132 temp->writeConfig(&config);
133 temp->setName( prof[1] ); 133 temp->setName( prof[1] );
134 temp->writeConfig(&config); 134 temp->writeConfig(&config);
135 temp->setName( prof[2] ); 135 temp->setName( prof[2] );
136 temp->writeConfig(&config); 136 temp->writeConfig(&config);
137 config.setGroup("General"); 137 config.setGroup("General");
138 config.writeEntry("SyncProfileNames",prof); 138 config.writeEntry("SyncProfileNames",prof);
139 config.writeEntry("ExternSyncProfiles",externalName); 139 config.writeEntry("ExternSyncProfiles",externalName);
140 config.sync(); 140 config.sync();
141 delete temp; 141 delete temp;
142 } 142 }
143 mExternSyncProfiles = config.readListEntry("ExternSyncProfiles"); 143 mExternSyncProfiles = config.readListEntry("ExternSyncProfiles");
144 mSyncProfileNames = prof; 144 mSyncProfileNames = prof;
145 unsigned int i; 145 unsigned int i;
146 for ( i = 0; i < prof.count(); ++i ) { 146 for ( i = 0; i < prof.count(); ++i ) {
147 mSyncMenu->insertItem( prof[i], 1000+i ); 147 mSyncMenu->insertItem( prof[i], 1000+i );
148 clearMenu->insertItem( prof[i], 1000+i ); 148 clearMenu->insertItem( prof[i], 1000+i );
149 if ( i == 2 ) 149 if ( i == 2 )
150 mSyncMenu->insertSeparator(); 150 mSyncMenu->insertSeparator();
151 } 151 }
152 QDir app_dir; 152 QDir app_dir;
153 //US do not display SharpDTM if app is pwmpi, or no sharpfiles available 153 //US do not display SharpDTM if app is pwmpi, or no sharpfiles available
154 if ( mTargetApp == PWMPI) { 154 if ( mTargetApp == PWMPI) {
155 mSyncMenu->removeItem( 1000 ); 155 mSyncMenu->removeItem( 1000 );
156 clearMenu->removeItem( 1000 ); 156 clearMenu->removeItem( 1000 );
157 } 157 }
158#ifndef DESKTOP_VERSION 158#ifndef DESKTOP_VERSION
159 else if (!app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { 159 else if (!app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) {
160 mSyncMenu->removeItem( 1000 ); 160 mSyncMenu->removeItem( 1000 );
161 clearMenu->removeItem( 1000 ); 161 clearMenu->removeItem( 1000 );
162 } 162 }
163#endif 163#endif
164 mSyncMenu->removeItem( 1002 ); 164 mSyncMenu->removeItem( 1002 );
165 clearMenu->removeItem( 1002 ); 165 clearMenu->removeItem( 1002 );
166} 166}
167void KSyncManager::slotClearMenu( int action ) 167void KSyncManager::slotClearMenu( int action )
168{ 168{
169 QString syncDevice; 169 QString syncDevice;
170 if ( action > 999 ) { 170 if ( action > 999 ) {
171 syncDevice = mSyncProfileNames[action - 1000] ; 171 syncDevice = mSyncProfileNames[action - 1000] ;
172 } 172 }
173 173
174 174
175 175
176 int result = 0; 176 int result = 0;
177 QString sd; 177 QString sd;
178 if ( syncDevice.isEmpty() ) 178 if ( syncDevice.isEmpty() )
179 sd = i18n("Do you want to\nclear all sync info\nof all profiles?"); 179 sd = i18n("Do you want to\nclear all sync info\nof all profiles?");
180 else 180 else
181 sd = i18n("Do you want to\nclear the sync\ninfo of profile\n%1?\n"). arg( syncDevice ); 181 sd = i18n("Do you want to\nclear the sync\ninfo of profile\n%1?\n"). arg( syncDevice );
182 182
183 result = QMessageBox::warning( mParent, i18n("Warning!"),sd,i18n("OK"), i18n("Cancel"), 0, 183 result = QMessageBox::warning( mParent, i18n("Warning!"),sd,i18n("OK"), i18n("Cancel"), 0,
184 0, 1 ); 184 0, 1 );
185 if ( result ) 185 if ( result )
186 return; 186 return;
187 mImplementation->removeSyncInfo( syncDevice ); 187 mImplementation->removeSyncInfo( syncDevice );
188} 188}
189void KSyncManager::slotSyncMenu( int action ) 189void KSyncManager::slotSyncMenu( int action )
190{ 190{
191 qDebug("KSM::syncaction %d ", action); 191 qDebug("KSM::syncaction %d ", action);
192 if ( action == 5000 ) 192 if ( action == 5000 )
193 return; 193 return;
194 mSyncWithDesktop = false; 194 mSyncWithDesktop = false;
195 if ( action == 0 ) { 195 if ( action == 0 ) {
196 196
197 // seems to be a Qt2 event handling bug 197 // seems to be a Qt2 event handling bug
198 // syncmenu.clear causes a segfault at first time 198 // syncmenu.clear causes a segfault at first time
199 // when we call it after the main event loop, it is ok 199 // when we call it after the main event loop, it is ok
200 // same behaviour when calling OM/Pi via QCOP for the first time 200 // same behaviour when calling OM/Pi via QCOP for the first time
201 QTimer::singleShot ( 1, this, SLOT ( confSync() ) ); 201 QTimer::singleShot ( 1, this, SLOT ( confSync() ) );
202 //confSync(); 202 //confSync();
203 203
204 return; 204 return;
205 } 205 }
206 if ( action == 1 ) { 206 if ( action == 1 ) {
207 multiSync( true ); 207 multiSync( true );
208 return; 208 return;
209 } 209 }
210 if ( action == 2 ) { 210 if ( action == 2 ) {
211 enableQuick(); 211 enableQuick();
212 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); 212 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
213 return; 213 return;
214 } 214 }
215 if ( action == 3 ) { 215 if ( action == 3 ) {
216 delete mServerSocket; 216 delete mServerSocket;
217 mServerSocket = 0; 217 mServerSocket = 0;
218 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); 218 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
219 return; 219 return;
220 } 220 }
221 221
222 if (blockSave()) 222 if (blockSave())
223 return; 223 return;
224 224
225 setBlockSave(true); 225 setBlockSave(true);
226 bool silent = false; 226 bool silent = false;
227 if ( action == 999 ) { 227 if ( action == 999 ) {
228 //special mode for silent syncing 228 //special mode for silent syncing
229 action = 1000; 229 action = 1000;
230 silent = true; 230 silent = true;
231 } 231 }
232 232
233 mCurrentSyncProfile = action - 1000 ; 233 mCurrentSyncProfile = action - 1000 ;
234 mCurrentSyncDevice = mSyncProfileNames[mCurrentSyncProfile] ; 234 mCurrentSyncDevice = mSyncProfileNames[mCurrentSyncProfile] ;
235 mCurrentSyncName = mLocalMachineName ; 235 mCurrentSyncName = mLocalMachineName ;
236 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 236 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
237 KSyncProfile* temp = new KSyncProfile (); 237 KSyncProfile* temp = new KSyncProfile ();
238 temp->setName(mSyncProfileNames[mCurrentSyncProfile]); 238 temp->setName(mSyncProfileNames[mCurrentSyncProfile]);
239 temp->readConfig(&config); 239 temp->readConfig(&config);
240 if (silent) { 240 if (silent) {
241 mAskForPreferences = false; 241 mAskForPreferences = false;
242 mShowSyncSummary = false; 242 mShowSyncSummary = false;
243 mWriteBackFile = true; 243 mWriteBackFile = true;
244 mSyncAlgoPrefs = 2;// take newest 244 mSyncAlgoPrefs = 2;// take newest
245 } 245 }
246 else { 246 else {
247 mAskForPreferences = temp->getAskForPreferences(); 247 mAskForPreferences = temp->getAskForPreferences();
248 mShowSyncSummary = temp->getShowSummaryAfterSync(); 248 mShowSyncSummary = temp->getShowSummaryAfterSync();
249 mWriteBackFile = temp->getWriteBackFile(); 249 mWriteBackFile = temp->getWriteBackFile();
250 mSyncAlgoPrefs = temp->getSyncPrefs(); 250 mSyncAlgoPrefs = temp->getSyncPrefs();
251 } 251 }
252 mWriteBackExistingOnly = temp->getWriteBackExisting(); 252 mWriteBackExistingOnly = temp->getWriteBackExisting();
253 mIsKapiFile = temp->getIsKapiFile(); 253 mIsKapiFile = temp->getIsKapiFile();
254 mWriteBackInFuture = 0; 254 mWriteBackInFuture = 0;
255 if ( temp->getWriteBackFuture() ) { 255 if ( temp->getWriteBackFuture() ) {
256 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 256 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
257 mWriteBackInPast = temp->getWriteBackPastWeeks( ); 257 mWriteBackInPast = temp->getWriteBackPastWeeks( );
258 } 258 }
259 mFilterInCal = temp->getFilterInCal(); 259 mFilterInCal = temp->getFilterInCal();
260 mFilterOutCal = temp->getFilterOutCal(); 260 mFilterOutCal = temp->getFilterOutCal();
261 mFilterInAB = temp->getFilterInAB(); 261 mFilterInAB = temp->getFilterInAB();
262 mFilterOutAB = temp->getFilterOutAB(); 262 mFilterOutAB = temp->getFilterOutAB();
263 263
264 if ( action == 1000 ) { 264 if ( action == 1000 ) {
265 mIsKapiFile = false; 265 mIsKapiFile = false;
266#ifdef DESKTOP_VERSION 266#ifdef DESKTOP_VERSION
267 syncKDE(); 267 syncKDE();
268#else 268#else
269 syncSharp(); 269 syncSharp();
270#endif 270#endif
271 271
272 } else if ( action == 1001 ) { 272 } else if ( action == 1001 ) {
273 syncLocalFile(); 273 syncLocalFile();
274 274
275 } else if ( action == 1002 ) { 275 } else if ( action == 1002 ) {
276 mWriteBackFile = false; 276 mWriteBackFile = false;
277 mAskForPreferences = false; 277 mAskForPreferences = false;
278 mShowSyncSummary = false; 278 mShowSyncSummary = false;
279 mSyncAlgoPrefs = 3; 279 mSyncAlgoPrefs = 3;
280 quickSyncLocalFile(); 280 quickSyncLocalFile();
281 281
282 } else if ( action >= 1003 ) { 282 } else if ( action >= 1003 ) {
283 if ( temp->getIsLocalFileSync() ) { 283 if ( temp->getIsLocalFileSync() ) {
284 switch(mTargetApp) 284 switch(mTargetApp)
285 { 285 {
286 case (KAPI): 286 case (KAPI):
287 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) 287 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
288 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); 288 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
289 break; 289 break;
290 case (KOPI): 290 case (KOPI):
291 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 291 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
292 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); 292 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
293 break; 293 break;
294 case (PWMPI): 294 case (PWMPI):
295 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) 295 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
296 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); 296 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM();
297 break; 297 break;
298 default: 298 default:
299 qDebug("KSM::slotSyncMenu: invalid apptype selected"); 299 qDebug("KSM::slotSyncMenu: invalid apptype selected");
300 break; 300 break;
301 301
302 } 302 }
303 } else { 303 } else {
304 if ( temp->getIsPhoneSync() ) { 304 if ( temp->getIsPhoneSync() ) {
305 mPhoneDevice = temp->getPhoneDevice( ) ; 305 mPhoneDevice = temp->getPhoneDevice( ) ;
306 mPhoneConnection = temp->getPhoneConnection( ); 306 mPhoneConnection = temp->getPhoneConnection( );
307 mPhoneModel = temp->getPhoneModel( ); 307 mPhoneModel = temp->getPhoneModel( );
308 syncPhone(); 308 syncPhone();
309 } else if ( temp->getIsPiSync() ) { 309 } else if ( temp->getIsPiSync() ) {
310 if ( mTargetApp == KAPI ) { 310 if ( mTargetApp == KAPI ) {
311 mPassWordPiSync = temp->getRemotePwAB(); 311 mPassWordPiSync = temp->getRemotePwAB();
312 mActiveSyncPort = temp->getRemotePortAB(); 312 mActiveSyncPort = temp->getRemotePortAB();
313 mActiveSyncIP = temp->getRemoteIPAB(); 313 mActiveSyncIP = temp->getRemoteIPAB();
314 } else if ( mTargetApp == KOPI ) { 314 } else if ( mTargetApp == KOPI ) {
315 mPassWordPiSync = temp->getRemotePw(); 315 mPassWordPiSync = temp->getRemotePw();
316 mActiveSyncPort = temp->getRemotePort(); 316 mActiveSyncPort = temp->getRemotePort();
317 mActiveSyncIP = temp->getRemoteIP(); 317 mActiveSyncIP = temp->getRemoteIP();
318 } else { 318 } else {
319 mPassWordPiSync = temp->getRemotePwPWM(); 319 mPassWordPiSync = temp->getRemotePwPWM();
320 mActiveSyncPort = temp->getRemotePortPWM(); 320 mActiveSyncPort = temp->getRemotePortPWM();
321 mActiveSyncIP = temp->getRemoteIPPWM(); 321 mActiveSyncIP = temp->getRemoteIPPWM();
322 } 322 }
323 syncPi(); 323 syncPi();
324 while ( !mPisyncFinished ) { 324 while ( !mPisyncFinished ) {
325 //qDebug("waiting "); 325 //qDebug("waiting ");
326 qApp->processEvents(); 326 qApp->processEvents();
327 } 327 }
328 } else 328 } else
329 syncRemote( temp ); 329 syncRemote( temp );
330 330
331 } 331 }
332 } 332 }
333 delete temp; 333 delete temp;
334 setBlockSave(false); 334 setBlockSave(false);
335} 335}
336 336
337void KSyncManager::enableQuick( bool ask ) 337void KSyncManager::enableQuick( bool ask )
338{ 338{
339 bool autoStart; 339 bool autoStart;
340 bool changed = false; 340 bool changed = false;
341 if ( ask ) { 341 if ( ask ) {
342 QDialog dia ( 0, "input-dialog", true ); 342 QDialog dia ( 0, "input-dialog", true );
343 QLineEdit lab ( &dia ); 343 QLineEdit lab ( &dia );
344 QVBoxLayout lay( &dia ); 344 QVBoxLayout lay( &dia );
345 lab.setText( mPrefs->mPassiveSyncPort ); 345 lab.setText( mPrefs->mPassiveSyncPort );
346 lay.setMargin(7); 346 lay.setMargin(7);
347 lay.setSpacing(7); 347 lay.setSpacing(7);
348 int po = 9197+mTargetApp; 348 int po = 9197+mTargetApp;
349 QLabel label ( i18n("Port number (Default: %1)").arg(po), &dia ); 349 QLabel label ( i18n("Port number (Default: %1)").arg(po), &dia );
350 lay.addWidget( &label); 350 lay.addWidget( &label);
351 lay.addWidget( &lab); 351 lay.addWidget( &lab);
352 352
353 QLineEdit lepw ( &dia ); 353 QLineEdit lepw ( &dia );
354 lepw.setText( mPrefs->mPassiveSyncPw ); 354 lepw.setText( mPrefs->mPassiveSyncPw );
355 QLabel label2 ( i18n("Password to enable\naccess from remote:"), &dia ); 355 QLabel label2 ( i18n("Password to enable\naccess from remote:"), &dia );
356 lay.addWidget( &label2); 356 lay.addWidget( &label2);
357 lay.addWidget( &lepw); 357 lay.addWidget( &lepw);
358 QCheckBox autostart(i18n("Automatically start\nat application startup"), &dia ); 358 QCheckBox autostart(i18n("Automatically start\nat application startup"), &dia );
359 lay.addWidget( &autostart); 359 lay.addWidget( &autostart);
360 autostart.setChecked( mPrefs->mPassiveSyncAutoStart ); 360 autostart.setChecked( mPrefs->mPassiveSyncAutoStart );
361#ifdef DESKTOP_VERSION 361#ifdef DESKTOP_VERSION
362#ifdef _WIN32_ 362#ifdef _WIN32_
363 QCheckBox syncdesktop( i18n("Automatically sync with Outlook\nwhen receiving sync request"),&dia ); 363 QCheckBox syncdesktop( i18n("Automatically sync with Outlook\nwhen receiving sync request"),&dia );
364 syncdesktop.hide();// not implemented! 364 syncdesktop.hide();// not implemented!
365#else 365#else
366 QCheckBox syncdesktop( i18n("Automatically sync with KDE-Desktop\nwhen receiving sync request"),&dia ); 366 QCheckBox syncdesktop( i18n("Automatically sync with KDE-Desktop\nwhen receiving sync request"),&dia );
367#endif 367#endif
368 lay.addWidget( &syncdesktop); 368 lay.addWidget( &syncdesktop);
369#else 369#else
370 mPrefs->mPassiveSyncWithDesktop = false; 370 mPrefs->mPassiveSyncWithDesktop = false;
371 QCheckBox syncdesktop( i18n("Automatically sync\nwith KDE-Desktop"),&dia ); 371 QCheckBox syncdesktop( i18n("Automatically sync\nwith KDE-Desktop"),&dia );
372 syncdesktop.hide(); 372 syncdesktop.hide();
373#endif 373#endif
374 syncdesktop.setChecked( mPrefs->mPassiveSyncWithDesktop ); 374 syncdesktop.setChecked( mPrefs->mPassiveSyncWithDesktop );
375 375
376 QPushButton pb ( "OK", &dia); 376 QPushButton pb ( "OK", &dia);
377 lay.addWidget( &pb ); 377 lay.addWidget( &pb );
378 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); 378 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
379 dia.resize( 230,120 ); 379 dia.resize( 230,120 );
380 dia.setCaption( i18n("Enter port for Pi-Sync") ); 380 dia.setCaption( i18n("Enter port for Pi-Sync") );
381 dia.show(); 381 dia.show();
382#ifndef DESKTOP_VERSION 382#ifndef DESKTOP_VERSION
383 int dw = QApplication::desktop()->width(); 383 int dw = QApplication::desktop()->width();
384 int dh = QApplication::desktop()->height(); 384 int dh = QApplication::desktop()->height();
385 dia.move( (dw-dia.width())/2, (dh - dia.height() )/2 ); 385 dia.move( (dw-dia.width())/2, (dh - dia.height() )/2 );
386#endif 386#endif
387 if ( ! dia.exec() ) 387 if ( ! dia.exec() )
388 return; 388 return;
389 dia.hide(); 389 dia.hide();
390 qApp->processEvents(); 390 qApp->processEvents();
391 if ( mPrefs->mPassiveSyncPw != lepw.text() ) { 391 if ( mPrefs->mPassiveSyncPw != lepw.text() ) {
392 changed = true; 392 changed = true;
393 mPrefs->mPassiveSyncPw = lepw.text(); 393 mPrefs->mPassiveSyncPw = lepw.text();
394 } 394 }
395 if ( mPrefs->mPassiveSyncPort != lab.text() ) { 395 if ( mPrefs->mPassiveSyncPort != lab.text() ) {
396 mPrefs->mPassiveSyncPort = lab.text(); 396 mPrefs->mPassiveSyncPort = lab.text();
397 changed = true; 397 changed = true;
398 } 398 }
399 autoStart = autostart.isChecked(); 399 autoStart = autostart.isChecked();
400 if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) { 400 if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) {
401 changed = true; 401 changed = true;
402 mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked(); 402 mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked();
403 } 403 }
404 } 404 }
405 else 405 else
406 autoStart = mPrefs->mPassiveSyncAutoStart; 406 autoStart = mPrefs->mPassiveSyncAutoStart;
407 if ( autoStart != mPrefs->mPassiveSyncAutoStart ) 407 if ( autoStart != mPrefs->mPassiveSyncAutoStart )
408 changed = true; 408 changed = true;
409 bool ok; 409 bool ok;
410 mPrefs->mPassiveSyncAutoStart = false; 410 mPrefs->mPassiveSyncAutoStart = false;
411 Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok); 411 Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok);
412 if ( ! ok ) { 412 if ( ! ok ) {
413 KMessageBox::information( 0, i18n("No valid port")); 413 KMessageBox::information( 0, i18n("No valid port"));
414 return; 414 return;
415 } 415 }
416 //qDebug("port %d ", port); 416 //qDebug("port %d ", port);
417 mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 ); 417 mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 );
418 mServerSocket->setFileName( defaultFileName() );//bbb 418 mServerSocket->setFileName( defaultFileName() );//bbb
419 if ( !mServerSocket->ok() ) { 419 if ( !mServerSocket->ok() ) {
420 KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!")); 420 KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!"));
421 delete mServerSocket; 421 delete mServerSocket;
422 mServerSocket = 0; 422 mServerSocket = 0;
423 return; 423 return;
424 } 424 }
425 mPrefs->mPassiveSyncAutoStart = autoStart; 425 mPrefs->mPassiveSyncAutoStart = autoStart;
426 if ( changed ) { 426 if ( changed ) {
427 mPrefs->writeConfig(); 427 mPrefs->writeConfig();
428 } 428 }
429 connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) ); 429 connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) );
430 connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) ); 430 connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) );
431} 431}
432 432
433void KSyncManager::syncLocalFile() 433void KSyncManager::syncLocalFile()
434{ 434{
435 435
436 QString fn =mPrefs->mLastSyncedLocalFile; 436 QString fn =mPrefs->mLastSyncedLocalFile;
437 QString ext; 437 QString ext;
438 438
439 switch(mTargetApp) 439 switch(mTargetApp)
440 { 440 {
441 case (KAPI): 441 case (KAPI):
442 ext = "(*.vcf)"; 442 ext = "(*.vcf)";
443 break; 443 break;
444 case (KOPI): 444 case (KOPI):
445 ext = "(*.ics/*.vcs)"; 445 ext = "(*.ics/*.vcs)";
446 break; 446 break;
447 case (PWMPI): 447 case (PWMPI):
448 ext = "(*.pwm)"; 448 ext = "(*.pwm)";
449 break; 449 break;
450 default: 450 default:
451 qDebug("KSM::syncLocalFile: invalid apptype selected"); 451 qDebug("KSM::syncLocalFile: invalid apptype selected");
452 break; 452 break;
453 453
454 } 454 }
455 455
456 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename"+ext), mParent ); 456 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename"+ext), mParent );
457 if ( fn == "" ) 457 if ( fn == "" )
458 return; 458 return;
459 if ( syncWithFile( fn, false ) ) { 459 if ( syncWithFile( fn, false ) ) {
460 qDebug("KSM::syncLocalFile() successful "); 460 qDebug("KSM::syncLocalFile() successful ");
461 } 461 }
462 462
463} 463}
464 464
465bool KSyncManager::syncWithFile( QString fn , bool quick ) 465bool KSyncManager::syncWithFile( QString fn , bool quick )
466{ 466{
467 bool ret = false; 467 bool ret = false;
468 QFileInfo info; 468 QFileInfo info;
469 info.setFile( fn ); 469 info.setFile( fn );
470 QString mess; 470 QString mess;
471 if ( !info. exists() ) { 471 if ( !info. exists() ) {
472 mess = i18n( "Sync file \n...%1\ndoes not exist!\nNothing synced!\n").arg(fn.right( 30) ); 472 mess = i18n( "Sync file \n...%1\ndoes not exist!\nNothing synced!\n").arg(fn.right( 30) );
473 QMessageBox::warning( mParent, i18n("Warning!"), 473 QMessageBox::warning( mParent, i18n("Warning!"),
474 mess ); 474 mess );
475 return ret; 475 return ret;
476 } 476 }
477 int result = 0; 477 int result = 0;
478 if ( !quick ) { 478 if ( !quick ) {
479 mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 479 mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
480 result = QMessageBox::warning( mParent, i18n("Warning!"), 480 result = QMessageBox::warning( mParent, i18n("Warning!"),
481 mess, 481 mess,
482 i18n("Sync"), i18n("Cancel"), 0, 482 i18n("Sync"), i18n("Cancel"), 0,
483 0, 1 ); 483 0, 1 );
484 if ( result ) 484 if ( result )
485 return false; 485 return false;
486 } 486 }
487 if ( mAskForPreferences ) 487 if ( mAskForPreferences )
488 if ( !edit_sync_options()) { 488 if ( !edit_sync_options()) {
489 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); 489 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
490 return false; 490 return false;
491 } 491 }
492 if ( result == 0 ) { 492 if ( result == 0 ) {
493 //qDebug("Now sycing ... "); 493 //qDebug("Now sycing ... ");
494 if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) ) 494 if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) )
495 mParent->topLevelWidget()->setCaption( i18n("Synchronization successful") ); 495 mParent->topLevelWidget()->setCaption( i18n("Synchronization successful") );
496 else 496 else
497 mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); 497 mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") );
498 if ( ! quick ) 498 if ( ! quick )
499 mPrefs->mLastSyncedLocalFile = fn; 499 mPrefs->mLastSyncedLocalFile = fn;
500 } 500 }
501 return ret; 501 return ret;
502} 502}
503 503
504void KSyncManager::quickSyncLocalFile() 504void KSyncManager::quickSyncLocalFile()
505{ 505{
506 506
507 if ( syncWithFile( mPrefs->mLastSyncedLocalFile, true ) ) { 507 if ( syncWithFile( mPrefs->mLastSyncedLocalFile, true ) ) {
508 qDebug("KSM::quick syncLocalFile() successful "); 508 qDebug("KSM::quick syncLocalFile() successful ");
509 509
510 } 510 }
511} 511}
512 512
513void KSyncManager::multiSync( bool askforPrefs ) 513void KSyncManager::multiSync( bool askforPrefs )
514{ 514{
515 if (blockSave()) 515 if (blockSave())
516 return; 516 return;
517 setBlockSave(true); 517 setBlockSave(true);
518 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); 518 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
519 if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"), 519 if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"),
520 question, 520 question,
521 i18n("Yes"), i18n("No"), 521 i18n("Yes"), i18n("No"),
522 0, 0 ) != 0 ) { 522 0, 0 ) != 0 ) {
523 setBlockSave(false); 523 setBlockSave(false);
524 mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!")); 524 mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!"));
525 return; 525 return;
526 } 526 }
527 mCurrentSyncDevice = i18n("Multiple profiles") ; 527 mCurrentSyncDevice = i18n("Multiple profiles") ;
528 mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs; 528 mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs;
529 if ( askforPrefs ) { 529 if ( askforPrefs ) {
530 if ( !edit_sync_options()) { 530 if ( !edit_sync_options()) {
531 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted.") ); 531 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted.") );
532 return; 532 return;
533 } 533 }
534 mPrefs->mRingSyncAlgoPrefs = mSyncAlgoPrefs; 534 mPrefs->mRingSyncAlgoPrefs = mSyncAlgoPrefs;
535 } 535 }
536 mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") ); 536 mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") );
537 qApp->processEvents(); 537 qApp->processEvents();
538 int num = ringSync() ; 538 int num = ringSync() ;
539 if ( num > 1 ) 539 if ( num > 1 )
540 ringSync(); 540 ringSync();
541 setBlockSave(false); 541 setBlockSave(false);
542 if ( num ) 542 if ( num )
543 emit save(); 543 emit save();
544 if ( num ) 544 if ( num )
545 mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) ); 545 mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) );
546 else 546 else
547 mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); 547 mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!"));
548 return; 548 return;
549} 549}
550 550
551int KSyncManager::ringSync() 551int KSyncManager::ringSync()
552{ 552{
553 553
554 int syncedProfiles = 0; 554 int syncedProfiles = 0;
555 unsigned int i; 555 unsigned int i;
556 QTime timer; 556 QTime timer;
557 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 557 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
558 QStringList syncProfileNames = mSyncProfileNames; 558 QStringList syncProfileNames = mSyncProfileNames;
559 KSyncProfile* temp = new KSyncProfile (); 559 KSyncProfile* temp = new KSyncProfile ();
560 mAskForPreferences = false; 560 mAskForPreferences = false;
561 for ( i = 0; i < syncProfileNames.count(); ++i ) { 561 for ( i = 0; i < syncProfileNames.count(); ++i ) {
562 mCurrentSyncProfile = i; 562 mCurrentSyncProfile = i;
563 temp->setName(syncProfileNames[mCurrentSyncProfile]); 563 temp->setName(syncProfileNames[mCurrentSyncProfile]);
564 temp->readConfig(&config); 564 temp->readConfig(&config);
565 565
566 bool includeInRingSync = false; 566 bool includeInRingSync = false;
567 switch(mTargetApp) 567 switch(mTargetApp)
568 { 568 {
569 case (KAPI): 569 case (KAPI):
570 includeInRingSync = temp->getIncludeInRingSyncAB(); 570 includeInRingSync = temp->getIncludeInRingSyncAB();
571 break; 571 break;
572 case (KOPI): 572 case (KOPI):
573 includeInRingSync = temp->getIncludeInRingSync(); 573 includeInRingSync = temp->getIncludeInRingSync();
574 break; 574 break;
575 case (PWMPI): 575 case (PWMPI):
576 includeInRingSync = temp->getIncludeInRingSyncPWM(); 576 includeInRingSync = temp->getIncludeInRingSyncPWM();
577 break; 577 break;
578 default: 578 default:
579 qDebug("KSM::ringSync: invalid apptype selected"); 579 qDebug("KSM::ringSync: invalid apptype selected");
580 break; 580 break;
581 581
582 } 582 }
583 583
584 584
585 if ( includeInRingSync && ( i < 1 || i > 2 )) { 585 if ( includeInRingSync && ( i < 1 || i > 2 )) {
586 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); 586 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
587 ++syncedProfiles; 587 ++syncedProfiles;
588 mSyncWithDesktop = false; 588 mSyncWithDesktop = false;
589 // mAskForPreferences = temp->getAskForPreferences(); 589 // mAskForPreferences = temp->getAskForPreferences();
590 mWriteBackFile = temp->getWriteBackFile(); 590 mWriteBackFile = temp->getWriteBackFile();
591 mWriteBackExistingOnly = temp->getWriteBackExisting(); 591 mWriteBackExistingOnly = temp->getWriteBackExisting();
592 mIsKapiFile = temp->getIsKapiFile(); 592 mIsKapiFile = temp->getIsKapiFile();
593 mWriteBackInFuture = 0; 593 mWriteBackInFuture = 0;
594 if ( temp->getWriteBackFuture() ) { 594 if ( temp->getWriteBackFuture() ) {
595 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 595 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
596 mWriteBackInPast = temp->getWriteBackPastWeeks( ); 596 mWriteBackInPast = temp->getWriteBackPastWeeks( );
597 } 597 }
598 mFilterInCal = temp->getFilterInCal(); 598 mFilterInCal = temp->getFilterInCal();
599 mFilterOutCal = temp->getFilterOutCal(); 599 mFilterOutCal = temp->getFilterOutCal();
600 mFilterInAB = temp->getFilterInAB(); 600 mFilterInAB = temp->getFilterInAB();
601 mFilterOutAB = temp->getFilterOutAB(); 601 mFilterOutAB = temp->getFilterOutAB();
602 mShowSyncSummary = false; 602 mShowSyncSummary = false;
603 mCurrentSyncDevice = syncProfileNames[i] ; 603 mCurrentSyncDevice = syncProfileNames[i] ;
604 mCurrentSyncName = mLocalMachineName; 604 mCurrentSyncName = mLocalMachineName;
605 if ( i == 0 ) { 605 if ( i == 0 ) {
606 mIsKapiFile = false; 606 mIsKapiFile = false;
607#ifdef DESKTOP_VERSION 607#ifdef DESKTOP_VERSION
608 syncKDE(); 608 syncKDE();
609#else 609#else
610 syncSharp(); 610 syncSharp();
611#endif 611#endif
612 } else { 612 } else {
613 if ( temp->getIsLocalFileSync() ) { 613 if ( temp->getIsLocalFileSync() ) {
614 switch(mTargetApp) 614 switch(mTargetApp)
615 { 615 {
616 case (KAPI): 616 case (KAPI):
617 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) 617 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
618 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); 618 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
619 break; 619 break;
620 case (KOPI): 620 case (KOPI):
621 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 621 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
622 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); 622 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
623 break; 623 break;
624 case (PWMPI): 624 case (PWMPI):
625 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) 625 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
626 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); 626 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM();
627 break; 627 break;
628 default: 628 default:
629 qDebug("KSM: invalid apptype selected"); 629 qDebug("KSM: invalid apptype selected");
630 break; 630 break;
631 } 631 }
632 } else { 632 } else {
633 if ( temp->getIsPhoneSync() ) { 633 if ( temp->getIsPhoneSync() ) {
634 mPhoneDevice = temp->getPhoneDevice( ) ; 634 mPhoneDevice = temp->getPhoneDevice( ) ;
635 mPhoneConnection = temp->getPhoneConnection( ); 635 mPhoneConnection = temp->getPhoneConnection( );
636 mPhoneModel = temp->getPhoneModel( ); 636 mPhoneModel = temp->getPhoneModel( );
637 syncPhone(); 637 syncPhone();
638 } else if ( temp->getIsPiSync() ) { 638 } else if ( temp->getIsPiSync() ) {
639 if ( mTargetApp == KAPI ) { 639 if ( mTargetApp == KAPI ) {
640 mPassWordPiSync = temp->getRemotePwAB(); 640 mPassWordPiSync = temp->getRemotePwAB();
641 mActiveSyncPort = temp->getRemotePortAB(); 641 mActiveSyncPort = temp->getRemotePortAB();
642 mActiveSyncIP = temp->getRemoteIPAB(); 642 mActiveSyncIP = temp->getRemoteIPAB();
643 } else if ( mTargetApp == KOPI ) { 643 } else if ( mTargetApp == KOPI ) {
644 mPassWordPiSync = temp->getRemotePw(); 644 mPassWordPiSync = temp->getRemotePw();
645 mActiveSyncPort = temp->getRemotePort(); 645 mActiveSyncPort = temp->getRemotePort();
646 mActiveSyncIP = temp->getRemoteIP(); 646 mActiveSyncIP = temp->getRemoteIP();
647 } else { 647 } else {
648 mPassWordPiSync = temp->getRemotePwPWM(); 648 mPassWordPiSync = temp->getRemotePwPWM();
649 mActiveSyncPort = temp->getRemotePortPWM(); 649 mActiveSyncPort = temp->getRemotePortPWM();
650 mActiveSyncIP = temp->getRemoteIPPWM(); 650 mActiveSyncIP = temp->getRemoteIPPWM();
651 } 651 }
652 syncPi(); 652 syncPi();
653 while ( !mPisyncFinished ) { 653 while ( !mPisyncFinished ) {
654 //qDebug("waiting "); 654 //qDebug("waiting ");
655 qApp->processEvents(); 655 qApp->processEvents();
656 } 656 }
657 timer.start(); 657 timer.start();
658 while ( timer.elapsed () < 2000 ) { 658 while ( timer.elapsed () < 2000 ) {
659 qApp->processEvents(); 659 qApp->processEvents();
660 } 660 }
661 } else 661 } else
662 syncRemote( temp, false ); 662 syncRemote( temp, false );
663 663
664 } 664 }
665 } 665 }
666 timer.start(); 666 timer.start();
667 mParent->topLevelWidget()->setCaption(i18n("Multiple sync in progress ... please wait!") ); 667 mParent->topLevelWidget()->setCaption(i18n("Multiple sync in progress ... please wait!") );
668 while ( timer.elapsed () < 2000 ) { 668 while ( timer.elapsed () < 2000 ) {
669 qApp->processEvents(); 669 qApp->processEvents();
670#ifndef _WIN32_ 670#ifndef _WIN32_
671 sleep (1); 671 sleep (1);
672#endif 672#endif
673 } 673 }
674 674
675 } 675 }
676 676
677 } 677 }
678 delete temp; 678 delete temp;
679 return syncedProfiles; 679 return syncedProfiles;
680} 680}
681 681
682void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) 682void KSyncManager::syncRemote( KSyncProfile* prof, bool ask)
683{ 683{
684 QString question; 684 QString question;
685 if ( ask ) { 685 if ( ask ) {
686 question = i18n("Do you really want\nto remote sync\nwith profile \n")+ prof->getName()+" ?\n"; 686 question = i18n("Do you really want\nto remote sync\nwith profile \n")+ prof->getName()+" ?\n";
687 if ( QMessageBox::information( mParent, i18n("Sync"), 687 if ( QMessageBox::information( mParent, i18n("Sync"),
688 question, 688 question,
689 i18n("Yes"), i18n("No"), 689 i18n("Yes"), i18n("No"),
690 0, 0 ) != 0 ) 690 0, 0 ) != 0 )
691 return; 691 return;
692 } 692 }
693 693
694 QString preCommand; 694 QString preCommand;
695 QString localTempFile; 695 QString localTempFile;
696 QString postCommand; 696 QString postCommand;
697 697
698 switch(mTargetApp) 698 switch(mTargetApp)
699 { 699 {
700 case (KAPI): 700 case (KAPI):
701 preCommand = prof->getPreSyncCommandAB(); 701 preCommand = prof->getPreSyncCommandAB();
702 postCommand = prof->getPostSyncCommandAB(); 702 postCommand = prof->getPostSyncCommandAB();
703 localTempFile = prof->getLocalTempFileAB(); 703 localTempFile = prof->getLocalTempFileAB();
704 break; 704 break;
705 case (KOPI): 705 case (KOPI):
706 preCommand = prof->getPreSyncCommand(); 706 preCommand = prof->getPreSyncCommand();
707 postCommand = prof->getPostSyncCommand(); 707 postCommand = prof->getPostSyncCommand();
708 localTempFile = prof->getLocalTempFile(); 708 localTempFile = prof->getLocalTempFile();
709 break; 709 break;
710 case (PWMPI): 710 case (PWMPI):
711 preCommand = prof->getPreSyncCommandPWM(); 711 preCommand = prof->getPreSyncCommandPWM();
712 postCommand = prof->getPostSyncCommandPWM(); 712 postCommand = prof->getPostSyncCommandPWM();
713 localTempFile = prof->getLocalTempFilePWM(); 713 localTempFile = prof->getLocalTempFilePWM();
714 break; 714 break;
715 default: 715 default:
716 qDebug("KSM::syncRemote: invalid apptype selected"); 716 qDebug("KSM::syncRemote: invalid apptype selected");
717 break; 717 break;
718 } 718 }
719 719
720 720
721 int fi; 721 int fi;
722 if ( (fi = preCommand.find("$PWD$")) > 0 ) { 722 if ( (fi = preCommand.find("$PWD$")) > 0 ) {
723 QString pwd = getPassword(); 723 QString pwd = getPassword();
724 preCommand = preCommand.left( fi )+ pwd + preCommand.mid( fi+5 ); 724 preCommand = preCommand.left( fi )+ pwd + preCommand.mid( fi+5 );
725 725
726 } 726 }
727 int maxlen = 30; 727 int maxlen = 30;
728 if ( QApplication::desktop()->width() > 320 ) 728 if ( QApplication::desktop()->width() > 320 )
729 maxlen += 25; 729 maxlen += 25;
730 mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) ); 730 mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) );
731 int fileSize = 0; 731 int fileSize = 0;
732 int result = system ( preCommand ); 732 int result = system ( preCommand );
733 // 0 : okay 733 // 0 : okay
734 // 256: no such file or dir 734 // 256: no such file or dir
735 // 735 //
736 qDebug("KSM::Sync: Remote copy result(0 = okay): %d ",result ); 736 qDebug("KSM::Sync: Remote copy result(0 = okay): %d ",result );
737 if ( result != 0 ) { 737 if ( result != 0 ) {
738 unsigned int len = maxlen; 738 unsigned int len = maxlen;
739 while ( len < preCommand.length() ) { 739 while ( len < preCommand.length() ) {
740 preCommand.insert( len , "\n" ); 740 preCommand.insert( len , "\n" );
741 len += maxlen +2; 741 len += maxlen +2;
742 } 742 }
743 question = i18n("Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n").arg (preCommand) ; 743 question = i18n("Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n").arg (preCommand) ;
744 QMessageBox::information( mParent, i18n("Sync - ERROR"), 744 QMessageBox::information( mParent, i18n("Sync - ERROR"),
745 question, 745 question,
746 i18n("Okay!")) ; 746 i18n("Okay!")) ;
747 mParent->topLevelWidget()->setCaption ("KDE-Pim"); 747 mParent->topLevelWidget()->setCaption ("KDE-Pim");
748 return; 748 return;
749 } 749 }
750 mParent->topLevelWidget()->setCaption ( i18n( "Copying succeed." ) ); 750 mParent->topLevelWidget()->setCaption ( i18n( "Copying succeed." ) );
751 //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() ); 751 //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() );
752 752
753 if ( syncWithFile( localTempFile, true ) ) { 753 if ( syncWithFile( localTempFile, true ) ) {
754 754
755 if ( mWriteBackFile ) { 755 if ( mWriteBackFile ) {
756 int fi; 756 int fi;
757 if ( (fi = postCommand.find("$PWD$")) > 0 ) { 757 if ( (fi = postCommand.find("$PWD$")) > 0 ) {
758 QString pwd = getPassword(); 758 QString pwd = getPassword();
759 postCommand = postCommand.left( fi )+ pwd + postCommand.mid( fi+5 ); 759 postCommand = postCommand.left( fi )+ pwd + postCommand.mid( fi+5 );
760 760
761 } 761 }
762 mParent->topLevelWidget()->setCaption ( i18n( "Writing back file ..." ) ); 762 mParent->topLevelWidget()->setCaption ( i18n( "Writing back file ..." ) );
763 result = system ( postCommand ); 763 result = system ( postCommand );
764 qDebug("KSM::Sync:Writing back file result: %d ", result); 764 qDebug("KSM::Sync:Writing back file result: %d ", result);
765 if ( result != 0 ) { 765 if ( result != 0 ) {
766 mParent->topLevelWidget()->setCaption ( i18n( "Writing back file result: " )+QString::number( result ) ); 766 mParent->topLevelWidget()->setCaption ( i18n( "Writing back file result: " )+QString::number( result ) );
767 return; 767 return;
768 } else { 768 } else {
769 mParent->topLevelWidget()->setCaption ( i18n( "Syncronization sucessfully completed" ) ); 769 mParent->topLevelWidget()->setCaption ( i18n( "Syncronization sucessfully completed" ) );
770 } 770 }
771 } 771 }
772 } 772 }
773 return; 773 return;
774} 774}
775bool KSyncManager::edit_pisync_options() 775bool KSyncManager::edit_pisync_options()
776{ 776{
777 QDialog dia( mParent, "dia", true ); 777 QDialog dia( mParent, "dia", true );
778 dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice ); 778 dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice );
779 QVBoxLayout lay ( &dia ); 779 QVBoxLayout lay ( &dia );
780 lay.setSpacing( 5 ); 780 lay.setSpacing( 5 );
781 lay.setMargin( 3 ); 781 lay.setMargin( 3 );
782 QLabel lab1 ( i18n("Password for remote access:"), &dia); 782 QLabel lab1 ( i18n("Password for remote access:"), &dia);
783 lay.addWidget( &lab1 ); 783 lay.addWidget( &lab1 );
784 QLineEdit le1 (&dia ); 784 QLineEdit le1 (&dia );
785 lay.addWidget( &le1 ); 785 lay.addWidget( &le1 );
786 QLabel lab2 ( i18n("Remote IP address:"), &dia); 786 QLabel lab2 ( i18n("Remote IP address:"), &dia);
787 lay.addWidget( &lab2 ); 787 lay.addWidget( &lab2 );
788 QLineEdit le2 (&dia ); 788 QLineEdit le2 (&dia );
789 lay.addWidget( &le2 ); 789 lay.addWidget( &le2 );
790 QLabel lab3 ( i18n("Remote port number:"), &dia); 790 QLabel lab3 ( i18n("Remote port number:"), &dia);
791 lay.addWidget( &lab3 ); 791 lay.addWidget( &lab3 );
792 QLineEdit le3 (&dia ); 792 QLineEdit le3 (&dia );
793 lay.addWidget( &le3 ); 793 lay.addWidget( &le3 );
794 QPushButton pb ( "OK", &dia); 794 QPushButton pb ( "OK", &dia);
795 lay.addWidget( &pb ); 795 lay.addWidget( &pb );
796 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); 796 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
797 le1.setText( mPassWordPiSync ); 797 le1.setText( mPassWordPiSync );
798 le2.setText( mActiveSyncIP ); 798 le2.setText( mActiveSyncIP );
799 le3.setText( mActiveSyncPort ); 799 le3.setText( mActiveSyncPort );
800 if ( dia.exec() ) { 800 if ( dia.exec() ) {
801 mPassWordPiSync = le1.text(); 801 mPassWordPiSync = le1.text();
802 mActiveSyncPort = le3.text(); 802 mActiveSyncPort = le3.text();
803 mActiveSyncIP = le2.text(); 803 mActiveSyncIP = le2.text();
804 return true; 804 return true;
805 } 805 }
806 return false; 806 return false;
807} 807}
808bool KSyncManager::edit_sync_options() 808bool KSyncManager::edit_sync_options()
809{ 809{
810 810
811 QDialog dia( mParent, "dia", true ); 811 QDialog dia( mParent, "dia", true );
812 dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice ); 812 dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice );
813 QButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia); 813 QButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia);
814 QVBoxLayout lay ( &dia ); 814 QVBoxLayout lay ( &dia );
815 lay.setSpacing( 2 ); 815 lay.setSpacing( 2 );
816 lay.setMargin( 3 ); 816 lay.setMargin( 3 );
817 lay.addWidget(&gr); 817 lay.addWidget(&gr);
818 QRadioButton loc ( i18n("Take local entry on conflict"), &gr ); 818 QRadioButton loc ( i18n("Take local entry on conflict"), &gr );
819 QRadioButton rem ( i18n("Take remote entry on conflict"), &gr ); 819 QRadioButton rem ( i18n("Take remote entry on conflict"), &gr );
820 QRadioButton newest( i18n("Take newest entry on conflict"), &gr ); 820 QRadioButton newest( i18n("Take newest entry on conflict"), &gr );
821 QRadioButton ask( i18n("Ask for every entry on conflict"), &gr ); 821 QRadioButton ask( i18n("Ask for every entry on conflict"), &gr );
822 QRadioButton f_loc( i18n("Force: Take local entry always"), &gr ); 822 QRadioButton f_loc( i18n("Force: Take local entry always"), &gr );
823 QRadioButton f_rem( i18n("Force: Take remote entry always"), &gr ); 823 QRadioButton f_rem( i18n("Force: Take remote entry always"), &gr );
824 //QRadioButton both( i18n("Take both on conflict"), &gr ); 824 //QRadioButton both( i18n("Take both on conflict"), &gr );
825 QPushButton pb ( "OK", &dia); 825 QPushButton pb ( "OK", &dia);
826 lay.addWidget( &pb ); 826 lay.addWidget( &pb );
827 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); 827 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
828 switch ( mSyncAlgoPrefs ) { 828 switch ( mSyncAlgoPrefs ) {
829 case 0: 829 case 0:
830 loc.setChecked( true); 830 loc.setChecked( true);
831 break; 831 break;
832 case 1: 832 case 1:
833 rem.setChecked( true ); 833 rem.setChecked( true );
834 break; 834 break;
835 case 2: 835 case 2:
836 newest.setChecked( true); 836 newest.setChecked( true);
837 break; 837 break;
838 case 3: 838 case 3:
839 ask.setChecked( true); 839 ask.setChecked( true);
840 break; 840 break;
841 case 4: 841 case 4:
842 f_loc.setChecked( true); 842 f_loc.setChecked( true);
843 break; 843 break;
844 case 5: 844 case 5:
845 f_rem.setChecked( true); 845 f_rem.setChecked( true);
846 break; 846 break;
847 case 6: 847 case 6:
848 // both.setChecked( true); 848 // both.setChecked( true);
849 break; 849 break;
850 default: 850 default:
851 break; 851 break;
852 } 852 }
853 if ( dia.exec() ) { 853 if ( dia.exec() ) {
854 mSyncAlgoPrefs = rem.isChecked()*1+newest.isChecked()*2+ ask.isChecked()*3+ f_loc.isChecked()*4+ f_rem.isChecked()*5;//+ both.isChecked()*6 ; 854 mSyncAlgoPrefs = rem.isChecked()*1+newest.isChecked()*2+ ask.isChecked()*3+ f_loc.isChecked()*4+ f_rem.isChecked()*5;//+ both.isChecked()*6 ;
855 return true; 855 return true;
856 } 856 }
857 return false; 857 return false;
858} 858}
859 859
860QString KSyncManager::getPassword( ) 860QString KSyncManager::getPassword( )
861{ 861{
862 QString retfile = ""; 862 QString retfile = "";
863 QDialog dia ( mParent, "input-dialog", true ); 863 QDialog dia ( mParent, "input-dialog", true );
864 QLineEdit lab ( &dia ); 864 QLineEdit lab ( &dia );
865 lab.setEchoMode( QLineEdit::Password ); 865 lab.setEchoMode( QLineEdit::Password );
866 QVBoxLayout lay( &dia ); 866 QVBoxLayout lay( &dia );
867 lay.setMargin(7); 867 lay.setMargin(7);
868 lay.setSpacing(7); 868 lay.setSpacing(7);
869 lay.addWidget( &lab); 869 lay.addWidget( &lab);
870 dia.setFixedSize( 230,50 ); 870 dia.setFixedSize( 230,50 );
871 dia.setCaption( i18n("Enter password") ); 871 dia.setCaption( i18n("Enter password") );
872 QPushButton pb ( "OK", &dia); 872 QPushButton pb ( "OK", &dia);
873 lay.addWidget( &pb ); 873 lay.addWidget( &pb );
874 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); 874 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
875 dia.show(); 875 dia.show();
876 int res = dia.exec(); 876 int res = dia.exec();
877 if ( res ) 877 if ( res )
878 retfile = lab.text(); 878 retfile = lab.text();
879 dia.hide(); 879 dia.hide();
880 qApp->processEvents(); 880 qApp->processEvents();
881 return retfile; 881 return retfile;
882 882
883} 883}
884 884
885 885
886void KSyncManager::confSync() 886void KSyncManager::confSync()
887{ 887{
888 static KSyncPrefsDialog* sp = 0; 888 static KSyncPrefsDialog* sp = 0;
889 if ( ! sp ) { 889 if ( ! sp ) {
890 sp = new KSyncPrefsDialog( mParent, "syncprefs", true ); 890 sp = new KSyncPrefsDialog( mParent, "syncprefs", true );
891 } 891 }
892 sp->usrReadConfig(); 892 sp->usrReadConfig();
893#ifndef DESKTOP_VERSION 893#ifndef DESKTOP_VERSION
894 sp->showMaximized(); 894 sp->showMaximized();
895#else 895#else
896 sp->show(); 896 sp->show();
897#endif 897#endif
898 sp->exec(); 898 sp->exec();
899 QStringList oldSyncProfileNames = mSyncProfileNames; 899 QStringList oldSyncProfileNames = mSyncProfileNames;
900 mSyncProfileNames = sp->getSyncProfileNames(); 900 mSyncProfileNames = sp->getSyncProfileNames();
901 mLocalMachineName = sp->getLocalMachineName (); 901 mLocalMachineName = sp->getLocalMachineName ();
902 int ii; 902 int ii;
903 for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) { 903 for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) {
904 if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) ) 904 if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) )
905 mImplementation->removeSyncInfo( oldSyncProfileNames[ii] ); 905 mImplementation->removeSyncInfo( oldSyncProfileNames[ii] );
906 } 906 }
907 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); 907 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
908} 908}
909void KSyncManager::syncKDE() 909void KSyncManager::syncKDE()
910{ 910{
911 mSyncWithDesktop = true; 911 mSyncWithDesktop = true;
912 emit save(); 912 emit save();
913 switch(mTargetApp) 913 switch(mTargetApp)
914 { 914 {
915 case (KAPI): 915 case (KAPI):
916 { 916 {
917#ifdef DESKTOP_VERSION 917#ifdef DESKTOP_VERSION
918 QString command = qApp->applicationDirPath () + "/kdeabdump"; 918 QString command = qApp->applicationDirPath () + "/kdeabdump";
919#else 919#else
920 QString command = "kdeabdump"; 920 QString command = "kdeabdump";
921#endif 921#endif
922 if ( ! QFile::exists ( command ) ) 922 if ( ! QFile::exists ( command ) )
923 command = "kdeabdump"; 923 command = "kdeabdump";
924 QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf"; 924 QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf";
925 system ( command.latin1()); 925 system ( command.latin1());
926 if ( syncWithFile( fileName,true ) ) { 926 if ( syncWithFile( fileName,true ) ) {
927 if ( mWriteBackFile ) { 927 if ( mWriteBackFile ) {
928 command += " --read"; 928 command += " --read";
929 system ( command.latin1()); 929 system ( command.latin1());
930 } 930 }
931 } 931 }
932 932
933 } 933 }
934 break; 934 break;
935 case (KOPI): 935 case (KOPI):
936 { 936 {
937#ifdef DESKTOP_VERSION 937#ifdef DESKTOP_VERSION
938 QString command = qApp->applicationDirPath () + "/kdecaldump"; 938 QString command = qApp->applicationDirPath () + "/kdecaldump";
939#else 939#else
940 QString command = "kdecaldump"; 940 QString command = "kdecaldump";
941#endif 941#endif
942 if ( ! QFile::exists ( command ) ) 942 if ( ! QFile::exists ( command ) )
943 command = "kdecaldump"; 943 command = "kdecaldump";
944 QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics"; 944 QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics";
945 system ( command.latin1()); 945 system ( command.latin1());
946 if ( syncWithFile( fileName,true ) ) { 946 if ( syncWithFile( fileName,true ) ) {
947 if ( mWriteBackFile ) { 947 if ( mWriteBackFile ) {
948 command += " --read"; 948 command += " --read";
949 system ( command.latin1()); 949 system ( command.latin1());
950 } 950 }
951 } 951 }
952 952
953 } 953 }
954 break; 954 break;
955 case (PWMPI): 955 case (PWMPI):
956 956
957 break; 957 break;
958 default: 958 default:
959 qDebug("KSM::slotSyncMenu: invalid apptype selected"); 959 qDebug("KSM::slotSyncMenu: invalid apptype selected");
960 break; 960 break;
961 961
962 } 962 }
963} 963}
964 964
965void KSyncManager::syncSharp() 965void KSyncManager::syncSharp()
966{ 966{
967 967
968 if ( ! syncExternalApplication("sharp") ) 968 if ( ! syncExternalApplication("sharp") )
969 qDebug("KSM::ERROR sync sharp "); 969 qDebug("KSM::ERROR sync sharp ");
970} 970}
971 971
972bool KSyncManager::syncExternalApplication(QString resource) 972bool KSyncManager::syncExternalApplication(QString resource)
973{ 973{
974 974
975 emit save(); 975 emit save();
976 976
977 if ( mAskForPreferences ) 977 if ( mAskForPreferences )
978 if ( !edit_sync_options()) { 978 if ( !edit_sync_options()) {
979 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); 979 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
980 return false; 980 return false;
981 } 981 }
982 982
983 qDebug("KSM::Sync extern %s", resource.latin1()); 983 qDebug("KSM::Sync extern %s", resource.latin1());
984 984
985 bool syncOK = mImplementation->syncExternal(this, resource); 985 bool syncOK = mImplementation->syncExternal(this, resource);
986 986
987 return syncOK; 987 return syncOK;
988 988
989} 989}
990 990
991void KSyncManager::syncPhone() 991void KSyncManager::syncPhone()
992{ 992{
993 993
994 syncExternalApplication("phone"); 994 syncExternalApplication("phone");
995 995
996} 996}
997 997
998void KSyncManager::showProgressBar(int percentage, QString caption, int total) 998void KSyncManager::showProgressBar(int percentage, QString caption, int total)
999{ 999{
1000 if (!bar->isVisible()) 1000 if (!bar->isVisible())
1001 { 1001 {
1002 bar->setCaption (caption); 1002 bar->setCaption (caption);
1003 bar->setTotalSteps ( total ) ; 1003 bar->setTotalSteps ( total ) ;
1004 bar->show(); 1004 bar->show();
1005 } 1005 }
1006 bar->raise(); 1006 bar->raise();
1007 bar->setProgress( percentage ); 1007 bar->setProgress( percentage );
1008 qApp->processEvents(); 1008 qApp->processEvents();
1009} 1009}
1010 1010
1011void KSyncManager::hideProgressBar() 1011void KSyncManager::hideProgressBar()
1012{ 1012{
1013 bar->hide(); 1013 bar->hide();
1014 qApp->processEvents(); 1014 qApp->processEvents();
1015} 1015}
1016 1016
1017bool KSyncManager::isProgressBarCanceled() 1017bool KSyncManager::isProgressBarCanceled()
1018{ 1018{
1019 return !bar->isVisible(); 1019 return !bar->isVisible();
1020} 1020}
1021 1021
1022QString KSyncManager::syncFileName() 1022QString KSyncManager::syncFileName()
1023{ 1023{
1024 1024
1025 QString fn = "tempfile"; 1025 QString fn = "tempfile";
1026 switch(mTargetApp) 1026 switch(mTargetApp)
1027 { 1027 {
1028 case (KAPI): 1028 case (KAPI):
1029 fn = "tempsyncab.vcf"; 1029 fn = "tempsyncab.vcf";
1030 break; 1030 break;
1031 case (KOPI): 1031 case (KOPI):
1032 fn = "tempsynccal.ics"; 1032 fn = "tempsynccal.ics";
1033 break; 1033 break;
1034 case (PWMPI): 1034 case (PWMPI):
1035 fn = "tempsyncpw.pwm"; 1035 fn = "tempsyncpw.pwm";
1036 break; 1036 break;
1037 default: 1037 default:
1038 break; 1038 break;
1039 } 1039 }
1040#ifdef _WIN32_ 1040#ifdef _WIN32_
1041 return locateLocal( "tmp", fn ); 1041 return locateLocal( "tmp", fn );
1042#else 1042#else
1043 return (QString( "/tmp/" )+ fn ); 1043 return (QString( "/tmp/" )+ fn );
1044#endif 1044#endif
1045} 1045}
1046 1046
1047void KSyncManager::syncPi() 1047void KSyncManager::syncPi()
1048{ 1048{
1049 mIsKapiFile = true; 1049 mIsKapiFile = true;
1050 mPisyncFinished = false; 1050 mPisyncFinished = false;
1051 qApp->processEvents(); 1051 qApp->processEvents();
1052 if ( mAskForPreferences ) 1052 if ( mAskForPreferences )
1053 if ( !edit_pisync_options()) { 1053 if ( !edit_pisync_options()) {
1054 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); 1054 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
1055 return; 1055 return;
1056 } 1056 }
1057 bool ok; 1057 bool ok;
1058 Q_UINT16 port = mActiveSyncPort.toUInt(&ok); 1058 Q_UINT16 port = mActiveSyncPort.toUInt(&ok);
1059 if ( ! ok ) { 1059 if ( ! ok ) {
1060 mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); 1060 mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") );
1061 return; 1061 return;
1062 } 1062 }
1063 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); 1063 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() );
1064 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); 1064 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) );
1065 commandSocket->readFile( syncFileName() ); 1065 commandSocket->readFile( syncFileName() );
1066} 1066}
1067 1067
1068void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) 1068void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state)
1069{ 1069{
1070 //enum { success, errorW, errorR, quiet }; 1070 //enum { success, errorW, errorR, quiet };
1071 if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ) { 1071 if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ) {
1072 mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") ); 1072 mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") );
1073 delete s; 1073 delete s;
1074 if ( state == KCommandSocket::errorR ) { 1074 if ( state == KCommandSocket::errorR ) {
1075 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget()); 1075 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget());
1076 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); 1076 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) );
1077 commandSocket->sendStop(); 1077 commandSocket->sendStop();
1078 } 1078 }
1079 mPisyncFinished = true; 1079 mPisyncFinished = true;
1080 return; 1080 return;
1081 1081
1082 } else if ( state == KCommandSocket::errorW ) { 1082 } else if ( state == KCommandSocket::errorW ) {
1083 mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") ); 1083 mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") );
1084 mPisyncFinished = true; 1084 mPisyncFinished = true;
1085 1085
1086 } else if ( state == KCommandSocket::successR ) { 1086 } else if ( state == KCommandSocket::successR ) {
1087 QTimer::singleShot( 1, this , SLOT ( readFileFromSocket())); 1087 QTimer::singleShot( 1, this , SLOT ( readFileFromSocket()));
1088 1088
1089 } else if ( state == KCommandSocket::successW ) { 1089 } else if ( state == KCommandSocket::successW ) {
1090 mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); 1090 mParent->topLevelWidget()->setCaption( i18n("Pi-Sync successful!") );
1091 mPisyncFinished = true; 1091 mPisyncFinished = true;
1092 } 1092 }
1093 1093
1094 delete s; 1094 delete s;
1095} 1095}
1096 1096
1097void KSyncManager::readFileFromSocket() 1097void KSyncManager::readFileFromSocket()
1098{ 1098{
1099 QString fileName = syncFileName(); 1099 QString fileName = syncFileName();
1100 bool syncOK = true;
1100 mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") ); 1101 mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") );
1101 if ( ! syncWithFile( fileName , true ) ) { 1102 if ( ! syncWithFile( fileName , true ) ) {
1102 mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") ); 1103 mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") );
1103 mPisyncFinished = true; 1104 syncOK = false;
1104 return;
1105 } 1105 }
1106 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() ); 1106 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() );
1107 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); 1107 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) );
1108 if ( mWriteBackFile ) 1108 if ( mWriteBackFile && syncOK )
1109 commandSocket->writeFile( fileName ); 1109 commandSocket->writeFile( fileName );
1110 else { 1110 else {
1111 commandSocket->sendStop(); 1111 commandSocket->sendStop();
1112 mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); 1112 if ( syncOK )
1113 mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") );
1113 mPisyncFinished = true; 1114 mPisyncFinished = true;
1114 } 1115 }
1115} 1116}
1116 1117
1117KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name ) 1118KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name )
1118{ 1119{
1119 mPassWord = pw; 1120 mPassWord = pw;
1120 mSocket = 0; 1121 mSocket = 0;
1121 mSyncActionDialog = 0; 1122 mSyncActionDialog = 0;
1122 blockRC = false; 1123 blockRC = false;
1123} 1124}
1124 1125
1125void KServerSocket::newConnection ( int socket ) 1126void KServerSocket::newConnection ( int socket )
1126{ 1127{
1127 // qDebug("KServerSocket:New connection %d ", socket); 1128 // qDebug("KServerSocket:New connection %d ", socket);
1128 if ( mSocket ) { 1129 if ( mSocket ) {
1129 qDebug("KSS::newConnection Socket deleted! "); 1130 qDebug("KSS::newConnection Socket deleted! ");
1130 delete mSocket; 1131 delete mSocket;
1131 mSocket = 0; 1132 mSocket = 0;
1132 } 1133 }
1133 mSocket = new QSocket( this ); 1134 mSocket = new QSocket( this );
1134 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); 1135 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
1135 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); 1136 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
1136 mSocket->setSocket( socket ); 1137 mSocket->setSocket( socket );
1137} 1138}
1138 1139
1139void KServerSocket::discardClient() 1140void KServerSocket::discardClient()
1140{ 1141{
1141 //qDebug(" KServerSocket::discardClient()"); 1142 //qDebug(" KServerSocket::discardClient()");
1142 if ( mSocket ) { 1143 if ( mSocket ) {
1143 delete mSocket; 1144 delete mSocket;
1144 mSocket = 0; 1145 mSocket = 0;
1145 } 1146 }
1146 //emit endConnect(); 1147 //emit endConnect();
1147} 1148}
1148void KServerSocket::readClient() 1149void KServerSocket::readClient()
1149{ 1150{
1150 if ( blockRC ) 1151 if ( blockRC )
1151 return; 1152 return;
1152 if ( mSocket == 0 ) { 1153 if ( mSocket == 0 ) {
1153 qDebug("ERROR::KSS::readClient(): mSocket == 0 "); 1154 qDebug("ERROR::KSS::readClient(): mSocket == 0 ");
1154 return; 1155 return;
1155 } 1156 }
1156 //qDebug("KServerSocket::readClient()"); 1157 //qDebug("KServerSocket::readClient()");
1157 if ( mSocket->canReadLine() ) { 1158 if ( mSocket->canReadLine() ) {
1158 QString line = mSocket->readLine(); 1159 QString line = mSocket->readLine();
1159 //qDebug("KServerSocket readline: %s ", line.latin1()); 1160 //qDebug("KServerSocket readline: %s ", line.latin1());
1160 QStringList tokens = QStringList::split( QRegExp("[ \r\n][ \r\n]*"), line ); 1161 QStringList tokens = QStringList::split( QRegExp("[ \r\n][ \r\n]*"), line );
1161 if ( tokens[0] == "GET" ) { 1162 if ( tokens[0] == "GET" ) {
1162 if ( tokens[1] == mPassWord ) { 1163 if ( tokens[1] == mPassWord ) {
1163 //emit sendFile( mSocket ); 1164 //emit sendFile( mSocket );
1164 bool ok = false; 1165 bool ok = false;
1165 QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok); 1166 QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok);
1166 if ( ok ) { 1167 if ( ok ) {
1167 KSyncManager::mRequestedSyncEvent = dt; 1168 KSyncManager::mRequestedSyncEvent = dt;
1168 } 1169 }
1169 else 1170 else
1170 KSyncManager::mRequestedSyncEvent = QDateTime(); 1171 KSyncManager::mRequestedSyncEvent = QDateTime();
1171 send_file(); 1172 send_file();
1172 } 1173 }
1173 else { 1174 else {
1174 KMessageBox::error( 0, i18n("Got send file request\nwith invalid password")); 1175 KMessageBox::error( 0, i18n("Got send file request\nwith invalid password"));
1175 //qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); 1176 //qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() );
1176 } 1177 }
1177 } 1178 }
1178 if ( tokens[0] == "PUT" ) { 1179 if ( tokens[0] == "PUT" ) {
1179 if ( tokens[1] == mPassWord ) { 1180 if ( tokens[1] == mPassWord ) {
1180 //emit getFile( mSocket ); 1181 //emit getFile( mSocket );
1181 blockRC = true; 1182 blockRC = true;
1182 get_file(); 1183 get_file();
1183 } 1184 }
1184 else { 1185 else {
1185 KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password")); 1186 KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password"));
1186 //qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); 1187 //qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() );
1187 } 1188 }
1188 } 1189 }
1189 if ( tokens[0] == "STOP" ) { 1190 if ( tokens[0] == "STOP" ) {
1190 //emit endConnect(); 1191 //emit endConnect();
1191 end_connect(); 1192 end_connect();
1192 } 1193 }
1193 } 1194 }
1194} 1195}
1195void KServerSocket::end_connect() 1196void KServerSocket::end_connect()
1196{ 1197{
1197 delete mSyncActionDialog; 1198 delete mSyncActionDialog;
1198 mSyncActionDialog = 0; 1199 mSyncActionDialog = 0;
1199} 1200}
1200void KServerSocket::send_file() 1201void KServerSocket::send_file()
1201{ 1202{
1202 //qDebug("MainWindow::sendFile(QSocket* s) "); 1203 //qDebug("MainWindow::sendFile(QSocket* s) ");
1203 if ( mSyncActionDialog ) 1204 if ( mSyncActionDialog )
1204 delete mSyncActionDialog; 1205 delete mSyncActionDialog;
1205 mSyncActionDialog = new QDialog ( 0, "input-dialog", true ); 1206 mSyncActionDialog = new QDialog ( 0, "input-dialog", true );
1206 mSyncActionDialog->setCaption(i18n("Received sync request")); 1207 mSyncActionDialog->setCaption(i18n("Received sync request"));
1207 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog ); 1208 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog );
1208 label->setAlignment ( Qt::AlignHCenter ); 1209 label->setAlignment ( Qt::AlignHCenter );
1209 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); 1210 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog );
1210 lay->addWidget( label); 1211 lay->addWidget( label);
1211 lay->setMargin(7); 1212 lay->setMargin(7);
1212 lay->setSpacing(7); 1213 lay->setSpacing(7);
1213 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 1214 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
1214 int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent ); 1215 int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent );
1215 if ( secs < 0 ) 1216 if ( secs < 0 )
1216 secs = secs * (-1); 1217 secs = secs * (-1);
1217 if ( secs > 30 ) 1218 if ( secs > 30 )
1218 //if ( true ) 1219 //if ( true )
1219 { 1220 {
1220 QString warning = i18n("Clock skew of\nsyncing devices\nis %1 seconds!").arg( secs ); 1221 QString warning = i18n("Clock skew of\nsyncing devices\nis %1 seconds!").arg( secs );
1221 QLabel* label = new QLabel( warning, mSyncActionDialog ); 1222 QLabel* label = new QLabel( warning, mSyncActionDialog );
1222 label->setAlignment ( Qt::AlignHCenter ); 1223 label->setAlignment ( Qt::AlignHCenter );
1223 lay->addWidget( label); 1224 lay->addWidget( label);
1224 if ( secs > 180 ) 1225 if ( secs > 180 )
1225 { 1226 {
1226 if ( secs > 300 ) { 1227 if ( secs > 300 ) {
1227 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(0, i18n("The clocks of the syncing\ndevices have a difference\n of more than 5 minutes.\nPlease adjust your clocks.\n<b>You may get wrong syncing results!<\b>\nPlease confirm synchronization!"), i18n("High clock skew!"),i18n("Synchronize!"))) { 1228 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(0, i18n("The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!"), i18n("High clock skew!"),i18n("Synchronize!"))) {
1228 qDebug("KSS::Sync cancelled ,cs"); 1229 qDebug("KSS::Sync cancelled ,cs");
1229 return ; 1230 return ;
1230 } 1231 }
1231 } 1232 }
1232 QFont f = label->font(); 1233 QFont f = label->font();
1233 f.setPointSize ( f.pointSize() *2 ); 1234 f.setPointSize ( f.pointSize() *2 );
1234 f. setBold (true ); 1235 f. setBold (true );
1235 QLabel* label = new QLabel( warning, mSyncActionDialog ); 1236 QLabel* label = new QLabel( warning, mSyncActionDialog );
1236 label->setFont( f ); 1237 label->setFont( f );
1237 warning = i18n("ADJUST\nYOUR\nCLOCKS!"); 1238 warning = i18n("ADJUST\nYOUR\nCLOCKS!");
1238 label->setText( warning ); 1239 label->setText( warning );
1239 label->setAlignment ( Qt::AlignHCenter ); 1240 label->setAlignment ( Qt::AlignHCenter );
1240 lay->addWidget( label); 1241 lay->addWidget( label);
1241 mSyncActionDialog->setFixedSize( 230, 300); 1242 mSyncActionDialog->setFixedSize( 230, 300);
1242 } else { 1243 } else {
1243 mSyncActionDialog->setFixedSize( 230, 200); 1244 mSyncActionDialog->setFixedSize( 230, 200);
1244 } 1245 }
1245 } else { 1246 } else {
1246 mSyncActionDialog->setFixedSize( 230, 120); 1247 mSyncActionDialog->setFixedSize( 230, 120);
1247 } 1248 }
1248 } else 1249 } else
1249 mSyncActionDialog->setFixedSize( 230, 120); 1250 mSyncActionDialog->setFixedSize( 230, 120);
1250 mSyncActionDialog->show(); 1251 mSyncActionDialog->show();
1251 mSyncActionDialog->raise(); 1252 mSyncActionDialog->raise();
1252 emit request_file(); 1253 emit request_file();
1253 qApp->processEvents(); 1254 qApp->processEvents();
1254 QString fileName = mFileName; 1255 QString fileName = mFileName;
1255 QFile file( fileName ); 1256 QFile file( fileName );
1256 if (!file.open( IO_ReadOnly ) ) { 1257 if (!file.open( IO_ReadOnly ) ) {
1257 delete mSyncActionDialog; 1258 delete mSyncActionDialog;
1258 mSyncActionDialog = 0; 1259 mSyncActionDialog = 0;
1259 qDebug("KSS::error open sync file: %s ", fileName.latin1()); 1260 qDebug("KSS::error open sync file: %s ", fileName.latin1());
1260 mSocket->close(); 1261 mSocket->close();
1261 if ( mSocket->state() == QSocket::Idle ) 1262 if ( mSocket->state() == QSocket::Idle )
1262 QTimer::singleShot( 10, this , SLOT ( discardClient())); 1263 QTimer::singleShot( 10, this , SLOT ( discardClient()));
1263 return ; 1264 return ;
1264 1265
1265 } 1266 }
1266 mSyncActionDialog->setCaption( i18n("Sending file...") ); 1267 mSyncActionDialog->setCaption( i18n("Sending file...") );
1267 QTextStream ts( &file ); 1268 QTextStream ts( &file );
1268 ts.setEncoding( QTextStream::Latin1 ); 1269 ts.setEncoding( QTextStream::Latin1 );
1269 1270
1270 QTextStream os( mSocket ); 1271 QTextStream os( mSocket );
1271 os.setEncoding( QTextStream::Latin1 ); 1272 os.setEncoding( QTextStream::Latin1 );
1272 while ( ! ts.atEnd() ) { 1273 while ( ! ts.atEnd() ) {
1273 os << ts.readLine() << "\r\n\r\n"; 1274 os << ts.readLine() << "\r\n\r\n";
1274 } 1275 }
1275 //os << ts.read(); 1276 //os << ts.read();
1276 file.close(); 1277 file.close();
1277 mSyncActionDialog->setCaption( i18n("Waiting for synced file...") ); 1278 mSyncActionDialog->setCaption( i18n("Waiting for synced file...") );
1278 mSocket->close(); 1279 mSocket->close();
1279 if ( mSocket->state() == QSocket::Idle ) 1280 if ( mSocket->state() == QSocket::Idle )
1280 QTimer::singleShot( 10, this , SLOT ( discardClient())); 1281 QTimer::singleShot( 10, this , SLOT ( discardClient()));
1281} 1282}
1282void KServerSocket::get_file() 1283void KServerSocket::get_file()
1283{ 1284{
1284 mSyncActionDialog->setCaption( i18n("Receiving synced file...") ); 1285 mSyncActionDialog->setCaption( i18n("Receiving synced file...") );
1285 1286
1286 piTime.start(); 1287 piTime.start();
1287 piFileString = ""; 1288 piFileString = "";
1288 QTimer::singleShot( 1, this , SLOT (readBackFileFromSocket( ) )); 1289 QTimer::singleShot( 1, this , SLOT (readBackFileFromSocket( ) ));
1289} 1290}
1290 1291
1291 1292
1292void KServerSocket::readBackFileFromSocket() 1293void KServerSocket::readBackFileFromSocket()
1293{ 1294{
1294 //qDebug("readBackFileFromSocket() %d ", piTime.elapsed ()); 1295 //qDebug("readBackFileFromSocket() %d ", piTime.elapsed ());
1295 while ( mSocket->canReadLine () ) { 1296 while ( mSocket->canReadLine () ) {
1296 piTime.restart(); 1297 piTime.restart();
1297 QString line = mSocket->readLine (); 1298 QString line = mSocket->readLine ();
1298 piFileString += line; 1299 piFileString += line;
1299 //qDebug("readline: %s ", line.latin1()); 1300 //qDebug("readline: %s ", line.latin1());
1300 mSyncActionDialog->setCaption( i18n("Received %1 bytes").arg( piFileString.length() ) ); 1301 mSyncActionDialog->setCaption( i18n("Received %1 bytes").arg( piFileString.length() ) );
1301 1302
1302 } 1303 }
1303 if ( piTime.elapsed () < 3000 ) { 1304 if ( piTime.elapsed () < 3000 ) {
1304 // wait for more 1305 // wait for more
1305 //qDebug("waitformore "); 1306 //qDebug("waitformore ");
1306 QTimer::singleShot( 100, this , SLOT (readBackFileFromSocket( ) )); 1307 QTimer::singleShot( 100, this , SLOT (readBackFileFromSocket( ) ));
1307 return; 1308 return;
1308 } 1309 }
1309 QString fileName = mFileName; 1310 QString fileName = mFileName;
1310 QFile file ( fileName ); 1311 QFile file ( fileName );
1311 if (!file.open( IO_WriteOnly ) ) { 1312 if (!file.open( IO_WriteOnly ) ) {
1312 delete mSyncActionDialog; 1313 delete mSyncActionDialog;
1313 mSyncActionDialog = 0; 1314 mSyncActionDialog = 0;
1314 qDebug("KSS:Error open read back file "); 1315 qDebug("KSS:Error open read back file ");
1315 piFileString = ""; 1316 piFileString = "";
1316 emit file_received( false ); 1317 emit file_received( false );
1317 blockRC = false; 1318 blockRC = false;
1318 return ; 1319 return ;
1319 1320
1320 } 1321 }
1321 1322
1322 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); 1323 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
1323 QTextStream ts ( &file ); 1324 QTextStream ts ( &file );
1324 ts.setEncoding( QTextStream::Latin1 ); 1325 ts.setEncoding( QTextStream::Latin1 );
1325 mSyncActionDialog->setCaption( i18n("Writing file to disk...") ); 1326 mSyncActionDialog->setCaption( i18n("Writing file to disk...") );
1326 ts << piFileString; 1327 ts << piFileString;
1327 mSocket->close(); 1328 mSocket->close();
1328 if ( mSocket->state() == QSocket::Idle ) 1329 if ( mSocket->state() == QSocket::Idle )
1329 QTimer::singleShot( 10, this , SLOT ( discardClient())); 1330 QTimer::singleShot( 10, this , SLOT ( discardClient()));
1330 file.close(); 1331 file.close();
1331 piFileString = ""; 1332 piFileString = "";
1332 emit file_received( true ); 1333 emit file_received( true );
1333 delete mSyncActionDialog; 1334 delete mSyncActionDialog;
1334 mSyncActionDialog = 0; 1335 mSyncActionDialog = 0;
1335 blockRC = false; 1336 blockRC = false;
1336 1337
1337} 1338}
1338 1339
1339KCommandSocket::KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent, QWidget * cap, const char * name ): QObject( parent, name ) 1340KCommandSocket::KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent, QWidget * cap, const char * name ): QObject( parent, name )
1340{ 1341{
1341 mPassWord = password; 1342 mPassWord = password;
1342 mSocket = 0; 1343 mSocket = 0;
1343 mFirst = false; 1344 mFirst = false;
1344 mPort = port; 1345 mPort = port;
1345 mHost = host; 1346 mHost = host;
1346 tlw = cap; 1347 tlw = cap;
1347 mRetVal = quiet; 1348 mRetVal = quiet;
1348 mTimerSocket = new QTimer ( this ); 1349 mTimerSocket = new QTimer ( this );
1349 connect( mTimerSocket, SIGNAL ( timeout () ), this, SLOT ( deleteSocket() ) ); 1350 connect( mTimerSocket, SIGNAL ( timeout () ), this, SLOT ( deleteSocket() ) );
1350} 1351}
1351void KCommandSocket::sendFileRequest() 1352void KCommandSocket::sendFileRequest()
1352{ 1353{
1353 if ( tlw ) 1354 if ( tlw )
1354 tlw->setCaption( i18n("Connected! Sending request for remote file ...") ); 1355 tlw->setCaption( i18n("Connected! Sending request for remote file ...") );
1355 mTimerSocket->start( 300000 ); 1356 mTimerSocket->start( 300000 );
1356 QTextStream os( mSocket ); 1357 QTextStream os( mSocket );
1357 os.setEncoding( QTextStream::Latin1 ); 1358 os.setEncoding( QTextStream::Latin1 );
1358 1359
1359 QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); 1360 QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate );
1360 os << "GET " << mPassWord << curDt <<"\r\n\r\n"; 1361 os << "GET " << mPassWord << curDt <<"\r\n\r\n";
1361} 1362}
1362 1363
1363void KCommandSocket::readFile( QString fn ) 1364void KCommandSocket::readFile( QString fn )
1364{ 1365{
1365 if ( !mSocket ) { 1366 if ( !mSocket ) {
1366 mSocket = new QSocket( this ); 1367 mSocket = new QSocket( this );
1367 connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) ); 1368 connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) );
1368 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1369 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1369 connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() )); 1370 connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() ));
1370 } 1371 }
1371 mFileString = ""; 1372 mFileString = "";
1372 mFileName = fn; 1373 mFileName = fn;
1373 mFirst = true; 1374 mFirst = true;
1374 if ( tlw ) 1375 if ( tlw )
1375 tlw->setCaption( i18n("Trying to connect to remote...") ); 1376 tlw->setCaption( i18n("Trying to connect to remote...") );
1376 mSocket->connectToHost( mHost, mPort ); 1377 mSocket->connectToHost( mHost, mPort );
1377 qDebug("KSS: Waiting for connection"); 1378 qDebug("KSS: Waiting for connection");
1378 mTimerSocket->start( 20000 ); 1379 mTimerSocket->start( 20000 );
1379} 1380}
1380 1381
1381void KCommandSocket::writeFile( QString fileName ) 1382void KCommandSocket::writeFile( QString fileName )
1382{ 1383{
1383 if ( !mSocket ) { 1384 if ( !mSocket ) {
1384 mSocket = new QSocket( this ); 1385 mSocket = new QSocket( this );
1385 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1386 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1386 connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) ); 1387 connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) );
1387 } 1388 }
1388 mFileName = fileName ; 1389 mFileName = fileName ;
1389 mSocket->connectToHost( mHost, mPort ); 1390 mSocket->connectToHost( mHost, mPort );
1390} 1391}
1391void KCommandSocket::writeFileToSocket() 1392void KCommandSocket::writeFileToSocket()
1392{ 1393{
1393 QFile file2( mFileName ); 1394 QFile file2( mFileName );
1394 if (!file2.open( IO_ReadOnly ) ) { 1395 if (!file2.open( IO_ReadOnly ) ) {
1395 mRetVal= errorW; 1396 mRetVal= errorW;
1396 mSocket->close(); 1397 mSocket->close();
1397 if ( mSocket->state() == QSocket::Idle ) 1398 if ( mSocket->state() == QSocket::Idle )
1398 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1399 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1399 return ; 1400 return ;
1400 } 1401 }
1401 QTextStream ts2( &file2 ); 1402 QTextStream ts2( &file2 );
1402 ts2.setEncoding( QTextStream::Latin1 ); 1403 ts2.setEncoding( QTextStream::Latin1 );
1403 QTextStream os2( mSocket ); 1404 QTextStream os2( mSocket );
1404 os2.setEncoding( QTextStream::Latin1 ); 1405 os2.setEncoding( QTextStream::Latin1 );
1405 os2 << "PUT " << mPassWord << "\r\n\r\n";; 1406 os2 << "PUT " << mPassWord << "\r\n\r\n";;
1406 while ( ! ts2.atEnd() ) { 1407 while ( ! ts2.atEnd() ) {
1407 os2 << ts2.readLine() << "\r\n\r\n"; 1408 os2 << ts2.readLine() << "\r\n\r\n";
1408 } 1409 }
1409 mRetVal= successW; 1410 mRetVal= successW;
1410 file2.close(); 1411 file2.close();
1411 mSocket->close(); 1412 mSocket->close();
1412 if ( mSocket->state() == QSocket::Idle ) 1413 if ( mSocket->state() == QSocket::Idle )
1413 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1414 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1414} 1415}
1415void KCommandSocket::sendStop() 1416void KCommandSocket::sendStop()
1416{ 1417{
1417 if ( !mSocket ) { 1418 if ( !mSocket ) {
1418 mSocket = new QSocket( this ); 1419 mSocket = new QSocket( this );
1419 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1420 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1420 } 1421 }
1421 mSocket->connectToHost( mHost, mPort ); 1422 mSocket->connectToHost( mHost, mPort );
1422 QTextStream os2( mSocket ); 1423 QTextStream os2( mSocket );
1423 os2.setEncoding( QTextStream::Latin1 ); 1424 os2.setEncoding( QTextStream::Latin1 );
1424 os2 << "STOP\r\n\r\n"; 1425 os2 << "STOP\r\n\r\n";
1425 mSocket->close(); 1426 mSocket->close();
1426 if ( mSocket->state() == QSocket::Idle ) 1427 if ( mSocket->state() == QSocket::Idle )
1427 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1428 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1428} 1429}
1429 1430
1430void KCommandSocket::startReadFileFromSocket() 1431void KCommandSocket::startReadFileFromSocket()
1431{ 1432{
1432 if ( ! mFirst ) 1433 if ( ! mFirst )
1433 return; 1434 return;
1434 mFirst = false; 1435 mFirst = false;
1435 mTimerSocket->stop(); 1436 mTimerSocket->stop();
1436 mFileString = ""; 1437 mFileString = "";
1437 mTime.start(); 1438 mTime.start();
1438 QTimer::singleShot( 1, this , SLOT (readFileFromSocket( ) )); 1439 QTimer::singleShot( 1, this , SLOT (readFileFromSocket( ) ));
1439 1440
1440} 1441}
1441void KCommandSocket::readFileFromSocket() 1442void KCommandSocket::readFileFromSocket()
1442{ 1443{
1443 //qDebug("readBackFileFromSocket() %d ", mTime.elapsed ()); 1444 //qDebug("readBackFileFromSocket() %d ", mTime.elapsed ());
1444 while ( mSocket->canReadLine () ) { 1445 while ( mSocket->canReadLine () ) {
1445 mTime.restart(); 1446 mTime.restart();
1446 QString line = mSocket->readLine (); 1447 QString line = mSocket->readLine ();
1447 mFileString += line; 1448 mFileString += line;
1448 //qDebug("readline: %s ", line.latin1()); 1449 //qDebug("readline: %s ", line.latin1());
1449 } 1450 }
1450 if ( mTime.elapsed () < 3000 ) { 1451 if ( mTime.elapsed () < 3000 ) {
1451 // wait for more 1452 // wait for more
1452 //qDebug("waitformore "); 1453 //qDebug("waitformore ");
1453 QTimer::singleShot( 100, this , SLOT (readFileFromSocket( ) )); 1454 QTimer::singleShot( 100, this , SLOT (readFileFromSocket( ) ));
1454 return; 1455 return;
1455 } 1456 }
1456 QString fileName = mFileName; 1457 QString fileName = mFileName;
1457 QFile file ( fileName ); 1458 QFile file ( fileName );
1458 if (!file.open( IO_WriteOnly ) ) { 1459 if (!file.open( IO_WriteOnly ) ) {
1459 mFileString = ""; 1460 mFileString = "";
1460 mRetVal = errorR; 1461 mRetVal = errorR;
1461 qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() ); 1462 qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() );
1462 deleteSocket(); 1463 deleteSocket();
1463 return ; 1464 return ;
1464 1465
1465 } 1466 }
1466 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); 1467 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
1467 QTextStream ts ( &file ); 1468 QTextStream ts ( &file );
1468 ts.setEncoding( QTextStream::Latin1 ); 1469 ts.setEncoding( QTextStream::Latin1 );
1469 ts << mFileString; 1470 ts << mFileString;
1470 file.close(); 1471 file.close();
1471 mFileString = ""; 1472 mFileString = "";
1472 mRetVal = successR; 1473 mRetVal = successR;
1473 mSocket->close(); 1474 mSocket->close();
1474 // if state is not idle, deleteSocket(); is called via 1475 // if state is not idle, deleteSocket(); is called via
1475 // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1476 // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1476 if ( mSocket->state() == QSocket::Idle ) 1477 if ( mSocket->state() == QSocket::Idle )
1477 deleteSocket(); 1478 deleteSocket();
1478} 1479}
1479 1480
1480void KCommandSocket::deleteSocket() 1481void KCommandSocket::deleteSocket()
1481{ 1482{
1482 //qDebug("KCommandSocket::deleteSocket() "); 1483 //qDebug("KCommandSocket::deleteSocket() ");
1483 if ( mTimerSocket->isActive () ) { 1484 if ( mTimerSocket->isActive () ) {
1484 mTimerSocket->stop(); 1485 mTimerSocket->stop();
1485 mRetVal = errorTO; 1486 mRetVal = errorTO;
1486 qDebug("KCS::Connection to remote host timed out"); 1487 qDebug("KCS::Connection to remote host timed out");
1487 if ( mSocket ) { 1488 if ( mSocket ) {
1488 mSocket->close(); 1489 mSocket->close();
1489 //if ( mSocket->state() == QSocket::Idle ) 1490 //if ( mSocket->state() == QSocket::Idle )
1490 // deleteSocket(); 1491 // deleteSocket();
1491 delete mSocket; 1492 delete mSocket;
1492 mSocket = 0; 1493 mSocket = 0;
1493 } 1494 }
1494 KMessageBox::error( 0, i18n("Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?")); 1495 KMessageBox::error( 0, i18n("Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?"));
1495 emit commandFinished( this, mRetVal ); 1496 emit commandFinished( this, mRetVal );
1496 return; 1497 return;
1497 } 1498 }
1498 //qDebug("KCommandSocket::deleteSocket() %d", mRetVal ); 1499 //qDebug("KCommandSocket::deleteSocket() %d", mRetVal );
1499 if ( mSocket) 1500 if ( mSocket)
1500 delete mSocket; 1501 delete mSocket;
1501 mSocket = 0; 1502 mSocket = 0;
1502 emit commandFinished( this, mRetVal ); 1503 emit commandFinished( this, mRetVal );
1503} 1504}
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp
index 7f31ab1..aec74fa 100644
--- a/microkde/kdecore/klocale.cpp
+++ b/microkde/kdecore/klocale.cpp
@@ -1,1085 +1,1085 @@
1#include <qregexp.h> 1#include <qregexp.h>
2#include <qapplication.h> 2#include <qapplication.h>
3 3
4#include "kdebug.h" 4#include "kdebug.h"
5#include "kcalendarsystemgregorian.h" 5#include "kcalendarsystemgregorian.h"
6 6
7#include "klocale.h" 7#include "klocale.h"
8 8
9#include <qstringlist.h> 9#include <qstringlist.h>
10 10
11//#define COLLECT_TRANSLATION 11#define COLLECT_TRANSLATION
12 12
13 13
14QDict<QString> *mLocaleDict = 0; 14QDict<QString> *mLocaleDict = 0;
15void setLocaleDict( QDict<QString> * dict ) 15void setLocaleDict( QDict<QString> * dict )
16{ 16{
17 mLocaleDict = dict; 17 mLocaleDict = dict;
18 18
19} 19}
20 20
21#ifdef COLLECT_TRANSLATION 21#ifdef COLLECT_TRANSLATION
22 22
23QStringList missingTrans; 23QStringList missingTrans;
24QStringList existingTrans1; 24QStringList existingTrans1;
25QStringList existingTrans2; 25QStringList existingTrans2;
26 26
27void addMissing(const char *text) 27void addMissing(const char *text)
28{ 28{
29 29
30 QString mis ( text ); 30 QString mis ( text );
31 if ( !missingTrans.contains( mis ) ) 31 if ( !missingTrans.contains( mis ) )
32 missingTrans.append(mis); 32 missingTrans.append(mis);
33 33
34} 34}
35void addExist(const char *text,QString trans ) 35void addExist(const char *text,QString trans )
36{ 36{
37 //return; 37 //return;
38 QString mis ( text ); 38 QString mis ( text );
39 if ( !existingTrans1.contains( mis ) ) { 39 if ( !existingTrans1.contains( mis ) ) {
40 existingTrans1.append(mis); 40 existingTrans1.append(mis);
41 existingTrans2.append(trans); 41 existingTrans2.append(trans);
42 42
43 } 43 }
44 44
45} 45}
46 46
47#include <qfile.h> 47#include <qfile.h>
48#include <qtextstream.h> 48#include <qtextstream.h>
49#include <qtextcodec.h> 49#include <qtextcodec.h>
50#endif 50#endif
51void dumpMissing() 51void dumpMissing()
52{ 52{
53#ifdef COLLECT_TRANSLATION 53#ifdef COLLECT_TRANSLATION
54 QString fileName = "/tmp/usernewtrans.txt"; 54 QString fileName = "/tmp/usernewtrans.txt";
55 QFile file( fileName ); 55 QFile file( fileName );
56 if (!file.open( IO_WriteOnly ) ) { 56 if (!file.open( IO_WriteOnly ) ) {
57 return ; 57 return ;
58 } 58 }
59 QTextStream ts( &file ); 59 QTextStream ts( &file );
60 ts.setCodec( QTextCodec::codecForName("utf8") ); 60 ts.setCodec( QTextCodec::codecForName("utf8") );
61 61
62 int i; 62 int i;
63 for ( i = 0; i< missingTrans.count(); ++i ) { 63 for ( i = 0; i< missingTrans.count(); ++i ) {
64 64
65 QString text = missingTrans[i].replace( QRegExp("\n"),"\\n" ); 65 QString text = missingTrans[i].replace( QRegExp("\n"),"\\n" );
66 ts << "{ \""<<text<< "\",\""<< text <<"\" },\n"; 66 ts << "{ \""<<text<< "\",\""<< text <<"\" },\n";
67 67
68 } 68 }
69 file.close(); 69 file.close();
70 { 70 {
71 QString fileName = "/tmp/usertrans.txt"; 71 QString fileName = "/tmp/usertrans.txt";
72 QFile file( fileName ); 72 QFile file( fileName );
73 if (!file.open( IO_WriteOnly ) ) { 73 if (!file.open( IO_WriteOnly ) ) {
74 return ; 74 return ;
75 } 75 }
76 QTextStream ts( &file ); 76 QTextStream ts( &file );
77 ts.setCodec( QTextCodec::codecForName("utf8") ); 77 ts.setCodec( QTextCodec::codecForName("utf8") );
78 78
79 int i; 79 int i;
80 for ( i = 0; i< existingTrans1.count(); ++i ) { 80 for ( i = 0; i< existingTrans1.count(); ++i ) {
81 81
82 QString text = existingTrans1[i].replace( QRegExp("\n"),"\\n" ); 82 QString text = existingTrans1[i].replace( QRegExp("\n"),"\\n" );
83 QString text2 = existingTrans2[i].replace( QRegExp("\n"),"\\n" ); 83 QString text2 = existingTrans2[i].replace( QRegExp("\n"),"\\n" );
84 ts << "{ \""<<text<< "\",\""<< text2 <<"\" },\n"; 84 ts << "{ \""<<text<< "\",\""<< text2 <<"\" },\n";
85 85
86 } 86 }
87 file.close(); 87 file.close();
88 } 88 }
89#endif 89#endif
90} 90}
91QString i18n(const char *text) 91QString i18n(const char *text)
92{ 92{
93 if ( ! mLocaleDict ) { 93 if ( ! mLocaleDict ) {
94#ifdef COLLECT_TRANSLATION 94#ifdef COLLECT_TRANSLATION
95 addMissing( text ); 95 addMissing( text );
96#endif 96#endif
97 return QString( text ); 97 return QString( text );
98 } 98 }
99 else { 99 else {
100 QString* ret = mLocaleDict->find(QString(text)) ; 100 QString* ret = mLocaleDict->find(QString(text)) ;
101 if ( ret == 0 ) { 101 if ( ret == 0 ) {
102#ifdef COLLECT_TRANSLATION 102#ifdef COLLECT_TRANSLATION
103 addMissing( text ); 103 addMissing( text );
104#endif 104#endif
105 return QString( text ); 105 return QString( text );
106 } 106 }
107 else { 107 else {
108 if ( (*ret).isEmpty() ) { 108 if ( (*ret).isEmpty() ) {
109#ifdef COLLECT_TRANSLATION 109#ifdef COLLECT_TRANSLATION
110 addMissing( text ); 110 addMissing( text );
111#endif 111#endif
112 return QString( text ); 112 return QString( text );
113 } 113 }
114 else { 114 else {
115#ifdef COLLECT_TRANSLATION 115#ifdef COLLECT_TRANSLATION
116 addExist( text, *ret ); 116 addExist( text, *ret );
117#endif 117#endif
118 return (*ret); 118 return (*ret);
119 } 119 }
120 } 120 }
121 } 121 }
122 122
123} 123}
124 124
125QString i18n(const char *,const char *text) 125QString i18n(const char *,const char *text)
126{ 126{
127 return i18n( text ); 127 return i18n( text );
128} 128}
129 129
130QString i18n(const char *text1, const char *textn, int num) 130QString i18n(const char *text1, const char *textn, int num)
131{ 131{
132 if ( num == 1 ) return i18n( text1 ); 132 if ( num == 1 ) return i18n( text1 );
133 else { 133 else {
134 QString text = i18n( textn ); 134 QString text = i18n( textn );
135 int pos = text.find( "%n" ); 135 int pos = text.find( "%n" );
136 if ( pos >= 0 ) text.replace( pos, 2, QString::number( num ) ); 136 if ( pos >= 0 ) text.replace( pos, 2, QString::number( num ) );
137 return text; 137 return text;
138 } 138 }
139} 139}
140 140
141inline void put_it_in( QChar *buffer, uint& index, const QString &s ) 141inline void put_it_in( QChar *buffer, uint& index, const QString &s )
142{ 142{
143 for ( uint l = 0; l < s.length(); l++ ) 143 for ( uint l = 0; l < s.length(); l++ )
144 buffer[index++] = s.at( l ); 144 buffer[index++] = s.at( l );
145} 145}
146 146
147inline void put_it_in( QChar *buffer, uint& index, int number ) 147inline void put_it_in( QChar *buffer, uint& index, int number )
148{ 148{
149 buffer[index++] = number / 10 + '0'; 149 buffer[index++] = number / 10 + '0';
150 buffer[index++] = number % 10 + '0'; 150 buffer[index++] = number % 10 + '0';
151} 151}
152 152
153static int readInt(const QString &str, uint &pos) 153static int readInt(const QString &str, uint &pos)
154{ 154{
155 if (!str.at(pos).isDigit()) return -1; 155 if (!str.at(pos).isDigit()) return -1;
156 int result = 0; 156 int result = 0;
157 for (; str.length() > pos && str.at(pos).isDigit(); pos++) 157 for (; str.length() > pos && str.at(pos).isDigit(); pos++)
158 { 158 {
159 result *= 10; 159 result *= 10;
160 result += str.at(pos).digitValue(); 160 result += str.at(pos).digitValue();
161 } 161 }
162 162
163 return result; 163 return result;
164} 164}
165 165
166KLocale::KLocale() : mCalendarSystem( 0 ) 166KLocale::KLocale() : mCalendarSystem( 0 )
167{ 167{
168 168
169 m_decimalSymbol = "."; 169 m_decimalSymbol = ".";
170 m_positiveSign = ""; 170 m_positiveSign = "";
171 m_negativeSign = "-"; 171 m_negativeSign = "-";
172 m_thousandsSeparator = ","; 172 m_thousandsSeparator = ",";
173 173
174 174
175 175
176 176
177 mWeekStartsMonday = true; 177 mWeekStartsMonday = true;
178 mHourF24Format = true; 178 mHourF24Format = true;
179 mIntDateFormat = Default; 179 mIntDateFormat = Default;
180 mIntTimeFormat = Default; 180 mIntTimeFormat = Default;
181 mLanguage = 0; 181 mLanguage = 0;
182 mDateFormat = "%a %Y %b %d"; 182 mDateFormat = "%a %Y %b %d";
183 mDateFormatShort = "%Y-%m-%d"; 183 mDateFormatShort = "%Y-%m-%d";
184 mTimeZoneList << ("-11:00 US/Samoa") 184 mTimeZoneList << ("-11:00 US/Samoa")
185 << ("-10:00 US/Hawaii") 185 << ("-10:00 US/Hawaii")
186 << ("-09:00 US/Alaska") 186 << ("-09:00 US/Alaska")
187 << ("-08:00 US/Pacific") 187 << ("-08:00 US/Pacific")
188 << ("-07:00 US/Mountain") 188 << ("-07:00 US/Mountain")
189 << ("-06:00 US/Central") 189 << ("-06:00 US/Central")
190 << ("-05:00 US/Eastern") 190 << ("-05:00 US/Eastern")
191 << ("-04:00 Brazil/West") 191 << ("-04:00 Brazil/West")
192 << ("-03:00 Brazil/East") 192 << ("-03:00 Brazil/East")
193 << ("-02:00 Brazil/DeNoronha") 193 << ("-02:00 Brazil/DeNoronha")
194 << ("-01:00 Atlantic/Azores") 194 << ("-01:00 Atlantic/Azores")
195 << (" 00:00 Europe/London(UTC)") 195 << (" 00:00 Europe/London(UTC)")
196 << ("+01:00 Europe/Oslo(CET)") 196 << ("+01:00 Europe/Oslo(CET)")
197 << ("+02:00 Europe/Helsinki") 197 << ("+02:00 Europe/Helsinki")
198 << ("+03:00 Europe/Moscow") 198 << ("+03:00 Europe/Moscow")
199 << ("+04:00 Indian/Mauritius") 199 << ("+04:00 Indian/Mauritius")
200 << ("+05:00 Indian/Maldives") 200 << ("+05:00 Indian/Maldives")
201 << ("+06:00 Indian/Chagos") 201 << ("+06:00 Indian/Chagos")
202 << ("+07:00 Asia/Bangkok") 202 << ("+07:00 Asia/Bangkok")
203 << ("+08:00 Asia/Hongkong") 203 << ("+08:00 Asia/Hongkong")
204 << ("+09:00 Asia/Tokyo") 204 << ("+09:00 Asia/Tokyo")
205 << ("+10:00 Asia/Vladivostok") 205 << ("+10:00 Asia/Vladivostok")
206 << ("+11:00 Asia/Magadan") 206 << ("+11:00 Asia/Magadan")
207 << ("+12:00 Asia/Kamchatka") 207 << ("+12:00 Asia/Kamchatka")
208 // << (" xx:xx User defined offset") 208 // << (" xx:xx User defined offset")
209 << i18n (" Local Time"); 209 << i18n (" Local Time");
210 mSouthDaylight = false; 210 mSouthDaylight = false;
211 mTimeZoneOffset = 0; 211 mTimeZoneOffset = 0;
212 daylightEnabled = false; 212 daylightEnabled = false;
213} 213}
214 214
215void KLocale::setDateFormat( QString s ) 215void KLocale::setDateFormat( QString s )
216{ 216{
217 mDateFormat = s; 217 mDateFormat = s;
218} 218}
219 219
220void KLocale::setDateFormatShort( QString s ) 220void KLocale::setDateFormatShort( QString s )
221{ 221{
222 mDateFormatShort = s; 222 mDateFormatShort = s;
223} 223}
224 224
225void KLocale::setHore24Format ( bool b ) 225void KLocale::setHore24Format ( bool b )
226{ 226{
227 mHourF24Format = b; 227 mHourF24Format = b;
228} 228}
229void KLocale::setWeekStartMonday( bool b ) 229void KLocale::setWeekStartMonday( bool b )
230{ 230{
231 mWeekStartsMonday = b; 231 mWeekStartsMonday = b;
232} 232}
233 233
234KLocale::IntDateFormat KLocale::getIntDateFormat( ) 234KLocale::IntDateFormat KLocale::getIntDateFormat( )
235{ 235{
236 return mIntDateFormat; 236 return mIntDateFormat;
237 237
238} 238}
239void KLocale::setIntDateFormat( KLocale::IntDateFormat i ) 239void KLocale::setIntDateFormat( KLocale::IntDateFormat i )
240{ 240{
241 mIntDateFormat = i; 241 mIntDateFormat = i;
242} 242}
243KLocale::IntDateFormat KLocale::getIntTimeFormat( ) 243KLocale::IntDateFormat KLocale::getIntTimeFormat( )
244{ 244{
245 return mIntTimeFormat; 245 return mIntTimeFormat;
246 246
247} 247}
248void KLocale::setIntTimeFormat( KLocale::IntDateFormat i ) 248void KLocale::setIntTimeFormat( KLocale::IntDateFormat i )
249{ 249{
250 mIntTimeFormat = i; 250 mIntTimeFormat = i;
251} 251}
252 252
253void KLocale::setLanguage( int i ) 253void KLocale::setLanguage( int i )
254{ 254{
255 mLanguage = i; 255 mLanguage = i;
256} 256}
257int KLocale::language( ) 257int KLocale::language( )
258{ 258{
259 return mLanguage; 259 return mLanguage;
260} 260}
261QString KLocale::translate( const char *index ) const 261QString KLocale::translate( const char *index ) const
262{ 262{
263 return i18n( index ); 263 return i18n( index );
264} 264}
265 265
266QString KLocale::translate( const char *, const char *fallback) const 266QString KLocale::translate( const char *, const char *fallback) const
267{ 267{
268 return i18n( fallback ); 268 return i18n( fallback );
269} 269}
270 270
271QString KLocale::formatTime(const QTime &pTime, bool includeSecs, IntDateFormat intIntDateFormat) const 271QString KLocale::formatTime(const QTime &pTime, bool includeSecs, IntDateFormat intIntDateFormat) const
272{ 272{
273 const QString rst = timeFormat(intIntDateFormat); 273 const QString rst = timeFormat(intIntDateFormat);
274 274
275 // only "pm/am" here can grow, the rest shrinks, but 275 // only "pm/am" here can grow, the rest shrinks, but
276 // I'm rather safe than sorry 276 // I'm rather safe than sorry
277 QChar *buffer = new QChar[rst.length() * 3 / 2 + 30]; 277 QChar *buffer = new QChar[rst.length() * 3 / 2 + 30];
278 278
279 uint index = 0; 279 uint index = 0;
280 bool escape = false; 280 bool escape = false;
281 int number = 0; 281 int number = 0;
282 282
283 for ( uint format_index = 0; format_index < rst.length(); format_index++ ) 283 for ( uint format_index = 0; format_index < rst.length(); format_index++ )
284 { 284 {
285 if ( !escape ) 285 if ( !escape )
286 { 286 {
287 if ( rst.at( format_index ).unicode() == '%' ) 287 if ( rst.at( format_index ).unicode() == '%' )
288 escape = true; 288 escape = true;
289 else 289 else
290 buffer[index++] = rst.at( format_index ); 290 buffer[index++] = rst.at( format_index );
291 } 291 }
292 else 292 else
293 { 293 {
294 switch ( rst.at( format_index ).unicode() ) 294 switch ( rst.at( format_index ).unicode() )
295 { 295 {
296 case '%': 296 case '%':
297 buffer[index++] = '%'; 297 buffer[index++] = '%';
298 break; 298 break;
299 case 'H': 299 case 'H':
300 put_it_in( buffer, index, pTime.hour() ); 300 put_it_in( buffer, index, pTime.hour() );
301 break; 301 break;
302 case 'I': 302 case 'I':
303 put_it_in( buffer, index, ( pTime.hour() + 11) % 12 + 1 ); 303 put_it_in( buffer, index, ( pTime.hour() + 11) % 12 + 1 );
304 break; 304 break;
305 case 'M': 305 case 'M':
306 put_it_in( buffer, index, pTime.minute() ); 306 put_it_in( buffer, index, pTime.minute() );
307 break; 307 break;
308 case 'S': 308 case 'S':
309 if (includeSecs) 309 if (includeSecs)
310 put_it_in( buffer, index, pTime.second() ); 310 put_it_in( buffer, index, pTime.second() );
311 else 311 else
312 { 312 {
313 // we remove the seperator sign before the seconds and 313 // we remove the seperator sign before the seconds and
314 // assume that works everywhere 314 // assume that works everywhere
315 --index; 315 --index;
316 break; 316 break;
317 } 317 }
318 break; 318 break;
319 case 'k': 319 case 'k':
320 number = pTime.hour(); 320 number = pTime.hour();
321 case 'l': 321 case 'l':
322 // to share the code 322 // to share the code
323 if ( rst.at( format_index ).unicode() == 'l' ) 323 if ( rst.at( format_index ).unicode() == 'l' )
324 number = (pTime.hour() + 11) % 12 + 1; 324 number = (pTime.hour() + 11) % 12 + 1;
325 if ( number / 10 ) 325 if ( number / 10 )
326 buffer[index++] = number / 10 + '0'; 326 buffer[index++] = number / 10 + '0';
327 buffer[index++] = number % 10 + '0'; 327 buffer[index++] = number % 10 + '0';
328 break; 328 break;
329 case 'p': 329 case 'p':
330 { 330 {
331 QString s; 331 QString s;
332 if ( pTime.hour() >= 12 ) 332 if ( pTime.hour() >= 12 )
333 put_it_in( buffer, index, i18n("pm") ); 333 put_it_in( buffer, index, i18n("pm") );
334 else 334 else
335 put_it_in( buffer, index, i18n("am") ); 335 put_it_in( buffer, index, i18n("am") );
336 break; 336 break;
337 } 337 }
338 default: 338 default:
339 buffer[index++] = rst.at( format_index ); 339 buffer[index++] = rst.at( format_index );
340 break; 340 break;
341 } 341 }
342 escape = false; 342 escape = false;
343 } 343 }
344 } 344 }
345 QString ret( buffer, index ); 345 QString ret( buffer, index );
346 delete [] buffer; 346 delete [] buffer;
347 return ret; 347 return ret;
348} 348}
349 349
350QString KLocale::formatDate(const QDate &pDate, bool shortFormat, IntDateFormat intIntDateFormat) const 350QString KLocale::formatDate(const QDate &pDate, bool shortFormat, IntDateFormat intIntDateFormat) const
351{ 351{
352 const QString rst = shortFormat?dateFormatShort(intIntDateFormat):dateFormat(intIntDateFormat); 352 const QString rst = shortFormat?dateFormatShort(intIntDateFormat):dateFormat(intIntDateFormat);
353 353
354 // I'm rather safe than sorry 354 // I'm rather safe than sorry
355 QChar *buffer = new QChar[rst.length() * 3 / 2 + 50]; 355 QChar *buffer = new QChar[rst.length() * 3 / 2 + 50];
356 356
357 unsigned int index = 0; 357 unsigned int index = 0;
358 bool escape = false; 358 bool escape = false;
359 int number = 0; 359 int number = 0;
360 360
361 for ( uint format_index = 0; format_index < rst.length(); ++format_index ) 361 for ( uint format_index = 0; format_index < rst.length(); ++format_index )
362 { 362 {
363 if ( !escape ) 363 if ( !escape )
364 { 364 {
365 if ( rst.at( format_index ).unicode() == '%' ) 365 if ( rst.at( format_index ).unicode() == '%' )
366 escape = true; 366 escape = true;
367 else 367 else
368 buffer[index++] = rst.at( format_index ); 368 buffer[index++] = rst.at( format_index );
369 } 369 }
370 else 370 else
371 { 371 {
372 switch ( rst.at( format_index ).unicode() ) 372 switch ( rst.at( format_index ).unicode() )
373 { 373 {
374 case '%': 374 case '%':
375 buffer[index++] = '%'; 375 buffer[index++] = '%';
376 break; 376 break;
377 case 'Y': 377 case 'Y':
378 put_it_in( buffer, index, pDate.year() / 100 ); 378 put_it_in( buffer, index, pDate.year() / 100 );
379 case 'y': 379 case 'y':
380 put_it_in( buffer, index, pDate.year() % 100 ); 380 put_it_in( buffer, index, pDate.year() % 100 );
381 break; 381 break;
382 case 'n': 382 case 'n':
383 number = pDate.month(); 383 number = pDate.month();
384 case 'e': 384 case 'e':
385 // to share the code 385 // to share the code
386 if ( rst.at( format_index ).unicode() == 'e' ) 386 if ( rst.at( format_index ).unicode() == 'e' )
387 number = pDate.day(); 387 number = pDate.day();
388 if ( number / 10 ) 388 if ( number / 10 )
389 buffer[index++] = number / 10 + '0'; 389 buffer[index++] = number / 10 + '0';
390 buffer[index++] = number % 10 + '0'; 390 buffer[index++] = number % 10 + '0';
391 break; 391 break;
392 case 'm': 392 case 'm':
393 put_it_in( buffer, index, pDate.month() ); 393 put_it_in( buffer, index, pDate.month() );
394 break; 394 break;
395 case 'b': 395 case 'b':
396 put_it_in( buffer, index, monthName(pDate.month(), true) ); 396 put_it_in( buffer, index, monthName(pDate.month(), true) );
397 break; 397 break;
398 case 'B': 398 case 'B':
399 put_it_in( buffer, index, monthName(pDate.month(), false) ); 399 put_it_in( buffer, index, monthName(pDate.month(), false) );
400 break; 400 break;
401 case 'd': 401 case 'd':
402 put_it_in( buffer, index, pDate.day() ); 402 put_it_in( buffer, index, pDate.day() );
403 break; 403 break;
404 case 'a': 404 case 'a':
405 put_it_in( buffer, index, weekDayName(pDate.dayOfWeek(), true) ); 405 put_it_in( buffer, index, weekDayName(pDate.dayOfWeek(), true) );
406 break; 406 break;
407 case 'A': 407 case 'A':
408 put_it_in( buffer, index, weekDayName(pDate.dayOfWeek(), false) ); 408 put_it_in( buffer, index, weekDayName(pDate.dayOfWeek(), false) );
409 break; 409 break;
410 default: 410 default:
411 buffer[index++] = rst.at( format_index ); 411 buffer[index++] = rst.at( format_index );
412 break; 412 break;
413 } 413 }
414 escape = false; 414 escape = false;
415 } 415 }
416 } 416 }
417 QString ret( buffer, index ); 417 QString ret( buffer, index );
418 delete [] buffer; 418 delete [] buffer;
419 return ret; 419 return ret;
420} 420}
421 421
422QString KLocale::formatDateTime(const QDateTime &pDateTime, 422QString KLocale::formatDateTime(const QDateTime &pDateTime,
423 bool shortFormat, 423 bool shortFormat,
424 bool includeSeconds, 424 bool includeSeconds,
425 IntDateFormat intIntDateFormat) const 425 IntDateFormat intIntDateFormat) const
426{ 426{
427 QString format("%1 %2"); 427 QString format("%1 %2");
428 428
429 if ( intIntDateFormat == Default ) 429 if ( intIntDateFormat == Default )
430 format = "%1 %2"; 430 format = "%1 %2";
431 else if ( intIntDateFormat == Format1 ) 431 else if ( intIntDateFormat == Format1 )
432 format = "%1 %2"; 432 format = "%1 %2";
433 else if ( intIntDateFormat == ISODate ) 433 else if ( intIntDateFormat == ISODate )
434 format = "%1T%2"; 434 format = "%1T%2";
435 435
436 QString res = format.arg(formatDate( pDateTime.date(), shortFormat, intIntDateFormat )) 436 QString res = format.arg(formatDate( pDateTime.date(), shortFormat, intIntDateFormat ))
437 .arg(formatTime( pDateTime.time(), includeSeconds , intIntDateFormat )); 437 .arg(formatTime( pDateTime.time(), includeSeconds , intIntDateFormat ));
438 438
439 //qDebug("KLocale::formatDateTime transformed %s, into %s", pDateTime.toString().latin1(), res.latin1() ); 439 //qDebug("KLocale::formatDateTime transformed %s, into %s", pDateTime.toString().latin1(), res.latin1() );
440 440
441 return res; 441 return res;
442} 442}
443 443
444QString KLocale::formatDateTime(const QDateTime &pDateTime, IntDateFormat intIntDateFormat) const 444QString KLocale::formatDateTime(const QDateTime &pDateTime, IntDateFormat intIntDateFormat) const
445{ 445{
446 return formatDateTime(pDateTime, true, true, intIntDateFormat); 446 return formatDateTime(pDateTime, true, true, intIntDateFormat);
447} 447}
448 448
449QDate KLocale::readDate(const QString &intstr, bool* ok) const 449QDate KLocale::readDate(const QString &intstr, bool* ok) const
450{ 450{
451 QDate date; 451 QDate date;
452 date = readDate(intstr, true, ok); 452 date = readDate(intstr, true, ok);
453 if (date.isValid()) return date; 453 if (date.isValid()) return date;
454 return readDate(intstr, false, ok); 454 return readDate(intstr, false, ok);
455} 455}
456 456
457QDate KLocale::readDate(const QString &intstr, bool shortFormat, bool* ok) const 457QDate KLocale::readDate(const QString &intstr, bool shortFormat, bool* ok) const
458{ 458{
459 QString fmt = (shortFormat ? dateFormatShort() : dateFormat()).simplifyWhiteSpace(); 459 QString fmt = (shortFormat ? dateFormatShort() : dateFormat()).simplifyWhiteSpace();
460 return readDate( intstr, fmt, ok ); 460 return readDate( intstr, fmt, ok );
461} 461}
462 462
463QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) const 463QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) const
464{ 464{
465 //kdDebug(173) << "KLocale::readDate intstr=" << intstr << " fmt=" << fmt << endl; 465 //kdDebug(173) << "KLocale::readDate intstr=" << intstr << " fmt=" << fmt << endl;
466 QString str = intstr.simplifyWhiteSpace().lower(); 466 QString str = intstr.simplifyWhiteSpace().lower();
467 int day = -1, month = -1; 467 int day = -1, month = -1;
468 // allow the year to be omitted if not in the format 468 // allow the year to be omitted if not in the format
469 int year = QDate::currentDate().year(); 469 int year = QDate::currentDate().year();
470 uint strpos = 0; 470 uint strpos = 0;
471 uint fmtpos = 0; 471 uint fmtpos = 0;
472 472
473 while (fmt.length() > fmtpos || str.length() > strpos) 473 while (fmt.length() > fmtpos || str.length() > strpos)
474 { 474 {
475 if ( !(fmt.length() > fmtpos && str.length() > strpos) ) 475 if ( !(fmt.length() > fmtpos && str.length() > strpos) )
476 goto error; 476 goto error;
477 477
478 QChar c = fmt.at(fmtpos++); 478 QChar c = fmt.at(fmtpos++);
479 479
480 if (c != '%') { 480 if (c != '%') {
481 if (c.isSpace()) 481 if (c.isSpace())
482 strpos++; 482 strpos++;
483 else if (c != str.at(strpos++)) 483 else if (c != str.at(strpos++))
484 goto error; 484 goto error;
485 continue; 485 continue;
486 } 486 }
487 487
488 // remove space at the begining 488 // remove space at the begining
489 if (str.length() > strpos && str.at(strpos).isSpace()) 489 if (str.length() > strpos && str.at(strpos).isSpace())
490 strpos++; 490 strpos++;
491 491
492 c = fmt.at(fmtpos++); 492 c = fmt.at(fmtpos++);
493 switch (c) 493 switch (c)
494 { 494 {
495 case 'a': 495 case 'a':
496 case 'A': 496 case 'A':
497 // this will just be ignored 497 // this will just be ignored
498 { // Cristian Tache: porting to Win: Block added because of "j" redefinition 498 { // Cristian Tache: porting to Win: Block added because of "j" redefinition
499 for (int j = 1; j < 8; j++) { 499 for (int j = 1; j < 8; j++) {
500 QString s = weekDayName(j, c == 'a').lower(); 500 QString s = weekDayName(j, c == 'a').lower();
501 int len = s.length(); 501 int len = s.length();
502 if (str.mid(strpos, len) == s) 502 if (str.mid(strpos, len) == s)
503 strpos += len; 503 strpos += len;
504 } 504 }
505 break; 505 break;
506 } 506 }
507 case 'b': 507 case 'b':
508 case 'B': 508 case 'B':
509 { // Cristian Tache: porting to Win: Block added because of "j" redefinition 509 { // Cristian Tache: porting to Win: Block added because of "j" redefinition
510 for (int j = 1; j < 13; j++) { 510 for (int j = 1; j < 13; j++) {
511 QString s = monthName(j, c == 'b').lower(); 511 QString s = monthName(j, c == 'b').lower();
512 int len = s.length(); 512 int len = s.length();
513 if (str.mid(strpos, len) == s) { 513 if (str.mid(strpos, len) == s) {
514 month = j; 514 month = j;
515 strpos += len; 515 strpos += len;
516 } 516 }
517 } 517 }
518 break; 518 break;
519 } 519 }
520 case 'd': 520 case 'd':
521 case 'e': 521 case 'e':
522 day = readInt(str, strpos); 522 day = readInt(str, strpos);
523 if (day < 1 || day > 31) 523 if (day < 1 || day > 31)
524 goto error; 524 goto error;
525 525
526 break; 526 break;
527 527
528 case 'n': 528 case 'n':
529 case 'm': 529 case 'm':
530 month = readInt(str, strpos); 530 month = readInt(str, strpos);
531 if (month < 1 || month > 12) 531 if (month < 1 || month > 12)
532 goto error; 532 goto error;
533 533
534 break; 534 break;
535 535
536 case 'Y': 536 case 'Y':
537 case 'y': 537 case 'y':
538 year = readInt(str, strpos); 538 year = readInt(str, strpos);
539 if (year < 0) 539 if (year < 0)
540 goto error; 540 goto error;
541 // Qt treats a year in the range 0-100 as 1900-1999. 541 // Qt treats a year in the range 0-100 as 1900-1999.
542 // It is nicer for the user if we treat 0-68 as 2000-2068 542 // It is nicer for the user if we treat 0-68 as 2000-2068
543 if (year < 69) 543 if (year < 69)
544 year += 2000; 544 year += 2000;
545 else if (c == 'y') 545 else if (c == 'y')
546 year += 1900; 546 year += 1900;
547 547
548 break; 548 break;
549 } 549 }
550 } 550 }
551 //kdDebug(173) << "KLocale::readDate day=" << day << " month=" << month << " year=" << year << endl; 551 //kdDebug(173) << "KLocale::readDate day=" << day << " month=" << month << " year=" << year << endl;
552 if ( year != -1 && month != -1 && day != -1 ) 552 if ( year != -1 && month != -1 && day != -1 )
553 { 553 {
554 if (ok) *ok = true; 554 if (ok) *ok = true;
555 return QDate(year, month, day); 555 return QDate(year, month, day);
556 } 556 }
557 error: 557 error:
558 if (ok) *ok = false; 558 if (ok) *ok = false;
559 return QDate(); // invalid date 559 return QDate(); // invalid date
560} 560}
561 561
562QTime KLocale::readTime(const QString &intstr, bool *ok) const 562QTime KLocale::readTime(const QString &intstr, bool *ok) const
563{ 563{
564 QTime _time; 564 QTime _time;
565 _time = readTime(intstr, false, ok); 565 _time = readTime(intstr, false, ok);
566 if (_time.isValid()) return _time; 566 if (_time.isValid()) return _time;
567 return readTime(intstr, true, ok); 567 return readTime(intstr, true, ok);
568} 568}
569 569
570QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const 570QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const
571{ 571{
572 QString str = intstr.simplifyWhiteSpace().lower(); 572 QString str = intstr.simplifyWhiteSpace().lower();
573 QString Format = timeFormat().simplifyWhiteSpace(); 573 QString Format = timeFormat().simplifyWhiteSpace();
574 if (!seconds) 574 if (!seconds)
575 Format.replace(QRegExp(QString::fromLatin1(".%S")), QString::null); 575 Format.replace(QRegExp(QString::fromLatin1(".%S")), QString::null);
576 576
577 int hour = -1, minute = -1, second = seconds ? -1 : 0; // don't require seconds 577 int hour = -1, minute = -1, second = seconds ? -1 : 0; // don't require seconds
578 578
579 bool g_12h = false; 579 bool g_12h = false;
580 bool pm = false; 580 bool pm = false;
581 uint strpos = 0; 581 uint strpos = 0;
582 uint Formatpos = 0; 582 uint Formatpos = 0;
583 583
584 while (Format.length() > Formatpos || str.length() > strpos) 584 while (Format.length() > Formatpos || str.length() > strpos)
585 { 585 {
586 if ( !(Format.length() > Formatpos && str.length() > strpos) ) goto error; 586 if ( !(Format.length() > Formatpos && str.length() > strpos) ) goto error;
587 587
588 QChar c = Format.at(Formatpos++); 588 QChar c = Format.at(Formatpos++);
589 589
590 if (c != '%') 590 if (c != '%')
591 { 591 {
592 if (c.isSpace()) 592 if (c.isSpace())
593 strpos++; 593 strpos++;
594 else if (c != str.at(strpos++)) 594 else if (c != str.at(strpos++))
595 goto error; 595 goto error;
596 continue; 596 continue;
597 } 597 }
598 598
599 // remove space at the begining 599 // remove space at the begining
600 if (str.length() > strpos && str.at(strpos).isSpace()) 600 if (str.length() > strpos && str.at(strpos).isSpace())
601 strpos++; 601 strpos++;
602 602
603 c = Format.at(Formatpos++); 603 c = Format.at(Formatpos++);
604 switch (c) 604 switch (c)
605 { 605 {
606 case 'p': 606 case 'p':
607 { 607 {
608 QString s; 608 QString s;
609 s = i18n("pm").lower(); 609 s = i18n("pm").lower();
610 int len = s.length(); 610 int len = s.length();
611 if (str.mid(strpos, len) == s) 611 if (str.mid(strpos, len) == s)
612 { 612 {
613 pm = true; 613 pm = true;
614 strpos += len; 614 strpos += len;
615 } 615 }
616 else 616 else
617 { 617 {
618 s = i18n("am").lower(); 618 s = i18n("am").lower();
619 len = s.length(); 619 len = s.length();
620 if (str.mid(strpos, len) == s) { 620 if (str.mid(strpos, len) == s) {
621 pm = false; 621 pm = false;
622 strpos += len; 622 strpos += len;
623 } 623 }
624 else 624 else
625 goto error; 625 goto error;
626 } 626 }
627 } 627 }
628 break; 628 break;
629 629
630 case 'k': 630 case 'k':
631 case 'H': 631 case 'H':
632 g_12h = false; 632 g_12h = false;
633 hour = readInt(str, strpos); 633 hour = readInt(str, strpos);
634 if (hour < 0 || hour > 23) 634 if (hour < 0 || hour > 23)
635 goto error; 635 goto error;
636 636
637 break; 637 break;
638 638
639 case 'l': 639 case 'l':
640 case 'I': 640 case 'I':
641 g_12h = true; 641 g_12h = true;
642 hour = readInt(str, strpos); 642 hour = readInt(str, strpos);
643 if (hour < 1 || hour > 12) 643 if (hour < 1 || hour > 12)
644 goto error; 644 goto error;
645 645
646 break; 646 break;
647 647
648 case 'M': 648 case 'M':
649 minute = readInt(str, strpos); 649 minute = readInt(str, strpos);
650 if (minute < 0 || minute > 59) 650 if (minute < 0 || minute > 59)
651 goto error; 651 goto error;
652 652
653 break; 653 break;
654 654
655 case 'S': 655 case 'S':
656 second = readInt(str, strpos); 656 second = readInt(str, strpos);
657 if (second < 0 || second > 59) 657 if (second < 0 || second > 59)
658 goto error; 658 goto error;
659 659
660 break; 660 break;
661 } 661 }
662 } 662 }
663 if (g_12h) 663 if (g_12h)
664 { 664 {
665 hour %= 12; 665 hour %= 12;
666 if (pm) hour += 12; 666 if (pm) hour += 12;
667 } 667 }
668 668
669 if (ok) *ok = true; 669 if (ok) *ok = true;
670 return QTime(hour, minute, second); 670 return QTime(hour, minute, second);
671 671
672 error: 672 error:
673 if (ok) *ok = false; 673 if (ok) *ok = false;
674 return QTime(-1, -1, -1); // return invalid date if it didn't work 674 return QTime(-1, -1, -1); // return invalid date if it didn't work
675 // This will be removed in the near future, since it gives a warning on stderr. 675 // This will be removed in the near future, since it gives a warning on stderr.
676 // The presence of the bool* (since KDE-3.0) removes the need for an invalid QTime. 676 // The presence of the bool* (since KDE-3.0) removes the need for an invalid QTime.
677} 677}
678 678
679QDateTime KLocale::readDateTime(const QString &intstr, 679QDateTime KLocale::readDateTime(const QString &intstr,
680 IntDateFormat intIntDateFormat, 680 IntDateFormat intIntDateFormat,
681 bool* ok) const 681 bool* ok) const
682{ 682{
683 bool ok1, ok2; 683 bool ok1, ok2;
684 684
685 // AT the moment we can not read any other format then ISODate 685 // AT the moment we can not read any other format then ISODate
686 if ( intIntDateFormat != ISODate ) 686 if ( intIntDateFormat != ISODate )
687 { 687 {
688 qDebug("KLocale::readDateTime, only ISODate is supported."); 688 qDebug("KLocale::readDateTime, only ISODate is supported.");
689 return QDateTime(); 689 return QDateTime();
690 } 690 }
691 691
692 int pos = intstr.find("T"); 692 int pos = intstr.find("T");
693 QString date = intstr.left(pos); 693 QString date = intstr.left(pos);
694 QString time = intstr.mid(pos+1); 694 QString time = intstr.mid(pos+1);
695 695
696 QString dformat = dateFormat(intIntDateFormat); 696 QString dformat = dateFormat(intIntDateFormat);
697 QString tformat = timeFormat(intIntDateFormat); 697 QString tformat = timeFormat(intIntDateFormat);
698 698
699 QDate m_date = readDate(date, dformat, &ok1); 699 QDate m_date = readDate(date, dformat, &ok1);
700 QTime m_time = readTime(time, tformat, &ok2); 700 QTime m_time = readTime(time, tformat, &ok2);
701 701
702 QDateTime m_dt; 702 QDateTime m_dt;
703 703
704 if (ok) 704 if (ok)
705 { 705 {
706 if ((ok1 == false) || (ok2 == false)) 706 if ((ok1 == false) || (ok2 == false))
707 *ok = false; 707 *ok = false;
708 else 708 else
709 *ok = true; 709 *ok = true;
710 } 710 }
711 711
712 //only set values if both operations returned true. 712 //only set values if both operations returned true.
713 if ((ok1 == true) && (ok2 == true)) 713 if ((ok1 == true) && (ok2 == true))
714 { 714 {
715 m_dt.setDate(m_date); 715 m_dt.setDate(m_date);
716 m_dt.setTime(m_time); 716 m_dt.setTime(m_time);
717 } 717 }
718 718
719 //qDebug("KLocale::readDateTime() transformed %s into %s (%s), %s (%s) : err1=%i, err2=%i", intstr.latin1(), date.latin1(), dformat.latin1(), time.latin1(), tformat.latin1(), ok1, ok2); 719 //qDebug("KLocale::readDateTime() transformed %s into %s (%s), %s (%s) : err1=%i, err2=%i", intstr.latin1(), date.latin1(), dformat.latin1(), time.latin1(), tformat.latin1(), ok1, ok2);
720 return m_dt; 720 return m_dt;
721} 721}
722 722
723QDate KLocale::readDate(const QString &intstr, 723QDate KLocale::readDate(const QString &intstr,
724 IntDateFormat intIntDateFormat, 724 IntDateFormat intIntDateFormat,
725 bool* ok) const 725 bool* ok) const
726{ 726{
727 bool ok1; 727 bool ok1;
728 728
729 QString dformat = dateFormat(intIntDateFormat); 729 QString dformat = dateFormat(intIntDateFormat);
730 730
731 QDate m_date = readDate(intstr, dformat, &ok1); 731 QDate m_date = readDate(intstr, dformat, &ok1);
732 732
733 if (ok) 733 if (ok)
734 *ok = ok1; 734 *ok = ok1;
735 735
736 //qDebug("KLocale::readDate() transformed %s into %s (%s), %s (%s) : err1=%i, err2=%i", intstr.latin1(), date.latin1(), dformat.latin1(), time.latin1(), tformat.latin1(), ok1, ok2); 736 //qDebug("KLocale::readDate() transformed %s into %s (%s), %s (%s) : err1=%i, err2=%i", intstr.latin1(), date.latin1(), dformat.latin1(), time.latin1(), tformat.latin1(), ok1, ok2);
737 return m_date; 737 return m_date;
738} 738}
739 739
740 740
741bool KLocale::use12Clock() const 741bool KLocale::use12Clock() const
742{ 742{
743 return !mHourF24Format ;; 743 return !mHourF24Format ;;
744} 744}
745 745
746bool KLocale::weekStartsMonday() const 746bool KLocale::weekStartsMonday() const
747{ 747{
748 return mWeekStartsMonday; 748 return mWeekStartsMonday;
749} 749}
750 750
751int KLocale::weekStartDay() const 751int KLocale::weekStartDay() const
752{ 752{
753 if ( mWeekStartsMonday ) 753 if ( mWeekStartsMonday )
754 return 1; 754 return 1;
755 return 7; 755 return 7;
756} 756}
757 757
758QString KLocale::weekDayName(int i,bool shortName) const 758QString KLocale::weekDayName(int i,bool shortName) const
759{ 759{
760 if ( shortName ) 760 if ( shortName )
761 switch ( i ) 761 switch ( i )
762 { 762 {
763 case 1: return i18n("Monday", "Mon"); 763 case 1: return i18n("Monday", "Mon");
764 case 2: return i18n("Tuesday", "Tue"); 764 case 2: return i18n("Tuesday", "Tue");
765 case 3: return i18n("Wednesday", "Wed"); 765 case 3: return i18n("Wednesday", "Wed");
766 case 4: return i18n("Thursday", "Thu"); 766 case 4: return i18n("Thursday", "Thu");
767 case 5: return i18n("Friday", "Fri"); 767 case 5: return i18n("Friday", "Fri");
768 case 6: return i18n("Saturday", "Sat"); 768 case 6: return i18n("Saturday", "Sat");
769 case 7: return i18n("Sunday", "Sun"); 769 case 7: return i18n("Sunday", "Sun");
770 } 770 }
771 else 771 else
772 switch ( i ) 772 switch ( i )
773 { 773 {
774 case 1: return i18n("Monday"); 774 case 1: return i18n("Monday");
775 case 2: return i18n("Tuesday"); 775 case 2: return i18n("Tuesday");
776 case 3: return i18n("Wednesday"); 776 case 3: return i18n("Wednesday");
777 case 4: return i18n("Thursday"); 777 case 4: return i18n("Thursday");
778 case 5: return i18n("Friday"); 778 case 5: return i18n("Friday");
779 case 6: return i18n("Saturday"); 779 case 6: return i18n("Saturday");
780 case 7: return i18n("Sunday"); 780 case 7: return i18n("Sunday");
781 } 781 }
782 782
783 return QString::null; 783 return QString::null;
784} 784}
785 785
786QString KLocale::monthName(int i,bool shortName) const 786QString KLocale::monthName(int i,bool shortName) const
787{ 787{
788 if ( shortName ) 788 if ( shortName )
789 switch ( i ) 789 switch ( i )
790 { 790 {
791 case 1: return i18n("January", "Jan"); 791 case 1: return i18n("January", "Jan");
792 case 2: return i18n("February", "Feb"); 792 case 2: return i18n("February", "Feb");
793 case 3: return i18n("March", "Mar"); 793 case 3: return i18n("March", "Mar");
794 case 4: return i18n("April", "Apr"); 794 case 4: return i18n("April", "Apr");
795 case 5: return i18n("May short", "May"); 795 case 5: return i18n("May short", "May");
796 case 6: return i18n("June", "Jun"); 796 case 6: return i18n("June", "Jun");
797 case 7: return i18n("July", "Jul"); 797 case 7: return i18n("July", "Jul");
798 case 8: return i18n("August", "Aug"); 798 case 8: return i18n("August", "Aug");
799 case 9: return i18n("September", "Sep"); 799 case 9: return i18n("September", "Sep");
800 case 10: return i18n("October", "Oct"); 800 case 10: return i18n("October", "Oct");
801 case 11: return i18n("November", "Nov"); 801 case 11: return i18n("November", "Nov");
802 case 12: return i18n("December", "Dec"); 802 case 12: return i18n("December", "Dec");
803 } 803 }
804 else 804 else
805 switch (i) 805 switch (i)
806 { 806 {
807 case 1: return i18n("January"); 807 case 1: return i18n("January");
808 case 2: return i18n("February"); 808 case 2: return i18n("February");
809 case 3: return i18n("March"); 809 case 3: return i18n("March");
810 case 4: return i18n("April"); 810 case 4: return i18n("April");
811 case 5: return i18n("May long", "May"); 811 case 5: return i18n("May long", "May");
812 case 6: return i18n("June"); 812 case 6: return i18n("June");
813 case 7: return i18n("July"); 813 case 7: return i18n("July");
814 case 8: return i18n("August"); 814 case 8: return i18n("August");
815 case 9: return i18n("September"); 815 case 9: return i18n("September");
816 case 10: return i18n("October"); 816 case 10: return i18n("October");
817 case 11: return i18n("November"); 817 case 11: return i18n("November");
818 case 12: return i18n("December"); 818 case 12: return i18n("December");
819 } 819 }
820 820
821 return QString::null; 821 return QString::null;
822} 822}
823 823
824QString KLocale::country() const 824QString KLocale::country() const
825{ 825{
826 return QString::null; 826 return QString::null;
827} 827}
828 828
829QString KLocale::dateFormat(IntDateFormat intIntDateFormat) const 829QString KLocale::dateFormat(IntDateFormat intIntDateFormat) const
830{ 830{
831 const IntDateFormat dformat = (intIntDateFormat == Undefined)?mIntDateFormat:intIntDateFormat; 831 const IntDateFormat dformat = (intIntDateFormat == Undefined)?mIntDateFormat:intIntDateFormat;
832 832
833 if ( dformat == ISODate ) 833 if ( dformat == ISODate )
834 return "%Y-%m-%d"; 834 return "%Y-%m-%d";
835 835
836 if ( QApplication::desktop()->width() < 480 ) { 836 if ( QApplication::desktop()->width() < 480 ) {
837 if ( dformat == Default ) 837 if ( dformat == Default )
838 return "%a %d %b %Y"; 838 return "%a %d %b %Y";
839 else if ( dformat == Format1 ) 839 else if ( dformat == Format1 )
840 return "%a %b %d %Y"; 840 return "%a %b %d %Y";
841 } else { 841 } else {
842 if ( dformat == Default ) 842 if ( dformat == Default )
843 return "%A %d %B %Y"; 843 return "%A %d %B %Y";
844 else if ( dformat == Format1 ) 844 else if ( dformat == Format1 )
845 return "%A %B %d %Y"; 845 return "%A %B %d %Y";
846 846
847 } 847 }
848 return mDateFormat ; 848 return mDateFormat ;
849} 849}
850 850
851QString KLocale::dateFormatShort(IntDateFormat intIntDateFormat) const 851QString KLocale::dateFormatShort(IntDateFormat intIntDateFormat) const
852{ 852{
853 const IntDateFormat dformat = (intIntDateFormat == Undefined)?mIntDateFormat:intIntDateFormat; 853 const IntDateFormat dformat = (intIntDateFormat == Undefined)?mIntDateFormat:intIntDateFormat;
854 854
855 if ( dformat == Default ) 855 if ( dformat == Default )
856 return "%d.%m.%Y"; 856 return "%d.%m.%Y";
857 else if ( dformat == Format1 ) 857 else if ( dformat == Format1 )
858 return "%m.%d.%Y"; 858 return "%m.%d.%Y";
859 else if ( dformat == ISODate ) // = Qt::ISODate 859 else if ( dformat == ISODate ) // = Qt::ISODate
860 return "%Y-%m-%d"; 860 return "%Y-%m-%d";
861 return mDateFormatShort ; 861 return mDateFormatShort ;
862 862
863} 863}
864 864
865 865
866QString KLocale::timeFormat(IntDateFormat intIntTimeFormat) const 866QString KLocale::timeFormat(IntDateFormat intIntTimeFormat) const
867{ 867{
868 const IntDateFormat tformat = (intIntTimeFormat == Undefined)?mIntTimeFormat:intIntTimeFormat; 868 const IntDateFormat tformat = (intIntTimeFormat == Undefined)?mIntTimeFormat:intIntTimeFormat;
869 869
870 if ( tformat == Default ) 870 if ( tformat == Default )
871 if ( mHourF24Format) 871 if ( mHourF24Format)
872 return "%H:%M:%S"; 872 return "%H:%M:%S";
873 else 873 else
874 return "%I:%M:%S%p"; 874 return "%I:%M:%S%p";
875 875
876 else if ( tformat == Format1 ) 876 else if ( tformat == Format1 )
877 if ( mHourF24Format) 877 if ( mHourF24Format)
878 return "%H:%M:%S"; 878 return "%H:%M:%S";
879 else 879 else
880 return "%I:%M:%S%p"; 880 return "%I:%M:%S%p";
881 881
882 else if ( tformat == ISODate ) // = Qt::ISODate 882 else if ( tformat == ISODate ) // = Qt::ISODate
883 if ( mHourF24Format) 883 if ( mHourF24Format)
884 return "%H:%M:%S"; 884 return "%H:%M:%S";
885 else 885 else
886 return "%I:%M:%S%p"; 886 return "%I:%M:%S%p";
887 // to satisfy the compiler 887 // to satisfy the compiler
888 return "%H:%M:%S"; 888 return "%H:%M:%S";
889} 889}
890 890
891void KLocale::insertCatalogue ( const QString & ) 891void KLocale::insertCatalogue ( const QString & )
892{ 892{
893} 893}
894 894
895KCalendarSystem *KLocale::calendar() 895KCalendarSystem *KLocale::calendar()
896{ 896{
897 if ( !mCalendarSystem ) { 897 if ( !mCalendarSystem ) {
898 mCalendarSystem = new KCalendarSystemGregorian; 898 mCalendarSystem = new KCalendarSystemGregorian;
899 } 899 }
900 900
901 return mCalendarSystem; 901 return mCalendarSystem;
902} 902}
903 903
904int KLocale::timezoneOffset( QString timeZone ) 904int KLocale::timezoneOffset( QString timeZone )
905{ 905{
906 int ret = 1001; 906 int ret = 1001;
907 int index = mTimeZoneList.findIndex( timeZone ); 907 int index = mTimeZoneList.findIndex( timeZone );
908 if ( index < 24 ) 908 if ( index < 24 )
909 ret = ( index-11 ) * 60 ; 909 ret = ( index-11 ) * 60 ;
910 return ret; 910 return ret;
911} 911}
912 912
913QStringList KLocale::timeZoneList() const 913QStringList KLocale::timeZoneList() const
914{ 914{
915 return mTimeZoneList; 915 return mTimeZoneList;
916} 916}
917void KLocale::setTimezone( const QString &timeZone, bool oddTZ ) 917void KLocale::setTimezone( const QString &timeZone, bool oddTZ )
918{ 918{
919 mTimeZoneOffset = timezoneOffset( timeZone ); 919 mTimeZoneOffset = timezoneOffset( timeZone );
920 if ( oddTZ ) 920 if ( oddTZ )
921 mTimeZoneOffset += 30; 921 mTimeZoneOffset += 30;
922} 922}
923 923
924void KLocale::setDaylightSaving( bool b, int start , int end ) 924void KLocale::setDaylightSaving( bool b, int start , int end )
925{ 925{
926 daylightEnabled = b; 926 daylightEnabled = b;
927 daylightStart = start; 927 daylightStart = start;
928 daylightEnd = end; 928 daylightEnd = end;
929 mSouthDaylight = (end < start); 929 mSouthDaylight = (end < start);
930 // qDebug("klocale daylight %d %d %d ", b, start , end ); 930 // qDebug("klocale daylight %d %d %d ", b, start , end );
931} 931}
932 932
933int KLocale::localTimeOffset( const QDateTime &dt ) 933int KLocale::localTimeOffset( const QDateTime &dt )
934{ 934{
935 bool addDaylight = false; 935 bool addDaylight = false;
936 if ( daylightEnabled ) { 936 if ( daylightEnabled ) {
937 int d_end, d_start; 937 int d_end, d_start;
938 int dayofyear = dt.date().dayOfYear(); 938 int dayofyear = dt.date().dayOfYear();
939 int year = dt.date().year(); 939 int year = dt.date().year();
940 int add = 0; 940 int add = 0;
941 if ( QDate::leapYear(year) ) 941 if ( QDate::leapYear(year) )
942 add = 1; 942 add = 1;
943 QDate date ( year,1,1 ); 943 QDate date ( year,1,1 );
944 if ( daylightEnd > 59 ) 944 if ( daylightEnd > 59 )
945 d_end = daylightEnd +add; 945 d_end = daylightEnd +add;
946 else 946 else
947 d_end = daylightEnd; 947 d_end = daylightEnd;
948 if ( daylightStart > 59 ) 948 if ( daylightStart > 59 )
949 d_start = daylightStart +add; 949 d_start = daylightStart +add;
950 else 950 else
951 d_start = daylightStart; 951 d_start = daylightStart;
952 QDate s_date = date.addDays( d_start -1 ); 952 QDate s_date = date.addDays( d_start -1 );
953 QDate e_date = date.addDays( d_end -1 ); 953 QDate e_date = date.addDays( d_end -1 );
954 int dof = s_date.dayOfWeek(); 954 int dof = s_date.dayOfWeek();
955 if ( dof < 7 ) 955 if ( dof < 7 )
956 s_date = s_date.addDays( -dof ); 956 s_date = s_date.addDays( -dof );
957 dof = e_date.dayOfWeek(); 957 dof = e_date.dayOfWeek();
958 if ( dof < 7 ) 958 if ( dof < 7 )
959 e_date = e_date.addDays( -dof ); 959 e_date = e_date.addDays( -dof );
960 QTime startTime ( 3,0,0 ); 960 QTime startTime ( 3,0,0 );
961 QDateTime startDt( s_date, startTime ); 961 QDateTime startDt( s_date, startTime );
962 QDateTime endDt( e_date, startTime ); 962 QDateTime endDt( e_date, startTime );
963 //qDebug("dayligt saving start %s end %s ",startDt.toString().latin1(),endDt.toString().latin1( )); 963 //qDebug("dayligt saving start %s end %s ",startDt.toString().latin1(),endDt.toString().latin1( ));
964 if ( mSouthDaylight ) { 964 if ( mSouthDaylight ) {
965 if ( ! ( endDt < dt && dt < startDt) ) 965 if ( ! ( endDt < dt && dt < startDt) )
966 addDaylight = true; 966 addDaylight = true;
967 } else { 967 } else {
968 if ( startDt < dt && dt < endDt ) 968 if ( startDt < dt && dt < endDt )
969 addDaylight = true; 969 addDaylight = true;
970 970
971 971
972 } 972 }
973 } 973 }
974 int addMin = 0; 974 int addMin = 0;
975 if ( addDaylight ) 975 if ( addDaylight )
976 addMin = 60; 976 addMin = 60;
977 return mTimeZoneOffset + addMin; 977 return mTimeZoneOffset + addMin;
978} 978}
979// ****************************************************************** 979// ******************************************************************
980// added LR 980// added LR
981QString KLocale::formatNumber(double num, int precision) const 981QString KLocale::formatNumber(double num, int precision) const
982{ 982{
983 bool neg = num < 0; 983 bool neg = num < 0;
984 if (precision == -1) precision = 2; 984 if (precision == -1) precision = 2;
985 QString res = QString::number(neg?-num:num, 'f', precision); 985 QString res = QString::number(neg?-num:num, 'f', precision);
986 int pos = res.find('.'); 986 int pos = res.find('.');
987 if (pos == -1) pos = res.length(); 987 if (pos == -1) pos = res.length();
988 else res.replace(pos, 1, decimalSymbol()); 988 else res.replace(pos, 1, decimalSymbol());
989 989
990 while (0 < (pos -= 3)) 990 while (0 < (pos -= 3))
991 res.insert(pos, thousandsSeparator()); // thousand sep 991 res.insert(pos, thousandsSeparator()); // thousand sep
992 992
993 // How can we know where we should put the sign? 993 // How can we know where we should put the sign?
994 res.prepend(neg?negativeSign():positiveSign()); 994 res.prepend(neg?negativeSign():positiveSign());
995 995
996 return res; 996 return res;
997} 997}
998QString KLocale::formatNumber(const QString &numStr) const 998QString KLocale::formatNumber(const QString &numStr) const
999{ 999{
1000 return formatNumber(numStr.toDouble()); 1000 return formatNumber(numStr.toDouble());
1001} 1001}
1002double KLocale::readNumber(const QString &_str, bool * ok) const 1002double KLocale::readNumber(const QString &_str, bool * ok) const
1003{ 1003{
1004 QString str = _str.stripWhiteSpace(); 1004 QString str = _str.stripWhiteSpace();
1005 bool neg = str.find(negativeSign()) == 0; 1005 bool neg = str.find(negativeSign()) == 0;
1006 if (neg) 1006 if (neg)
1007 str.remove( 0, negativeSign().length() ); 1007 str.remove( 0, negativeSign().length() );
1008 1008
1009 /* will hold the scientific notation portion of the number. 1009 /* will hold the scientific notation portion of the number.
1010 Example, with 2.34E+23, exponentialPart == "E+23" 1010 Example, with 2.34E+23, exponentialPart == "E+23"
1011 */ 1011 */
1012 QString exponentialPart; 1012 QString exponentialPart;
1013 int EPos; 1013 int EPos;
1014 1014
1015 EPos = str.find('E', 0, false); 1015 EPos = str.find('E', 0, false);
1016 1016
1017 if (EPos != -1) 1017 if (EPos != -1)
1018 { 1018 {
1019 exponentialPart = str.mid(EPos); 1019 exponentialPart = str.mid(EPos);
1020 str = str.left(EPos); 1020 str = str.left(EPos);
1021 } 1021 }
1022 1022
1023 int pos = str.find(decimalSymbol()); 1023 int pos = str.find(decimalSymbol());
1024 QString major; 1024 QString major;
1025 QString minor; 1025 QString minor;
1026 if ( pos == -1 ) 1026 if ( pos == -1 )
1027 major = str; 1027 major = str;
1028 else 1028 else
1029 { 1029 {
1030 major = str.left(pos); 1030 major = str.left(pos);
1031 minor = str.mid(pos + decimalSymbol().length()); 1031 minor = str.mid(pos + decimalSymbol().length());
1032 } 1032 }
1033 1033
1034 // Remove thousand separators 1034 // Remove thousand separators
1035 int thlen = thousandsSeparator().length(); 1035 int thlen = thousandsSeparator().length();
1036 int lastpos = 0; 1036 int lastpos = 0;
1037 while ( ( pos = major.find( thousandsSeparator() ) ) > 0 ) 1037 while ( ( pos = major.find( thousandsSeparator() ) ) > 0 )
1038 { 1038 {
1039 // e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N 1039 // e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N
1040 int fromEnd = major.length() - pos; 1040 int fromEnd = major.length() - pos;
1041 if ( fromEnd % (3+thlen) != 0 // Needs to be a multiple, otherwise it's an error 1041 if ( fromEnd % (3+thlen) != 0 // Needs to be a multiple, otherwise it's an error
1042 || pos - lastpos > 3 // More than 3 digits between two separators -> error 1042 || pos - lastpos > 3 // More than 3 digits between two separators -> error
1043 || pos == 0 // Can't start with a separator 1043 || pos == 0 // Can't start with a separator
1044 || (lastpos>0 && pos-lastpos!=3)) // Must have exactly 3 digits between two separators 1044 || (lastpos>0 && pos-lastpos!=3)) // Must have exactly 3 digits between two separators
1045 { 1045 {
1046 if (ok) *ok = false; 1046 if (ok) *ok = false;
1047 return 0.0; 1047 return 0.0;
1048 } 1048 }
1049 1049
1050 lastpos = pos; 1050 lastpos = pos;
1051 major.remove( pos, thlen ); 1051 major.remove( pos, thlen );
1052 } 1052 }
1053 if (lastpos>0 && major.length()-lastpos!=3) // Must have exactly 3 digits after the last separator 1053 if (lastpos>0 && major.length()-lastpos!=3) // Must have exactly 3 digits after the last separator
1054 { 1054 {
1055 if (ok) *ok = false; 1055 if (ok) *ok = false;
1056 return 0.0; 1056 return 0.0;
1057 } 1057 }
1058 1058
1059 QString tot; 1059 QString tot;
1060 if (neg) tot = '-'; 1060 if (neg) tot = '-';
1061 1061
1062 tot += major + '.' + minor + exponentialPart; 1062 tot += major + '.' + minor + exponentialPart;
1063 1063
1064 return tot.toDouble(ok); 1064 return tot.toDouble(ok);
1065} 1065}
1066QString KLocale::decimalSymbol() const 1066QString KLocale::decimalSymbol() const
1067{ 1067{
1068 1068
1069 return m_decimalSymbol; 1069 return m_decimalSymbol;
1070} 1070}
1071 1071
1072QString KLocale::thousandsSeparator() const 1072QString KLocale::thousandsSeparator() const
1073{ 1073{
1074 1074
1075 return m_thousandsSeparator; 1075 return m_thousandsSeparator;
1076} 1076}
1077QString KLocale::positiveSign() const 1077QString KLocale::positiveSign() const
1078{ 1078{
1079 return m_positiveSign; 1079 return m_positiveSign;
1080} 1080}
1081 1081
1082QString KLocale::negativeSign() const 1082QString KLocale::negativeSign() const
1083{ 1083{
1084 return m_negativeSign; 1084 return m_negativeSign;
1085} 1085}