summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-07 04:18:11 (UTC)
committer zautrix <zautrix>2005-07-07 04:18:11 (UTC)
commitb4d85da57e2d558ec088af6f3b2a34b1854462c0 (patch) (unidiff)
tree0860bfaae1d15aae6cd24861eaa87d0331fb364a
parentcb350dbe9151db2ded62942d29d11d6c8b88eabd (diff)
downloadkdepimpi-b4d85da57e2d558ec088af6f3b2a34b1854462c0.zip
kdepimpi-b4d85da57e2d558ec088af6f3b2a34b1854462c0.tar.gz
kdepimpi-b4d85da57e2d558ec088af6f3b2a34b1854462c0.tar.bz2
conflict
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt14
-rw-r--r--korganizer/calendarview.cpp80
-rw-r--r--korganizer/calendarview.h4
-rw-r--r--korganizer/mainwindow.cpp71
5 files changed, 142 insertions, 29 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 79de197..814c541 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,242 +1,244 @@
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.1.14 ************ 3********** VERSION 2.1.14 ************
4 4
5Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done. 5Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done.
6Added a button to add a subtodo quickly. 6Added a button to add a subtodo quickly.
7 7
8Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q" ).
9
8 10
9********** VERSION 2.1.13 ************ 11********** VERSION 2.1.13 ************
10 12
11Fixed a problem in KA/Pi search. 13Fixed a problem in KA/Pi search.
12Fixed some minor problems in KO/Pi. 14Fixed some minor problems in KO/Pi.
13Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. 15Added calendar selection possibility to the todo view popup and to the event/todo/journal editor.
14 16
15Fixed memory usage problems in KA/Pi: 17Fixed memory usage problems in KA/Pi:
16When loading data KA/Pi did load the file data twice. 18When loading data KA/Pi did load the file data twice.
17Example: 19Example:
18 A 600k file did consume 1200k memory during loading process. 20 A 600k file did consume 1200k memory during loading process.
19 This is fixed, it does now consume only 600k during loading process. 21 This is fixed, it does now consume only 600k during loading process.
20When saving data KA/Pi did consume a lot of memory for the data parsing during the save process. 22When saving data KA/Pi did consume a lot of memory for the data parsing during the save process.
21This is fixed. 23This is fixed.
22Example: 24Example:
23 Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram. 25 Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram.
24 When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system. 26 When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system.
25 Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process. 27 Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process.
26Note: The memory usage of KA/Pi after the data is loaded/saved has not changed. 28Note: The memory usage of KA/Pi after the data is loaded/saved has not changed.
27The saving of data may be a bit slower now. 29The saving of data may be a bit slower now.
28 30
29Fixed memory usage problems in KO/Pi: 31Fixed memory usage problems in KO/Pi:
30When KO/Pi did save the data to file, it did not release the used buffers after saving. 32When KO/Pi did save the data to file, it did not release the used buffers after saving.
31The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation. 33The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation.
32This is fixed. 34This is fixed.
33Example: 35Example:
34 When saving a 400k file KO/Pi do now use 400k less memory now. 36 When saving a 400k file KO/Pi do now use 400k less memory now.
35 37
36Optimized memory usage in KO/Pi Agenda view: 38Optimized memory usage in KO/Pi Agenda view:
37KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view. 39KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view.
38These buffers were not made smaller (i.e. downsized) because of performance reasons. 40These buffers were not made smaller (i.e. downsized) because of performance reasons.
39The handling of these buffers are now much smarter: 41The handling of these buffers are now much smarter:
40Two (of six) buffers are removed completely. 42Two (of six) buffers are removed completely.
41The remaing four buffers are now downsized after not using the agenda view for 45 seconds. 43The remaing four buffers are now downsized after not using the agenda view for 45 seconds.
42Such that the memory usage of KO/Pi is smaller now in general ( because 2 buffers are removed) and is much smaller when not using the agenda view. That is very important when using fastload for KO/Pi. 44Such that the memory usage of KO/Pi is smaller now in general ( because 2 buffers are removed) and is much smaller when not using the agenda view. That is very important when using fastload for KO/Pi.
43 45
44Worst case example ( for a maximum size agenda content): 46Worst case example ( for a maximum size agenda content):
45 When resizing the agenda content to a large scale, KO/Pi did use 17Meg of mem ( and did not use less memory until it was stopped). Now KO/Pi is using on the same operation only 14.3 Meg of mem and after 45 seconds not using the agenda view it uses only 9.4 Meg of mem. 47 When resizing the agenda content to a large scale, KO/Pi did use 17Meg of mem ( and did not use less memory until it was stopped). Now KO/Pi is using on the same operation only 14.3 Meg of mem and after 45 seconds not using the agenda view it uses only 9.4 Meg of mem.
46 48
47When switching to an unused Agenda view now KO/Pi is upizing the buffers again. This takes less than a second. Such that switching to Agenda view (after not using it for more than 45 seconds) is now a bit slower. 49When switching to an unused Agenda view now KO/Pi is upizing the buffers again. This takes less than a second. Such that switching to Agenda view (after not using it for more than 45 seconds) is now a bit slower.
48 50
49Summary: 51Summary:
50Many memory wasting problems of KA/Pi and KO/Pi fixed such that it is better to use on the Zaurus. 52Many memory wasting problems of KA/Pi and KO/Pi fixed such that it is better to use on the Zaurus.
51 53
52********** VERSION 2.1.12 ************ 54********** VERSION 2.1.12 ************
53 55
54KO/Pi: 56KO/Pi:
55Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. 57Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus.
56Fixed a problem with the month view when file was saved but KO/Pi was not the active window. 58Fixed a problem with the month view when file was saved but KO/Pi was not the active window.
57Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only). 59Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only).
58Fixed some other small problems. 60Fixed some other small problems.
59 61
60********** VERSION 2.1.11 ************ 62********** VERSION 2.1.11 ************
61 63
62KO/Pi: 64KO/Pi:
63Because we can have many calendars now in KO/Pi we can have more than one journal entry per day. 65Because we can have many calendars now in KO/Pi we can have more than one journal entry per day.
64Added features to handle (and add ) more than one journal entry per day. 66Added features to handle (and add ) more than one journal entry per day.
65Added option for a journal title. 67Added option for a journal title.
66 68
67Added info about the calendar, the item belongs to, to the event/todo/journal viewer. 69Added info about the calendar, the item belongs to, to the event/todo/journal viewer.
68Fixed a problem of the alarm of completed recurring todos. 70Fixed a problem of the alarm of completed recurring todos.
69Added to the event/todo editor to set quickly the category of an item. 71Added to the event/todo editor to set quickly the category of an item.
70 72
71 73
72Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet. 74Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet.
73 75
74Added KA/Pi multi sync to the multi sync called from the alarm applet. 76Added KA/Pi multi sync to the multi sync called from the alarm applet.
75 77
76********** VERSION 2.1.10 ************ 78********** VERSION 2.1.10 ************
77 79
78KO/Pi: 80KO/Pi:
79Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file. 81Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file.
80When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted. 82When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted.
81Fixed a bug in searching for a small timerange, i.e. one day. 83Fixed a bug in searching for a small timerange, i.e. one day.
82 84
83KA/Pi: 85KA/Pi:
84Fixed two problems in csv export. 86Fixed two problems in csv export.
85Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi. 87Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi.
86 88
87********** VERSION 2.1.9 ************ 89********** VERSION 2.1.9 ************
88 90
89KO/Pi: 91KO/Pi:
90Fixed some problems of the new search options in the search dialog. 92Fixed some problems of the new search options in the search dialog.
91Fixed some problems in the new resource config options. 93Fixed some problems in the new resource config options.
92Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. 94Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page.
93Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: 95Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
94Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup. 96Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup.
95 97
96Fixed a problem in recurrence range in syncing with DTM. 98Fixed a problem in recurrence range in syncing with DTM.
97 99
98KA/Pi: 100KA/Pi:
99Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...) 101Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...)
100 102
101PwM/Pi: 103PwM/Pi:
102Added "sec" to the timeout config settings to make it clear the timeout values are seconds. 104Added "sec" to the timeout config settings to make it clear the timeout values are seconds.
103 105
104********** VERSION 2.1.8 ************ 106********** VERSION 2.1.8 ************
105 107
106KO/Pi: 108KO/Pi:
107Added info about the completion state of a todo in the ListView/Searchdialog. 109Added info about the completion state of a todo in the ListView/Searchdialog.
108If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well. 110If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
109Fixed some updating problems when changing the filter. 111Fixed some updating problems when changing the filter.
110 112
111KA/Pi: 113KA/Pi:
112In the addressee selection dialog now the formatted name is shown, if not empty. 114In the addressee selection dialog now the formatted name is shown, if not empty.
113Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category. 115Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category.
114Now in the addressee selection dialog a selected contact is remove with a single click from the selected list. 116Now in the addressee selection dialog a selected contact is remove with a single click from the selected list.
115 117
116Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored. 118Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
117Fixed the sorting for size in the file selector on the Z. 119Fixed the sorting for size in the file selector on the Z.
118 120
119Changed the color selection dialog on the Zaurus to a more user friendly version. 121Changed the color selection dialog on the Zaurus to a more user friendly version.
120 122
121********** VERSION 2.1.7 ************ 123********** VERSION 2.1.7 ************
122 124
123KO/Pi: 125KO/Pi:
124Fixed several problems in the new Resource handling. 126Fixed several problems in the new Resource handling.
125Added more options to the search dialog. 127Added more options to the search dialog.
126Fixed a problem in the Month view. 128Fixed a problem in the Month view.
127Added more options to the dialog when setting a todo to stopped. 129Added more options to the dialog when setting a todo to stopped.
128 130
129Fixed two small problems in KO/Pi Alarm applet. 131Fixed two small problems in KO/Pi Alarm applet.
130 132
131********** VERSION 2.1.6 ************ 133********** VERSION 2.1.6 ************
132 134
133This release is for testing only. 135This release is for testing only.
134 136
135KO/Pi: 137KO/Pi:
136Added to the list view (the list view is used in search dialog as well) the possibility to print it. 138Added to the list view (the list view is used in search dialog as well) the possibility to print it.
137Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view. 139Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
138Added to the list view the possibility to add all subtodos of selected todos to an export/beam. 140Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
139Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout. 141Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
140Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus. 142Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
141Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly. 143Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
142 144
143Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars. 145Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars.
144In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later. 146In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later.
145Now on every sync the set of calendars is synced which are enabled in the resource view. 147Now on every sync the set of calendars is synced which are enabled in the resource view.
146 148
147A calendar is enabled in the resource view if the "eye" column is checked. 149A calendar is enabled in the resource view if the "eye" column is checked.
148You can set a calendar to be the default for new items( "+" column ). 150You can set a calendar to be the default for new items( "+" column ).
149You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly. 151You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly.
150To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ... 152To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ...
151 153
152 154
153********** VERSION 2.1.5 ************ 155********** VERSION 2.1.5 ************
154 156
155This is the new stable version. 157This is the new stable version.
156Bugfix: 158Bugfix:
157Fixed a problem with agenda popup on the desktop in KO/Pi. 159Fixed a problem with agenda popup on the desktop in KO/Pi.
158Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. 160Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
159Added config option to not display completed todos in agenda view. 161Added config option to not display completed todos in agenda view.
160Addressee view is now using the formatted name, if defined. 162Addressee view is now using the formatted name, if defined.
161That makes it possible to display "lastname, firstname" in that view now. 163That makes it possible to display "lastname, firstname" in that view now.
162To set the formatted name for all contacts, please use menu: 164To set the formatted name for all contacts, please use menu:
163Edit->Change->Set formatted name. 165Edit->Change->Set formatted name.
164Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. 166Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
165 167
166********** VERSION 2.1.4 ************ 168********** VERSION 2.1.4 ************
167 169
168Fixed two more bugs in the KA/Pi CSV import dialog: 170Fixed two more bugs in the KA/Pi CSV import dialog:
169Made it possible to read multi-line fields and import it to the "Note" field. 171Made it possible to read multi-line fields and import it to the "Note" field.
170Fixed a problem in mapping custom fields, whatever a custem field is... 172Fixed a problem in mapping custom fields, whatever a custem field is...
171 173
172********** VERSION 2.1.3 ************ 174********** VERSION 2.1.3 ************
173 175
174Changed the menu structure of the alarm applet: 176Changed the menu structure of the alarm applet:
175Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". 177Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
176 178
177Fixed several problems in the KA/Pi CSV import dialog: 179Fixed several problems in the KA/Pi CSV import dialog:
178Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. 180Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
179 181
180 182
181********** VERSION 2.1.2 ************ 183********** VERSION 2.1.2 ************
182 184
183Fixed a problem closing the alarm dialog on Zaurus with "OK" button. 185Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
184 186
185Fixed a problem when importing data from Outlook with mutiple categories set. 187Fixed a problem when importing data from Outlook with mutiple categories set.
186 188
187Changed display of days in datenavigator: 189Changed display of days in datenavigator:
188Birthdays are now blue, not dark green. 190Birthdays are now blue, not dark green.
189When todo view is shown, no birtdays are shown and days with due todos are shown blue. 191When todo view is shown, no birtdays are shown and days with due todos are shown blue.
190When journal view is shown, only holidays are shown and days with journals are blue. 192When journal view is shown, only holidays are shown and days with journals are blue.
191 193
192Added Backup options to global config: 194Added Backup options to global config:
193You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ). 195You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
194It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again. 196It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
195The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups. 197The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
196 198
197********** VERSION 2.1.1 ************ 199********** VERSION 2.1.1 ************
198 200
199Stable release 2.1.1! 201Stable release 2.1.1!
200 202
201KO/Pi: 203KO/Pi:
202Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. 204Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
203 205
204********** VERSION 2.1.0 ************ 206********** VERSION 2.1.0 ************
205 207
206Stable release 2.1.0! 208Stable release 2.1.0!
207 209
208Summary of changes/fixes compared to version 2.0.6: 210Summary of changes/fixes compared to version 2.0.6:
209 211
210Many bugs of version 2.0.6 fixed. 212Many bugs of version 2.0.6 fixed.
211Most of them were small bugs, but some of them were important. 213Most of them were small bugs, but some of them were important.
212It is recommended to use version 2.1.0 and not version 2.0.6. 214It is recommended to use version 2.1.0 and not version 2.0.6.
213 215
214Important changes: 216Important changes:
215 217
216Added recurring todos to KO/Pi. 218Added recurring todos to KO/Pi.
217 219
218Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. 220Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
219 221
220Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 222Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
221 223
222Datenavigator can now display many months. Very useful on the desktop. 224Datenavigator can now display many months. Very useful on the desktop.
223 225
224KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. 226KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
225 227
226Made alarm sound working on Linux desktop. 228Made alarm sound working on Linux desktop.
227 229
228Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. 230Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details.
229 231
230Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. 232Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details.
231 233
232Many other usebility enhancements. 234Many other usebility enhancements.
233Special thanks to Ben for his suggestions! 235Special thanks to Ben for his suggestions!
234 236
235You can find the complete changelog 237You can find the complete changelog
236from version 1.7.7 to 2.1.0 238from version 1.7.7 to 2.1.0
237in the source package or on 239in the source package or on
238 240
239http://www.pi-sync.net/html/changelog.html 241http://www.pi-sync.net/html/changelog.html
240 242
241 243
242 244
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index bcc23dc..b225594 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -473,1034 +473,1048 @@
473{ "File","Datei" }, 473{ "File","Datei" },
474{ "Clone...","Dupliziere..." }, 474{ "Clone...","Dupliziere..." },
475{ "Move...","Bewege..." }, 475{ "Move...","Bewege..." },
476{ "Beam...","Sende via IR..." }, 476{ "Beam...","Sende via IR..." },
477{ "&Clone...","Dupliziere..." }, 477{ "&Clone...","Dupliziere..." },
478{ "&Move...","Bewege..." }, 478{ "&Move...","Bewege..." },
479{ "&Beam...","Sende via IR..." }, 479{ "&Beam...","Sende via IR..." },
480{ "Show Completed","Zeige erledigte Todos" }, 480{ "Show Completed","Zeige erledigte Todos" },
481{ "Show Quick Todo","Zeige Quick-Todo" }, 481{ "Show Quick Todo","Zeige Quick-Todo" },
482{ "Unparent Todo","Un-sub Todo" }, 482{ "Unparent Todo","Un-sub Todo" },
483{ "Save selected to file...","Speichere Selektierte..." }, 483{ "Save selected to file...","Speichere Selektierte..." },
484{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, 484{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." },
485{ "Set Categ. for selected...","Setze Kateg. für Selekt." }, 485{ "Set Categ. for selected...","Setze Kateg. für Selekt." },
486{ "Beam via IR...","Sende via IR..." }, 486{ "Beam via IR...","Sende via IR..." },
487{ "Search","Suchen" }, 487{ "Search","Suchen" },
488{ "Date Picker","Datum auswählen" }, 488{ "Date Picker","Datum auswählen" },
489{ "Day View","Tagesansicht" }, 489{ "Day View","Tagesansicht" },
490{ "Work Week","Arbeitswoche" }, 490{ "Work Week","Arbeitswoche" },
491{ "Week","Wochenansicht" }, 491{ "Week","Wochenansicht" },
492{ "Month","Monatsansicht" }, 492{ "Month","Monatsansicht" },
493{ "Todo View","Todo Liste" }, 493{ "Todo View","Todo Liste" },
494{ "Journal","Journal" }, 494{ "Journal","Journal" },
495{ "Next days","Nächste Tage" }, 495{ "Next days","Nächste Tage" },
496{ "Print agenda selection...","Drucke Agendaselektion..." }, 496{ "Print agenda selection...","Drucke Agendaselektion..." },
497{ "Toggle DateNavigator","Navigator umschalten" }, 497{ "Toggle DateNavigator","Navigator umschalten" },
498{ "Toggle FilterView","Filteransicht umschalten" }, 498{ "Toggle FilterView","Filteransicht umschalten" },
499{ "Prev. month","Vorheriger Monat" }, 499{ "Prev. month","Vorheriger Monat" },
500{ "Go backward","Gehe zurück" }, 500{ "Go backward","Gehe zurück" },
501{ "Go forward","Gehe weiter" }, 501{ "Go forward","Gehe weiter" },
502{ "Synchronize","Synchronisieren" }, 502{ "Synchronize","Synchronisieren" },
503{ "AgendaSize","Agendagröße" }, 503{ "AgendaSize","Agendagröße" },
504{ "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, 504{ "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" },
505{ "Import last file","Importiere letzte Datei" }, 505{ "Import last file","Importiere letzte Datei" },
506{ "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, 506{ "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." },
507{ "Save Backup...","Speichere Backup..." }, 507{ "Save Backup...","Speichere Backup..." },
508{ "Export VCalendar","Exportiere VCalendar" }, 508{ "Export VCalendar","Exportiere VCalendar" },
509{ "Manage new categories...","Verwalte neue Kategorien..." }, 509{ "Manage new categories...","Verwalte neue Kategorien..." },
510{ "Beam complete calendar...","Sende kompletten Kalender..." }, 510{ "Beam complete calendar...","Sende kompletten Kalender..." },
511{ "Beam filtered calendar...","Sende gefilterten Kalender..." }, 511{ "Beam filtered calendar...","Sende gefilterten Kalender..." },
512{ "Remote via ssh","Über Netzwerk via ssh" }, 512{ "Remote via ssh","Über Netzwerk via ssh" },
513{ "With local file","Mit lokaler Datei" }, 513{ "With local file","Mit lokaler Datei" },
514{ "With last file","Mit letzter Datei" }, 514{ "With last file","Mit letzter Datei" },
515{ "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, 515{ "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" },
516{ "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, 516{ "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" },
517{ "Save filename","Speichern: Dateinamen wählen" }, 517{ "Save filename","Speichern: Dateinamen wählen" },
518{ "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, 518{ "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" },
519{ "KO/Pi: Warning!","KO/Pi: Warnung!" }, 519{ "KO/Pi: Warning!","KO/Pi: Warnung!" },
520{ "Overwrite!","Überschreibe!" }, 520{ "Overwrite!","Überschreibe!" },
521{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 521{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
522{ "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" }, 522{ "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" },
523{ "KO/Pi Confirmation","KO/Pi Bestätigung" }, 523{ "KO/Pi Confirmation","KO/Pi Bestätigung" },
524{ "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, 524{ "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" },
525{ "Deleting item %d ...","Lösche Eintrag %d ..." }, 525{ "Deleting item %d ...","Lösche Eintrag %d ..." },
526{ "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, 526{ "%d items remaining in list.","%d Einträge sind in der Liste verblieben." },
527{ "Size","Größe" }, 527{ "Size","Größe" },
528{ "Date","Datum" }, 528{ "Date","Datum" },
529{ "Mime Type","Datei Typ" }, 529{ "Mime Type","Datei Typ" },
530{ "All Files","Alle Dateien" }, 530{ "All Files","Alle Dateien" },
531{ "Files","Dateien" }, 531{ "Files","Dateien" },
532{ "Documents","DoKumente" }, 532{ "Documents","DoKumente" },
533{ "Select Categories","Selektiere Kategorien" }, 533{ "Select Categories","Selektiere Kategorien" },
534{ " &Deselect All "," Auswahl aufheben " }, 534{ " &Deselect All "," Auswahl aufheben " },
535{ "A&dd","Hinzu" }, 535{ "A&dd","Hinzu" },
536{ "&Modify","Ändern" }, 536{ "&Modify","Ändern" },
537{ "Edit Categories","Editiere Kategorien" }, 537{ "Edit Categories","Editiere Kategorien" },
538{ " &Edit Categories "," &Editiere Kategorien " }, 538{ " &Edit Categories "," &Editiere Kategorien " },
539{ "Beam Options","Beam Einstellungen" }, 539{ "Beam Options","Beam Einstellungen" },
540{ " With timezone "," Mit Zeitzone " }, 540{ " With timezone "," Mit Zeitzone " },
541{ " Local time ", " Lokale Zeit " }, 541{ " Local time ", " Lokale Zeit " },
542{ "Manage new Categories","Verwalte neue Kategorien" }, 542{ "Manage new Categories","Verwalte neue Kategorien" },
543{ "Add to category list","Füge zur Kategorieliste hinzu" }, 543{ "Add to category list","Füge zur Kategorieliste hinzu" },
544{ "Remove from Events/Todos","Entferne von Terminen/Todos" }, 544{ "Remove from Events/Todos","Entferne von Terminen/Todos" },
545{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, 545{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" },
546{ "File format","Datei Format" }, 546{ "File format","Datei Format" },
547{ "Time format","Zeit Format" }, 547{ "Time format","Zeit Format" },
548{ "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, 548{ "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." },
549{ "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, 549{ "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" },
550{ "h","Std" }, 550{ "h","Std" },
551{ "min","Min" }, 551{ "min","Min" },
552{ "hou","Std" }, 552{ "hou","Std" },
553{ "day","Tag" }, 553{ "day","Tag" },
554{ "French","Französich" }, 554{ "French","Französich" },
555{ "Time","Zeit" }, 555{ "Time","Zeit" },
556{ "Event Viewer","Termin Anzeige" }, 556{ "Event Viewer","Termin Anzeige" },
557{ "Cancel Sync","Sync Abbrechen" }, 557{ "Cancel Sync","Sync Abbrechen" },
558{ "Remote","Fern" }, 558{ "Remote","Fern" },
559{ "Local","Lokal" }, 559{ "Local","Lokal" },
560{ "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, 560{ "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" },
561{ "Local: ","Lokal: " }, 561{ "Local: ","Lokal: " },
562{ "Remote: ","Fern: " }, 562{ "Remote: ","Fern: " },
563{ "Last modified: ","Zuletzt geändert: " }, 563{ "Last modified: ","Zuletzt geändert: " },
564{ "Location: ","Ort: " }, 564{ "Location: ","Ort: " },
565{ "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, 565{ "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" },
566{ "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, 566{ "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" },
567{ "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, 567{ "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " },
568{ "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, 568{ "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" },
569{ "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, 569{ "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " },
570{ "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, 570{ "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" },
571{ "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, 571{ "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." },
572{ "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, 572{ "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" },
573{ "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, 573{ "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" },
574{ "( %1 min before )","( %1 min vorher )" }, 574{ "( %1 min before )","( %1 min vorher )" },
575{ "<b>Alarm on: ","<b>Alarm am: " }, 575{ "<b>Alarm on: ","<b>Alarm am: " },
576{ "<b>Details: </b>","<b>Details: </b>" }, 576{ "<b>Details: </b>","<b>Details: </b>" },
577{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, 577{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" },
578{ "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, 578{ "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" },
579{ "Organizer","Organisator" }, 579{ "Organizer","Organisator" },
580{ "Save","Speichern" }, 580{ "Save","Speichern" },
581{ "Exit (+save)","Beenden(+speichern)" }, 581{ "Exit (+save)","Beenden(+speichern)" },
582{ "Home","Zuhause" }, 582{ "Home","Zuhause" },
583{ "Office","Büro" }, 583{ "Office","Büro" },
584{ "Library","Bibliothek" }, 584{ "Library","Bibliothek" },
585{ "Doctor","Arzt" }, 585{ "Doctor","Arzt" },
586{ "Beach","Strand" }, 586{ "Beach","Strand" },
587{ "Conference room","Konferenzraum" }, 587{ "Conference room","Konferenzraum" },
588{ "Drive Home","Heimfahrt" }, 588{ "Drive Home","Heimfahrt" },
589{ "Watch TV","Tv gucken" }, 589{ "Watch TV","Tv gucken" },
590{ "Phone call","Telefonanruf" }, 590{ "Phone call","Telefonanruf" },
591{ "Pay bill","Rechnung bezahlen" }, 591{ "Pay bill","Rechnung bezahlen" },
592{ "Read book","Buch lesen" }, 592{ "Read book","Buch lesen" },
593{ "Watering plants","Pflanzen giessen" }, 593{ "Watering plants","Pflanzen giessen" },
594{"Appointment","Verabredung" }, 594{"Appointment","Verabredung" },
595{"Birthday","Geburtstag" }, 595{"Birthday","Geburtstag" },
596{"Business","Geschäft" }, 596{"Business","Geschäft" },
597{"Business Travel","Geschäftsreise" }, 597{"Business Travel","Geschäftsreise" },
598{"Cinema","Kino" }, 598{"Cinema","Kino" },
599{"Customer","Kunde" }, 599{"Customer","Kunde" },
600{"Break","Pause" }, 600{"Break","Pause" },
601{"Breakfast","Frühstück" }, 601{"Breakfast","Frühstück" },
602{"Competition","Wettkampf" }, 602{"Competition","Wettkampf" },
603{"Dinner","Abendessen" }, 603{"Dinner","Abendessen" },
604{"Education","Erziehung" }, 604{"Education","Erziehung" },
605{"Family","Familie" }, 605{"Family","Familie" },
606{"Favorites","Favoriten" }, 606{"Favorites","Favoriten" },
607{"Festival","Festival" }, 607{"Festival","Festival" },
608{"Fishing","Angeln" }, 608{"Fishing","Angeln" },
609{"Flight","Flug" }, 609{"Flight","Flug" },
610{"Gifts","Geschenk" }, 610{"Gifts","Geschenk" },
611{"Holiday","Feiertag" }, 611{"Holiday","Feiertag" },
612{"Holiday Cards","Ansichtskarten" }, 612{"Holiday Cards","Ansichtskarten" },
613{"Hot Contacts","Heisse Kontakte" }, 613{"Hot Contacts","Heisse Kontakte" },
614{"Hiking","Wandern" }, 614{"Hiking","Wandern" },
615{"Hunting","Jagen" }, 615{"Hunting","Jagen" },
616{"Key Customer","Wichtiger Kunde" }, 616{"Key Customer","Wichtiger Kunde" },
617{"Kids","Kinder" }, 617{"Kids","Kinder" },
618{"Lunch","Mittagessen" }, 618{"Lunch","Mittagessen" },
619{"Meeting","Treffen" }, 619{"Meeting","Treffen" },
620{"Miscellaneous","Verschiedenes" }, 620{"Miscellaneous","Verschiedenes" },
621{"Partner","Partner" }, 621{"Partner","Partner" },
622{"Party","Partie" }, 622{"Party","Partie" },
623{"Personal","Privat" }, 623{"Personal","Privat" },
624{"Personal Travel","Privatreise"}, 624{"Personal Travel","Privatreise"},
625{"PHB","PHB" }, 625{"PHB","PHB" },
626{"Phone Calls","Telefonanruf" }, 626{"Phone Calls","Telefonanruf" },
627{"Projects","Projekt" }, 627{"Projects","Projekt" },
628{"Recurring","Wiederholend" }, 628{"Recurring","Wiederholend" },
629{"School","Schule" }, 629{"School","Schule" },
630{"Shopping","Einkaufen" }, 630{"Shopping","Einkaufen" },
631{"Speach","Rede" }, 631{"Speach","Rede" },
632{"Special Occasion","Spez.Gelegenheit" }, 632{"Special Occasion","Spez.Gelegenheit" },
633{"Sports","Sport" }, 633{"Sports","Sport" },
634{"Talk","Vortrag" }, 634{"Talk","Vortrag" },
635{"Travel","Reise" }, 635{"Travel","Reise" },
636{"TV","TV" }, 636{"TV","TV" },
637{"Germany","Deutschland" }, 637{"Germany","Deutschland" },
638{"Sweden","Schweden" }, 638{"Sweden","Schweden" },
639{"Forest","Wald" }, 639{"Forest","Wald" },
640{ "Desert","Wüste" }, 640{ "Desert","Wüste" },
641{ "Kitchen","Küche" }, 641{ "Kitchen","Küche" },
642{ "Lake","See" }, 642{ "Lake","See" },
643{"University","Universität"}, 643{"University","Universität"},
644{"Vacation","Urlaub" }, 644{"Vacation","Urlaub" },
645{"VIP","VIP" }, 645{"VIP","VIP" },
646{ "Import Sharp Calendar","Importiere Sharp Kalender" }, 646{ "Import Sharp Calendar","Importiere Sharp Kalender" },
647{ "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, 647{ "This todo has been cancelled!","Dieses Todo wurde gecancelt!" },
648{ "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, 648{ "This event has been cancelled!","Dieser Termin wurde gecancelt!" },
649{ "Cancelled","Gecancelt" }, 649{ "Cancelled","Gecancelt" },
650{ "Multiple sync","Mehrfach Sync" }, 650{ "Multiple sync","Mehrfach Sync" },
651{ "Local file","Lokale Datei" }, 651{ "Local file","Lokale Datei" },
652{ "Last file","Letzte Datei" }, 652{ "Last file","Letzte Datei" },
653{ "Keys + Colors...","Tasten + Farben..." }, 653{ "Keys + Colors...","Tasten + Farben..." },
654{ "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, 654{ "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" },
655{ "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, 655{ "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" },
656{ "Choose...","Wähle..." }, 656{ "Choose...","Wähle..." },
657{ "Use colors for application:","Setze Farben für Programm:" }, 657{ "Use colors for application:","Setze Farben für Programm:" },
658{ "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, 658{ "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" },
659{ "Frames, labels, etc.:","Rahmen, Label, etc.:" }, 659{ "Frames, labels, etc.:","Rahmen, Label, etc.:" },
660{ "Show parent To-Do's","Zeige Ober-Todos" }, 660{ "Show parent To-Do's","Zeige Ober-Todos" },
661{ "Show location","Zeige Orte" }, 661{ "Show location","Zeige Orte" },
662{ "Show events that recur ","Zeige Termine, die sich wiederholen:" }, 662{ "Show events that recur ","Zeige Termine, die sich wiederholen:" },
663{ "Show in every cell ","Zeige in jeder Zelle " }, 663{ "Show in every cell ","Zeige in jeder Zelle " },
664{ "short month","kurzen Monat" }, 664{ "short month","kurzen Monat" },
665{ "icons","Icons" }, 665{ "icons","Icons" },
666{ "Show Sat/Sun together","Zeige Sam/Son zusammen" }, 666{ "Show Sat/Sun together","Zeige Sam/Son zusammen" },
667{ "Category colors are applied to text","Kategorie Farben färben Text" }, 667{ "Category colors are applied to text","Kategorie Farben färben Text" },
668{ "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, 668{ "Month view uses day colors","Monatsansicht zeigt Tagesfarben" },
669{ "Day color odd months","Tagesfarbe ungerade Monate" }, 669{ "Day color odd months","Tagesfarbe ungerade Monate" },
670{ "Day color even months","Tagesfarbe gerade Monate" }, 670{ "Day color even months","Tagesfarbe gerade Monate" },
671{ "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, 671{ "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" },
672{ "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, 672{ "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" },
673{ "Small To-do view uses smaller font","Kleine Todo Ansicht nutzt kleineren Font" }, 673{ "Small To-do view uses smaller font","Kleine Todo Ansicht nutzt kleineren Font" },
674{ "Colors are applied to text","Farben werden auf Text angewendet" }, 674{ "Colors are applied to text","Farben werden auf Text angewendet" },
675{ "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, 675{ "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" },
676{ "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" }, 676{ "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" },
677{ "Play beeps count:","Anzahl der Alarmpiepse: " }, 677{ "Play beeps count:","Anzahl der Alarmpiepse: " },
678{ "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, 678{ "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " },
679{ "Default suspend time in min:","Standard Supendierungs Zeit: " }, 679{ "Default suspend time in min:","Standard Supendierungs Zeit: " },
680{ "Auto suspend count:","Anzahl der auto Suspendierungen" }, 680{ "Auto suspend count:","Anzahl der auto Suspendierungen" },
681{ "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, 681{ "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" },
682{ "New profile","Neues Profil" }, 682{ "New profile","Neues Profil" },
683{ "Clone profile","Klone Profil" }, 683{ "Clone profile","Klone Profil" },
684{ "Delete profile","Lösche Profil" }, 684{ "Delete profile","Lösche Profil" },
685{ "Profile:","Profil:" }, 685{ "Profile:","Profil:" },
686{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, 686{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" },
687{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 687{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
688{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 688{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
689{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 689{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
690{ "Write back file","Schreibe Datei zurück" }, 690{ "Write back file","Schreibe Datei zurück" },
691{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 691{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
692{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 692{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
693{ "Local device name:","Name dieses Gerätes:" }, 693{ "Local device name:","Name dieses Gerätes:" },
694{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 694{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
695{ "Sync preferences","Synchronisations Einstellungen" }, 695{ "Sync preferences","Synchronisations Einstellungen" },
696{ "Profile kind","Profil Art" }, 696{ "Profile kind","Profil Art" },
697{ "Local file","Lokale Datei" }, 697{ "Local file","Lokale Datei" },
698{ "Local file:","Lokale Datei:" }, 698{ "Local file:","Lokale Datei:" },
699{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 699{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
700{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 700{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
701{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 701{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
702{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, 702{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"},
703{ "Device","Gerät:" }, 703{ "Device","Gerät:" },
704{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, 704{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" },
705{ "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" }, 705{ "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" },
706{ "Synchronization successful","Synchronisation erfolgreich" }, 706{ "Synchronization successful","Synchronisation erfolgreich" },
707{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, 707{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." },
708{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, 708{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" },
709{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, 709{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" },
710{ "Enter password","Passwort eingeben" }, 710{ "Enter password","Passwort eingeben" },
711{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, 711{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" },
712{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, 712{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." },
713{ "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" }, 713{ "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" },
714{ "Writing back file result: ","Resultat des Dateizurückschreibens: " }, 714{ "Writing back file result: ","Resultat des Dateizurückschreibens: " },
715{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, 715{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" },
716{ "Edit Calendar Filters","Editiere Kalendar Filter" }, 716{ "Edit Calendar Filters","Editiere Kalendar Filter" },
717{ "Enter filter name:","Neuer Filter Name:" }, 717{ "Enter filter name:","Neuer Filter Name:" },
718{ "Add Filter","Filter hinzufügen" }, 718{ "Add Filter","Filter hinzufügen" },
719{ "Question","Frage" }, 719{ "Question","Frage" },
720{ "Filter position: ","Filter Position: " }, 720{ "Filter position: ","Filter Position: " },
721{ "Month View","Monatsansicht" }, 721{ "Month View","Monatsansicht" },
722{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, 722{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" },
723{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 723{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
724{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 724{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
725{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, 725{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" },
726{ "Access: ","Zugriff: " }, 726{ "Access: ","Zugriff: " },
727{ "Needs Action","Aktion notwendig" }, 727{ "Needs Action","Aktion notwendig" },
728{ "Accepted","Akzeptiert" }, 728{ "Accepted","Akzeptiert" },
729{ "Declined","Abgelehnt" }, 729{ "Declined","Abgelehnt" },
730{ "Tentative","Vorläufig" }, 730{ "Tentative","Vorläufig" },
731{ "Delegated","Beauftragt" }, 731{ "Delegated","Beauftragt" },
732{ "Completed","Vollständig" }, 732{ "Completed","Vollständig" },
733{ "In Process","In Bearbeitung" }, 733{ "In Process","In Bearbeitung" },
734{ "Participant","Teilnehmer" }, 734{ "Participant","Teilnehmer" },
735{ "Optional Participant","Möglicher Teilnehmer" }, 735{ "Optional Participant","Möglicher Teilnehmer" },
736{ "Observer","Beobachter" }, 736{ "Observer","Beobachter" },
737{ "Chair","Vorsitzender" }, 737{ "Chair","Vorsitzender" },
738{ "Not supported \non desktop!\n","" }, 738{ "Not supported \non desktop!\n","" },
739{ "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 vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, 739{ "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 vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " },
740{ "Date range: ","Datums Zeitspanne: " }, 740{ "Date range: ","Datums Zeitspanne: " },
741{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, 741{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " },
742{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, 742{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." },
743{ "Add / remove events","Add./entferne Termine" }, 743{ "Add / remove events","Add./entferne Termine" },
744{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, 744{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." },
745{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, 745{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." },
746{ "Overwrite","Überschreiben" }, 746{ "Overwrite","Überschreiben" },
747{ "Sync+save","Syncen+speichern" }, 747{ "Sync+save","Syncen+speichern" },
748{ "Default","Standard" }, 748{ "Default","Standard" },
749{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, 749{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " },
750{ " %d items?"," %d Einträge?" }, 750{ " %d items?"," %d Einträge?" },
751{ "\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?" }, 751{ "\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?" },
752{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, 752{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" },
753{ "Current","Aktuelle" }, 753{ "Current","Aktuelle" },
754{ "\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" }, 754{ "\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" },
755{ "All","Alle" }, 755{ "All","Alle" },
756{ "Data Loss Warning","Datenverlust Warnung" }, 756{ "Data Loss Warning","Datenverlust Warnung" },
757{ "Proceed","Weitermachen" }, 757{ "Proceed","Weitermachen" },
758{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, 758{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" },
759{ "Filter disabled ","Filter abgeschaltet" }, 759{ "Filter disabled ","Filter abgeschaltet" },
760{ "Filter selected: ","Gewählter Filter: " }, 760{ "Filter selected: ","Gewählter Filter: " },
761{ "Toggle Cancel","Gecancelt ändern" }, 761{ "Toggle Cancel","Gecancelt ändern" },
762{ "&Toggle Cancel","Gecancel&t ändern" }, 762{ "&Toggle Cancel","Gecancel&t ändern" },
763{ "Configure Toolbar","Konfiguriere Toolbar" }, 763{ "Configure Toolbar","Konfiguriere Toolbar" },
764{ "Stretched TB","Gedehnte TB" }, 764{ "Stretched TB","Gedehnte TB" },
765{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, 765{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" },
766{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, 766{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" },
767{ "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" }, 767{ "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" },
768{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, 768{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" },
769{ "Imported file successfully","Datei erfolgreich importiert" }, 769{ "Imported file successfully","Datei erfolgreich importiert" },
770{ "Error importing file","Fehler beim Importieren der Datei" }, 770{ "Error importing file","Fehler beim Importieren der Datei" },
771{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, 771{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" },
772{ "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" }, 772{ "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" },
773{ "Overwrite!","Überschreiben!" }, 773{ "Overwrite!","Überschreiben!" },
774{ "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" }, 774{ "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" },
775{ "Load backup filename","Lade Backup Dateiname" }, 775{ "Load backup filename","Lade Backup Dateiname" },
776{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, 776{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" },
777{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, 777{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" },
778{ "Save backup filename","Speichere Backup Dateiname" }, 778{ "Save backup filename","Speichere Backup Dateiname" },
779{ "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" }, 779{ "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" },
780{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 780{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
781{ "Details of attendee","Teilnehmerdetails" }, 781{ "Details of attendee","Teilnehmerdetails" },
782{ "Work phone:\n","Telefon Arbeit:\n" }, 782{ "Work phone:\n","Telefon Arbeit:\n" },
783{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, 783{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" },
784{ "Home phone:\n","Telefon privat:\n" }, 784{ "Home phone:\n","Telefon privat:\n" },
785{ "Mobile home phone:\n","Mobiltelefon privat:\n" }, 785{ "Mobile home phone:\n","Mobiltelefon privat:\n" },
786{ "Email:\n","Email:\n" }, 786{ "Email:\n","Email:\n" },
787{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, 787{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" },
788{ "Audio Al.: ","Audio Al.: " }, 788{ "Audio Al.: ","Audio Al.: " },
789{ "Proc.Al.: ","Proz.Al.: " }, 789{ "Proc.Al.: ","Proz.Al.: " },
790{ "No sound set","Kein Sound definiert" }, 790{ "No sound set","Kein Sound definiert" },
791{ "*.wav|Wav Files","*.wav|Wav Dateien" }, 791{ "*.wav|Wav Files","*.wav|Wav Dateien" },
792{ "No program set","Kein Programm definiert" }, 792{ "No program set","Kein Programm definiert" },
793{ "Running '%1'","Ausführen '%1'" }, 793{ "Running '%1'","Ausführen '%1'" },
794{ "Playing '%1'","Abspielen '%1'" }, 794{ "Playing '%1'","Abspielen '%1'" },
795{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, 795{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" },
796{ "Load!","Laden!" }, 796{ "Load!","Laden!" },
797{ "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" }, 797{ "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" },
798{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, 798{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" },
799{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, 799{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" },
800{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, 800{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" },
801{ "Features + hints...","Eigenschaften + Tipps..." }, 801{ "Features + hints...","Eigenschaften + Tipps..." },
802{ "User translation...","Benutzer Übersetzung..." }, 802{ "User translation...","Benutzer Übersetzung..." },
803{ "Sync HowTo...","Synchronisation HowTo..." }, 803{ "Sync HowTo...","Synchronisation HowTo..." },
804{ "Print calendar...","Drucke Kalender..." }, 804{ "Print calendar...","Drucke Kalender..." },
805{ "Anniversary","Jahrestag" }, 805{ "Anniversary","Jahrestag" },
806{ "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" }, 806{ "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" },
807{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, 807{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" },
808{ "Next recurrence is on: ","Nächste Wiederholung ist am:" }, 808{ "Next recurrence is on: ","Nächste Wiederholung ist am:" },
809{ "<b>Alarm on: </b>","<b>Alarm am: </b>" }, 809{ "<b>Alarm on: </b>","<b>Alarm am: </b>" },
810{ "<b>Access: </b>","<b>Zugriff: </b>" }, 810{ "<b>Access: </b>","<b>Zugriff: </b>" },
811{ "(%1 min before)","(%1 min vorher)" }, 811{ "(%1 min before)","(%1 min vorher)" },
812{ "<b>Categories: </b>","<b>Kategorien: </b>" }, 812{ "<b>Categories: </b>","<b>Kategorien: </b>" },
813{ "Save Journal/Description...","Speichere Journal/Details..." }, 813{ "Save Journal/Description...","Speichere Journal/Details..." },
814{ "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." }, 814{ "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." },
815{ "Continue","Weitermachen" }, 815{ "Continue","Weitermachen" },
816{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, 816{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" },
817{ "Attendee:","Teilnehmer:" }, 817{ "Attendee:","Teilnehmer:" },
818{ "Click OK to search ->","Klicke zum Suchen auf OK ->" }, 818{ "Click OK to search ->","Klicke zum Suchen auf OK ->" },
819{ "On day ","Am Tag " }, 819{ "On day ","Am Tag " },
820{ "%1 of ","%1 des Monats" }, 820{ "%1 of ","%1 des Monats" },
821{ "%1 of the year","%1 des Jahres" }, 821{ "%1 of the year","%1 des Jahres" },
822{ "Anonymous","Anonymo" }, 822{ "Anonymous","Anonymo" },
823{ "nobody@nowhere","niemand@nirgendwo" }, 823{ "nobody@nowhere","niemand@nirgendwo" },
824{ "calendar.html","calendar.html" }, 824{ "calendar.html","calendar.html" },
825{ " Local Time"," Lokale Zeit" }, 825{ " Local Time"," Lokale Zeit" },
826{ "Unknown Name","Unbekannter Name" }, 826{ "Unknown Name","Unbekannter Name" },
827{ "unknown@nowhere","unbekannt@nirgendwo" }, 827{ "unknown@nowhere","unbekannt@nirgendwo" },
828{ "Beam via IR!","Beam via IR!" }, 828{ "Beam via IR!","Beam via IR!" },
829{ "Next Month","Nächster Monat" }, 829{ "Next Month","Nächster Monat" },
830{ "Prio","Prio" }, 830{ "Prio","Prio" },
831{ "Reparent Todo","Mache Sub-Todo" }, 831{ "Reparent Todo","Mache Sub-Todo" },
832{ "tomorrow","morgen" }, 832{ "tomorrow","morgen" },
833{ "today","heute" }, 833{ "today","heute" },
834{ "yesterday","gestern" }, 834{ "yesterday","gestern" },
835{ "Ok","Ok" }, 835{ "Ok","Ok" },
836{ "Ok+Agenda","Ok+Agenda" }, 836{ "Ok+Agenda","Ok+Agenda" },
837{ "Email","Email" }, 837{ "Email","Email" },
838{ "RSVP","RSVP" }, 838{ "RSVP","RSVP" },
839{ "Email:","Email:" }, 839{ "Email:","Email:" },
840{ "Appointment Time ","Termin Zeit " }, 840{ "Appointment Time ","Termin Zeit " },
841{ "2","2" }, 841{ "2","2" },
842{ "3","3" }, 842{ "3","3" },
843{ "4","4" }, 843{ "4","4" },
844{ " 0 %"," 0 %" }, 844{ " 0 %"," 0 %" },
845{ " 20 %"," 20 %" }, 845{ " 20 %"," 20 %" },
846{ " 40 %"," 40 %" }, 846{ " 40 %"," 40 %" },
847{ " 60 %"," 60 %" }, 847{ " 60 %"," 60 %" },
848{ " 80 %"," 80 %" }, 848{ " 80 %"," 80 %" },
849{ "100 %","100 %" }, 849{ "100 %","100 %" },
850{ "Filter","Filter" }, 850{ "Filter","Filter" },
851{ "Configure","Konfiguriere" }, 851{ "Configure","Konfiguriere" },
852{ "What's Next","What's Next" }, 852{ "What's Next","What's Next" },
853{ "Complete calendar...","Kompletten Kalender..." }, 853{ "Complete calendar...","Kompletten Kalender..." },
854{ "Filtered calendar...","Gefilterten Kalender..." }, 854{ "Filtered calendar...","Gefilterten Kalender..." },
855{ "Export to phone","Exportiere zum Handy" }, 855{ "Export to phone","Exportiere zum Handy" },
856{ "Beam receive enabled","Beam Empfang an" }, 856{ "Beam receive enabled","Beam Empfang an" },
857{ "What's new?","Was ist neu?" }, 857{ "What's new?","Was ist neu?" },
858{ "FAQ...","FAQ..." }, 858{ "FAQ...","FAQ..." },
859{ "Licence...","Licence..." }, 859{ "Licence...","Licence..." },
860{ "What's This?","What's This?" }, 860{ "What's This?","What's This?" },
861{ "&Edit...","Bearbeite..." }, 861{ "&Edit...","Bearbeite..." },
862{ "Oktober","Oktober" }, 862{ "Oktober","Oktober" },
863{ "Title","Titel" }, 863{ "Title","Titel" },
864{ "%1 %","%1 %" }, 864{ "%1 %","%1 %" },
865{ "Enable Pi-Sync","Schalte Pi-Sync an" }, 865{ "Enable Pi-Sync","Schalte Pi-Sync an" },
866{ "Import!","Importiere!" }, 866{ "Import!","Importiere!" },
867{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, 867{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" },
868{ "Export to phone options","Export ans Handy Optionen" }, 868{ "Export to phone options","Export ans Handy Optionen" },
869{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 869{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
870{ "I/O device: ","I/O device: " }, 870{ "I/O device: ","I/O device: " },
871{ "Connection: ","Connection: " }, 871{ "Connection: ","Connection: " },
872{ "Model(opt.): ","Model(opt.): " }, 872{ "Model(opt.): ","Model(opt.): " },
873{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, 873{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" },
874{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, 874{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " },
875{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, 875{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" },
876{ "Export to mobile phone!","Exportiere auf das Handy!" }, 876{ "Export to mobile phone!","Exportiere auf das Handy!" },
877{ "Export complete calendar","Exportiere kompletten Kalender" }, 877{ "Export complete calendar","Exportiere kompletten Kalender" },
878{ "Writing to phone...","Sende Daten ans Handy..." }, 878{ "Writing to phone...","Sende Daten ans Handy..." },
879{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 879{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
880{ "Retry","Nochmal versuchen" }, 880{ "Retry","Nochmal versuchen" },
881{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 881{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
882{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 882{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
883{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 883{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
884{ "Export filtered calendar","Exportiere gefilterten Kalender" }, 884{ "Export filtered calendar","Exportiere gefilterten Kalender" },
885{ "Preferences","Vorlieben" }, 885{ "Preferences","Vorlieben" },
886{ "Global","Global" }, 886{ "Global","Global" },
887{ "Phone","Phone" }, 887{ "Phone","Phone" },
888{ "SMS","SMS" }, 888{ "SMS","SMS" },
889{ "Fax","Fax" }, 889{ "Fax","Fax" },
890{ "Pager","Pager" }, 890{ "Pager","Pager" },
891{ "SIP","SIP" }, 891{ "SIP","SIP" },
892{ "Italian","Italienisch" }, 892{ "Italian","Italienisch" },
893{ "24:00","24:00" }, 893{ "24:00","24:00" },
894{ "12:00am","12:00am" }, 894{ "12:00am","12:00am" },
895{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 895{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
896{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 896{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
897{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 897{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
898{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 898{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
899{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 899{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
900{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 900{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
901{ "Used Mail Client","Benutzter Mail Client" }, 901{ "Used Mail Client","Benutzter Mail Client" },
902{ "Channel:","Channel:" }, 902{ "Channel:","Channel:" },
903{ "Message:","Message:" }, 903{ "Message:","Message:" },
904{ "Parameters:","Parameter:" }, 904{ "Parameters:","Parameter:" },
905{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 905{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
906{ "extra Message:","extra Message:" }, 906{ "extra Message:","extra Message:" },
907{ "extra Parameters:","extra Parameter:" }, 907{ "extra Parameters:","extra Parameter:" },
908{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 908{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
909{ "External Apps.","Externe Appl." }, 909{ "External Apps.","Externe Appl." },
910{ "24 hours","24 Std." }, 910{ "24 hours","24 Std." },
911{ "3 hours","3 Std." }, 911{ "3 hours","3 Std." },
912{ "1 hour","1 Std." }, 912{ "1 hour","1 Std." },
913{ "15 minutes","15 Min." }, 913{ "15 minutes","15 Min." },
914{ "5 minutes","5 Min." }, 914{ "5 minutes","5 Min." },
915{ "1 minute","1 Min." }, 915{ "1 minute","1 Min." },
916{ "23","23" }, 916{ "23","23" },
917{ "Mon 15","Mon 15" }, 917{ "Mon 15","Mon 15" },
918{ "Configure KO","Konfiguriere KO" }, 918{ "Configure KO","Konfiguriere KO" },
919{ "Event text","Termin Text" }, 919{ "Event text","Termin Text" },
920{ "ToDo","Todo" }, 920{ "ToDo","Todo" },
921{ "Today","Heute" }, 921{ "Today","Heute" },
922{ "What's Next View","What's Next Ansicht" }, 922{ "What's Next View","What's Next Ansicht" },
923{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, 923{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" },
924{ "Alarm","Alarm" }, 924{ "Alarm","Alarm" },
925{ "Used %1 Client","Benutzter %1 Client" }, 925{ "Used %1 Client","Benutzter %1 Client" },
926{ "No email client installed","Kein Email Klient installiert" }, 926{ "No email client installed","Kein Email Klient installiert" },
927{ "Userdefined email client","Benutzerdef. Email Klient" }, 927{ "Userdefined email client","Benutzerdef. Email Klient" },
928{ "OM/Pi email client","OM/Pi Email Klient" }, 928{ "OM/Pi email client","OM/Pi Email Klient" },
929{ "Include in multiple ","Beziehe in multiple " }, 929{ "Include in multiple ","Beziehe in multiple " },
930{ "calendar ","Kalender " }, 930{ "calendar ","Kalender " },
931{ "addressbook ","Adressbuch " }, 931{ "addressbook ","Adressbuch " },
932{ "pwmanager","PWmanager" }, 932{ "pwmanager","PWmanager" },
933{ " sync"," Sync ein" }, 933{ " sync"," Sync ein" },
934{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 934{ "Write back synced data","Schreibe gesyncte Daten zurück" },
935{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 935{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
936{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 936{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
937{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 937{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
938{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 938{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
939{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 939{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
940{ "Help...","Hilfe..." }, 940{ "Help...","Hilfe..." },
941{ "Local file Cal:","Lokale Datei Kal:" }, 941{ "Local file Cal:","Lokale Datei Kal:" },
942{ "Local file ABook:","Lokale Datei ABuch:" }, 942{ "Local file ABook:","Lokale Datei ABuch:" },
943{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 943{ "Local file PWMgr:","Lokale Datei PWMgr:" },
944{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 944{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
945{ "Calendar:","Kalender:" }, 945{ "Calendar:","Kalender:" },
946{ "AddressBook:","AdressBuch:" }, 946{ "AddressBook:","AdressBuch:" },
947{ "PWManager:","PWManager:" }, 947{ "PWManager:","PWManager:" },
948{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 948{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
949{ "ssh/scp","ssh/scp" }, 949{ "ssh/scp","ssh/scp" },
950{ "ftp","ftp" }, 950{ "ftp","ftp" },
951{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 951{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
952{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 952{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
953{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 953{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
954{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 954{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
955{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 955{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
956{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 956{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
957{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 957{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
958{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 958{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
959{ "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" }, 959{ "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" },
960{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 960{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
961{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 961{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
962{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 962{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
963{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 963{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
964{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 964{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
965{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 965{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
966{ "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!" }, 966{ "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!" },
967{ "KDE-Pim Sync","KDE-Pim Sync" }, 967{ "KDE-Pim Sync","KDE-Pim Sync" },
968{ "Multiple profiles","Multi-Sync Profile" }, 968{ "Multiple profiles","Multi-Sync Profile" },
969{ "Device: ","Gerät: " }, 969{ "Device: ","Gerät: " },
970{ "Multiple sync started.","Multi-Sync gestartet." }, 970{ "Multiple sync started.","Multi-Sync gestartet." },
971{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 971{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
972{ "Turn filter on","Schalte Filter an" }, 972{ "Turn filter on","Schalte Filter an" },
973{ "Turn filter off","Schalte Filter aus" }, 973{ "Turn filter off","Schalte Filter aus" },
974{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, 974{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" },
975{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, 975{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" },
976{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, 976{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" },
977{ "<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" }, 977{ "<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" },
978{ "<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" }, 978{ "<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" },
979{ "<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" }, 979{ "<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" },
980{ "<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" }, 980{ "<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" },
981{ "<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" }, 981{ "<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" },
982{ "<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" }, 982{ "<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" },
983{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, 983{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" },
984{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, 984{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" },
985{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, 985{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" },
986{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, 986{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" },
987{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, 987{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" },
988{ "<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" }, 988{ "<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" },
989{ "<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" }, 989{ "<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" },
990{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, 990{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" },
991{ "<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" }, 991{ "<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" },
992{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, 992{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" },
993{ "<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" }, 993{ "<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" },
994{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, 994{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" },
995{ "<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" }, 995{ "<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" },
996{ "<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" }, 996{ "<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" },
997{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, 997{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" },
998{ "<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" }, 998{ "<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" },
999{ "<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" }, 999{ "<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" },
1000{ "<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" }, 1000{ "<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" },
1001{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, 1001{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" },
1002{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, 1002{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" },
1003{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, 1003{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" },
1004{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, 1004{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" },
1005{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, 1005{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" },
1006{ "<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" }, 1006{ "<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" },
1007{ "<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" }, 1007{ "<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" },
1008{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, 1008{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" },
1009{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, 1009{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" },
1010{ "<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" }, 1010{ "<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" },
1011{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, 1011{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" },
1012{ "<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" }, 1012{ "<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" },
1013{ "<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" }, 1013{ "<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" },
1014{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, 1014{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" },
1015{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, 1015{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" },
1016{ "<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" }, 1016{ "<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" },
1017{ "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, 1017{ "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " },
1018{ "<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" }, 1018{ "<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" },
1019{ "<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" }, 1019{ "<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" },
1020{ "<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" }, 1020{ "<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" },
1021{ "<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" }, 1021{ "<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" },
1022{ "<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" }, 1022{ "<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" },
1023{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, 1023{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" },
1024{ "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" }, 1024{ "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" },
1025{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, 1025{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" },
1026{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, 1026{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" },
1027{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, 1027{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" },
1028{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, 1028{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" },
1029{ "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" }, 1029{ "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" },
1030{ "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" }, 1030{ "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" },
1031{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, 1031{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" },
1032{ "KO/Pi FAQ","KO/Pi FAQ" }, 1032{ "KO/Pi FAQ","KO/Pi FAQ" },
1033{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, 1033{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" },
1034{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, 1034{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" },
1035{ "About KOrganizer/Pi","Über KOrganizer/Pi" }, 1035{ "About KOrganizer/Pi","Über KOrganizer/Pi" },
1036{ "From: ","Von: " }, 1036{ "From: ","Von: " },
1037{ "Remove sync info","Entferne Sync Info" }, 1037{ "Remove sync info","Entferne Sync Info" },
1038{ "For all profiles","Für alle Profile" }, 1038{ "For all profiles","Für alle Profile" },
1039{ "Hide not Running","Verstecke nicht Laufende" }, 1039{ "Hide not Running","Verstecke nicht Laufende" },
1040{ "ME","ME" }, 1040{ "ME","ME" },
1041{ "Toolbar","Toolbar" }, 1041{ "Toolbar","Toolbar" },
1042{ "Undo Delete...","UNDO Löschen..." }, 1042{ "Undo Delete...","UNDO Löschen..." },
1043{ "Undo Delete","Löschen rückgängig machen" }, 1043{ "Undo Delete","Löschen rückgängig machen" },
1044{ "KDE Sync HowTo...","KDE Sync HowTo..." }, 1044{ "KDE Sync HowTo...","KDE Sync HowTo..." },
1045{ "Multi Sync HowTo...","Multi Sync HowTo..." }, 1045{ "Multi Sync HowTo...","Multi Sync HowTo..." },
1046{ "Januar","Januar" }, 1046{ "Januar","Januar" },
1047{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, 1047{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" },
1048{ "No Filter","Kein Filter" }, 1048{ "No Filter","Kein Filter" },
1049{ "Multiple Sync options","Multi Sync Optionen" }, 1049{ "Multiple Sync options","Multi Sync Optionen" },
1050{ "Sync algo options","Sync Ablauf Optionen" }, 1050{ "Sync algo options","Sync Ablauf Optionen" },
1051{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 1051{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
1052{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 1052{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
1053{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 1053{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
1054{ "Write back options","Optionen zum Zurückschreiben" }, 1054{ "Write back options","Optionen zum Zurückschreiben" },
1055{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 1055{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
1056{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 1056{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
1057{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 1057{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
1058{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 1058{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
1059{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 1059{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
1060{ "Time period","Zeitspanne" }, 1060{ "Time period","Zeitspanne" },
1061{ "From ","Von " }, 1061{ "From ","Von " },
1062{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 1062{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
1063{ " weeks in the future "," Wochen in der Zukunft " }, 1063{ " weeks in the future "," Wochen in der Zukunft " },
1064{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 1064{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
1065{ "Local temp file:","Lokale temp Datei:" }, 1065{ "Local temp file:","Lokale temp Datei:" },
1066{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 1066{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
1067{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 1067{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
1068{ "Language","Sprache" }, 1068{ "Language","Sprache" },
1069{ "Time Format","Zeit Format" }, 1069{ "Time Format","Zeit Format" },
1070{ "Time Zone","Zeit Zone" }, 1070{ "Time Zone","Zeit Zone" },
1071{ "%1 groups subscribed","%1 Guppen abboniert" }, 1071{ "%1 groups subscribed","%1 Guppen abboniert" },
1072{ "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" }, 1072{ "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" },
1073{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 1073{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
1074{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 1074{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
1075{ "Save settings","Speichere Einstellungen" }, 1075{ "Save settings","Speichere Einstellungen" },
1076{ "Save standard","Speichere Standard" }, 1076{ "Save standard","Speichere Standard" },
1077{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 1077{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
1078{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1078{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1079{ "Data storage path","Daten Speicherpfad" }, 1079{ "Data storage path","Daten Speicherpfad" },
1080{ "Language","Sprache" }, 1080{ "Language","Sprache" },
1081{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1081{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1082{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1082{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1083{ "Show events that are done","Zeige abgelaufene Termine" }, 1083{ "Show events that are done","Zeige abgelaufene Termine" },
1084{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1084{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1085{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1085{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1086{ "KO/Pi","KO/Pi" }, 1086{ "KO/Pi","KO/Pi" },
1087{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1087{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1088{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1088{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1089{ "Sound.Al.: ","Sound.Al.: " }, 1089{ "Sound.Al.: ","Sound.Al.: " },
1090{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1090{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1091{ "Restore","Wiederherstellen" }, 1091{ "Restore","Wiederherstellen" },
1092{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklich\nwiederherstellen?" }, 1092{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklich\nwiederherstellen?" },
1093{ "% completed","% erledigt" }, 1093{ "% completed","% erledigt" },
1094{ "%d item(s) found.","%d Item(s) gefunden." }, 1094{ "%d item(s) found.","%d Item(s) gefunden." },
1095{ "Set complete","Setze auf erledigt" }, 1095{ "Set complete","Setze auf erledigt" },
1096{ "(cancelled)","(gecancelt)" }, 1096{ "(cancelled)","(gecancelt)" },
1097{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1097{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1098{ " Local time "," Lokale Zeit " }, 1098{ " Local time "," Lokale Zeit " },
1099{ "Form2","Form2" }, 1099{ "Form2","Form2" },
1100{ "Filter enabled","Filter angeschaltet" }, 1100{ "Filter enabled","Filter angeschaltet" },
1101{ "Edit Filters","Ändere Filter" }, 1101{ "Edit Filters","Ändere Filter" },
1102{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1102{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1103{ "Agenda","Agenda" }, 1103{ "Agenda","Agenda" },
1104{ " ("," (" }, 1104{ " ("," (" },
1105{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1105{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1106{ "Print","Print" }, 1106{ "Print","Print" },
1107{ "&Setup Printer...","Drucker &Setup..." }, 1107{ "&Setup Printer...","Drucker &Setup..." },
1108{ "View Type","Zeige Typ" }, 1108{ "View Type","Zeige Typ" },
1109{ "Page &orientation:","Seiten Ausrichtung:" }, 1109{ "Page &orientation:","Seiten Ausrichtung:" },
1110{ "Use Default of Selected Style","Default des selektierten Stils" }, 1110{ "Use Default of Selected Style","Default des selektierten Stils" },
1111{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1111{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1112{ "Portrait","Portrait" }, 1112{ "Portrait","Portrait" },
1113{ "Landscape","Landschaft" }, 1113{ "Landscape","Landschaft" },
1114{ "Print day","Drucke Tag" }, 1114{ "Print day","Drucke Tag" },
1115{ "CalPrintDay_Base","CalPrintDay_Base" }, 1115{ "CalPrintDay_Base","CalPrintDay_Base" },
1116{ "Date && Time Range","Datum && Zeitspanne" }, 1116{ "Date && Time Range","Datum && Zeitspanne" },
1117{ "&End date:","&Enddatum:" }, 1117{ "&End date:","&Enddatum:" },
1118{ "&Start date:","&Startdatum:" }, 1118{ "&Start date:","&Startdatum:" },
1119{ "Start &time:","Startzeit:" }, 1119{ "Start &time:","Startzeit:" },
1120{ "End ti&me:","Endzeit:" }, 1120{ "End ti&me:","Endzeit:" },
1121{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1121{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1122{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1122{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1123{ "Alt+D","Alt+D" }, 1123{ "Alt+D","Alt+D" },
1124{ "&Use colors","Nutze Farben" }, 1124{ "&Use colors","Nutze Farben" },
1125{ "Alt+U","Alt+U" }, 1125{ "Alt+U","Alt+U" },
1126{ "Print week","Drucke Woche" }, 1126{ "Print week","Drucke Woche" },
1127{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1127{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1128{ "Use &colors","Nutze Farben" }, 1128{ "Use &colors","Nutze Farben" },
1129{ "Type of View","Typ der Ansicht" }, 1129{ "Type of View","Typ der Ansicht" },
1130{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1130{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1131{ "Alt+F","Alt+F" }, 1131{ "Alt+F","Alt+F" },
1132{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1132{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1133{ "Alt+T","Alt+T" }, 1133{ "Alt+T","Alt+T" },
1134{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1134{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1135{ "Print month","Drucke Monat" }, 1135{ "Print month","Drucke Monat" },
1136{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1136{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1137{ "&Start month:","&Startmonat:" }, 1137{ "&Start month:","&Startmonat:" },
1138{ "&End month:","&Endmonat:" }, 1138{ "&End month:","&Endmonat:" },
1139{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1139{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1140{ "Print todos","Drucke Todos" }, 1140{ "Print todos","Drucke Todos" },
1141{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1141{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1142{ "Include &description of the item","Inclusive Itembeschreibung" }, 1142{ "Include &description of the item","Inclusive Itembeschreibung" },
1143{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1143{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1144{ "Include &priority of the item","Inclusive Priorität des Items" }, 1144{ "Include &priority of the item","Inclusive Priorität des Items" },
1145{ "Items to Print","Zu druckende Items" }, 1145{ "Items to Print","Zu druckende Items" },
1146{ "&From:","Von:" }, 1146{ "&From:","Von:" },
1147{ "&To:","Bis:" }, 1147{ "&To:","Bis:" },
1148{ "Print &all todo items","Drucke alle Todo Items" }, 1148{ "Print &all todo items","Drucke alle Todo Items" },
1149{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1149{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1150{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1150{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1151{ "Todo List","Todo Liste" }, 1151{ "Todo List","Todo Liste" },
1152{ "&Title:","&Titel:" }, 1152{ "&Title:","&Titel:" },
1153{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, 1153{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" },
1154{ "Todo list","Todo Liste" }, 1154{ "Todo list","Todo Liste" },
1155{ "&Print...","Drucke..." }, 1155{ "&Print...","Drucke..." },
1156{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1156{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1157{ "[Unconfigured]","[Unkonfiguriert]" }, 1157{ "[Unconfigured]","[Unkonfiguriert]" },
1158{ "OK","OK" }, 1158{ "OK","OK" },
1159{ "FilterEditor","FilterEditor" }, 1159{ "FilterEditor","FilterEditor" },
1160{ "Include","Inclusive" }, 1160{ "Include","Inclusive" },
1161{ "Exclude","Exclusive" }, 1161{ "Exclude","Exclusive" },
1162{ "Edit Selection...","Editiere Auswahl" }, 1162{ "Edit Selection...","Editiere Auswahl" },
1163{ "recurring events","wiederholende Termine" }, 1163{ "recurring events","wiederholende Termine" },
1164{ "recurr. events","wiederh.Termine" }, 1164{ "recurr. events","wiederh.Termine" },
1165{ "completed to-dos","erledigte Todos" }, 1165{ "completed to-dos","erledigte Todos" },
1166{ "events","Termine" }, 1166{ "events","Termine" },
1167{ "todos","Todos" }, 1167{ "todos","Todos" },
1168{ "journals","Journale" }, 1168{ "journals","Journale" },
1169{ "public","öffentl." }, 1169{ "public","öffentl." },
1170{ "private","privat" }, 1170{ "private","privat" },
1171{ "confidential","vertraul." }, 1171{ "confidential","vertraul." },
1172{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, 1172{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" },
1173{ "Yesterday","Gestern" }, 1173{ "Yesterday","Gestern" },
1174{ "Day after tomorrow","Übermorgen" }, 1174{ "Day after tomorrow","Übermorgen" },
1175{ "Tomorrow","Morgen" }, 1175{ "Tomorrow","Morgen" },
1176{ "Day before yesterday","Vorgestern" }, 1176{ "Day before yesterday","Vorgestern" },
1177{ "Size %1","Größe %1" }, 1177{ "Size %1","Größe %1" },
1178{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1178{ "New Agendasize: %1","Neue Agendagröße: %1" },
1179{ " (%1 y.)"," (%1 J.)" }, 1179{ " (%1 y.)"," (%1 J.)" },
1180{ "Allday:","Ganztägig:" }, 1180{ "Allday:","Ganztägig:" },
1181{ "compl.todos","erled.Todos" }, 1181{ "compl.todos","erled.Todos" },
1182{ "Day view","Tagesansicht" }, 1182{ "Day view","Tagesansicht" },
1183{ "Next days","Nächste Tage" }, 1183{ "Next days","Nächste Tage" },
1184{ "Next week","Nächste Woche" }, 1184{ "Next week","Nächste Woche" },
1185{ "Next two weeks","Nächste zwei Wochen" }, 1185{ "Next two weeks","Nächste zwei Wochen" },
1186{ "This month","Dieser Monat" }, 1186{ "This month","Dieser Monat" },
1187{ "Journal view","Journal" }, 1187{ "Journal view","Journal" },
1188{ "Display all opened","Zeige alle geöffnet" }, 1188{ "Display all opened","Zeige alle geöffnet" },
1189{ "Display all closed","Zeige alle geschlossen" }, 1189{ "Display all closed","Zeige alle geschlossen" },
1190{ "Display all flat","Zeige alle flach" }, 1190{ "Display all flat","Zeige alle flach" },
1191{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1191{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1192{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1192{ "Default todo done color:","Standard Todo erledigt Farbe" },
1193{ "Select week %1-%2","Wähle Woche %1-%2" }, 1193{ "Select week %1-%2","Wähle Woche %1-%2" },
1194{ "Select Week","Wähle Woche" }, 1194{ "Select Week","Wähle Woche" },
1195{ "Set alarm...","Setze Alarm..." }, 1195{ "Set alarm...","Setze Alarm..." },
1196{ "Set Alarm!","Setze Alarm!" }, 1196{ "Set Alarm!","Setze Alarm!" },
1197{ "Changed alarm for %1 items","Alarm für %1 Items geändert" }, 1197{ "Changed alarm for %1 items","Alarm für %1 Items geändert" },
1198{ " and "," und " }, 1198{ " and "," und " },
1199{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1199{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1200{ "Mail to selected","Mail an Ausgewählte" }, 1200{ "Mail to selected","Mail an Ausgewählte" },
1201{ "Mail to all","Mail an Alle" }, 1201{ "Mail to all","Mail an Alle" },
1202{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1202{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1203{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1203{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1204{ " on"," am" }, 1204{ " on"," am" },
1205{ " completed on "," erledigt am " }, 1205{ " completed on "," erledigt am " },
1206{ "Save as Event template","Speichere als Vorlage" }, 1206{ "Save as Event template","Speichere als Vorlage" },
1207{ "Load Event template","Lade Termin Vorlage" }, 1207{ "Load Event template","Lade Termin Vorlage" },
1208{ "Save as Journal template","Speichere als Journal Vorlage" }, 1208{ "Save as Journal template","Speichere als Journal Vorlage" },
1209{ "Insert Journal template","Füge Journal Vorlage ein" }, 1209{ "Insert Journal template","Füge Journal Vorlage ein" },
1210{ "Sub todos:<br>","Unter-Todos:<br>" }, 1210{ "Sub todos:<br>","Unter-Todos:<br>" },
1211{ "Parent todo:<br>","Über-Todo:<br>" }, 1211{ "Parent todo:<br>","Über-Todo:<br>" },
1212{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1212{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1213{ " completed"," erledigt" }, 1213{ " completed"," erledigt" },
1214{ "(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.info --- 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.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, 1214{ "(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.info --- 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.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" },
1215{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1215{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1216{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1216{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1217{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1217{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1218{ "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?" }, 1218{ "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?" },
1219{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1219{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1220{ "Error","Fehler" }, 1220{ "Error","Fehler" },
1221{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1221{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1222{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1222{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1223{ "Warning","Warnung" }, 1223{ "Warning","Warnung" },
1224{ "Select week number","Wähle Wochen Nummer" }, 1224{ "Select week number","Wähle Wochen Nummer" },
1225{ "Februar","Februar" }, 1225{ "Februar","Februar" },
1226{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1226{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1227{ "W","W" }, 1227{ "W","W" },
1228{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1228{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1229{ "T: %1","T: %1" }, 1229{ "T: %1","T: %1" },
1230{ "Start: ","Start: " }, 1230{ "Start: ","Start: " },
1231{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1231{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1232{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1232{ "Password for remote access:","Passwort für fernen Zugriff:" },
1233{ "Remote IP address:","Ferne IP Adresse:" }, 1233{ "Remote IP address:","Ferne IP Adresse:" },
1234{ "Remote port number:","Ferne Port Nummer:" }, 1234{ "Remote port number:","Ferne Port Nummer:" },
1235{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1235{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1236{ "Remote from: ","Fern von: " }, 1236{ "Remote from: ","Fern von: " },
1237{ "Local from: ","Lokal von: " }, 1237{ "Local from: ","Lokal von: " },
1238{ "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" }, 1238{ "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" },
1239{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1239{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1240{ "Write back","Schreibe zurück" }, 1240{ "Write back","Schreibe zurück" },
1241{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1241{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1242{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1242{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1243{ "Received sync request","Sync Anfrage erhalten" }, 1243{ "Received sync request","Sync Anfrage erhalten" },
1244{ "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." }, 1244{ "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." },
1245{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1245{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1246{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1246{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1247{ "Sending file...","Sende Datei..." }, 1247{ "Sending file...","Sende Datei..." },
1248{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1248{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1249{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1249{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1250{ "Received %1 bytes","%1 Bytes erhalten" }, 1250{ "Received %1 bytes","%1 Bytes erhalten" },
1251{ "Writing file to disk...","Speichere Datei..." }, 1251{ "Writing file to disk...","Speichere Datei..." },
1252{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1252{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1253{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1253{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1254{ "Synchronize!","Synchronisiere!" }, 1254{ "Synchronize!","Synchronisiere!" },
1255{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1255{ "High clock skew!","Großer Uhrzeitunterschied!" },
1256{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1256{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1257{ "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!" }, 1257{ "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!" },
1258{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1258{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1259{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1259{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1260{ "List week view","Listenwochenansicht" }, 1260{ "List week view","Listenwochenansicht" },
1261{ "List week","Listenwochenansicht" }, 1261{ "List week","Listenwochenansicht" },
1262{ "Next Week","Nächste Woche" }, 1262{ "Next Week","Nächste Woche" },
1263{ "Previous Week","Vorherige Woche" }, 1263{ "Previous Week","Vorherige Woche" },
1264{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, 1264{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." },
1265{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1265{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1266{ "Details","Details" }, 1266{ "Details","Details" },
1267{ "Created time","Erstellt Zeit" }, 1267{ "Created time","Erstellt Zeit" },
1268{ "Last modified time","Geändert Zeit" }, 1268{ "Last modified time","Geändert Zeit" },
1269{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1269{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1270{ "View Options","Anzeige Optionen" }, 1270{ "View Options","Anzeige Optionen" },
1271{ "<b>Created: ","<b>Erstellt am: " }, 1271{ "<b>Created: ","<b>Erstellt am: " },
1272{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1272{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1273{ "Journal: ","Journal: " }, 1273{ "Journal: ","Journal: " },
1274{ "yearly","jährlich" }, 1274{ "yearly","jährlich" },
1275{ "(%1) ","%1-" }, 1275{ "(%1) ","%1-" },
1276{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1276{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1277{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1277{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1278{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1278{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1279{ "Summary/Loc.","Titel/Ort" }, 1279{ "Summary/Loc.","Titel/Ort" },
1280{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1280{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1281{ "Week Number","Wochennummer" }, 1281{ "Week Number","Wochennummer" },
1282{ "Import","Importiere" }, 1282{ "Import","Importiere" },
1283{ "Export","Exportiere" }, 1283{ "Export","Exportiere" },
1284{ "Beam","Beame" }, 1284{ "Beam","Beame" },
1285{ "Export","Exportiere" }, 1285{ "Export","Exportiere" },
1286{ "As iCal (ics) file...","Als iCal (ics) Datei..." }, 1286{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1287{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, 1287{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1288{ "Journal/Details...","Journale/Details..." }, 1288{ "Journal/Details...","Journale/Details..." },
1289{ "Agenda View","Agenda Ansicht" }, 1289{ "Agenda View","Agenda Ansicht" },
1290{ "Show current time","Zeige aktuelle Zeit" }, 1290{ "Show current time","Zeige aktuelle Zeit" },
1291{ "Edit new item","Bearbeite neuen Eintrag" }, 1291{ "Edit new item","Bearbeite neuen Eintrag" },
1292{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, 1292{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" },
1293{ "There is no next alarm.","Es gibt keinen nächsten Alarm." }, 1293{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1294{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, 1294{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1295{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, 1295{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
1296{ "%1 days\n","%1 Tagen\n" }, 1296{ "%1 days\n","%1 Tagen\n" },
1297{ "1 day\n","1 Tag\n" }, 1297{ "1 day\n","1 Tag\n" },
1298{ "%1 hours\n","%1 Stunden\n" }, 1298{ "%1 hours\n","%1 Stunden\n" },
1299{ "1 hour\n","1 Stunde\n" }, 1299{ "1 hour\n","1 Stunde\n" },
1300{ "%1 minutes\n","%1 Minuten\n" }, 1300{ "%1 minutes\n","%1 Minuten\n" },
1301{ "1 minute\n","1 Minute\n" }, 1301{ "1 minute\n","1 Minute\n" },
1302{ "Only one toolbar","Nur eine Toolbar" }, 1302{ "Only one toolbar","Nur eine Toolbar" },
1303{ "Print","Drucke" }, 1303{ "Print","Drucke" },
1304{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, 1304{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
1305{ "There is nothing selected!","Es ist nichts ausgewählt!" }, 1305{ "There is nothing selected!","Es ist nichts ausgewählt!" },
1306{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, 1306{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
1307{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, 1307{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
1308{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, 1308{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" },
1309{ "KO/Pi Printout","KO/Pi Ausdruck" }, 1309{ "KO/Pi Printout","KO/Pi Ausdruck" },
1310{ "Print unscaled","Drucke unskaliert" }, 1310{ "Print unscaled","Drucke unskaliert" },
1311{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, 1311{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
1312{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, 1312{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
1313{ "Printout Mode","Druck Modus" }, 1313{ "Printout Mode","Druck Modus" },
1314{ "Filter menu icon","Filtermenu Icon" }, 1314{ "Filter menu icon","Filtermenu Icon" },
1315{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, 1315{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" },
1316{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, 1316{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" },
1317{ "%1d","%1t" }, 1317{ "%1d","%1t" },
1318{ "%1h","%1std" }, 1318{ "%1h","%1std" },
1319{ "%1min","%1min" }, 1319{ "%1min","%1min" },
1320{ "( %1 before )","( %1 vorher )" }, 1320{ "( %1 before )","( %1 vorher )" },
1321{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1321{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1322{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1322{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1323{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1323{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1324{ "Show Sync Events","Zeige Sync-Ereignisse" }, 1324{ "Show Sync Events","Zeige Sync-Ereignisse" },
1325{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1325{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1326{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1326{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1327{ " on "," am " }, 1327{ " on "," am " },
1328{ "On: ","Am: " }, 1328{ "On: ","Am: " },
1329{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, 1329{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1330{ "Start/Stop todo...","Starte/Stoppe Todo..." }, 1330{ "Start/Stop todo...","Starte/Stoppe Todo..." },
1331{ "Color for running todos:","Farbe für laufende Todos:" }, 1331{ "Color for running todos:","Farbe für laufende Todos:" },
1332{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, 1332{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" },
1333{ "Todo is started","Todo ist gestartet" }, 1333{ "Todo is started","Todo ist gestartet" },
1334{ "Stop todo","Stoppe Todo" }, 1334{ "Stop todo","Stoppe Todo" },
1335{ "Todo is stopped","Todo ist gestoppt" }, 1335{ "Todo is stopped","Todo ist gestoppt" },
1336{ "Start todo","Starte Todo" }, 1336{ "Start todo","Starte Todo" },
1337{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, 1337{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" },
1338{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, 1338{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" },
1339{ "Todo has subtodos","Todo hat Untertodos" }, 1339{ "Todo has subtodos","Todo hat Untertodos" },
1340{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, 1340{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" },
1341{ "Colors","Farben" }, 1341{ "Colors","Farben" },
1342{ "Click on new parent item","Klicke auf neues Übertodo" }, 1342{ "Click on new parent item","Klicke auf neues Übertodo" },
1343{ "Reparenting aborted!","Übertodo setzen abgebrochen" }, 1343{ "Reparenting aborted!","Übertodo setzen abgebrochen" },
1344{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, 1344{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" },
1345{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, 1345{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" },
1346{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, 1346{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" },
1347{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 1347{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
1348{ "times","Zeiten" }, 1348{ "times","Zeiten" },
1349{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, 1349{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" },
1350{ "Backup enabled","Backup angeschaltet" }, 1350{ "Backup enabled","Backup angeschaltet" },
1351{ "Use standard backup dir","Standard Backupverzeichnis" }, 1351{ "Use standard backup dir","Standard Backupverzeichnis" },
1352{ "Number of Backups:","Anzahl der Backups" }, 1352{ "Number of Backups:","Anzahl der Backups" },
1353{ "Make backup every ","Mache ein Backup alle " }, 1353{ "Make backup every ","Mache ein Backup alle " },
1354{ " days"," Tage" }, 1354{ " days"," Tage" },
1355{ "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, 1355{ "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." },
1356{ "Backup Failed!","Backup Problem!" }, 1356{ "Backup Failed!","Backup Problem!" },
1357{ "Try again now","Versuche jetzt nochmal" }, 1357{ "Try again now","Versuche jetzt nochmal" },
1358{ "Try again later","Versuche später nochmal" }, 1358{ "Try again later","Versuche später nochmal" },
1359{ "Try again tomorrow","Versuche morgen nochmal" }, 1359{ "Try again tomorrow","Versuche morgen nochmal" },
1360{ "Disable backup","Schalte Backup ab" }, 1360{ "Disable backup","Schalte Backup ab" },
1361{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 1361{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
1362{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 1362{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
1363{ "Choose action","Wähle Aktion" }, 1363{ "Choose action","Wähle Aktion" },
1364{ "Comment for todo:","Kommentar zum Todo:" }, 1364{ "Comment for todo:","Kommentar zum Todo:" },
1365{ "Stop+note","Stop+Notiz" }, 1365{ "Stop+note","Stop+Notiz" },
1366{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, 1366{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" },
1367{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, 1367{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" },
1368{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, 1368{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" },
1369{ "Print complete list...","Drucke komplette Liste..." }, 1369{ "Print complete list...","Drucke komplette Liste..." },
1370{ "Hide all selected","Verstecke Ausgewählte" }, 1370{ "Hide all selected","Verstecke Ausgewählte" },
1371{ "Add items","hinzufügen" }, 1371{ "Add items","hinzufügen" },
1372{ "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, 1372{ "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" },
1373{ "Print List View...","Drucke Listenansicht..." }, 1373{ "Print List View...","Drucke Listenansicht..." },
1374{ "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, 1374{ "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." },
1375{ "Configure KO/Pi...","Konfiguriere KO/Pi..." }, 1375{ "Configure KO/Pi...","Konfiguriere KO/Pi..." },
1376{ "Global Settings...","Globale Einstellungen..." }, 1376{ "Global Settings...","Globale Einstellungen..." },
1377{ "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, 1377{ "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" },
1378{ "(disabled)","(abgeschaltet)" }, 1378{ "(disabled)","(abgeschaltet)" },
1379{ "New Calendar","Neuer Kalender" }, 1379{ "New Calendar","Neuer Kalender" },
1380{ "Calendar","Kalender" }, 1380{ "Calendar","Kalender" },
1381{ "Filter selector","Filterauswahl" }, 1381{ "Filter selector","Filterauswahl" },
1382{ "Filtermenu","Filtermenu" }, 1382{ "Filtermenu","Filtermenu" },
1383{ "Toggle Fullscreen","Vollbild umschalten" }, 1383{ "Toggle Fullscreen","Vollbild umschalten" },
1384{ "Toggle Resource View","Resourcenansicht umschalten" }, 1384{ "Toggle Resource View","Resourcenansicht umschalten" },
1385{ "Storage HowTo...","Speicherort HowTo..." }, 1385{ "Storage HowTo...","Speicherort HowTo..." },
1386{ "Timetracking HowTo...","Timetracking HowTo..." }, 1386{ "Timetracking HowTo...","Timetracking HowTo..." },
1387{ "Juni","Juni" }, 1387{ "Juni","Juni" },
1388{ "Juli","Juli" }, 1388{ "Juli","Juli" },
1389{ "ToDo:","ToDo:" }, 1389{ "ToDo:","ToDo:" },
1390{ "Set Calendar","Setze Kalender" }, 1390{ "Set Calendar","Setze Kalender" },
1391{ "Todo: %1","Todo: %1" }, 1391{ "Todo: %1","Todo: %1" },
1392{ ": (Prio ",": (Prio " }, 1392{ ": (Prio ",": (Prio " },
1393{ "Todos","Todos" }, 1393{ "Todos","Todos" },
1394{ "Todo Viewer","Todo Anzeige" }, 1394{ "Todo Viewer","Todo Anzeige" },
1395{ "Todo ","Todo " }, 1395{ "Todo ","Todo " },
1396{ " Calendar \n Resource "," Kalender \n Resource " }, 1396{ " Calendar \n Resource "," Kalender \n Resource " },
1397{ " Color "," Farbe " }, 1397{ " Color "," Farbe " },
1398{ "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, 1398{ "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" },
1399{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, 1399{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" },
1400{ "Add new Calendar","Füge Kalender hinzu" }, 1400{ "Add new Calendar","Füge Kalender hinzu" },
1401{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, 1401{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" },
1402{ "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, 1402{ "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" },
1403{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, 1403{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" },
1404{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, 1404{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" },
1405{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, 1405{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." },
1406{ "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, 1406{ "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" },
1407{ "Global application font for all apps:","Globale Schriftart:" }, 1407{ "Global application font for all apps:","Globale Schriftart:" },
1408{ "Application Font","Applikationsschriftart" }, 1408{ "Application Font","Applikationsschriftart" },
1409{ "Kx/Pi","Kx/Pi" }, 1409{ "Kx/Pi","Kx/Pi" },
1410{ "Backup","Backup" }, 1410{ "Backup","Backup" },
1411{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, 1411{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" },
1412{ "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, 1412{ "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" },
1413{ "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, 1413{ "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" },
1414{ "Choose Color","Wähle Farbe" }, 1414{ "Choose Color","Wähle Farbe" },
1415{ " OK "," OK " }, 1415{ " OK "," OK " },
1416{ " Cancel "," Abbrechen " }, 1416{ " Cancel "," Abbrechen " },
1417{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, 1417{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" },
1418{ "Matching items will be removed from list","Passende werden von der Liste entfernt" }, 1418{ "Matching items will be removed from list","Passende werden von der Liste entfernt" },
1419{ "Search on displayed list only","Suche auf der dargestellten Liste" }, 1419{ "Search on displayed list only","Suche auf der dargestellten Liste" },
1420{ "List will be cleared before search","Liste wird vor der Suche gelöscht" }, 1420{ "List will be cleared before search","Liste wird vor der Suche gelöscht" },
1421{ "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, 1421{ "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" },
1422{ "%1\nis running!","%1\nist am Laufen!" }, 1422{ "%1\nis running!","%1\nist am Laufen!" },
1423{ "Additional Comment:","Zusätzlicher Kommentar:" }, 1423{ "Additional Comment:","Zusätzlicher Kommentar:" },
1424{ "Stop and save","Stopp und Speichern" }, 1424{ "Stop and save","Stopp und Speichern" },
1425{ "Continue running","Weiter laufen lassen" }, 1425{ "Continue running","Weiter laufen lassen" },
1426{ "Stop - do not save","Stopp - nicht Speichern" }, 1426{ "Stop - do not save","Stopp - nicht Speichern" },
1427{ "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, 1427{ "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" },
1428{ "Time mismatch!","Zeiten stimmen nicht!" }, 1428{ "Time mismatch!","Zeiten stimmen nicht!" },
1429{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, 1429{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" },
1430{ "Yes, stop todo","Ja, stoppe Todo" }, 1430{ "Yes, stop todo","Ja, stoppe Todo" },
1431{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, 1431{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" },
1432{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, 1432{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" },
1433{ "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, 1433{ "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." },
1434{ "Spouse","Ehegatte" }, 1434{ "Spouse","Ehegatte" },
1435{ "Notes","Notizen" }, 1435{ "Notes","Notizen" },
1436{ "Messanger","Messanger" }, 1436{ "Messanger","Messanger" },
1437{ "Assistant","Assistent" }, 1437{ "Assistant","Assistent" },
1438{ "Manager","Manager" }, 1438{ "Manager","Manager" },
1439{ "Secrecy","Sichtbar" }, 1439{ "Secrecy","Sichtbar" },
1440{ "male","männlich" }, 1440{ "male","männlich" },
1441{ "female","weiblich" }, 1441{ "female","weiblich" },
1442{ "Hide!","Verbergen!" }, 1442{ "Hide!","Verbergen!" },
1443{ "Show!","Anzeigen!" }, 1443{ "Show!","Anzeigen!" },
1444{ "Details","Details" }, 1444{ "Details","Details" },
1445{ "Profession","Beruf" }, 1445{ "Profession","Beruf" },
1446{ "Children","Kinder" }, 1446{ "Children","Kinder" },
1447{ "Department","Abteilung" }, 1447{ "Department","Abteilung" },
1448{ "Backup cancelled","Backup abgebrochen" }, 1448{ "Backup cancelled","Backup abgebrochen" },
1449{ "Backup globally disabled","Backup global abgeschaltet" }, 1449{ "Backup globally disabled","Backup global abgeschaltet" },
1450{ "Backup succesfully finished","Backup erfolgreich beendet" }, 1450{ "Backup succesfully finished","Backup erfolgreich beendet" },
1451{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, 1451{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" },
1452{ "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, 1452{ "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" },
1453{ "Birthdays","Geburtstage" }, 1453{ "Birthdays","Geburtstage" },
1454{ "KO/Pi import information!","KO/Pi Import Information!" }, 1454{ "KO/Pi import information!","KO/Pi Import Information!" },
1455{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, 1455{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" },
1456{ "Cancel - do not start"," Abbrechen - Todo nicht starten" }, 1456{ "Cancel - do not start"," Abbrechen - Todo nicht starten" },
1457{ "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, 1457{ "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" },
1458{ "Reload","Neu laden" }, 1458{ "Reload","Neu laden" },
1459{ "Timezone settings","Zeitzoneneinstellung" }, 1459{ "Timezone settings","Zeitzoneneinstellung" },
1460{ "Title: ","Titel: " }, 1460{ "Title: ","Titel: " },
1461{ "Journal from: ","Journal vom: " }, 1461{ "Journal from: ","Journal vom: " },
1462{ "Journal: %1 from ","Journal: %1 vom " }, 1462{ "Journal: %1 from ","Journal: %1 vom " },
1463{ "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, 1463{ "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" },
1464{ "Selected Item","Ausgewähltes Item" }, 1464{ "Selected Item","Ausgewähltes Item" },
1465{ "Select Date...","Wähle Datum..." }, 1465{ "Select Date...","Wähle Datum..." },
1466{ "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, 1466{ "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" },
1467{ "Change category list now!","Ändere Kategorieliste jetzt!" }, 1467{ "Change category list now!","Ändere Kategorieliste jetzt!" },
1468{ "Edit category list...","Ändere Kategorieliste..." }, 1468{ "Edit category list...","Ändere Kategorieliste..." },
1469{ "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, 1469{ "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" },
1470{ "Filepath: ","Dateipfad: " }, 1470{ "Filepath: ","Dateipfad: " },
1471{ "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, 1471{ "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" },
1472{ "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, 1472{ "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" },
1473{ "Pending Suspend Alarm","Laufender Suspend Alarm" }, 1473{ "Pending Suspend Alarm","Laufender Suspend Alarm" },
1474{ "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, 1474{ "Error loading calendar %1","Fehler beim Laden von Kalender %1" },
1475{ "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, 1475{ "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" },
1476{ "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, 1476{ "Loding of calendar(s) failed","Laden von Kalendern fehlgeschlagen" },
1477{ "Alarm Options","Alarm Einstellungen" }, 1477{ "Alarm Options","Alarm Einstellungen" },
1478{ "Delete selected...","Lösche Ausgewählte..." }, 1478{ "Delete selected...","Lösche Ausgewählte..." },
1479{ "None","Nichts" }, 1479{ "None","Nichts" },
1480{ "Selection","Auswahl" }, 1480{ "Selection","Auswahl" },
1481{ "Set categories","Setze Kategorien" }, 1481{ "Set categories","Setze Kategorien" },
1482{ "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, 1482{ "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" },
1483{ "Reset","Neu setzen" }, 1483{ "Reset","Neu setzen" },
1484{ "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, 1484{ "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" },
1485{ "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, 1485{ "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" },
1486{ "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, 1486{ "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" },
1487{ "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, 1487{ "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" },
1488{ "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, 1488{ "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" },
1489{ "Edit","Edit" }, 1489{ "Edit","Edit" },
1490{ "Last Modified","Zuletzt geändert" }, 1490{ "Last Modified","Zuletzt geändert" },
1491{ "Journal viewer","Journal Anzeige" }, 1491{ "Journal viewer","Journal Anzeige" },
1492{ "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, 1492{ "Configure Calendar Files...","Konfiguriere Kalenderdateien..." },
1493{ "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, 1493{ "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." },
1494{ "Hide Completed","Verstecke erledigte Todos" }, 1494{ "Hide Completed","Verstecke erledigte Todos" },
1495{ "Show not Running","Zeige nicht Laufende" }, 1495{ "Show not Running","Zeige nicht Laufende" },
1496{ "Click to add new Todo","Klick für neues Todo!" }, 1496{ "Click to add new Todo","Klick für neues Todo!" },
1497{ "Show next conflict for","Zeige nächsten Konflikt für" },
1498{ "All events","Alle Termine" },
1499{ "Allday events","Ganztagestermine" },
1500{ "Events with time","Termine mit Zeit" },
1501{ "No conflict found within the next two years","Kein Konflikt innerhalb der nächsten zwei Jahre gefunden" },
1502{ "Conflict %1 <-> %2","Konflikt %1 <-> %2" },
1503{ "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " },
1504{ "","" },
1505{ "","" },
1506{ "","" },
1507{ "","" },
1508{ "","" },
1509{ "","" },
1510{ "","" },
1497{ "","" }, 1511{ "","" },
1498{ "","" }, 1512{ "","" },
1499{ "","" }, 1513{ "","" },
1500{ "","" }, 1514{ "","" },
1501{ "","" }, 1515{ "","" },
1502{ "","" }, 1516{ "","" },
1503{ "","" }, 1517{ "","" },
1504 1518
1505 1519
1506 1520
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index bc1c0c7..9a114d0 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1,1680 +1,1746 @@
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 (preton.brown@yale.edu) 8 Preston Brown (preton.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 "datenavigatorcontainer.h" 110#include "datenavigatorcontainer.h"
111#include "statusdialog.h" 111#include "statusdialog.h"
112#include "kdatenavigator.h" 112#include "kdatenavigator.h"
113#include "kotodoview.h" 113#include "kotodoview.h"
114#include "datenavigator.h" 114#include "datenavigator.h"
115#include "resourceview.h" 115#include "resourceview.h"
116#include "navigatorbar.h" 116#include "navigatorbar.h"
117#include "searchdialog.h" 117#include "searchdialog.h"
118#include "mainwindow.h" 118#include "mainwindow.h"
119#include "categoryeditdialog.h" 119#include "categoryeditdialog.h"
120 120
121#include "calendarview.h" 121#include "calendarview.h"
122#ifndef DESKTOP_VERSION 122#ifndef DESKTOP_VERSION
123#include <qtopia/alarmserver.h> 123#include <qtopia/alarmserver.h>
124#endif 124#endif
125#ifndef _WIN32_ 125#ifndef _WIN32_
126#include <stdlib.h> 126#include <stdlib.h>
127#include <stdio.h> 127#include <stdio.h>
128#include <unistd.h> 128#include <unistd.h>
129#else 129#else
130#include <qprocess.h> 130#include <qprocess.h>
131#endif 131#endif
132 132
133#ifdef DESKTOP_VERSION 133#ifdef DESKTOP_VERSION
134#include <kabc/stdaddressbook.h> 134#include <kabc/stdaddressbook.h>
135#endif 135#endif
136using namespace KOrg; 136using namespace KOrg;
137using namespace KCal; 137using namespace KCal;
138extern int globalFlagBlockAgenda; 138extern int globalFlagBlockAgenda;
139extern int globalFlagBlockStartup; 139extern int globalFlagBlockStartup;
140 140
141 141
142MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent) 142MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent)
143 143
144{ 144{
145 mAlarms = alarms; 145 mAlarms = alarms;
146 viewport()->setBackgroundColor( QColor( 255, 255, 255 ) ); 146 viewport()->setBackgroundColor( QColor( 255, 255, 255 ) );
147 QString mText = "<table width=\"100%\">\n"; 147 QString mText = "<table width=\"100%\">\n";
148 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; 148 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>";
149#ifdef DESKTOP_VERSION 149#ifdef DESKTOP_VERSION
150 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>"; 150 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>";
151#else 151#else
152 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h3>"; 152 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h3>";
153#endif 153#endif
154 // mText += "<img src=\""; 154 // mText += "<img src=\"";
155 // mText += ipath; 155 // mText += ipath;
156 // mText += "\">"; 156 // mText += "\">";
157 //mEventDate = QDate::currentDate(); 157 //mEventDate = QDate::currentDate();
158#ifdef DESKTOP_VERSION 158#ifdef DESKTOP_VERSION
159 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h2>"; 159 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h2>";
160#else 160#else
161 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h3>"; 161 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h3>";
162#endif 162#endif
163 //mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; 163 //mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>";
164 164
165 Incidence * inc = getNextInc( start ); 165 Incidence * inc = getNextInc( start );
166 int time = 0; 166 int time = 0;
167 //mText += "<table>"; 167 //mText += "<table>";
168 while ( inc ) { 168 while ( inc ) {
169 QDateTime dt ; 169 QDateTime dt ;
170 QString tempText = "<a "; 170 QString tempText = "<a ";
171 bool ok; 171 bool ok;
172 dt = inc->getNextOccurence( start, &ok ); 172 dt = inc->getNextOccurence( start, &ok );
173 if ( !ok ) continue; 173 if ( !ok ) continue;
174 if ( inc->typeID() == eventID ) { 174 if ( inc->typeID() == eventID ) {
175 tempText += "href=\"event:"; 175 tempText += "href=\"event:";
176 } else if ( inc->typeID() == todoID ) { 176 } else if ( inc->typeID() == todoID ) {
177 tempText += "href=\"todo:"; 177 tempText += "href=\"todo:";
178 } 178 }
179 tempText += inc->uid() + "\">"; 179 tempText += inc->uid() + "\">";
180 if ( inc->typeID() == todoID ) 180 if ( inc->typeID() == todoID )
181 tempText += i18n("Todo: "); 181 tempText += i18n("Todo: ");
182 if ( inc->summary().length() > 0 ) 182 if ( inc->summary().length() > 0 )
183 tempText += inc->summary(); 183 tempText += inc->summary();
184 else 184 else
185 tempText += i18n("-no summary-"); 185 tempText += i18n("-no summary-");
186 QString timestr; 186 QString timestr;
187 if (!inc->doesFloat()) 187 if (!inc->doesFloat())
188 timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": "; 188 timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": ";
189 else 189 else
190 timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": "; 190 timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": ";
191 if ( dt.date() < QDate::currentDate() && time == 0 ) { 191 if ( dt.date() < QDate::currentDate() && time == 0 ) {
192 mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; 192 mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>";
193 mText += "<table>"; 193 mText += "<table>";
194 time = 1; 194 time = 1;
195 } 195 }
196 if ( dt.date() == QDate::currentDate() && time <= 1 ) { 196 if ( dt.date() == QDate::currentDate() && time <= 1 ) {
197 if ( time > 0 ) 197 if ( time > 0 )
198 mText +="</table>"; 198 mText +="</table>";
199 mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>"; 199 mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>";
200 mText += "<table>"; 200 mText += "<table>";
201 time = 2; 201 time = 2;
202 202
203 } 203 }
204 if ( dt.date() > QDate::currentDate() && time <= 2 ) { 204 if ( dt.date() > QDate::currentDate() && time <= 2 ) {
205 if ( time > 0 ) 205 if ( time > 0 )
206 mText +="</table>"; 206 mText +="</table>";
207 mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>"; 207 mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>";
208 mText += "<table>"; 208 mText += "<table>";
209 time = 3; 209 time = 3;
210 } 210 }
211 mText +="<tr><td><b>"; 211 mText +="<tr><td><b>";
212 mText += timestr; 212 mText += timestr;
213 mText += "</b></td><td>"; 213 mText += "</b></td><td>";
214 mText += tempText; 214 mText += tempText;
215 mText += "</td></tr>\n"; 215 mText += "</td></tr>\n";
216 inc = getNextInc( start ); 216 inc = getNextInc( start );
217 } 217 }
218 mText +="</table>"; 218 mText +="</table>";
219 setText( mText ); 219 setText( mText );
220} 220}
221 221
222MissedAlarmTextBrowser::~MissedAlarmTextBrowser() 222MissedAlarmTextBrowser::~MissedAlarmTextBrowser()
223{ 223{
224 //qDebug("delete MissedAlarmTextBrowser::~MissedAlarmTextBrowser() "); 224 //qDebug("delete MissedAlarmTextBrowser::~MissedAlarmTextBrowser() ");
225} 225}
226Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start ) 226Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start )
227{ 227{
228 QDateTime dt ; 228 QDateTime dt ;
229 Incidence * retInc; 229 Incidence * retInc;
230 Incidence * inc = mAlarms.first(); 230 Incidence * inc = mAlarms.first();
231 if ( inc == 0 ) 231 if ( inc == 0 )
232 return 0; 232 return 0;
233 bool ok; 233 bool ok;
234 dt = inc->getNextOccurence( start, &ok ); 234 dt = inc->getNextOccurence( start, &ok );
235 if ( ! ok ) return 0; 235 if ( ! ok ) return 0;
236 QDateTime dtn ; 236 QDateTime dtn ;
237 retInc = inc; 237 retInc = inc;
238 inc = mAlarms.next(); 238 inc = mAlarms.next();
239 while ( inc ) { 239 while ( inc ) {
240 dtn = inc->getNextOccurence( start, &ok ); 240 dtn = inc->getNextOccurence( start, &ok );
241 if ( ! ok ) return 0; 241 if ( ! ok ) return 0;
242 if ( dtn < dt ) { 242 if ( dtn < dt ) {
243 dt = dtn; 243 dt = dtn;
244 retInc = inc; 244 retInc = inc;
245 } 245 }
246 inc = mAlarms.next(); 246 inc = mAlarms.next();
247 } 247 }
248 mAlarms.remove( retInc ); 248 mAlarms.remove( retInc );
249 return retInc; 249 return retInc;
250 250
251} 251}
252void MissedAlarmTextBrowser::setSource(const QString & n) 252void MissedAlarmTextBrowser::setSource(const QString & n)
253{ 253{
254 if (n.startsWith("event:")) { 254 if (n.startsWith("event:")) {
255#ifdef DESKTOP_VERSION 255#ifdef DESKTOP_VERSION
256 emit showIncidence(n.mid(8)); 256 emit showIncidence(n.mid(8));
257#else 257#else
258 emit showIncidence(n.mid(6)); 258 emit showIncidence(n.mid(6));
259#endif 259#endif
260 return; 260 return;
261 } else if (n.startsWith("todo:")) { 261 } else if (n.startsWith("todo:")) {
262#ifdef DESKTOP_VERSION 262#ifdef DESKTOP_VERSION
263 emit showIncidence(n.mid(7)); 263 emit showIncidence(n.mid(7));
264#else 264#else
265 emit showIncidence(n.mid(5)); 265 emit showIncidence(n.mid(5));
266#endif 266#endif
267 return; 267 return;
268 } 268 }
269} 269}
270 270
271 271
272class KOBeamPrefs : public QDialog 272class KOBeamPrefs : public QDialog
273{ 273{
274 public: 274 public:
275 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) : 275 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) :
276 QDialog( parent, name, true ) 276 QDialog( parent, name, true )
277 { 277 {
278 setCaption( i18n("Beam Options") ); 278 setCaption( i18n("Beam Options") );
279 QVBoxLayout* lay = new QVBoxLayout( this ); 279 QVBoxLayout* lay = new QVBoxLayout( this );
280 lay->setSpacing( 3 ); 280 lay->setSpacing( 3 );
281 lay->setMargin( 3 ); 281 lay->setMargin( 3 );
282 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); 282 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this );
283 lay->addWidget( format ); 283 lay->addWidget( format );
284 format->setExclusive ( true ) ; 284 format->setExclusive ( true ) ;
285 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); 285 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this );
286 lay->addWidget( time ); time->setExclusive ( true ) ; 286 lay->addWidget( time ); time->setExclusive ( true ) ;
287 vcal = new QRadioButton(" vCalendar ", format ); 287 vcal = new QRadioButton(" vCalendar ", format );
288 ical = new QRadioButton(" iCalendar ", format ); 288 ical = new QRadioButton(" iCalendar ", format );
289 vcal->setChecked( true ); 289 vcal->setChecked( true );
290 tz = new QRadioButton(i18n(" With timezone "), time ); 290 tz = new QRadioButton(i18n(" With timezone "), time );
291 local = new QRadioButton(i18n(" Local time "), time ); 291 local = new QRadioButton(i18n(" Local time "), time );
292 tz->setChecked( true ); 292 tz->setChecked( true );
293 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this ); 293 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this );
294 lay->addWidget( ok ); 294 lay->addWidget( ok );
295 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 295 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
296 lay->addWidget( cancel ); 296 lay->addWidget( cancel );
297 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 297 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
298 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 298 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
299 resize( 200, 200 ); 299 resize( 200, 200 );
300 } 300 }
301 301
302 bool beamVcal() { return vcal->isChecked(); } 302 bool beamVcal() { return vcal->isChecked(); }
303 bool beamLocal() { return local->isChecked(); } 303 bool beamLocal() { return local->isChecked(); }
304private: 304private:
305 QRadioButton* vcal, *ical, *local, *tz; 305 QRadioButton* vcal, *ical, *local, *tz;
306}; 306};
307class KOCatPrefs : public QDialog 307class KOCatPrefs : public QDialog
308{ 308{
309 public: 309 public:
310 KOCatPrefs( QWidget *parent=0, const char *name=0 ) : 310 KOCatPrefs( QWidget *parent=0, const char *name=0 ) :
311 QDialog( parent, name, true ) 311 QDialog( parent, name, true )
312 { 312 {
313 setCaption( i18n("Manage new Categories") ); 313 setCaption( i18n("Manage new Categories") );
314 QVBoxLayout* lay = new QVBoxLayout( this ); 314 QVBoxLayout* lay = new QVBoxLayout( this );
315 lay->setSpacing( 3 ); 315 lay->setSpacing( 3 );
316 lay->setMargin( 3 ); 316 lay->setMargin( 3 );
317 QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this ); 317 QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this );
318 lay->addWidget( lab ); 318 lay->addWidget( lab );
319 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 319 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
320 lay->addWidget( format ); 320 lay->addWidget( format );
321 format->setExclusive ( true ) ; 321 format->setExclusive ( true ) ;
322 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 322 addCatBut = new QRadioButton(i18n("Add to category list"), format );
323 new QRadioButton(i18n("Remove from Events/Todos"), format ); 323 new QRadioButton(i18n("Remove from Events/Todos"), format );
324 addCatBut->setChecked( true ); 324 addCatBut->setChecked( true );
325 QPushButton * ok = new QPushButton( i18n("Change category list now!"), this ); 325 QPushButton * ok = new QPushButton( i18n("Change category list now!"), this );
326 lay->addWidget( ok ); 326 lay->addWidget( ok );
327 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 327 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
328 lay->addWidget( cancel ); 328 lay->addWidget( cancel );
329 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 329 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
330 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 330 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
331 resize( 200, 200 ); 331 resize( 200, 200 );
332 } 332 }
333 333
334 bool addCat() { return addCatBut->isChecked(); } 334 bool addCat() { return addCatBut->isChecked(); }
335private: 335private:
336 QRadioButton* addCatBut; 336 QRadioButton* addCatBut;
337}; 337};
338 338
339 339
340 340
341CalendarView::CalendarView( CalendarResources *calendar, 341CalendarView::CalendarView( CalendarResources *calendar,
342 QWidget *parent, const char *name ) 342 QWidget *parent, const char *name )
343 : CalendarViewBase( parent, name ), 343 : CalendarViewBase( parent, name ),
344 mCalendar( calendar ), 344 mCalendar( calendar ),
345 mResourceManager( calendar->resourceManager() ) 345 mResourceManager( calendar->resourceManager() )
346{ 346{
347 347
348 mEventEditor = 0; 348 mEventEditor = 0;
349 mTodoEditor = 0; 349 mTodoEditor = 0;
350 350
351 init(); 351 init();
352} 352}
353 353
354CalendarView::CalendarView( Calendar *calendar, 354CalendarView::CalendarView( Calendar *calendar,
355 QWidget *parent, const char *name ) 355 QWidget *parent, const char *name )
356 : CalendarViewBase( parent, name ), 356 : CalendarViewBase( parent, name ),
357 mCalendar( calendar ), 357 mCalendar( calendar ),
358 mResourceManager( 0 ) 358 mResourceManager( 0 )
359{ 359{
360 360
361 mEventEditor = 0; 361 mEventEditor = 0;
362 mTodoEditor = 0; 362 mTodoEditor = 0;
363 init(); 363 init();
364} 364}
365 365
366void CalendarView::init() 366void CalendarView::init()
367{ 367{
368 mNextAlarmDateTime = QDateTime::currentDateTime(); 368 mNextAlarmDateTime = QDateTime::currentDateTime();
369 setFocusPolicy ( NoFocus ); 369 setFocusPolicy ( NoFocus );
370 mViewerCallerIsSearchDialog = false; 370 mViewerCallerIsSearchDialog = false;
371 mBlockShowDates = false; 371 mBlockShowDates = false;
372 372
373 mDatePickerMode = 0; 373 mDatePickerMode = 0;
374 mCurrentSyncDevice = ""; 374 mCurrentSyncDevice = "";
375 mViewManager = new KOViewManager( this ); 375 mViewManager = new KOViewManager( this );
376 mDialogManager = new KODialogManager( this ); 376 mDialogManager = new KODialogManager( this );
377 mEventViewerDialog = 0; 377 mEventViewerDialog = 0;
378 mModified = false; 378 mModified = false;
379 mReadOnly = false; 379 mReadOnly = false;
380 mSelectedIncidence = 0; 380 mSelectedIncidence = 0;
381 mCalPrinter = 0; 381 mCalPrinter = 0;
382 mFilters.setAutoDelete(true); 382 mFilters.setAutoDelete(true);
383 383
384 mCalendar->registerObserver( this ); 384 mCalendar->registerObserver( this );
385 // TODO: Make sure that view is updated, when calendar is changed. 385 // TODO: Make sure that view is updated, when calendar is changed.
386 386
387 mStorage = new FileStorage( mCalendar ); 387 mStorage = new FileStorage( mCalendar );
388 mNavigator = new DateNavigator( this, "datevav", mViewManager ); 388 mNavigator = new DateNavigator( this, "datevav", mViewManager );
389 389
390 QBoxLayout *topLayout = (QBoxLayout*)layout(); 390 QBoxLayout *topLayout = (QBoxLayout*)layout();
391#ifndef KORG_NOSPLITTER 391#ifndef KORG_NOSPLITTER
392 // create the main layout frames. 392 // create the main layout frames.
393 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); 393 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner");
394 topLayout->addWidget(mPanner); 394 topLayout->addWidget(mPanner);
395 395
396 mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, 396 mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner,
397 "CalendarView::LeftFrame"); 397 "CalendarView::LeftFrame");
398 mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); 398 mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize);
399 399
400 mDateNavigator = new DateNavigatorContainer( mLeftSplitter, 400 mDateNavigator = new DateNavigatorContainer( mLeftSplitter,
401 "CalendarView::DateNavigator" ); 401 "CalendarView::DateNavigator" );
402 402
403 mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); 403 mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize);
404 mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); 404 mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2");
405 mTodoList->setNavigator( mNavigator ); 405 mTodoList->setNavigator( mNavigator );
406 mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); 406 mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView");
407 407
408#ifdef KORG_NORESOURCEVIEW 408#ifdef KORG_NORESOURCEVIEW
409 mResourceView = 0; 409 mResourceView = 0;
410#else 410#else
411 if ( mResourceManager ) { 411 if ( mResourceManager ) {
412 mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); 412 mResourceView = new ResourceView( mResourceManager, mLeftSplitter );
413 mResourceView->updateView(); 413 mResourceView->updateView();
414 connect( mResourceView, SIGNAL( resourcesChanged() ), 414 connect( mResourceView, SIGNAL( resourcesChanged() ),
415 SLOT( updateView() ) ); 415 SLOT( updateView() ) );
416 } else { 416 } else {
417 mResourceView = 0; 417 mResourceView = 0;
418 } 418 }
419#endif 419#endif
420 QWidget *rightBox = new QWidget( mPanner ); 420 QWidget *rightBox = new QWidget( mPanner );
421 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 421 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
422 422
423 mRightFrame = new QWidgetStack( rightBox ); 423 mRightFrame = new QWidgetStack( rightBox );
424 rightLayout->addWidget( mRightFrame, 1 ); 424 rightLayout->addWidget( mRightFrame, 1 );
425 425
426 mLeftFrame = mLeftSplitter; 426 mLeftFrame = mLeftSplitter;
427#else 427#else
428 //QWidget *mainBox = new QWidget( this ); 428 //QWidget *mainBox = new QWidget( this );
429 //QWidget *leftFrame = new QWidget( mainBox ); 429 //QWidget *leftFrame = new QWidget( mainBox );
430 //QBoxLayout * mainBoxLayout; 430 //QBoxLayout * mainBoxLayout;
431 if ( KOPrefs::instance()->mVerticalScreen ) { 431 if ( KOPrefs::instance()->mVerticalScreen ) {
432 //mainBoxLayout = new QVBoxLayout(mainBox); 432 //mainBoxLayout = new QVBoxLayout(mainBox);
433 //leftFrameLayout = new QHBoxLayout(leftFrame ); 433 //leftFrameLayout = new QHBoxLayout(leftFrame );
434 mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); 434 mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this );
435 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 435 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
436 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; 436 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);;
437 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 437 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
438 } else { 438 } else {
439 //mainBoxLayout = new QHBoxLayout(mainBox); 439 //mainBoxLayout = new QHBoxLayout(mainBox);
440 //leftFrameLayout = new QVBoxLayout(leftFrame ); 440 //leftFrameLayout = new QVBoxLayout(leftFrame );
441 mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 441 mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
442 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); 442 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left);
443 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); 443 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame);
444 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 444 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
445 } 445 }
446 mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); 446 mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
447 //QBoxLayout * leftFrameLayout; 447 //QBoxLayout * leftFrameLayout;
448 topLayout->addWidget( mMainFrame ); 448 topLayout->addWidget( mMainFrame );
449#ifdef DESKTOP_VERSION 449#ifdef DESKTOP_VERSION
450 mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this ); 450 mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this );
451 topLayout->addWidget( mDateScrollBar ); 451 topLayout->addWidget( mDateScrollBar );
452 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); 452 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) );
453 if ( QApplication::desktop()->width() < 800 ) 453 if ( QApplication::desktop()->width() < 800 )
454 mDateScrollBar->hide(); 454 mDateScrollBar->hide();
455#endif 455#endif
456 //mainBoxLayout->addWidget (mLeftFrame); 456 //mainBoxLayout->addWidget (mLeftFrame);
457 mDateNavigator = new DateNavigatorContainer( mLeftFrame, 457 mDateNavigator = new DateNavigatorContainer( mLeftFrame,
458 "CalendarView::DateNavigator" ); 458 "CalendarView::DateNavigator" );
459#if 0 459#if 0
460 // FIXME 460 // FIXME
461 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, 461 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE,
462 "CalendarView::DateNavigator", QDate::currentDate()); 462 "CalendarView::DateNavigator", QDate::currentDate());
463#endif 463#endif
464 // mDateNavigator->blockSignals( true ); 464 // mDateNavigator->blockSignals( true );
465 //leftFrameLayout->addWidget( mDateNavigator ); 465 //leftFrameLayout->addWidget( mDateNavigator );
466 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); 466 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall");
467 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); 467 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView");
468 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); 468 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView");
469 connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); 469 connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) );
470 connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); 470 connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) );
471 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); 471 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) );
472 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); 472 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) );
473 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); 473 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) );
474 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); 474 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) );
475 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); 475 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) );
476 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); 476 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) );
477 connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); 477 connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() ));
478 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); 478 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) );
479 479
480 mTodoList->setNavigator( mNavigator ); 480 mTodoList->setNavigator( mNavigator );
481#if 0 481#if 0
482 if ( QApplication::desktop()->width() < 480 ) { 482 if ( QApplication::desktop()->width() < 480 ) {
483 leftFrameLayout->addWidget(mFilterView); 483 leftFrameLayout->addWidget(mFilterView);
484 leftFrameLayout->addWidget(mTodoList, 2 ); 484 leftFrameLayout->addWidget(mTodoList, 2 );
485 485
486 } else { 486 } else {
487 leftFrameLayout->addWidget(mTodoList,2 ); 487 leftFrameLayout->addWidget(mTodoList,2 );
488 leftFrameLayout->addWidget(mFilterView ); 488 leftFrameLayout->addWidget(mFilterView );
489 } 489 }
490#endif 490#endif
491 mFilterView->hide(); 491 mFilterView->hide();
492 mCalEditView->hide(); 492 mCalEditView->hide();
493 QWidget *rightBox = new QWidget( mMainFrame ); 493 QWidget *rightBox = new QWidget( mMainFrame );
494 //mainBoxLayout->addWidget ( rightBox, 10 ); 494 //mainBoxLayout->addWidget ( rightBox, 10 );
495 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 495 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
496 mRightFrame = new QWidgetStack( rightBox ); 496 mRightFrame = new QWidgetStack( rightBox );
497 rightLayout->addWidget( mRightFrame, 10 ); 497 rightLayout->addWidget( mRightFrame, 10 );
498 498
499 //mLeftFrame = (QWidget *)leftFrame; 499 //mLeftFrame = (QWidget *)leftFrame;
500 if ( KOPrefs::instance()->mVerticalScreen ) { 500 if ( KOPrefs::instance()->mVerticalScreen ) {
501 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); 501 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() );
502 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); 502 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() );
503 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); 503 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() );
504 //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); 504 //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() );
505 } else { 505 } else {
506 //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); 506 //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() );
507 //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); 507 //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() );
508 //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); 508 //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() );
509 } 509 }
510 if ( !KOPrefs::instance()->mShowDateNavigator) 510 if ( !KOPrefs::instance()->mShowDateNavigator)
511 mDateNavigator->hide(); 511 mDateNavigator->hide();
512 //qDebug("Calendarview Size %d %d ", width(), height()); 512 //qDebug("Calendarview Size %d %d ", width(), height());
513#endif 513#endif
514 514
515 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 515 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
516 SLOT( showDates( const KCal::DateList & ) ) ); 516 SLOT( showDates( const KCal::DateList & ) ) );
517 517
518 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 518 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
519 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 519 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
520 520
521 521
522 522
523 connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), 523 connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ),
524 mViewManager, SLOT( showMonth( const QDate & ) ) ); 524 mViewManager, SLOT( showMonth( const QDate & ) ) );
525 525
526 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), 526 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ),
527 mNavigator, SLOT( selectWeek( const QDate & ) ) ); 527 mNavigator, SLOT( selectWeek( const QDate & ) ) );
528 528
529 connect( mDateNavigator, SIGNAL( goPrevYear() ), 529 connect( mDateNavigator, SIGNAL( goPrevYear() ),
530 mNavigator, SLOT( selectPreviousYear() ) ); 530 mNavigator, SLOT( selectPreviousYear() ) );
531 connect( mDateNavigator, SIGNAL( goNextYear() ), 531 connect( mDateNavigator, SIGNAL( goNextYear() ),
532 mNavigator, SLOT( selectNextYear() ) ); 532 mNavigator, SLOT( selectNextYear() ) );
533 connect( mDateNavigator, SIGNAL( goPrevMonth() ), 533 connect( mDateNavigator, SIGNAL( goPrevMonth() ),
534 mNavigator, SLOT( selectPreviousMonth() ) ); 534 mNavigator, SLOT( selectPreviousMonth() ) );
535 connect( mDateNavigator, SIGNAL( goNextMonth() ), 535 connect( mDateNavigator, SIGNAL( goNextMonth() ),
536 mNavigator, SLOT( selectNextMonth() ) ); 536 mNavigator, SLOT( selectNextMonth() ) );
537 537
538 connect( mDateNavigator, SIGNAL( goPrevious() ), 538 connect( mDateNavigator, SIGNAL( goPrevious() ),
539 mNavigator, SLOT( selectPrevious() ) ); 539 mNavigator, SLOT( selectPrevious() ) );
540 connect( mDateNavigator, SIGNAL( goNext() ), 540 connect( mDateNavigator, SIGNAL( goNext() ),
541 mNavigator, SLOT( selectNext() ) ); 541 mNavigator, SLOT( selectNext() ) );
542 connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), 542 connect( mDateNavigator, SIGNAL( monthSelected ( int ) ),
543 mNavigator, SLOT( slotMonthSelect( int ) ) ); 543 mNavigator, SLOT( slotMonthSelect( int ) ) );
544 544
545 connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 545 connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
546 mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 546 mNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
547#if 0 547#if 0
548 connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), 548 connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ),
549 SLOT( incidenceAdded( Incidence *) ) ); 549 SLOT( incidenceAdded( Incidence *) ) );
550#endif 550#endif
551 // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); 551 // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView()));
552 552
553 connect( this, SIGNAL( configChanged() ), 553 connect( this, SIGNAL( configChanged() ),
554 mDateNavigator, SLOT( updateConfig() ) ); 554 mDateNavigator, SLOT( updateConfig() ) );
555 555
556 connect( mTodoList, SIGNAL( newTodoSignal() ), 556 connect( mTodoList, SIGNAL( newTodoSignal() ),
557 SLOT( newTodo() ) ); 557 SLOT( newTodo() ) );
558 connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), 558 connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ),
559 SLOT( newSubTodo( Todo * ) ) ); 559 SLOT( newSubTodo( Todo * ) ) );
560 connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), 560 connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ),
561 SLOT( editTodo( Todo * ) ) ); 561 SLOT( editTodo( Todo * ) ) );
562 connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), 562 connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ),
563 SLOT( showTodo( Todo *) ) ); 563 SLOT( showTodo( Todo *) ) );
564 connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), 564 connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ),
565 SLOT( deleteTodo( Todo *) ) ); 565 SLOT( deleteTodo( Todo *) ) );
566 connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); 566 connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) );
567 connect( mTodoList, SIGNAL( purgeCompletedSignal() ), 567 connect( mTodoList, SIGNAL( purgeCompletedSignal() ),
568 SLOT( purgeCompleted() ) ); 568 SLOT( purgeCompleted() ) );
569 connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), 569 connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ),
570 SIGNAL( todoModified( Todo *, int ) ) ); 570 SIGNAL( todoModified( Todo *, int ) ) );
571 571
572 connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), 572 connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ),
573 this, SLOT ( cloneIncidence( Incidence * ) ) ); 573 this, SLOT ( cloneIncidence( Incidence * ) ) );
574 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), 574 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ),
575 this, SLOT (cancelIncidence( Incidence * ) ) ); 575 this, SLOT (cancelIncidence( Incidence * ) ) );
576 576
577 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), 577 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ),
578 this, SLOT ( moveIncidence( Incidence * ) ) ); 578 this, SLOT ( moveIncidence( Incidence * ) ) );
579 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), 579 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ),
580 this, SLOT ( beamIncidence( Incidence * ) ) ); 580 this, SLOT ( beamIncidence( Incidence * ) ) );
581 581
582 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), 582 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ),
583 this, SLOT ( todo_unsub( Todo * ) ) ); 583 this, SLOT ( todo_unsub( Todo * ) ) );
584 584
585 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), 585 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
586 this, SLOT ( todo_resub( Todo *,Todo * ) ) ); 586 this, SLOT ( todo_resub( Todo *,Todo * ) ) );
587 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, 587 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList,
588 SLOT( updateTodo( Todo *, int ) ) ); 588 SLOT( updateTodo( Todo *, int ) ) );
589 connect( this, SIGNAL( todoModified( Todo *, int )), this, 589 connect( this, SIGNAL( todoModified( Todo *, int )), this,
590 SLOT( changeTodoDisplay( Todo *, int ) ) ); 590 SLOT( changeTodoDisplay( Todo *, int ) ) );
591 591
592 592
593 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); 593 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) );
594 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); 594 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) );
595 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); 595 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) );
596 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); 596 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) );
597 597
598 598
599 599
600 600
601 601
602 connect(QApplication::clipboard(),SIGNAL(dataChanged()), 602 connect(QApplication::clipboard(),SIGNAL(dataChanged()),
603 SLOT(checkClipboard())); 603 SLOT(checkClipboard()));
604 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), 604 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ),
605 SLOT( processTodoListSelection( Incidence * ) ) ); 605 SLOT( processTodoListSelection( Incidence * ) ) );
606 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); 606 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool)));
607 607
608 // kdDebug() << "CalendarView::CalendarView() done" << endl; 608 // kdDebug() << "CalendarView::CalendarView() done" << endl;
609 609
610 mDateFrame = new QVBox(0,0,WType_Popup); 610 mDateFrame = new QVBox(0,0,WType_Popup);
611 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 611 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
612 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); 612 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
613 mDateFrame->setLineWidth(3); 613 mDateFrame->setLineWidth(3);
614 mDateFrame->hide(); 614 mDateFrame->hide();
615 mDateFrame->setCaption( i18n( "Pick a date to display")); 615 mDateFrame->setCaption( i18n( "Pick a date to display"));
616 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); 616 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() );
617 617
618 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); 618 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate)));
619 619
620 mEventEditor = mDialogManager->getEventEditor(); 620 mEventEditor = mDialogManager->getEventEditor();
621 mTodoEditor = mDialogManager->getTodoEditor(); 621 mTodoEditor = mDialogManager->getTodoEditor();
622 622
623 mFlagEditDescription = false; 623 mFlagEditDescription = false;
624 624
625 mSuspendTimer = new QTimer( this ); 625 mSuspendTimer = new QTimer( this );
626 mAlarmTimer = new QTimer( this ); 626 mAlarmTimer = new QTimer( this );
627 mRecheckAlarmTimer = new QTimer( this ); 627 mRecheckAlarmTimer = new QTimer( this );
628 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); 628 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) );
629 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); 629 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) );
630 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); 630 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) );
631 mAlarmDialog = new AlarmDialog( this ); 631 mAlarmDialog = new AlarmDialog( this );
632 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); 632 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) );
633 mAlarmDialog->setServerNotification( false ); 633 mAlarmDialog->setServerNotification( false );
634 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); 634 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime );
635 635
636 636
637#ifndef DESKTOP_VERSION 637#ifndef DESKTOP_VERSION
638//US listen for arriving address resultsets 638//US listen for arriving address resultsets
639 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), 639 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)),
640 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); 640 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
641#endif 641#endif
642 mDateNavigator->setCalendar( mCalendar ); 642 mDateNavigator->setCalendar( mCalendar );
643} 643}
644 644
645 645
646CalendarView::~CalendarView() 646CalendarView::~CalendarView()
647{ 647{
648 // kdDebug() << "~CalendarView()" << endl; 648 // kdDebug() << "~CalendarView()" << endl;
649 //qDebug("CalendarView::~CalendarView() "); 649 //qDebug("CalendarView::~CalendarView() ");
650 delete mDialogManager; 650 delete mDialogManager;
651 delete mViewManager; 651 delete mViewManager;
652 delete mStorage; 652 delete mStorage;
653 delete mDateFrame ; 653 delete mDateFrame ;
654 delete mEventViewerDialog; 654 delete mEventViewerDialog;
655 //kdDebug() << "~CalendarView() done" << endl; 655 //kdDebug() << "~CalendarView() done" << endl;
656} 656}
657void CalendarView::nextConflict( bool all, bool allday )
658{
659 QDate start = mNavigator->selectedDates().first().addDays(1);
660 QDate end = start.addDays( 365*2);
661 while ( start < end ) {
662 QPtrList<Event> eventList = calendar()->events( start );
663 Event * ev = eventList.first();
664 QPtrList<Event> test = eventList;
665 while ( ev ) {
666 //qDebug("found %d on %s ", eventList.count(), start.toString().latin1());
667 Event * t_ev = test.first();
668 QDateTime es = ev->dtStart();
669 QDateTime ee = ev->dtEnd();
670 if ( ev->doesFloat() )
671 ee = ee.addDays( 1 );
672 if ( ! all ) {
673 if ( ev->doesFloat() != allday )
674 t_ev = 0;
675 }
676 while ( t_ev ) {
677 bool skip = false;
678 if ( ! all ) {
679 if ( t_ev->doesFloat() != allday )
680 skip = true;
681 }
682 if ( !skip && ev != t_ev ) {
683 QDateTime ets = t_ev->dtStart();
684 QDateTime ete = t_ev->dtEnd();
685 if ( t_ev->doesFloat() )
686 ete = ete.addDays( 1 );
687 //qDebug("test %s -- %s -------- %s -- %s ", es.toString().latin1() , ee.toString().latin1(), ets.toString().latin1() , ete.toString().latin1() );
688 if ( es < ete && ets < ee ) {
689 if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 )
690 mViewManager->showDayView();
691 mNavigator->slotDaySelect( start );
692 int hour = es.time().hour();
693 if ( ets > es )
694 hour = ets.time().hour();
695 mViewManager->agendaView()->setStartHour( hour );
696 topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( ev->summary().left( 20 ) ).arg( t_ev->summary().left( 20 ) ) );
697 return;
698 }
699 }
700 t_ev = test.next();
701 }
702 ev = eventList.next();
703 }
704 start = start.addDays( 1 );
705 }
706 topLevelWidget()->setCaption( i18n("No conflict found within the next two years") );
707 qDebug("No conflict found ");
708}
709
710void CalendarView::conflictAll()
711{
712 nextConflict ( true, true );
713}
714void CalendarView::conflictAllday()
715{
716 nextConflict ( false, true );
717}
718void CalendarView::conflictNotAll()
719{
720 nextConflict ( false, false );
721}
722
657void CalendarView::setCalReadOnly( int id, bool readO ) 723void CalendarView::setCalReadOnly( int id, bool readO )
658{ 724{
659 if ( readO ) { 725 if ( readO ) {
660 emit save(); 726 emit save();
661 } 727 }
662 mCalendar->setReadOnly( id, readO ); 728 mCalendar->setReadOnly( id, readO );
663} 729}
664void CalendarView::setScrollBarStep(int val ) 730void CalendarView::setScrollBarStep(int val )
665{ 731{
666#ifdef DESKTOP_VERSION 732#ifdef DESKTOP_VERSION
667 mDateScrollBar->setLineStep ( val ); 733 mDateScrollBar->setLineStep ( val );
668#endif 734#endif
669} 735}
670void CalendarView::scrollBarValue(int val ) 736void CalendarView::scrollBarValue(int val )
671{ 737{
672#ifdef DESKTOP_VERSION 738#ifdef DESKTOP_VERSION
673 if ( QApplication::desktop()->width() < 800 ) return; 739 if ( QApplication::desktop()->width() < 800 ) return;
674 static bool block = false; 740 static bool block = false;
675 if ( block ) return; 741 if ( block ) return;
676 block = true; 742 block = true;
677 int count = mNavigator->selectedDates().count(); 743 int count = mNavigator->selectedDates().count();
678 int day = mNavigator->selectedDates().first().dayOfYear(); 744 int day = mNavigator->selectedDates().first().dayOfYear();
679 int stepdays = val; 745 int stepdays = val;
680 if ( mDateScrollBar->lineStep () <= count ) { 746 if ( mDateScrollBar->lineStep () <= count ) {
681 //val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); 747 //val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep();
682 //qDebug("VAL %d ",val ); 748 //qDebug("VAL %d ",val );
683 stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); 749 stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep();
684 stepdays = day+stepdays; 750 stepdays = day+stepdays;
685 if ( stepdays < 0 ) stepdays = 0; 751 if ( stepdays < 0 ) stepdays = 0;
686 } 752 }
687 if ( stepdays == day ) { 753 if ( stepdays == day ) {
688 block = false; 754 block = false;
689 return; 755 return;
690 } 756 }
691 int year = mNavigator->selectedDates().first().year(); 757 int year = mNavigator->selectedDates().first().year();
692 QDate d ( year,1,1 ); 758 QDate d ( year,1,1 );
693 mNavigator->selectDates( d.addDays( stepdays-1) , count ); 759 mNavigator->selectDates( d.addDays( stepdays-1) , count );
694 block = false; 760 block = false;
695#endif 761#endif
696 762
697} 763}
698void CalendarView::updateView(const QDate &start, const QDate &end) 764void CalendarView::updateView(const QDate &start, const QDate &end)
699{ 765{
700#ifdef DESKTOP_VERSION 766#ifdef DESKTOP_VERSION
701 if ( ! mDateScrollBar->draggingSlider () ) { 767 if ( ! mDateScrollBar->draggingSlider () ) {
702 int dof = start.dayOfYear(); 768 int dof = start.dayOfYear();
703 //qDebug("dof %d day %d val %d ", dof, start.dayOfYear(),mDateScrollBar->value() ); 769 //qDebug("dof %d day %d val %d ", dof, start.dayOfYear(),mDateScrollBar->value() );
704 if ( dof != mDateScrollBar->value() ) { 770 if ( dof != mDateScrollBar->value() ) {
705 mDateScrollBar->blockSignals( true ); 771 mDateScrollBar->blockSignals( true );
706 mDateScrollBar->setValue( start.dayOfYear()); 772 mDateScrollBar->setValue( start.dayOfYear());
707 mDateScrollBar->blockSignals( false ); 773 mDateScrollBar->blockSignals( false );
708 } 774 }
709 } 775 }
710#endif 776#endif
711 mTodoList->updateView(); 777 mTodoList->updateView();
712 mViewManager->updateView(start, end); 778 mViewManager->updateView(start, end);
713 //mDateNavigator->updateView(); 779 //mDateNavigator->updateView();
714} 780}
715 781
716 782
717 783
718void CalendarView::checkFiles() 784void CalendarView::checkFiles()
719{ 785{
720 QString message; 786 QString message;
721 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 787 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
722 KopiCalendarFile * cal = calendars.first(); 788 KopiCalendarFile * cal = calendars.first();
723 while ( cal ) { 789 while ( cal ) {
724 if ( cal->mErrorOnLoad ) { 790 if ( cal->mErrorOnLoad ) {
725 message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n"; 791 message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n";
726 } 792 }
727 cal = calendars.next(); 793 cal = calendars.next();
728 } 794 }
729 if ( !message.isEmpty() ) { 795 if ( !message.isEmpty() ) {
730 message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); 796 message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0);
731 KMessageBox::error(this,message, i18n("Loding of calendar(s) failed")); 797 KMessageBox::error(this,message, i18n("Loding of calendar(s) failed"));
732 } 798 }
733 QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); 799 QTimer::singleShot( 2000, this, SLOT ( checkAlarms() ));
734} 800}
735void CalendarView::checkAlarms() 801void CalendarView::checkAlarms()
736{ 802{
737 803
738 804
739 KConfig *config = KOGlobals::config(); 805 KConfig *config = KOGlobals::config();
740 config->setGroup( "AppRun" ); 806 config->setGroup( "AppRun" );
741 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 807 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
742 int daysto = dt.daysTo( QDate::currentDate() ); 808 int daysto = dt.daysTo( QDate::currentDate() );
743 int days = config->readNumEntry( "LatestProgramStopDays" , daysto); 809 int days = config->readNumEntry( "LatestProgramStopDays" , daysto);
744 dt = dt.addDays( days ); 810 dt = dt.addDays( days );
745 int secto = dt.secsTo( QDateTime::currentDateTime() ); 811 int secto = dt.secsTo( QDateTime::currentDateTime() );
746 int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; 812 int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30;
747 //qDebug("KO: Reading program stop %d ", secs); 813 //qDebug("KO: Reading program stop %d ", secs);
748 //secs -= ( 3600 * 24*3 ); // debug only 814 //secs -= ( 3600 * 24*3 ); // debug only
749 QDateTime latest = dt.addSecs ( secs ); 815 QDateTime latest = dt.addSecs ( secs );
750 qDebug("KO: Last termination on %s ", latest.toString().latin1()); 816 qDebug("KO: Last termination on %s ", latest.toString().latin1());
751 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); 817 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
752 QPtrList<Incidence> el = mCalendar->rawIncidences(); 818 QPtrList<Incidence> el = mCalendar->rawIncidences();
753 QPtrList<Incidence> al; 819 QPtrList<Incidence> al;
754 Incidence* inL = el.first(); 820 Incidence* inL = el.first();
755 QDateTime cur = QDateTime::currentDateTime().addSecs(-59); 821 QDateTime cur = QDateTime::currentDateTime().addSecs(-59);
756 qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); 822 qDebug("KO: Checking alarm until %s ", cur.toString().latin1());
757 while ( inL ) { 823 while ( inL ) {
758 bool ok = false; 824 bool ok = false;
759 int offset = 0; 825 int offset = 0;
760 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; 826 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ;
761 if ( ok ) { 827 if ( ok ) {
762 //qDebug("OK %s",next.toString().latin1()); 828 //qDebug("OK %s",next.toString().latin1());
763 if ( next < cur ) { 829 if ( next < cur ) {
764 al.append( inL ); 830 al.append( inL );
765 //qDebug("found missed alarm: %s ", inL->summary().latin1() ); 831 //qDebug("found missed alarm: %s ", inL->summary().latin1() );
766 } 832 }
767 } 833 }
768 inL = el.next(); 834 inL = el.next();
769 } 835 }
770 if ( al.count() ) { 836 if ( al.count() ) {
771 QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); 837 QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop );
772 dia->setCaption( i18n("KO/Pi: Missing alarms!") ); 838 dia->setCaption( i18n("KO/Pi: Missing alarms!") );
773 QVBoxLayout* lay = new QVBoxLayout( dia ); 839 QVBoxLayout* lay = new QVBoxLayout( dia );
774 lay->setSpacing( 0 ); 840 lay->setSpacing( 0 );
775 lay->setMargin( 0 ); 841 lay->setMargin( 0 );
776 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); 842 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest );
777 connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); 843 connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) ));
778 lay->addWidget( matb ); 844 lay->addWidget( matb );
779 if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) { 845 if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) {
780 int wid = 210; 846 int wid = 210;
781 int x = QApplication::desktop()->width() - wid - 7; 847 int x = QApplication::desktop()->width() - wid - 7;
782 int y = QApplication::desktop()->height() - wid - 70; 848 int y = QApplication::desktop()->height() - wid - 70;
783 dia->setGeometry ( x,y,wid,wid); 849 dia->setGeometry ( x,y,wid,wid);
784 } else { 850 } else {
785 int si = 220; 851 int si = 220;
786 if ( QApplication::desktop()->width() > 470 ) 852 if ( QApplication::desktop()->width() > 470 )
787 si = 400; 853 si = 400;
788 dia->resize(si,si/2); 854 dia->resize(si,si/2);
789 } 855 }
790 dia->setBackgroundColor( QColor( 255, 255, 255 ) ); 856 dia->setBackgroundColor( QColor( 255, 255, 255 ) );
791 dia->show(); 857 dia->show();
792 858
793 } 859 }
794} 860}
795void CalendarView::showDay( QDate d ) 861void CalendarView::showDay( QDate d )
796{ 862{
797 dateNavigator()->blockSignals( true ); 863 dateNavigator()->blockSignals( true );
798 dateNavigator()->selectDate( d ); 864 dateNavigator()->selectDate( d );
799 dateNavigator()->blockSignals( false ); 865 dateNavigator()->blockSignals( false );
800 mViewManager->showDayView(); 866 mViewManager->showDayView();
801 //dateNavigator()->selectDate( d ); 867 //dateNavigator()->selectDate( d );
802} 868}
803void CalendarView::timerAlarm() 869void CalendarView::timerAlarm()
804{ 870{
805 //qDebug("CalendarView::timerAlarm() "); 871 //qDebug("CalendarView::timerAlarm() ");
806 computeAlarm(mAlarmNotification ); 872 computeAlarm(mAlarmNotification );
807} 873}
808 874
809void CalendarView::suspendAlarm() 875void CalendarView::suspendAlarm()
810{ 876{
811 //qDebug(" CalendarView::suspendAlarm() "); 877 //qDebug(" CalendarView::suspendAlarm() ");
812 computeAlarm(mSuspendAlarmNotification ); 878 computeAlarm(mSuspendAlarmNotification );
813 879
814} 880}
815 881
816void CalendarView::startAlarm( QString mess , QString filename) 882void CalendarView::startAlarm( QString mess , QString filename)
817{ 883{
818 884
819 topLevelWidget()->showNormal(); 885 topLevelWidget()->showNormal();
820 topLevelWidget()->setActiveWindow(); 886 topLevelWidget()->setActiveWindow();
821 topLevelWidget()->raise(); 887 topLevelWidget()->raise();
822 888
823 mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); 889 mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount );
824 QTimer::singleShot( 2000, this, SLOT( checkNextTimerAlarm() ) ); 890 QTimer::singleShot( 2000, this, SLOT( checkNextTimerAlarm() ) );
825 891
826} 892}
827 893
828void CalendarView::checkNextTimerAlarm() 894void CalendarView::checkNextTimerAlarm()
829{ 895{
830 mCalendar->checkAlarmForIncidence( 0, true ); 896 mCalendar->checkAlarmForIncidence( 0, true );
831} 897}
832 898
833void CalendarView::computeAlarm( QString msg ) 899void CalendarView::computeAlarm( QString msg )
834{ 900{
835 901
836 QString mess = msg; 902 QString mess = msg;
837 QString mAlarmMessage = mess.mid( 9 ); 903 QString mAlarmMessage = mess.mid( 9 );
838 QString filename = MainWindow::resourcePath(); 904 QString filename = MainWindow::resourcePath();
839 filename += "koalarm.wav"; 905 filename += "koalarm.wav";
840 QString tempfilename; 906 QString tempfilename;
841 if ( mess.left( 13 ) == "suspend_alarm") { 907 if ( mess.left( 13 ) == "suspend_alarm") {
842 bool error = false; 908 bool error = false;
843 int len = mess.mid( 13 ).find("+++"); 909 int len = mess.mid( 13 ).find("+++");
844 if ( len < 2 ) 910 if ( len < 2 )
845 error = true; 911 error = true;
846 else { 912 else {
847 tempfilename = mess.mid( 13, len ); 913 tempfilename = mess.mid( 13, len );
848 if ( !QFile::exists( tempfilename ) ) 914 if ( !QFile::exists( tempfilename ) )
849 error = true; 915 error = true;
850 } 916 }
851 if ( ! error ) { 917 if ( ! error ) {
852 filename = tempfilename; 918 filename = tempfilename;
853 } 919 }
854 mAlarmMessage = mess.mid( 13+len+3 ); 920 mAlarmMessage = mess.mid( 13+len+3 );
855 //qDebug("suspend file %s ",tempfilename.latin1() ); 921 //qDebug("suspend file %s ",tempfilename.latin1() );
856 startAlarm( mAlarmMessage, filename); 922 startAlarm( mAlarmMessage, filename);
857 return; 923 return;
858 } 924 }
859 if ( mess.left( 11 ) == "timer_alarm") { 925 if ( mess.left( 11 ) == "timer_alarm") {
860 //mTimerTime = 0; 926 //mTimerTime = 0;
861 startAlarm( mess.mid( 11 ), filename ); 927 startAlarm( mess.mid( 11 ), filename );
862 return; 928 return;
863 } 929 }
864 if ( mess.left( 10 ) == "proc_alarm") { 930 if ( mess.left( 10 ) == "proc_alarm") {
865 bool error = false; 931 bool error = false;
866 int len = mess.mid( 10 ).find("+++"); 932 int len = mess.mid( 10 ).find("+++");
867 if ( len < 2 ) 933 if ( len < 2 )
868 error = true; 934 error = true;
869 else { 935 else {
870 tempfilename = mess.mid( 10, len ); 936 tempfilename = mess.mid( 10, len );
871 if ( !QFile::exists( tempfilename ) ) 937 if ( !QFile::exists( tempfilename ) )
872 error = true; 938 error = true;
873 } 939 }
874 if ( error ) { 940 if ( error ) {
875 mAlarmMessage = "Procedure Alarm\nError - File not found\n"; 941 mAlarmMessage = "Procedure Alarm\nError - File not found\n";
876 mAlarmMessage += mess.mid( 10+len+3+9 ); 942 mAlarmMessage += mess.mid( 10+len+3+9 );
877 } else { 943 } else {
878 //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); 944 //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
879 //qDebug("-----system command %s ",tempfilename.latin1() ); 945 //qDebug("-----system command %s ",tempfilename.latin1() );
880#ifndef _WIN32_ 946#ifndef _WIN32_
881 if ( vfork () == 0 ) { 947 if ( vfork () == 0 ) {
882 execl ( tempfilename.latin1(), 0 ); 948 execl ( tempfilename.latin1(), 0 );
883 return; 949 return;
884 } 950 }
885#else 951#else
886 QProcess* p = new QProcess(); 952 QProcess* p = new QProcess();
887 p->addArgument( tempfilename.latin1() ); 953 p->addArgument( tempfilename.latin1() );
888 p->start(); 954 p->start();
889 return; 955 return;
890#endif 956#endif
891 957
892 return; 958 return;
893 } 959 }
894 960
895 //qDebug("+++++++system command %s ",tempfilename.latin1() ); 961 //qDebug("+++++++system command %s ",tempfilename.latin1() );
896 } 962 }
897 if ( mess.left( 11 ) == "audio_alarm") { 963 if ( mess.left( 11 ) == "audio_alarm") {
898 bool error = false; 964 bool error = false;
899 int len = mess.mid( 11 ).find("+++"); 965 int len = mess.mid( 11 ).find("+++");
900 if ( len < 2 ) 966 if ( len < 2 )
901 error = true; 967 error = true;
902 else { 968 else {
903 tempfilename = mess.mid( 11, len ); 969 tempfilename = mess.mid( 11, len );
904 if ( !QFile::exists( tempfilename ) ) 970 if ( !QFile::exists( tempfilename ) )
905 error = true; 971 error = true;
906 } 972 }
907 if ( ! error ) { 973 if ( ! error ) {
908 filename = tempfilename; 974 filename = tempfilename;
909 } 975 }
910 mAlarmMessage = mess.mid( 11+len+3+9 ); 976 mAlarmMessage = mess.mid( 11+len+3+9 );
911 //qDebug("audio file command %s ",tempfilename.latin1() ); 977 //qDebug("audio file command %s ",tempfilename.latin1() );
912 } 978 }
913 if ( mess.left( 9 ) == "cal_alarm") { 979 if ( mess.left( 9 ) == "cal_alarm") {
914 mAlarmMessage = mess.mid( 9 ) ; 980 mAlarmMessage = mess.mid( 9 ) ;
915 } 981 }
916 982
917 startAlarm( mAlarmMessage, filename ); 983 startAlarm( mAlarmMessage, filename );
918 984
919 985
920} 986}
921 987
922void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti ) 988void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
923{ 989{
924 //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 990 //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
925 991
926 mSuspendAlarmNotification = noti; 992 mSuspendAlarmNotification = noti;
927 int ms = QDateTime::currentDateTime().secsTo( qdt )*1000; 993 int ms = QDateTime::currentDateTime().secsTo( qdt )*1000;
928 //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000); 994 //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000);
929 mSuspendTimer->start( ms , true ); 995 mSuspendTimer->start( ms , true );
930 996
931} 997}
932 998
933void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti ) 999void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
934{ 1000{
935 mNextAlarmDateTime = qdt; 1001 mNextAlarmDateTime = qdt;
936 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 1002 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
937 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 1003 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
938#ifndef DESKTOP_VERSION 1004#ifndef DESKTOP_VERSION
939 AlarmServer::addAlarm ( qdt,"koalarm", noti.utf8() ); 1005 AlarmServer::addAlarm ( qdt,"koalarm", noti.utf8() );
940#endif 1006#endif
941 return; 1007 return;
942 } 1008 }
943 int maxSec; 1009 int maxSec;
944 //maxSec = 5; //testing only 1010 //maxSec = 5; //testing only
945 maxSec = 86400+3600; // one day+1hour 1011 maxSec = 86400+3600; // one day+1hour
946 mAlarmNotification = noti; 1012 mAlarmNotification = noti;
947 int sec = QDateTime::currentDateTime().secsTo( qdt ); 1013 int sec = QDateTime::currentDateTime().secsTo( qdt );
948 if ( sec > maxSec ) { 1014 if ( sec > maxSec ) {
949 mRecheckAlarmTimer->start( maxSec * 1000 ); 1015 mRecheckAlarmTimer->start( maxSec * 1000 );
950 // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec ); 1016 // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec );
951 return; 1017 return;
952 } else { 1018 } else {
953 mRecheckAlarmTimer->stop(); 1019 mRecheckAlarmTimer->stop();
954 } 1020 }
955 //qDebug("Alarm timer started with secs: %d ", sec); 1021 //qDebug("Alarm timer started with secs: %d ", sec);
956 mAlarmTimer->start( sec *1000 , true ); 1022 mAlarmTimer->start( sec *1000 , true );
957 1023
958} 1024}
959// called by mRecheckAlarmTimer to get next alarm 1025// called by mRecheckAlarmTimer to get next alarm
960// we need this, because a QTimer has only a max range of 25 days 1026// we need this, because a QTimer has only a max range of 25 days
961void CalendarView::recheckTimerAlarm() 1027void CalendarView::recheckTimerAlarm()
962{ 1028{
963 mAlarmTimer->stop(); 1029 mAlarmTimer->stop();
964 mRecheckAlarmTimer->stop(); 1030 mRecheckAlarmTimer->stop();
965 mCalendar->checkAlarmForIncidence( 0, true ); 1031 mCalendar->checkAlarmForIncidence( 0, true );
966} 1032}
967#ifndef DESKTOP_VERSION 1033#ifndef DESKTOP_VERSION
968void CalendarView::removeAlarm(const QDateTime &qdt, const QString &noti ) 1034void CalendarView::removeAlarm(const QDateTime &qdt, const QString &noti )
969#else 1035#else
970void CalendarView::removeAlarm(const QDateTime &, const QString & ) 1036void CalendarView::removeAlarm(const QDateTime &, const QString & )
971#endif 1037#endif
972{ 1038{
973 //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 1039 //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
974 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 1040 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
975#ifndef DESKTOP_VERSION 1041#ifndef DESKTOP_VERSION
976 AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.utf8() ); 1042 AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.utf8() );
977#endif 1043#endif
978 return; 1044 return;
979 } 1045 }
980 mAlarmTimer->stop(); 1046 mAlarmTimer->stop();
981} 1047}
982void CalendarView::selectWeekNum ( int num ) 1048void CalendarView::selectWeekNum ( int num )
983{ 1049{
984 dateNavigator()->blockSignals( true ); 1050 dateNavigator()->blockSignals( true );
985 dateNavigator()->selectWeek( num ); 1051 dateNavigator()->selectWeek( num );
986 dateNavigator()->blockSignals( false ); 1052 dateNavigator()->blockSignals( false );
987 mViewManager->showWeekView(); 1053 mViewManager->showWeekView();
988} 1054}
989KOViewManager *CalendarView::viewManager() 1055KOViewManager *CalendarView::viewManager()
990{ 1056{
991 return mViewManager; 1057 return mViewManager;
992} 1058}
993 1059
994KODialogManager *CalendarView::dialogManager() 1060KODialogManager *CalendarView::dialogManager()
995{ 1061{
996 return mDialogManager; 1062 return mDialogManager;
997} 1063}
998 1064
999QDate CalendarView::startDate() 1065QDate CalendarView::startDate()
1000{ 1066{
1001 DateList dates = mNavigator->selectedDates(); 1067 DateList dates = mNavigator->selectedDates();
1002 1068
1003 return dates.first(); 1069 return dates.first();
1004} 1070}
1005 1071
1006QDate CalendarView::endDate() 1072QDate CalendarView::endDate()
1007{ 1073{
1008 DateList dates = mNavigator->selectedDates(); 1074 DateList dates = mNavigator->selectedDates();
1009 1075
1010 return dates.last(); 1076 return dates.last();
1011} 1077}
1012 1078
1013 1079
1014void CalendarView::createPrinter() 1080void CalendarView::createPrinter()
1015{ 1081{
1016#ifndef KORG_NOPRINTER 1082#ifndef KORG_NOPRINTER
1017 if (!mCalPrinter) { 1083 if (!mCalPrinter) {
1018 mCalPrinter = new CalPrinter(this, mCalendar); 1084 mCalPrinter = new CalPrinter(this, mCalendar);
1019 connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig())); 1085 connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig()));
1020 } 1086 }
1021#endif 1087#endif
1022} 1088}
1023 1089
1024 1090
1025//KOPrefs::instance()->mWriteBackFile 1091//KOPrefs::instance()->mWriteBackFile
1026//KOPrefs::instance()->mWriteBackExistingOnly 1092//KOPrefs::instance()->mWriteBackExistingOnly
1027 1093
1028// 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 1094// 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
1029// 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 1095// 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
1030// 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 1096// 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
1031// 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 1097// 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
1032// 4 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 1098// 4 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
1033// 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 1099// 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
1034 1100
1035int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full ) 1101int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full )
1036{ 1102{
1037 1103
1038 // 0 equal 1104 // 0 equal
1039 // 1 take local 1105 // 1 take local
1040 // 2 take remote 1106 // 2 take remote
1041 // 3 cancel 1107 // 3 cancel
1042 QDateTime lastSync = mLastCalendarSync; 1108 QDateTime lastSync = mLastCalendarSync;
1043 QDateTime localMod = local->lastModified(); 1109 QDateTime localMod = local->lastModified();
1044 QDateTime remoteMod = remote->lastModified(); 1110 QDateTime remoteMod = remote->lastModified();
1045 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1111 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1046 bool remCh, locCh; 1112 bool remCh, locCh;
1047 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 1113 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
1048 //if ( remCh ) 1114 //if ( remCh )
1049 //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); 1115 //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
1050 locCh = ( localMod > mLastCalendarSync ); 1116 locCh = ( localMod > mLastCalendarSync );
1051 if ( !remCh && ! locCh ) { 1117 if ( !remCh && ! locCh ) {
1052 //qDebug("both not changed "); 1118 //qDebug("both not changed ");
1053 lastSync = localMod.addDays(1); 1119 lastSync = localMod.addDays(1);
1054 if ( mode <= SYNC_PREF_ASK ) 1120 if ( mode <= SYNC_PREF_ASK )
1055 return 0; 1121 return 0;
1056 } else { 1122 } else {
1057 if ( locCh ) { 1123 if ( locCh ) {
1058 //qDebug("loc changed %d %s %s", local->revision() , localMod.toString().latin1(), mLastCalendarSync.toString().latin1()); 1124 //qDebug("loc changed %d %s %s", local->revision() , localMod.toString().latin1(), mLastCalendarSync.toString().latin1());
1059 lastSync = localMod.addDays( -1 ); 1125 lastSync = localMod.addDays( -1 );
1060 if ( !remCh ) 1126 if ( !remCh )
1061 remoteMod = ( lastSync.addDays( -1 ) ); 1127 remoteMod = ( lastSync.addDays( -1 ) );
1062 } else { 1128 } else {
1063 //qDebug(" not loc changed "); 1129 //qDebug(" not loc changed ");
1064 lastSync = localMod.addDays( 1 ); 1130 lastSync = localMod.addDays( 1 );
1065 if ( remCh ) 1131 if ( remCh )
1066 remoteMod =( lastSync.addDays( 1 ) ); 1132 remoteMod =( lastSync.addDays( 1 ) );
1067 1133
1068 } 1134 }
1069 } 1135 }
1070 full = true; 1136 full = true;
1071 if ( mode < SYNC_PREF_ASK ) 1137 if ( mode < SYNC_PREF_ASK )
1072 mode = SYNC_PREF_ASK; 1138 mode = SYNC_PREF_ASK;
1073 } else { 1139 } else {
1074 if ( localMod == remoteMod ) 1140 if ( localMod == remoteMod )
1075 // if ( local->revision() == remote->revision() ) 1141 // if ( local->revision() == remote->revision() )
1076 return 0; 1142 return 0;
1077 1143
1078 } 1144 }
1079 // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); 1145 // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() );
1080 1146
1081 //qDebug("%s %d %s %d", localMod.toString().latin1() , local->revision(), remoteMod.toString().latin1(), remote->revision()); 1147 //qDebug("%s %d %s %d", localMod.toString().latin1() , local->revision(), remoteMod.toString().latin1(), remote->revision());
1082 //qDebug("%d %d %d %d ", localMod.time().second(), localMod.time().msec(), remoteMod.time().second(), remoteMod.time().msec() ); 1148 //qDebug("%d %d %d %d ", localMod.time().second(), localMod.time().msec(), remoteMod.time().second(), remoteMod.time().msec() );
1083 //full = true; //debug only 1149 //full = true; //debug only
1084 if ( full ) { 1150 if ( full ) {
1085 bool equ = false; 1151 bool equ = false;
1086 if ( local->typeID() == eventID ) { 1152 if ( local->typeID() == eventID ) {
1087 equ = (*((Event*) local) == *((Event*) remote)); 1153 equ = (*((Event*) local) == *((Event*) remote));
1088 } 1154 }
1089 else if ( local->typeID() == todoID ) 1155 else if ( local->typeID() == todoID )
1090 equ = (*((Todo*) local) == (*(Todo*) remote)); 1156 equ = (*((Todo*) local) == (*(Todo*) remote));
1091 else if ( local->typeID() == journalID ) 1157 else if ( local->typeID() == journalID )
1092 equ = (*((Journal*) local) == *((Journal*) remote)); 1158 equ = (*((Journal*) local) == *((Journal*) remote));
1093 if ( equ ) { 1159 if ( equ ) {
1094 //qDebug("equal "); 1160 //qDebug("equal ");
1095 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1161 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1096 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); 1162 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) );
1097 } 1163 }
1098 if ( mode < SYNC_PREF_FORCE_LOCAL ) 1164 if ( mode < SYNC_PREF_FORCE_LOCAL )
1099 return 0; 1165 return 0;
1100 1166
1101 }//else //debug only 1167 }//else //debug only
1102 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); 1168 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1());
1103 } 1169 }
1104 int result; 1170 int result;
1105 bool localIsNew; 1171 bool localIsNew;
1106 //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() ); 1172 //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() );
1107 1173
1108 1174
1109 // ************************************************ 1175 // ************************************************
1110 // ************************************************ 1176 // ************************************************
1111 // ************************************************ 1177 // ************************************************
1112 // We may have that lastSync > remoteMod AND lastSync > localMod 1178 // We may have that lastSync > remoteMod AND lastSync > localMod
1113 // BUT remoteMod != localMod 1179 // BUT remoteMod != localMod
1114 1180
1115 1181
1116 if ( full && mode < SYNC_PREF_NEWEST ) 1182 if ( full && mode < SYNC_PREF_NEWEST )
1117 mode = SYNC_PREF_ASK; 1183 mode = SYNC_PREF_ASK;
1118 1184
1119 switch( mode ) { 1185 switch( mode ) {
1120 case SYNC_PREF_LOCAL: 1186 case SYNC_PREF_LOCAL:
1121 if ( lastSync > remoteMod ) 1187 if ( lastSync > remoteMod )
1122 return 1; 1188 return 1;
1123 if ( lastSync > localMod ) 1189 if ( lastSync > localMod )
1124 return 2; 1190 return 2;
1125 return 1; 1191 return 1;
1126 break; 1192 break;
1127 case SYNC_PREF_REMOTE: 1193 case SYNC_PREF_REMOTE:
1128 if ( lastSync > localMod ) 1194 if ( lastSync > localMod )
1129 return 2; 1195 return 2;
1130 if ( lastSync > remoteMod ) 1196 if ( lastSync > remoteMod )
1131 return 1; 1197 return 1;
1132 return 2; 1198 return 2;
1133 break; 1199 break;
1134 case SYNC_PREF_NEWEST: 1200 case SYNC_PREF_NEWEST:
1135 if ( localMod >= remoteMod ) 1201 if ( localMod >= remoteMod )
1136 return 1; 1202 return 1;
1137 else 1203 else
1138 return 2; 1204 return 2;
1139 break; 1205 break;
1140 case SYNC_PREF_ASK: 1206 case SYNC_PREF_ASK:
1141 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 1207 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
1142 if ( lastSync > remoteMod && lastSync > localMod) 1208 if ( lastSync > remoteMod && lastSync > localMod)
1143 return 0; 1209 return 0;
1144 if ( lastSync > remoteMod ) 1210 if ( lastSync > remoteMod )
1145 return 1; 1211 return 1;
1146 if ( lastSync > localMod ) 1212 if ( lastSync > localMod )
1147 return 2; 1213 return 2;
1148 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 1214 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
1149 localIsNew = localMod >= remoteMod; 1215 localIsNew = localMod >= remoteMod;
1150 if ( localIsNew ) 1216 if ( localIsNew )
1151 getEventViewerDialog()->setColorMode( 1 ); 1217 getEventViewerDialog()->setColorMode( 1 );
1152 else 1218 else
1153 getEventViewerDialog()->setColorMode( 2 ); 1219 getEventViewerDialog()->setColorMode( 2 );
1154 getEventViewerDialog()->setIncidence(local); 1220 getEventViewerDialog()->setIncidence(local);
1155 if ( localIsNew ) 1221 if ( localIsNew )
1156 getEventViewerDialog()->setColorMode( 2 ); 1222 getEventViewerDialog()->setColorMode( 2 );
1157 else 1223 else
1158 getEventViewerDialog()->setColorMode( 1 ); 1224 getEventViewerDialog()->setColorMode( 1 );
1159 getEventViewerDialog()->addIncidence(remote); 1225 getEventViewerDialog()->addIncidence(remote);
1160 getEventViewerDialog()->setColorMode( 0 ); 1226 getEventViewerDialog()->setColorMode( 0 );
1161 //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() ); 1227 //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() );
1162 getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!")); 1228 getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!"));
1163 getEventViewerDialog()->showMe(); 1229 getEventViewerDialog()->showMe();
1164 result = getEventViewerDialog()->executeS( localIsNew ); 1230 result = getEventViewerDialog()->executeS( localIsNew );
1165 return result; 1231 return result;
1166 1232
1167 break; 1233 break;
1168 case SYNC_PREF_FORCE_LOCAL: 1234 case SYNC_PREF_FORCE_LOCAL:
1169 return 1; 1235 return 1;
1170 break; 1236 break;
1171 case SYNC_PREF_FORCE_REMOTE: 1237 case SYNC_PREF_FORCE_REMOTE:
1172 return 2; 1238 return 2;
1173 break; 1239 break;
1174 1240
1175 default: 1241 default:
1176 // SYNC_PREF_TAKE_BOTH not implemented 1242 // SYNC_PREF_TAKE_BOTH not implemented
1177 break; 1243 break;
1178 } 1244 }
1179 return 0; 1245 return 0;
1180} 1246}
1181Event* CalendarView::getLastSyncEvent() 1247Event* CalendarView::getLastSyncEvent()
1182{ 1248{
1183 Event* lse; 1249 Event* lse;
1184 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); 1250 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
1185 lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); 1251 lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice );
1186 if (!lse) { 1252 if (!lse) {
1187 lse = new Event(); 1253 lse = new Event();
1188 lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); 1254 lse->setUid( "last-syncEvent-"+mCurrentSyncDevice );
1189 QString sum = ""; 1255 QString sum = "";
1190 if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) 1256 if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) )
1191 sum = "E: "; 1257 sum = "E: ";
1192 lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); 1258 lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event"));
1193 lse->setDtStart( mLastCalendarSync ); 1259 lse->setDtStart( mLastCalendarSync );
1194 lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); 1260 lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) );
1195 lse->setCategories( i18n("SyncEvent") ); 1261 lse->setCategories( i18n("SyncEvent") );
1196 lse->setReadOnly( true ); 1262 lse->setReadOnly( true );
1197 mCalendar->addEvent( lse ); 1263 mCalendar->addEvent( lse );
1198 } 1264 }
1199 1265
1200 return lse; 1266 return lse;
1201 1267
1202} 1268}
1203 1269
1204// we check, if the to delete event has a id for a profile 1270// we check, if the to delete event has a id for a profile
1205// if yes, we set this id in the profile to delete 1271// if yes, we set this id in the profile to delete
1206void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) 1272void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete )
1207{ 1273{
1208 if ( lastSync.count() == 0 ) { 1274 if ( lastSync.count() == 0 ) {
1209 //qDebug(" lastSync.count() == 0"); 1275 //qDebug(" lastSync.count() == 0");
1210 return; 1276 return;
1211 } 1277 }
1212 if ( toDelete->typeID() == journalID ) 1278 if ( toDelete->typeID() == journalID )
1213 return; 1279 return;
1214 1280
1215 Event* eve = lastSync.first(); 1281 Event* eve = lastSync.first();
1216 1282
1217 while ( eve ) { 1283 while ( eve ) {
1218 QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name 1284 QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name
1219 if ( !id.isEmpty() ) { 1285 if ( !id.isEmpty() ) {
1220 QString des = eve->description(); 1286 QString des = eve->description();
1221 QString pref = "e"; 1287 QString pref = "e";
1222 if ( toDelete->typeID() == todoID ) 1288 if ( toDelete->typeID() == todoID )
1223 pref = "t"; 1289 pref = "t";
1224 des += pref+ id + ","; 1290 des += pref+ id + ",";
1225 eve->setReadOnly( false ); 1291 eve->setReadOnly( false );
1226 eve->setDescription( des ); 1292 eve->setDescription( des );
1227 //qDebug("setdes %s ", des.latin1()); 1293 //qDebug("setdes %s ", des.latin1());
1228 eve->setReadOnly( true ); 1294 eve->setReadOnly( true );
1229 } 1295 }
1230 eve = lastSync.next(); 1296 eve = lastSync.next();
1231 } 1297 }
1232 1298
1233} 1299}
1234void CalendarView::checkExternalId( Incidence * inc ) 1300void CalendarView::checkExternalId( Incidence * inc )
1235{ 1301{
1236 QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; 1302 QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ;
1237 checkExternSyncEvent( lastSync, inc ); 1303 checkExternSyncEvent( lastSync, inc );
1238 1304
1239} 1305}
1240bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) 1306bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode )
1241{ 1307{
1242 bool syncOK = true; 1308 bool syncOK = true;
1243 int addedEvent = 0; 1309 int addedEvent = 0;
1244 int addedEventR = 0; 1310 int addedEventR = 0;
1245 int deletedEventR = 0; 1311 int deletedEventR = 0;
1246 int deletedEventL = 0; 1312 int deletedEventL = 0;
1247 int changedLocal = 0; 1313 int changedLocal = 0;
1248 int changedRemote = 0; 1314 int changedRemote = 0;
1249 int filteredIN = 0; 1315 int filteredIN = 0;
1250 int filteredOUT = 0; 1316 int filteredOUT = 0;
1251 //QPtrList<Event> el = local->rawEvents(); 1317 //QPtrList<Event> el = local->rawEvents();
1252 Event* eventR; 1318 Event* eventR;
1253 QString uid; 1319 QString uid;
1254 int take; 1320 int take;
1255 Event* eventRSync; 1321 Event* eventRSync;
1256 Event* eventLSync; 1322 Event* eventLSync;
1257 clearAllViews(); 1323 clearAllViews();
1258 QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); 1324 QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents();
1259 QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); 1325 QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents();
1260 bool fullDateRange = false; 1326 bool fullDateRange = false;
1261 local->resetTempSyncStat(); 1327 local->resetTempSyncStat();
1262 mLastCalendarSync = QDateTime::currentDateTime(); 1328 mLastCalendarSync = QDateTime::currentDateTime();
1263 if ( mSyncManager->syncWithDesktop() ) { 1329 if ( mSyncManager->syncWithDesktop() ) {
1264 remote->resetPilotStat(1); 1330 remote->resetPilotStat(1);
1265 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 1331 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
1266 mLastCalendarSync = KSyncManager::mRequestedSyncEvent; 1332 mLastCalendarSync = KSyncManager::mRequestedSyncEvent;
1267 qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); 1333 qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() );
1268 } else { 1334 } else {
1269 qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); 1335 qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime ");
1270 } 1336 }
1271 } 1337 }
1272 QDateTime modifiedCalendar = mLastCalendarSync; 1338 QDateTime modifiedCalendar = mLastCalendarSync;
1273 eventLSync = getLastSyncEvent(); 1339 eventLSync = getLastSyncEvent();
1274 eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); 1340 eventR = remote->event("last-syncEvent-"+mCurrentSyncName );
1275 if ( eventR ) { 1341 if ( eventR ) {
1276 eventRSync = (Event*) eventR->clone(); 1342 eventRSync = (Event*) eventR->clone();
1277 remote->deleteEvent(eventR ); 1343 remote->deleteEvent(eventR );
1278 1344
1279 } else { 1345 } else {
1280 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { 1346 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) {
1281 eventRSync = (Event*)eventLSync->clone(); 1347 eventRSync = (Event*)eventLSync->clone();
1282 } else { 1348 } else {
1283 fullDateRange = true; 1349 fullDateRange = true;
1284 eventRSync = new Event(); 1350 eventRSync = new Event();
1285 eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); 1351 eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event"));
1286 eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); 1352 eventRSync->setUid("last-syncEvent-"+mCurrentSyncName );
1287 eventRSync->setDtStart( mLastCalendarSync ); 1353 eventRSync->setDtStart( mLastCalendarSync );
1288 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); 1354 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) );
1289 eventRSync->setCategories( i18n("SyncEvent") ); 1355 eventRSync->setCategories( i18n("SyncEvent") );
1290 } 1356 }
1291 } 1357 }
1292 if ( eventLSync->dtStart() == mLastCalendarSync ) 1358 if ( eventLSync->dtStart() == mLastCalendarSync )
1293 fullDateRange = true; 1359 fullDateRange = true;
1294 1360
1295 if ( ! fullDateRange ) { 1361 if ( ! fullDateRange ) {
1296 if ( eventLSync->dtStart() != eventRSync->dtStart() ) { 1362 if ( eventLSync->dtStart() != eventRSync->dtStart() ) {
1297 1363
1298 // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); 1364 // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() );
1299 //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); 1365 //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec());
1300 fullDateRange = true; 1366 fullDateRange = true;
1301 } 1367 }
1302 } 1368 }
1303 if ( mSyncManager->syncWithDesktop() ) { 1369 if ( mSyncManager->syncWithDesktop() ) {
1304 fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); 1370 fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync );
1305 } 1371 }
1306 if ( fullDateRange ) 1372 if ( fullDateRange )
1307 mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); 1373 mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365);
1308 else 1374 else
1309 mLastCalendarSync = eventLSync->dtStart(); 1375 mLastCalendarSync = eventLSync->dtStart();
1310 // for resyncing if own file has changed 1376 // for resyncing if own file has changed
1311 if ( mCurrentSyncDevice == "deleteaftersync" ) { 1377 if ( mCurrentSyncDevice == "deleteaftersync" ) {
1312 mLastCalendarSync = loadedFileVersion; 1378 mLastCalendarSync = loadedFileVersion;
1313 //qDebug("setting mLastCalendarSync "); 1379 //qDebug("setting mLastCalendarSync ");
1314 } 1380 }
1315 //qDebug("*************************** "); 1381 //qDebug("*************************** ");
1316 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); 1382 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange);
1317 QPtrList<Incidence> er = remote->rawIncidences(); 1383 QPtrList<Incidence> er = remote->rawIncidences();
1318 Incidence* inR = er.first(); 1384 Incidence* inR = er.first();
1319 Incidence* inL; 1385 Incidence* inL;
1320 QProgressBar bar( er.count(),0 ); 1386 QProgressBar bar( er.count(),0 );
1321 bar.setCaption (i18n("Syncing - close to abort!") ); 1387 bar.setCaption (i18n("Syncing - close to abort!") );
1322 1388
1323 // ************** setting up filter ************* 1389 // ************** setting up filter *************
1324 CalFilter *filterIN = 0; 1390 CalFilter *filterIN = 0;
1325 CalFilter *filterOUT = 0; 1391 CalFilter *filterOUT = 0;
1326 CalFilter *filter = mFilters.first(); 1392 CalFilter *filter = mFilters.first();
1327 while(filter) { 1393 while(filter) {
1328 if ( filter->name() == mSyncManager->mFilterInCal ) 1394 if ( filter->name() == mSyncManager->mFilterInCal )
1329 filterIN = filter; 1395 filterIN = filter;
1330 if ( filter->name() == mSyncManager->mFilterOutCal ) 1396 if ( filter->name() == mSyncManager->mFilterOutCal )
1331 filterOUT = filter; 1397 filterOUT = filter;
1332 filter = mFilters.next(); 1398 filter = mFilters.next();
1333 } 1399 }
1334 int w = 300; 1400 int w = 300;
1335 if ( QApplication::desktop()->width() < 320 ) 1401 if ( QApplication::desktop()->width() < 320 )
1336 w = 220; 1402 w = 220;
1337 int h = bar.sizeHint().height() ; 1403 int h = bar.sizeHint().height() ;
1338 int dw = QApplication::desktop()->width(); 1404 int dw = QApplication::desktop()->width();
1339 int dh = QApplication::desktop()->height(); 1405 int dh = QApplication::desktop()->height();
1340 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 1406 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
1341 bar.show(); 1407 bar.show();
1342 int modulo = (er.count()/10)+1; 1408 int modulo = (er.count()/10)+1;
1343 int incCounter = 0; 1409 int incCounter = 0;
1344 while ( inR ) { 1410 while ( inR ) {
1345 if ( ! bar.isVisible() ) 1411 if ( ! bar.isVisible() )
1346 return false; 1412 return false;
1347 if ( incCounter % modulo == 0 ) 1413 if ( incCounter % modulo == 0 )
1348 bar.setProgress( incCounter ); 1414 bar.setProgress( incCounter );
1349 ++incCounter; 1415 ++incCounter;
1350 uid = inR->uid(); 1416 uid = inR->uid();
1351 bool skipIncidence = false; 1417 bool skipIncidence = false;
1352 if ( uid.left(15) == QString("last-syncEvent-") ) 1418 if ( uid.left(15) == QString("last-syncEvent-") )
1353 skipIncidence = true; 1419 skipIncidence = true;
1354 QString idS; 1420 QString idS;
1355 qApp->processEvents(); 1421 qApp->processEvents();
1356 if ( !skipIncidence ) { 1422 if ( !skipIncidence ) {
1357 inL = local->incidence( uid ); 1423 inL = local->incidence( uid );
1358 if ( inL ) { // maybe conflict - same uid in both calendars 1424 if ( inL ) { // maybe conflict - same uid in both calendars
1359 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { 1425 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) {
1360 //qDebug("take %d %s ", take, inL->summary().latin1()); 1426 //qDebug("take %d %s ", take, inL->summary().latin1());
1361 if ( take == 3 ) 1427 if ( take == 3 )
1362 return false; 1428 return false;
1363 if ( take == 1 ) {// take local ********************** 1429 if ( take == 1 ) {// take local **********************
1364 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) 1430 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
1365 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1431 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1366 else 1432 else
1367 idS = inR->IDStr(); 1433 idS = inR->IDStr();
1368 remote->deleteIncidence( inR ); 1434 remote->deleteIncidence( inR );
1369 inR = inL->clone(); 1435 inR = inL->clone();
1370 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1436 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1371 if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) 1437 if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL )
1372 inR->setIDStr( idS ); 1438 inR->setIDStr( idS );
1373 remote->addIncidence( inR ); 1439 remote->addIncidence( inR );
1374 if ( mSyncManager->syncWithDesktop() ) 1440 if ( mSyncManager->syncWithDesktop() )
1375 inR->setPilotId( 2 ); 1441 inR->setPilotId( 2 );
1376 ++changedRemote; 1442 ++changedRemote;
1377 } else {// take remote ********************** 1443 } else {// take remote **********************
1378 idS = inL->IDStr(); 1444 idS = inL->IDStr();
1379 int pid = inL->pilotId(); 1445 int pid = inL->pilotId();
1380 local->deleteIncidence( inL ); 1446 local->deleteIncidence( inL );
1381 inL = inR->clone(); 1447 inL = inR->clone();
1382 if ( mSyncManager->syncWithDesktop() ) 1448 if ( mSyncManager->syncWithDesktop() )
1383 inL->setPilotId( pid ); 1449 inL->setPilotId( pid );
1384 inL->setIDStr( idS ); 1450 inL->setIDStr( idS );
1385 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1451 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1386 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1452 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1387 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); 1453 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
1388 } 1454 }
1389 local->addIncidence( inL ); 1455 local->addIncidence( inL );
1390 ++changedLocal; 1456 ++changedLocal;
1391 } 1457 }
1392 } 1458 }
1393 } else { // no conflict ********** add or delete remote 1459 } else { // no conflict ********** add or delete remote
1394 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ 1460 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
1395 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1461 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1396 QString des = eventLSync->description(); 1462 QString des = eventLSync->description();
1397 QString pref = "e"; 1463 QString pref = "e";
1398 if ( inR->typeID() == todoID ) 1464 if ( inR->typeID() == todoID )
1399 pref = "t"; 1465 pref = "t";
1400 if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it 1466 if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
1401 inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); 1467 inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE );
1402 //remote->deleteIncidence( inR ); 1468 //remote->deleteIncidence( inR );
1403 ++deletedEventR; 1469 ++deletedEventR;
1404 } else { 1470 } else {
1405 inR->setLastModified( modifiedCalendar ); 1471 inR->setLastModified( modifiedCalendar );
1406 inL = inR->clone(); 1472 inL = inR->clone();
1407 inL->setIDStr( ":" ); 1473 inL->setIDStr( ":" );
1408 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1474 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1409 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); 1475 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
1410 local->addIncidence( inL ); 1476 local->addIncidence( inL );
1411 ++addedEvent; 1477 ++addedEvent;
1412 1478
1413 } 1479 }
1414 } else { 1480 } else {
1415 if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { 1481 if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) {
1416 inR->setLastModified( modifiedCalendar ); 1482 inR->setLastModified( modifiedCalendar );
1417 inL = inR->clone(); 1483 inL = inR->clone();
1418 inL->setIDStr( ":" ); 1484 inL->setIDStr( ":" );
1419 local->addIncidence( inL ); 1485 local->addIncidence( inL );
1420 ++addedEvent; 1486 ++addedEvent;
1421 1487
1422 } else { 1488 } else {
1423 checkExternSyncEvent(eventRSyncSharp, inR); 1489 checkExternSyncEvent(eventRSyncSharp, inR);
1424 remote->deleteIncidence( inR ); 1490 remote->deleteIncidence( inR );
1425 ++deletedEventR; 1491 ++deletedEventR;
1426 } 1492 }
1427 } 1493 }
1428 } else { 1494 } else {
1429 ++filteredIN; 1495 ++filteredIN;
1430 } 1496 }
1431 } 1497 }
1432 } 1498 }
1433 inR = er.next(); 1499 inR = er.next();
1434 } 1500 }
1435 QPtrList<Incidence> el = local->rawIncidences(); 1501 QPtrList<Incidence> el = local->rawIncidences();
1436 inL = el.first(); 1502 inL = el.first();
1437 modulo = (el.count()/10)+1; 1503 modulo = (el.count()/10)+1;
1438 bar.setCaption (i18n("Add / remove events") ); 1504 bar.setCaption (i18n("Add / remove events") );
1439 bar.setTotalSteps ( el.count() ) ; 1505 bar.setTotalSteps ( el.count() ) ;
1440 bar.show(); 1506 bar.show();
1441 incCounter = 0; 1507 incCounter = 0;
1442 1508
1443 while ( inL ) { 1509 while ( inL ) {
1444 1510
1445 qApp->processEvents(); 1511 qApp->processEvents();
1446 if ( ! bar.isVisible() ) 1512 if ( ! bar.isVisible() )
1447 return false; 1513 return false;
1448 if ( incCounter % modulo == 0 ) 1514 if ( incCounter % modulo == 0 )
1449 bar.setProgress( incCounter ); 1515 bar.setProgress( incCounter );
1450 ++incCounter; 1516 ++incCounter;
1451 uid = inL->uid(); 1517 uid = inL->uid();
1452 bool skipIncidence = false; 1518 bool skipIncidence = false;
1453 if ( uid.left(15) == QString("last-syncEvent-") ) 1519 if ( uid.left(15) == QString("last-syncEvent-") )
1454 skipIncidence = true; 1520 skipIncidence = true;
1455 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID ) 1521 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID )
1456 skipIncidence = true; 1522 skipIncidence = true;
1457 if ( !skipIncidence ) { 1523 if ( !skipIncidence ) {
1458 inR = remote->incidence( uid ); 1524 inR = remote->incidence( uid );
1459 if ( ! inR ) { 1525 if ( ! inR ) {
1460 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ 1526 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
1461 // no conflict ********** add or delete local 1527 // no conflict ********** add or delete local
1462 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1528 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1463 if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { 1529 if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {
1464 checkExternSyncEvent(eventLSyncSharp, inL); 1530 checkExternSyncEvent(eventLSyncSharp, inL);
1465 local->deleteIncidence( inL ); 1531 local->deleteIncidence( inL );
1466 ++deletedEventL; 1532 ++deletedEventL;
1467 } else { 1533 } else {
1468 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1534 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1469 inL->removeID(mCurrentSyncDevice ); 1535 inL->removeID(mCurrentSyncDevice );
1470 ++addedEventR; 1536 ++addedEventR;
1471 //qDebug("remote added Incidence %s ", inL->summary().latin1()); 1537 //qDebug("remote added Incidence %s ", inL->summary().latin1());
1472 inL->setLastModified( modifiedCalendar ); 1538 inL->setLastModified( modifiedCalendar );
1473 inR = inL->clone(); 1539 inR = inL->clone();
1474 inR->setIDStr( ":" ); 1540 inR->setIDStr( ":" );
1475 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1541 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1476 remote->addIncidence( inR ); 1542 remote->addIncidence( inR );
1477 } 1543 }
1478 } 1544 }
1479 } else { 1545 } else {
1480 if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { 1546 if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) {
1481 checkExternSyncEvent(eventLSyncSharp, inL); 1547 checkExternSyncEvent(eventLSyncSharp, inL);
1482 local->deleteIncidence( inL ); 1548 local->deleteIncidence( inL );
1483 ++deletedEventL; 1549 ++deletedEventL;
1484 } else { 1550 } else {
1485 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1551 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1486 ++addedEventR; 1552 ++addedEventR;
1487 inL->setLastModified( modifiedCalendar ); 1553 inL->setLastModified( modifiedCalendar );
1488 inR = inL->clone(); 1554 inR = inL->clone();
1489 inR->setIDStr( ":" ); 1555 inR->setIDStr( ":" );
1490 remote->addIncidence( inR ); 1556 remote->addIncidence( inR );
1491 } 1557 }
1492 } 1558 }
1493 } 1559 }
1494 } else { 1560 } else {
1495 ++filteredOUT; 1561 ++filteredOUT;
1496 } 1562 }
1497 } 1563 }
1498 } 1564 }
1499 inL = el.next(); 1565 inL = el.next();
1500 } 1566 }
1501 int delFut = 0; 1567 int delFut = 0;
1502 int remRem = 0; 1568 int remRem = 0;
1503 if ( mSyncManager->mWriteBackInFuture ) { 1569 if ( mSyncManager->mWriteBackInFuture ) {
1504 er = remote->rawIncidences(); 1570 er = remote->rawIncidences();
1505 remRem = er.count(); 1571 remRem = er.count();
1506 inR = er.first(); 1572 inR = er.first();
1507 QDateTime dt; 1573 QDateTime dt;
1508 QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); 1574 QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) );
1509 QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); 1575 QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 );
1510 while ( inR ) { 1576 while ( inR ) {
1511 if ( inR->typeID() == todoID ) { 1577 if ( inR->typeID() == todoID ) {
1512 Todo * t = (Todo*)inR; 1578 Todo * t = (Todo*)inR;
1513 if ( t->hasDueDate() ) 1579 if ( t->hasDueDate() )
1514 dt = t->dtDue(); 1580 dt = t->dtDue();
1515 else 1581 else
1516 dt = cur.addSecs( 62 ); 1582 dt = cur.addSecs( 62 );
1517 } 1583 }
1518 else if (inR->typeID() == eventID ) { 1584 else if (inR->typeID() == eventID ) {
1519 bool ok; 1585 bool ok;
1520 dt = inR->getNextOccurence( cur, &ok ); 1586 dt = inR->getNextOccurence( cur, &ok );
1521 if ( !ok ) 1587 if ( !ok )
1522 dt = cur.addSecs( -62 ); 1588 dt = cur.addSecs( -62 );
1523 } 1589 }
1524 else 1590 else
1525 dt = inR->dtStart(); 1591 dt = inR->dtStart();
1526 if ( dt < cur || dt > end ) { 1592 if ( dt < cur || dt > end ) {
1527 remote->deleteIncidence( inR ); 1593 remote->deleteIncidence( inR );
1528 ++delFut; 1594 ++delFut;
1529 } 1595 }
1530 inR = er.next(); 1596 inR = er.next();
1531 } 1597 }
1532 } 1598 }
1533 bar.hide(); 1599 bar.hide();
1534 mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); 1600 mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 );
1535 eventLSync->setReadOnly( false ); 1601 eventLSync->setReadOnly( false );
1536 eventLSync->setDtStart( mLastCalendarSync ); 1602 eventLSync->setDtStart( mLastCalendarSync );
1537 eventRSync->setDtStart( mLastCalendarSync ); 1603 eventRSync->setDtStart( mLastCalendarSync );
1538 eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); 1604 eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
1539 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); 1605 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
1540 eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; 1606 eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ;
1541 eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); 1607 eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName );
1542 eventLSync->setReadOnly( true ); 1608 eventLSync->setReadOnly( true );
1543 qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); 1609 qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL );
1544 if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... 1610 if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal...
1545 remote->addEvent( eventRSync ); 1611 remote->addEvent( eventRSync );
1546 else 1612 else
1547 delete eventRSync; 1613 delete eventRSync;
1548 qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); 1614 qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() );
1549 QString mes; 1615 QString mes;
1550 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 ); 1616 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 );
1551 QString delmess; 1617 QString delmess;
1552 if ( delFut ) { 1618 if ( delFut ) {
1553 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); 1619 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);
1554 mes += delmess; 1620 mes += delmess;
1555 } 1621 }
1556 mes = i18n("Local calendar changed!\n") +mes; 1622 mes = i18n("Local calendar changed!\n") +mes;
1557 mCalendar->checkAlarmForIncidence( 0, true ); 1623 mCalendar->checkAlarmForIncidence( 0, true );
1558 qDebug( mes ); 1624 qDebug( mes );
1559 if ( mSyncManager->mShowSyncSummary ) { 1625 if ( mSyncManager->mShowSyncSummary ) {
1560 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, 1626 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
1561 i18n("KO/Pi Synchronization"),i18n("Write back"))) { 1627 i18n("KO/Pi Synchronization"),i18n("Write back"))) {
1562 qDebug("KO: WB cancelled "); 1628 qDebug("KO: WB cancelled ");
1563 mSyncManager->mWriteBackFile = false; 1629 mSyncManager->mWriteBackFile = false;
1564 return syncOK; 1630 return syncOK;
1565 } 1631 }
1566 } 1632 }
1567 return syncOK; 1633 return syncOK;
1568} 1634}
1569 1635
1570void CalendarView::setSyncDevice( QString s ) 1636void CalendarView::setSyncDevice( QString s )
1571{ 1637{
1572 mCurrentSyncDevice= s; 1638 mCurrentSyncDevice= s;
1573} 1639}
1574void CalendarView::setSyncName( QString s ) 1640void CalendarView::setSyncName( QString s )
1575{ 1641{
1576 mCurrentSyncName= s; 1642 mCurrentSyncName= s;
1577} 1643}
1578bool CalendarView::syncCalendar(QString filename, int mode) 1644bool CalendarView::syncCalendar(QString filename, int mode)
1579{ 1645{
1580 //qDebug("syncCalendar %s ", filename.latin1()); 1646 //qDebug("syncCalendar %s ", filename.latin1());
1581 mGlobalSyncMode = SYNC_MODE_NORMAL; 1647 mGlobalSyncMode = SYNC_MODE_NORMAL;
1582 CalendarLocal* calendar = new CalendarLocal(); 1648 CalendarLocal* calendar = new CalendarLocal();
1583 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 1649 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1584 FileStorage* storage = new FileStorage( calendar ); 1650 FileStorage* storage = new FileStorage( calendar );
1585 bool syncOK = false; 1651 bool syncOK = false;
1586 storage->setFileName( filename ); 1652 storage->setFileName( filename );
1587 // qDebug("loading ... "); 1653 // qDebug("loading ... ");
1588 if ( storage->load() ) { 1654 if ( storage->load() ) {
1589 getEventViewerDialog()->setSyncMode( true ); 1655 getEventViewerDialog()->setSyncMode( true );
1590 syncOK = synchronizeCalendar( mCalendar, calendar, mode ); 1656 syncOK = synchronizeCalendar( mCalendar, calendar, mode );
1591 getEventViewerDialog()->setSyncMode( false ); 1657 getEventViewerDialog()->setSyncMode( false );
1592 if ( syncOK ) { 1658 if ( syncOK ) {
1593 if ( mSyncManager->mWriteBackFile ) 1659 if ( mSyncManager->mWriteBackFile )
1594 { 1660 {
1595 storage->setSaveFormat( new ICalFormat() ); 1661 storage->setSaveFormat( new ICalFormat() );
1596 storage->save(); 1662 storage->save();
1597 } 1663 }
1598 } 1664 }
1599 setModified( true ); 1665 setModified( true );
1600 } 1666 }
1601 delete storage; 1667 delete storage;
1602 delete calendar; 1668 delete calendar;
1603 if ( syncOK ) 1669 if ( syncOK )
1604 updateView(); 1670 updateView();
1605 return syncOK; 1671 return syncOK;
1606} 1672}
1607 1673
1608void CalendarView::syncExternal( int mode ) 1674void CalendarView::syncExternal( int mode )
1609{ 1675{
1610 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 1676 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
1611 1677
1612 qApp->processEvents(); 1678 qApp->processEvents();
1613 CalendarLocal* calendar = new CalendarLocal(); 1679 CalendarLocal* calendar = new CalendarLocal();
1614 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 1680 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1615 bool syncOK = false; 1681 bool syncOK = false;
1616 bool loadSuccess = false; 1682 bool loadSuccess = false;
1617 PhoneFormat* phoneFormat = 0; 1683 PhoneFormat* phoneFormat = 0;
1618 emit tempDisableBR(true); 1684 emit tempDisableBR(true);
1619#ifndef DESKTOP_VERSION 1685#ifndef DESKTOP_VERSION
1620 SharpFormat* sharpFormat = 0; 1686 SharpFormat* sharpFormat = 0;
1621 if ( mode == 0 ) { // sharp 1687 if ( mode == 0 ) { // sharp
1622 sharpFormat = new SharpFormat () ; 1688 sharpFormat = new SharpFormat () ;
1623 loadSuccess = sharpFormat->load( calendar, mCalendar ); 1689 loadSuccess = sharpFormat->load( calendar, mCalendar );
1624 1690
1625 } else 1691 } else
1626#endif 1692#endif
1627 if ( mode == 1 ) { // phone 1693 if ( mode == 1 ) { // phone
1628 phoneFormat = new PhoneFormat (mCurrentSyncDevice, 1694 phoneFormat = new PhoneFormat (mCurrentSyncDevice,
1629 mSyncManager->mPhoneDevice, 1695 mSyncManager->mPhoneDevice,
1630 mSyncManager->mPhoneConnection, 1696 mSyncManager->mPhoneConnection,
1631 mSyncManager->mPhoneModel); 1697 mSyncManager->mPhoneModel);
1632 loadSuccess = phoneFormat->load( calendar,mCalendar); 1698 loadSuccess = phoneFormat->load( calendar,mCalendar);
1633 1699
1634 } else { 1700 } else {
1635 emit tempDisableBR(false); 1701 emit tempDisableBR(false);
1636 return; 1702 return;
1637 } 1703 }
1638 if ( loadSuccess ) { 1704 if ( loadSuccess ) {
1639 getEventViewerDialog()->setSyncMode( true ); 1705 getEventViewerDialog()->setSyncMode( true );
1640 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); 1706 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs );
1641 getEventViewerDialog()->setSyncMode( false ); 1707 getEventViewerDialog()->setSyncMode( false );
1642 qApp->processEvents(); 1708 qApp->processEvents();
1643 if ( syncOK ) { 1709 if ( syncOK ) {
1644 if ( mSyncManager->mWriteBackFile ) 1710 if ( mSyncManager->mWriteBackFile )
1645 { 1711 {
1646 QPtrList<Incidence> iL = mCalendar->rawIncidences(); 1712 QPtrList<Incidence> iL = mCalendar->rawIncidences();
1647 Incidence* inc = iL.first(); 1713 Incidence* inc = iL.first();
1648 if ( phoneFormat ) { 1714 if ( phoneFormat ) {
1649 while ( inc ) { 1715 while ( inc ) {
1650 inc->removeID(mCurrentSyncDevice); 1716 inc->removeID(mCurrentSyncDevice);
1651 inc = iL.next(); 1717 inc = iL.next();
1652 } 1718 }
1653 } 1719 }
1654#ifndef DESKTOP_VERSION 1720#ifndef DESKTOP_VERSION
1655 if ( sharpFormat ) 1721 if ( sharpFormat )
1656 sharpFormat->save(calendar); 1722 sharpFormat->save(calendar);
1657#endif 1723#endif
1658 if ( phoneFormat ) 1724 if ( phoneFormat )
1659 phoneFormat->save(calendar); 1725 phoneFormat->save(calendar);
1660 iL = calendar->rawIncidences(); 1726 iL = calendar->rawIncidences();
1661 inc = iL.first(); 1727 inc = iL.first();
1662 Incidence* loc; 1728 Incidence* loc;
1663 while ( inc ) { 1729 while ( inc ) {
1664 if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { 1730 if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) {
1665 loc = mCalendar->incidence(inc->uid() ); 1731 loc = mCalendar->incidence(inc->uid() );
1666 if ( loc ) { 1732 if ( loc ) {
1667 loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); 1733 loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) );
1668 loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); 1734 loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) );
1669 } 1735 }
1670 } 1736 }
1671 inc = iL.next(); 1737 inc = iL.next();
1672 } 1738 }
1673 Incidence* lse = getLastSyncEvent(); 1739 Incidence* lse = getLastSyncEvent();
1674 if ( lse ) { 1740 if ( lse ) {
1675 lse->setReadOnly( false ); 1741 lse->setReadOnly( false );
1676 lse->setDescription( "" ); 1742 lse->setDescription( "" );
1677 lse->setReadOnly( true ); 1743 lse->setReadOnly( true );
1678 } 1744 }
1679 } 1745 }
1680 } else { 1746 } else {
@@ -2141,2521 +2207,2521 @@ bool CalendarView::checkFileVersion(QString fn)
2141 setSyncDevice("deleteaftersync" ); 2207 setSyncDevice("deleteaftersync" );
2142 mSyncManager->mAskForPreferences = true; 2208 mSyncManager->mAskForPreferences = true;
2143 mSyncManager->mSyncAlgoPrefs = 3; 2209 mSyncManager->mSyncAlgoPrefs = 3;
2144 mSyncManager->mWriteBackFile = false; 2210 mSyncManager->mWriteBackFile = false;
2145 mSyncManager->mWriteBackExistingOnly = false; 2211 mSyncManager->mWriteBackExistingOnly = false;
2146 mSyncManager->mShowSyncSummary = false; 2212 mSyncManager->mShowSyncSummary = false;
2147 syncCalendar( fn, 3 ); 2213 syncCalendar( fn, 3 );
2148 Event * e = getLastSyncEvent(); 2214 Event * e = getLastSyncEvent();
2149 if ( e ) 2215 if ( e )
2150 mCalendar->deleteEvent( e ); 2216 mCalendar->deleteEvent( e );
2151 return true; 2217 return true;
2152} 2218}
2153bool CalendarView::saveCalendars() 2219bool CalendarView::saveCalendars()
2154{ 2220{
2155 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2221 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2156 KopiCalendarFile * cal = calendars.first(); 2222 KopiCalendarFile * cal = calendars.first();
2157 mCalendar->setDefaultCalendar( 1 ); 2223 mCalendar->setDefaultCalendar( 1 );
2158 mCalendar->setDefaultCalendarEnabledOnly(); 2224 mCalendar->setDefaultCalendarEnabledOnly();
2159 saveCalendar( MainWindow::defaultFileName() ); 2225 saveCalendar( MainWindow::defaultFileName() );
2160 cal = calendars.next(); 2226 cal = calendars.next();
2161 while ( cal ) { 2227 while ( cal ) {
2162 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { 2228 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) {
2163 mCalendar->setDefaultCalendar( cal->mCalNumber ); 2229 mCalendar->setDefaultCalendar( cal->mCalNumber );
2164 mCalendar->setDefaultCalendarEnabledOnly(); 2230 mCalendar->setDefaultCalendarEnabledOnly();
2165 if ( saveCalendar( cal->mFileName ) ) 2231 if ( saveCalendar( cal->mFileName ) )
2166 cal->mLoadDt = QDateTime::currentDateTime(); 2232 cal->mLoadDt = QDateTime::currentDateTime();
2167 } 2233 }
2168 cal = calendars.next(); 2234 cal = calendars.next();
2169 } 2235 }
2170 restoreCalendarSettings(); 2236 restoreCalendarSettings();
2171 return true; 2237 return true;
2172} 2238}
2173bool CalendarView::saveCalendar( QString filename ) 2239bool CalendarView::saveCalendar( QString filename )
2174{ 2240{
2175 2241
2176 // Store back all unsaved data into calendar object 2242 // Store back all unsaved data into calendar object
2177 // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); 2243 // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() );
2178 if ( mViewManager->currentView() ) 2244 if ( mViewManager->currentView() )
2179 mViewManager->currentView()->flushView(); 2245 mViewManager->currentView()->flushView();
2180 2246
2181 2247
2182 QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); 2248 QDateTime lfv = QDateTime::currentDateTime().addSecs( -2);
2183 mStorage->setSaveFormat( new ICalFormat() ); 2249 mStorage->setSaveFormat( new ICalFormat() );
2184 mStorage->setFileName( filename ); 2250 mStorage->setFileName( filename );
2185 bool success; 2251 bool success;
2186 success = mStorage->save(); 2252 success = mStorage->save();
2187 if ( !success ) { 2253 if ( !success ) {
2188 return false; 2254 return false;
2189 } 2255 }
2190 if ( filename == MainWindow::defaultFileName() ) { 2256 if ( filename == MainWindow::defaultFileName() ) {
2191 setLoadedFileVersion( lfv ); 2257 setLoadedFileVersion( lfv );
2192 watchSavedFile(); 2258 watchSavedFile();
2193 } 2259 }
2194 return true; 2260 return true;
2195} 2261}
2196 2262
2197void CalendarView::closeCalendar() 2263void CalendarView::closeCalendar()
2198{ 2264{
2199 2265
2200 // child windows no longer valid 2266 // child windows no longer valid
2201 clearAllViews(); 2267 clearAllViews();
2202 emit closingDown(); 2268 emit closingDown();
2203 2269
2204 mCalendar->close(); 2270 mCalendar->close();
2205 setModified(false); 2271 setModified(false);
2206 updateView(); 2272 updateView();
2207} 2273}
2208 2274
2209void CalendarView::archiveCalendar() 2275void CalendarView::archiveCalendar()
2210{ 2276{
2211 mDialogManager->showArchiveDialog(); 2277 mDialogManager->showArchiveDialog();
2212} 2278}
2213 2279
2214 2280
2215void CalendarView::readSettings() 2281void CalendarView::readSettings()
2216{ 2282{
2217 2283
2218 2284
2219 // mViewManager->showAgendaView(); 2285 // mViewManager->showAgendaView();
2220 QString str; 2286 QString str;
2221 //qDebug("CalendarView::readSettings() "); 2287 //qDebug("CalendarView::readSettings() ");
2222 // read settings from the KConfig, supplying reasonable 2288 // read settings from the KConfig, supplying reasonable
2223 // defaults where none are to be found 2289 // defaults where none are to be found
2224 KConfig *config = KOGlobals::config(); 2290 KConfig *config = KOGlobals::config();
2225#ifndef KORG_NOSPLITTER 2291#ifndef KORG_NOSPLITTER
2226 config->setGroup("KOrganizer Geometry"); 2292 config->setGroup("KOrganizer Geometry");
2227 2293
2228 QValueList<int> sizes = config->readIntListEntry("Separator1"); 2294 QValueList<int> sizes = config->readIntListEntry("Separator1");
2229 if (sizes.count() != 2) { 2295 if (sizes.count() != 2) {
2230 sizes << mDateNavigator->minimumSizeHint().width(); 2296 sizes << mDateNavigator->minimumSizeHint().width();
2231 sizes << 300; 2297 sizes << 300;
2232 } 2298 }
2233 mPanner->setSizes(sizes); 2299 mPanner->setSizes(sizes);
2234 2300
2235 sizes = config->readIntListEntry("Separator2"); 2301 sizes = config->readIntListEntry("Separator2");
2236 if ( ( mResourceView && sizes.count() == 4 ) || 2302 if ( ( mResourceView && sizes.count() == 4 ) ||
2237 ( !mResourceView && sizes.count() == 3 ) ) { 2303 ( !mResourceView && sizes.count() == 3 ) ) {
2238 mLeftSplitter->setSizes(sizes); 2304 mLeftSplitter->setSizes(sizes);
2239 } 2305 }
2240#endif 2306#endif
2241 globalFlagBlockAgenda = 1; 2307 globalFlagBlockAgenda = 1;
2242 mViewManager->showAgendaView(); 2308 mViewManager->showAgendaView();
2243 //mViewManager->readSettings( config ); 2309 //mViewManager->readSettings( config );
2244 mTodoList->restoreLayout(config,QString("Todo Layout")); 2310 mTodoList->restoreLayout(config,QString("Todo Layout"));
2245 readFilterSettings(config); 2311 readFilterSettings(config);
2246 2312
2247#ifdef DESKTOP_VERSION 2313#ifdef DESKTOP_VERSION
2248 config->setGroup("WidgetLayout"); 2314 config->setGroup("WidgetLayout");
2249 QStringList list; 2315 QStringList list;
2250 list = config->readListEntry("MainLayout"); 2316 list = config->readListEntry("MainLayout");
2251 int x,y,w,h; 2317 int x,y,w,h;
2252 if ( ! list.isEmpty() ) { 2318 if ( ! list.isEmpty() ) {
2253 x = list[0].toInt(); 2319 x = list[0].toInt();
2254 y = list[1].toInt(); 2320 y = list[1].toInt();
2255 w = list[2].toInt(); 2321 w = list[2].toInt();
2256 h = list[3].toInt(); 2322 h = list[3].toInt();
2257 KApplication::testCoords( &x,&y,&w,&h ); 2323 KApplication::testCoords( &x,&y,&w,&h );
2258 topLevelWidget()->setGeometry(x,y,w,h); 2324 topLevelWidget()->setGeometry(x,y,w,h);
2259 2325
2260 } else { 2326 } else {
2261 topLevelWidget()->setGeometry( 40 ,40 , 640, 440); 2327 topLevelWidget()->setGeometry( 40 ,40 , 640, 440);
2262 } 2328 }
2263 list = config->readListEntry("EditEventLayout"); 2329 list = config->readListEntry("EditEventLayout");
2264 if ( ! list.isEmpty() ) { 2330 if ( ! list.isEmpty() ) {
2265 x = list[0].toInt(); 2331 x = list[0].toInt();
2266 y = list[1].toInt(); 2332 y = list[1].toInt();
2267 w = list[2].toInt(); 2333 w = list[2].toInt();
2268 h = list[3].toInt(); 2334 h = list[3].toInt();
2269 KApplication::testCoords( &x,&y,&w,&h ); 2335 KApplication::testCoords( &x,&y,&w,&h );
2270 mEventEditor->setGeometry(x,y,w,h); 2336 mEventEditor->setGeometry(x,y,w,h);
2271 2337
2272 } 2338 }
2273 list = config->readListEntry("EditTodoLayout"); 2339 list = config->readListEntry("EditTodoLayout");
2274 if ( ! list.isEmpty() ) { 2340 if ( ! list.isEmpty() ) {
2275 x = list[0].toInt(); 2341 x = list[0].toInt();
2276 y = list[1].toInt(); 2342 y = list[1].toInt();
2277 w = list[2].toInt(); 2343 w = list[2].toInt();
2278 h = list[3].toInt(); 2344 h = list[3].toInt();
2279 KApplication::testCoords( &x,&y,&w,&h ); 2345 KApplication::testCoords( &x,&y,&w,&h );
2280 mTodoEditor->setGeometry(x,y,w,h); 2346 mTodoEditor->setGeometry(x,y,w,h);
2281 2347
2282 } 2348 }
2283 list = config->readListEntry("ViewerLayout"); 2349 list = config->readListEntry("ViewerLayout");
2284 if ( ! list.isEmpty() ) { 2350 if ( ! list.isEmpty() ) {
2285 x = list[0].toInt(); 2351 x = list[0].toInt();
2286 y = list[1].toInt(); 2352 y = list[1].toInt();
2287 w = list[2].toInt(); 2353 w = list[2].toInt();
2288 h = list[3].toInt(); 2354 h = list[3].toInt();
2289 KApplication::testCoords( &x,&y,&w,&h ); 2355 KApplication::testCoords( &x,&y,&w,&h );
2290 getEventViewerDialog()->setGeometry(x,y,w,h); 2356 getEventViewerDialog()->setGeometry(x,y,w,h);
2291 } 2357 }
2292#endif 2358#endif
2293 config->setGroup( "Views" ); 2359 config->setGroup( "Views" );
2294 int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); 2360 int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
2295 2361
2296 QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); 2362 QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame");
2297 2363
2298 int resetval = 0; 2364 int resetval = 0;
2299 int maxVal = 0; 2365 int maxVal = 0;
2300 if (sizes.count() != 3) { 2366 if (sizes.count() != 3) {
2301 if ( KOPrefs::instance()->mVerticalScreen ) { 2367 if ( KOPrefs::instance()->mVerticalScreen ) {
2302 resetval = mDateNavigator->sizeHint().width()+2; 2368 resetval = mDateNavigator->sizeHint().width()+2;
2303 } else { 2369 } else {
2304 resetval = mDateNavigator->sizeHint().height()+2; 2370 resetval = mDateNavigator->sizeHint().height()+2;
2305 } 2371 }
2306 } 2372 }
2307 if ( resetval ) { 2373 if ( resetval ) {
2308 sizes.clear(); 2374 sizes.clear();
2309 if ( KOPrefs::instance()->mVerticalScreen ) { 2375 if ( KOPrefs::instance()->mVerticalScreen ) {
2310 maxVal = QApplication::desktop()->width() -10; 2376 maxVal = QApplication::desktop()->width() -10;
2311 } else { 2377 } else {
2312 maxVal = QApplication::desktop()->height()-10; 2378 maxVal = QApplication::desktop()->height()-10;
2313 } 2379 }
2314 sizes << resetval; 2380 sizes << resetval;
2315 if ( maxVal < resetval + resetval) 2381 if ( maxVal < resetval + resetval)
2316 resetval = maxVal - resetval; 2382 resetval = maxVal - resetval;
2317 sizes << resetval; 2383 sizes << resetval;
2318 sizes << 100; 2384 sizes << 100;
2319 } 2385 }
2320 mLeftFrame->setSizes(sizes); 2386 mLeftFrame->setSizes(sizes);
2321 sizes = config->readIntListEntry("Main Splitter Frame"); 2387 sizes = config->readIntListEntry("Main Splitter Frame");
2322 resetval = 0; 2388 resetval = 0;
2323 maxVal = 0; 2389 maxVal = 0;
2324 if (sizes.count() != 2) { 2390 if (sizes.count() != 2) {
2325 if ( !KOPrefs::instance()->mVerticalScreen ) { 2391 if ( !KOPrefs::instance()->mVerticalScreen ) {
2326 resetval = mDateNavigator->sizeHint().width()+2; 2392 resetval = mDateNavigator->sizeHint().width()+2;
2327 } else { 2393 } else {
2328 resetval = mDateNavigator->sizeHint().height()+2; 2394 resetval = mDateNavigator->sizeHint().height()+2;
2329 } 2395 }
2330 } 2396 }
2331 if ( resetval ) { 2397 if ( resetval ) {
2332 sizes.clear(); 2398 sizes.clear();
2333 if ( !KOPrefs::instance()->mVerticalScreen ) { 2399 if ( !KOPrefs::instance()->mVerticalScreen ) {
2334 maxVal = QApplication::desktop()->width() -10; 2400 maxVal = QApplication::desktop()->width() -10;
2335 } else { 2401 } else {
2336 maxVal = QApplication::desktop()->height()-10; 2402 maxVal = QApplication::desktop()->height()-10;
2337 } 2403 }
2338 sizes << resetval; 2404 sizes << resetval;
2339 if ( maxVal < resetval + resetval) 2405 if ( maxVal < resetval + resetval)
2340 resetval = maxVal - resetval; 2406 resetval = maxVal - resetval;
2341 sizes << resetval; 2407 sizes << resetval;
2342 } 2408 }
2343 mMainFrame->setSizes(sizes); 2409 mMainFrame->setSizes(sizes);
2344 if ( dateCount == 5 ) mNavigator->selectWorkWeek(); 2410 if ( dateCount == 5 ) mNavigator->selectWorkWeek();
2345 else if ( dateCount == 7 ) mNavigator->selectWeek(); 2411 else if ( dateCount == 7 ) mNavigator->selectWeek();
2346 else mNavigator->selectDates( dateCount ); 2412 else mNavigator->selectDates( dateCount );
2347 // mViewManager->readSettings( config ); 2413 // mViewManager->readSettings( config );
2348 updateConfig(); 2414 updateConfig();
2349 globalFlagBlockAgenda = 2; 2415 globalFlagBlockAgenda = 2;
2350 mViewManager->readSettings( config ); 2416 mViewManager->readSettings( config );
2351 QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); 2417 QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) );
2352} 2418}
2353 2419
2354void CalendarView::checkSuspendAlarm() 2420void CalendarView::checkSuspendAlarm()
2355{ 2421{
2356 if ( mSuspendTimer->isActive() ) { 2422 if ( mSuspendTimer->isActive() ) {
2357 KMessageBox::information( this, i18n("<b>WARNING:</b> There is a pending suspended alarm!"), i18n("Pending Suspend Alarm")); 2423 KMessageBox::information( this, i18n("<b>WARNING:</b> There is a pending suspended alarm!"), i18n("Pending Suspend Alarm"));
2358 } 2424 }
2359} 2425}
2360void CalendarView::writeSettings() 2426void CalendarView::writeSettings()
2361{ 2427{
2362 // kdDebug() << "CalendarView::writeSettings" << endl; 2428 // kdDebug() << "CalendarView::writeSettings" << endl;
2363 2429
2364 KConfig *config = KOGlobals::config(); 2430 KConfig *config = KOGlobals::config();
2365 2431
2366 mViewManager->writeSettings( config ); 2432 mViewManager->writeSettings( config );
2367 mTodoList->saveLayout(config,QString("Todo Layout")); 2433 mTodoList->saveLayout(config,QString("Todo Layout"));
2368 mDialogManager->writeSettings( config ); 2434 mDialogManager->writeSettings( config );
2369 //KOPrefs::instance()->usrWriteConfig(); 2435 //KOPrefs::instance()->usrWriteConfig();
2370 KOPrefs::instance()->writeConfig(); 2436 KOPrefs::instance()->writeConfig();
2371 2437
2372 writeFilterSettings(config); 2438 writeFilterSettings(config);
2373 config->setGroup( "AppRun" ); 2439 config->setGroup( "AppRun" );
2374 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 2440 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
2375 int days = dt.daysTo( QDate::currentDate() ); 2441 int days = dt.daysTo( QDate::currentDate() );
2376 dt = dt.addDays( days ); 2442 dt = dt.addDays( days );
2377 int secs = dt.secsTo( QDateTime::currentDateTime() ); 2443 int secs = dt.secsTo( QDateTime::currentDateTime() );
2378 config->writeEntry( "LatestProgramStopDays", days ); 2444 config->writeEntry( "LatestProgramStopDays", days );
2379 config->writeEntry( "LatestProgramStopSecs", secs ); 2445 config->writeEntry( "LatestProgramStopSecs", secs );
2380 //qDebug("KO: Writing stop time: %d ", secs); 2446 //qDebug("KO: Writing stop time: %d ", secs);
2381 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); 2447 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
2382 //QDateTime latest = dt.addSecs ( secs ); 2448 //QDateTime latest = dt.addSecs ( secs );
2383 //qDebug("KO: Termination on %s ", latest.toString().latin1()); 2449 //qDebug("KO: Termination on %s ", latest.toString().latin1());
2384 config->setGroup( "Views" ); 2450 config->setGroup( "Views" );
2385 config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); 2451 config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() );
2386 2452
2387#if 0 2453#if 0
2388 qDebug("********************* "); 2454 qDebug("********************* ");
2389 qDebug("Testcode secsto "); 2455 qDebug("Testcode secsto ");
2390 QDateTime dt_nodaylight ( QDate (2005,3,26), QTime( 0,0,0 ) ); 2456 QDateTime dt_nodaylight ( QDate (2005,3,26), QTime( 0,0,0 ) );
2391 QDateTime dt_daylight ( QDate (2005,3,29), QTime( 0,0,0 ) ); 2457 QDateTime dt_daylight ( QDate (2005,3,29), QTime( 0,0,0 ) );
2392 int secsto = dt_nodaylight.secsTo( dt_daylight ); 2458 int secsto = dt_nodaylight.secsTo( dt_daylight );
2393 QDateTime dt_daylight_wrong = dt_nodaylight.addSecs( secsto ); 2459 QDateTime dt_daylight_wrong = dt_nodaylight.addSecs( secsto );
2394 qDebug("dt nodaylight %s ",dt_nodaylight.toString().latin1() ); 2460 qDebug("dt nodaylight %s ",dt_nodaylight.toString().latin1() );
2395 qDebug("dt daylight %s ",dt_daylight.toString().latin1() ); 2461 qDebug("dt daylight %s ",dt_daylight.toString().latin1() );
2396 qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() ); 2462 qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() );
2397 qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600); 2463 qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600);
2398 qDebug("********************* testcode end"); 2464 qDebug("********************* testcode end");
2399 2465
2400#endif 2466#endif
2401 2467
2402 QValueList<int> listINT = mLeftFrame->sizes(); 2468 QValueList<int> listINT = mLeftFrame->sizes();
2403 config->writeEntry("Left Splitter Frame",listINT); 2469 config->writeEntry("Left Splitter Frame",listINT);
2404 QValueList<int> listINT2 = mMainFrame->sizes(); 2470 QValueList<int> listINT2 = mMainFrame->sizes();
2405 config->writeEntry("Main Splitter Frame",listINT2); 2471 config->writeEntry("Main Splitter Frame",listINT2);
2406#ifdef DESKTOP_VERSION 2472#ifdef DESKTOP_VERSION
2407 config->setGroup("WidgetLayout"); 2473 config->setGroup("WidgetLayout");
2408 QStringList list ;//= config->readListEntry("MainLayout"); 2474 QStringList list ;//= config->readListEntry("MainLayout");
2409 int x,y,w,h; 2475 int x,y,w,h;
2410 QWidget* wid; 2476 QWidget* wid;
2411 wid = topLevelWidget(); 2477 wid = topLevelWidget();
2412 x = wid->geometry().x(); 2478 x = wid->geometry().x();
2413 y = wid->geometry().y(); 2479 y = wid->geometry().y();
2414 w = wid->width(); 2480 w = wid->width();
2415 h = wid->height(); 2481 h = wid->height();
2416 list.clear(); 2482 list.clear();
2417 list << QString::number( x ); 2483 list << QString::number( x );
2418 list << QString::number( y ); 2484 list << QString::number( y );
2419 list << QString::number( w ); 2485 list << QString::number( w );
2420 list << QString::number( h ); 2486 list << QString::number( h );
2421 config->writeEntry("MainLayout",list ); 2487 config->writeEntry("MainLayout",list );
2422 2488
2423 wid = mEventEditor; 2489 wid = mEventEditor;
2424 x = wid->geometry().x(); 2490 x = wid->geometry().x();
2425 y = wid->geometry().y(); 2491 y = wid->geometry().y();
2426 w = wid->width(); 2492 w = wid->width();
2427 h = wid->height(); 2493 h = wid->height();
2428 list.clear(); 2494 list.clear();
2429 list << QString::number( x ); 2495 list << QString::number( x );
2430 list << QString::number( y ); 2496 list << QString::number( y );
2431 list << QString::number( w ); 2497 list << QString::number( w );
2432 list << QString::number( h ); 2498 list << QString::number( h );
2433 config->writeEntry("EditEventLayout",list ); 2499 config->writeEntry("EditEventLayout",list );
2434 2500
2435 wid = mTodoEditor; 2501 wid = mTodoEditor;
2436 x = wid->geometry().x(); 2502 x = wid->geometry().x();
2437 y = wid->geometry().y(); 2503 y = wid->geometry().y();
2438 w = wid->width(); 2504 w = wid->width();
2439 h = wid->height(); 2505 h = wid->height();
2440 list.clear(); 2506 list.clear();
2441 list << QString::number( x ); 2507 list << QString::number( x );
2442 list << QString::number( y ); 2508 list << QString::number( y );
2443 list << QString::number( w ); 2509 list << QString::number( w );
2444 list << QString::number( h ); 2510 list << QString::number( h );
2445 config->writeEntry("EditTodoLayout",list ); 2511 config->writeEntry("EditTodoLayout",list );
2446 wid = getEventViewerDialog(); 2512 wid = getEventViewerDialog();
2447 x = wid->geometry().x(); 2513 x = wid->geometry().x();
2448 y = wid->geometry().y(); 2514 y = wid->geometry().y();
2449 w = wid->width(); 2515 w = wid->width();
2450 h = wid->height(); 2516 h = wid->height();
2451 list.clear(); 2517 list.clear();
2452 list << QString::number( x ); 2518 list << QString::number( x );
2453 list << QString::number( y ); 2519 list << QString::number( y );
2454 list << QString::number( w ); 2520 list << QString::number( w );
2455 list << QString::number( h ); 2521 list << QString::number( h );
2456 config->writeEntry("ViewerLayout",list ); 2522 config->writeEntry("ViewerLayout",list );
2457 wid = mDialogManager->getSearchDialog(); 2523 wid = mDialogManager->getSearchDialog();
2458 if ( wid ) { 2524 if ( wid ) {
2459 x = wid->geometry().x(); 2525 x = wid->geometry().x();
2460 y = wid->geometry().y(); 2526 y = wid->geometry().y();
2461 w = wid->width(); 2527 w = wid->width();
2462 h = wid->height(); 2528 h = wid->height();
2463 list.clear(); 2529 list.clear();
2464 list << QString::number( x ); 2530 list << QString::number( x );
2465 list << QString::number( y ); 2531 list << QString::number( y );
2466 list << QString::number( w ); 2532 list << QString::number( w );
2467 list << QString::number( h ); 2533 list << QString::number( h );
2468 config->writeEntry("SearchLayout",list ); 2534 config->writeEntry("SearchLayout",list );
2469 } 2535 }
2470#endif 2536#endif
2471 2537
2472 2538
2473 config->sync(); 2539 config->sync();
2474} 2540}
2475 2541
2476void CalendarView::readFilterSettings(KConfig *config) 2542void CalendarView::readFilterSettings(KConfig *config)
2477{ 2543{
2478 // kdDebug() << "CalendarView::readFilterSettings()" << endl; 2544 // kdDebug() << "CalendarView::readFilterSettings()" << endl;
2479 2545
2480 mFilters.clear(); 2546 mFilters.clear();
2481 2547
2482 config->setGroup("General"); 2548 config->setGroup("General");
2483 QStringList filterList = config->readListEntry("CalendarFilters"); 2549 QStringList filterList = config->readListEntry("CalendarFilters");
2484 2550
2485 QStringList::ConstIterator it = filterList.begin(); 2551 QStringList::ConstIterator it = filterList.begin();
2486 QStringList::ConstIterator end = filterList.end(); 2552 QStringList::ConstIterator end = filterList.end();
2487 while(it != end) { 2553 while(it != end) {
2488 // kdDebug() << " filter: " << (*it) << endl; 2554 // kdDebug() << " filter: " << (*it) << endl;
2489 2555
2490 CalFilter *filter; 2556 CalFilter *filter;
2491 filter = new CalFilter(*it); 2557 filter = new CalFilter(*it);
2492 config->setGroup("Filter_" + (*it).utf8()); 2558 config->setGroup("Filter_" + (*it).utf8());
2493 //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); 2559 //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) );
2494 filter->setCriteria(config->readNumEntry("Criteria",0)); 2560 filter->setCriteria(config->readNumEntry("Criteria",0));
2495 filter->setCategoryList(config->readListEntry("CategoryList")); 2561 filter->setCategoryList(config->readListEntry("CategoryList"));
2496 mFilters.append(filter); 2562 mFilters.append(filter);
2497 2563
2498 ++it; 2564 ++it;
2499 } 2565 }
2500 2566
2501 if (mFilters.count() == 0) { 2567 if (mFilters.count() == 0) {
2502 CalFilter *filter = new CalFilter(i18n("Default")); 2568 CalFilter *filter = new CalFilter(i18n("Default"));
2503 mFilters.append(filter); 2569 mFilters.append(filter);
2504 } 2570 }
2505 mFilterView->updateFilters(); 2571 mFilterView->updateFilters();
2506 config->setGroup("FilterView"); 2572 config->setGroup("FilterView");
2507 2573
2508 mFilterView->blockSignals(true); 2574 mFilterView->blockSignals(true);
2509 mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled")); 2575 mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled"));
2510 mFilterView->setSelectedFilter(config->readEntry("Current Filter")); 2576 mFilterView->setSelectedFilter(config->readEntry("Current Filter"));
2511 mFilterView->blockSignals(false); 2577 mFilterView->blockSignals(false);
2512 // We do it manually to avoid it being done twice by the above calls 2578 // We do it manually to avoid it being done twice by the above calls
2513 updateFilter(); 2579 updateFilter();
2514} 2580}
2515 2581
2516void CalendarView::writeFilterSettings(KConfig *config) 2582void CalendarView::writeFilterSettings(KConfig *config)
2517{ 2583{
2518 // kdDebug() << "CalendarView::writeFilterSettings()" << endl; 2584 // kdDebug() << "CalendarView::writeFilterSettings()" << endl;
2519 2585
2520 QStringList filterList; 2586 QStringList filterList;
2521 2587
2522 CalFilter *filter = mFilters.first(); 2588 CalFilter *filter = mFilters.first();
2523 while(filter) { 2589 while(filter) {
2524 // kdDebug() << " fn: " << filter->name() << endl; 2590 // kdDebug() << " fn: " << filter->name() << endl;
2525 filterList << filter->name(); 2591 filterList << filter->name();
2526 config->setGroup("Filter_" + filter->name().utf8()); 2592 config->setGroup("Filter_" + filter->name().utf8());
2527 config->writeEntry("Criteria",filter->criteria()); 2593 config->writeEntry("Criteria",filter->criteria());
2528 config->writeEntry("CategoryList",filter->categoryList()); 2594 config->writeEntry("CategoryList",filter->categoryList());
2529 filter = mFilters.next(); 2595 filter = mFilters.next();
2530 } 2596 }
2531 config->setGroup("General"); 2597 config->setGroup("General");
2532 config->writeEntry("CalendarFilters",filterList); 2598 config->writeEntry("CalendarFilters",filterList);
2533 2599
2534 config->setGroup("FilterView"); 2600 config->setGroup("FilterView");
2535 config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); 2601 config->writeEntry("FilterEnabled",mFilterView->filtersEnabled());
2536 config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); 2602 config->writeEntry("Current Filter",mFilterView->selectedFilter()->name());
2537} 2603}
2538 2604
2539 2605
2540void CalendarView::goToday() 2606void CalendarView::goToday()
2541{ 2607{
2542 if ( mViewManager->currentView()->isMonthView() ) 2608 if ( mViewManager->currentView()->isMonthView() )
2543 mNavigator->selectTodayMonth(); 2609 mNavigator->selectTodayMonth();
2544 else 2610 else
2545 mNavigator->selectToday(); 2611 mNavigator->selectToday();
2546} 2612}
2547 2613
2548void CalendarView::goNext() 2614void CalendarView::goNext()
2549{ 2615{
2550 mNavigator->selectNext(); 2616 mNavigator->selectNext();
2551} 2617}
2552 2618
2553void CalendarView::goPrevious() 2619void CalendarView::goPrevious()
2554{ 2620{
2555 mNavigator->selectPrevious(); 2621 mNavigator->selectPrevious();
2556} 2622}
2557void CalendarView::goNextMonth() 2623void CalendarView::goNextMonth()
2558{ 2624{
2559 mNavigator->selectNextMonth(); 2625 mNavigator->selectNextMonth();
2560} 2626}
2561 2627
2562void CalendarView::goPreviousMonth() 2628void CalendarView::goPreviousMonth()
2563{ 2629{
2564 mNavigator->selectPreviousMonth(); 2630 mNavigator->selectPreviousMonth();
2565} 2631}
2566 2632
2567void CalendarView::updateConfig() 2633void CalendarView::updateConfig()
2568{ 2634{
2569 if ( KOPrefs::instance()->mUseAppColors ) 2635 if ( KOPrefs::instance()->mUseAppColors )
2570 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 2636 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
2571 emit configChanged(); 2637 emit configChanged();
2572 mTodoList->updateConfig(); 2638 mTodoList->updateConfig();
2573 // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); 2639 // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont);
2574 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 2640 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2575 // To make the "fill window" configurations work 2641 // To make the "fill window" configurations work
2576 //mViewManager->raiseCurrentView(); 2642 //mViewManager->raiseCurrentView();
2577} 2643}
2578 2644
2579 2645
2580void CalendarView::eventChanged(Event *event) 2646void CalendarView::eventChanged(Event *event)
2581{ 2647{
2582 changeEventDisplay(event,KOGlobals::EVENTEDITED); 2648 changeEventDisplay(event,KOGlobals::EVENTEDITED);
2583 //updateUnmanagedViews(); 2649 //updateUnmanagedViews();
2584} 2650}
2585 2651
2586void CalendarView::eventAdded(Event *event) 2652void CalendarView::eventAdded(Event *event)
2587{ 2653{
2588 changeEventDisplay(event,KOGlobals::EVENTADDED); 2654 changeEventDisplay(event,KOGlobals::EVENTADDED);
2589} 2655}
2590 2656
2591void CalendarView::eventToBeDeleted(Event *) 2657void CalendarView::eventToBeDeleted(Event *)
2592{ 2658{
2593 kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; 2659 kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl;
2594} 2660}
2595 2661
2596void CalendarView::eventDeleted() 2662void CalendarView::eventDeleted()
2597{ 2663{
2598 changeEventDisplay(0,KOGlobals::EVENTDELETED); 2664 changeEventDisplay(0,KOGlobals::EVENTDELETED);
2599} 2665}
2600void CalendarView::changeTodoDisplay(Todo *which, int action) 2666void CalendarView::changeTodoDisplay(Todo *which, int action)
2601{ 2667{
2602 changeIncidenceDisplay((Incidence *)which, action); 2668 changeIncidenceDisplay((Incidence *)which, action);
2603 mDateNavigator->updateView(); //LR 2669 mDateNavigator->updateView(); //LR
2604 //mDialogManager->updateSearchDialog(); 2670 //mDialogManager->updateSearchDialog();
2605 2671
2606 if (which) { 2672 if (which) {
2607 mViewManager->updateWNview(); 2673 mViewManager->updateWNview();
2608 //mTodoList->updateView(); 2674 //mTodoList->updateView();
2609 } 2675 }
2610 2676
2611} 2677}
2612 2678
2613void CalendarView::changeIncidenceDisplay(Incidence *which, int action) 2679void CalendarView::changeIncidenceDisplay(Incidence *which, int action)
2614{ 2680{
2615 updateUnmanagedViews(); 2681 updateUnmanagedViews();
2616 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); 2682 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action );
2617 if ( action == KOGlobals::EVENTDELETED ) { //delete 2683 if ( action == KOGlobals::EVENTDELETED ) { //delete
2618 mCalendar->checkAlarmForIncidence( 0, true ); 2684 mCalendar->checkAlarmForIncidence( 0, true );
2619 if ( mEventViewerDialog ) 2685 if ( mEventViewerDialog )
2620 mEventViewerDialog->hide(); 2686 mEventViewerDialog->hide();
2621 } 2687 }
2622 else 2688 else
2623 mCalendar->checkAlarmForIncidence( which , false ); 2689 mCalendar->checkAlarmForIncidence( which , false );
2624} 2690}
2625 2691
2626// most of the changeEventDisplays() right now just call the view's 2692// most of the changeEventDisplays() right now just call the view's
2627// total update mode, but they SHOULD be recoded to be more refresh-efficient. 2693// total update mode, but they SHOULD be recoded to be more refresh-efficient.
2628void CalendarView::changeEventDisplay(Event *which, int action) 2694void CalendarView::changeEventDisplay(Event *which, int action)
2629{ 2695{
2630 // kdDebug() << "CalendarView::changeEventDisplay" << endl; 2696 // kdDebug() << "CalendarView::changeEventDisplay" << endl;
2631 changeIncidenceDisplay((Incidence *)which, action); 2697 changeIncidenceDisplay((Incidence *)which, action);
2632 2698
2633 2699
2634 static bool clearallviews = false; 2700 static bool clearallviews = false;
2635 if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { 2701 if ( KOPrefs::instance()->mGlobalUpdateDisabled ) {
2636 if ( clearallviews ) { 2702 if ( clearallviews ) {
2637 clearAllViews(); 2703 clearAllViews();
2638 clearallviews = false; 2704 clearallviews = false;
2639 } 2705 }
2640 return; 2706 return;
2641 } 2707 }
2642 clearallviews = true; 2708 clearallviews = true;
2643 2709
2644 2710
2645 2711
2646 mDateNavigator->updateView(); 2712 mDateNavigator->updateView();
2647 //mDialogManager->updateSearchDialog(); 2713 //mDialogManager->updateSearchDialog();
2648 2714
2649 if (which) { 2715 if (which) {
2650 // If there is an event view visible update the display 2716 // If there is an event view visible update the display
2651 mViewManager->currentView()->changeEventDisplay(which,action); 2717 mViewManager->currentView()->changeEventDisplay(which,action);
2652 // TODO: check, if update needed 2718 // TODO: check, if update needed
2653 // if (which->getTodoStatus()) { 2719 // if (which->getTodoStatus()) {
2654 mTodoList->updateView(); 2720 mTodoList->updateView();
2655 // } 2721 // }
2656 } else { 2722 } else {
2657 mViewManager->currentView()->updateView(); 2723 mViewManager->currentView()->updateView();
2658 } 2724 }
2659} 2725}
2660 2726
2661 2727
2662void CalendarView::updateTodoViews() 2728void CalendarView::updateTodoViews()
2663{ 2729{
2664 mTodoList->updateView(); 2730 mTodoList->updateView();
2665 mViewManager->currentView()->updateView(); 2731 mViewManager->currentView()->updateView();
2666 2732
2667} 2733}
2668 2734
2669 2735
2670 2736
2671void CalendarView::clearAllViews() 2737void CalendarView::clearAllViews()
2672{ 2738{
2673 mTodoList->clearList(); 2739 mTodoList->clearList();
2674 mViewManager->clearAllViews(); 2740 mViewManager->clearAllViews();
2675 SearchDialog * sd = mDialogManager->getSearchDialog(); 2741 SearchDialog * sd = mDialogManager->getSearchDialog();
2676 if ( sd ) { 2742 if ( sd ) {
2677 KOListView* kol = sd->listview(); 2743 KOListView* kol = sd->listview();
2678 if ( kol ) 2744 if ( kol )
2679 kol->clearList(); 2745 kol->clearList();
2680 } 2746 }
2681} 2747}
2682void CalendarView::updateView() 2748void CalendarView::updateView()
2683{ 2749{
2684 static bool clearallviews = false; 2750 static bool clearallviews = false;
2685 if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { 2751 if ( KOPrefs::instance()->mGlobalUpdateDisabled ) {
2686 if ( clearallviews ) { 2752 if ( clearallviews ) {
2687 clearAllViews(); 2753 clearAllViews();
2688 clearallviews = false; 2754 clearallviews = false;
2689 } 2755 }
2690 return; 2756 return;
2691 } 2757 }
2692 clearallviews = true; 2758 clearallviews = true;
2693 DateList tmpList = mNavigator->selectedDates(); 2759 DateList tmpList = mNavigator->selectedDates();
2694 2760
2695 if ( KOPrefs::instance()->mHideNonStartedTodos ) 2761 if ( KOPrefs::instance()->mHideNonStartedTodos )
2696 mTodoList->updateView(); 2762 mTodoList->updateView();
2697 // We assume that the navigator only selects consecutive days. 2763 // We assume that the navigator only selects consecutive days.
2698 updateView( tmpList.first(), tmpList.last() ); 2764 updateView( tmpList.first(), tmpList.last() );
2699} 2765}
2700 2766
2701void CalendarView::updateUnmanagedViews() 2767void CalendarView::updateUnmanagedViews()
2702{ 2768{
2703 mDateNavigator->updateDayMatrix(); 2769 mDateNavigator->updateDayMatrix();
2704} 2770}
2705 2771
2706int CalendarView::msgItemDelete(const QString name) 2772int CalendarView::msgItemDelete(const QString name)
2707{ 2773{
2708 return KMessageBox::warningContinueCancel(this,name +"\n\n"+ 2774 return KMessageBox::warningContinueCancel(this,name +"\n\n"+
2709 i18n("This item will be\npermanently deleted."), 2775 i18n("This item will be\npermanently deleted."),
2710 i18n("KO/Pi Confirmation"),i18n("Delete")); 2776 i18n("KO/Pi Confirmation"),i18n("Delete"));
2711} 2777}
2712 2778
2713 2779
2714void CalendarView::edit_cut() 2780void CalendarView::edit_cut()
2715{ 2781{
2716 Event *anEvent=0; 2782 Event *anEvent=0;
2717 2783
2718 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2784 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2719 2785
2720 if (mViewManager->currentView()->isEventView()) { 2786 if (mViewManager->currentView()->isEventView()) {
2721 if ( incidence && incidence->typeID() == eventID ) { 2787 if ( incidence && incidence->typeID() == eventID ) {
2722 anEvent = static_cast<Event *>(incidence); 2788 anEvent = static_cast<Event *>(incidence);
2723 } 2789 }
2724 } 2790 }
2725 2791
2726 if (!anEvent) { 2792 if (!anEvent) {
2727 KNotifyClient::beep(); 2793 KNotifyClient::beep();
2728 return; 2794 return;
2729 } 2795 }
2730 DndFactory factory( mCalendar ); 2796 DndFactory factory( mCalendar );
2731 factory.cutIncidence(anEvent); 2797 factory.cutIncidence(anEvent);
2732 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 2798 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
2733} 2799}
2734 2800
2735void CalendarView::edit_copy() 2801void CalendarView::edit_copy()
2736{ 2802{
2737 Event *anEvent=0; 2803 Event *anEvent=0;
2738 2804
2739 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2805 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2740 2806
2741 if (mViewManager->currentView()->isEventView()) { 2807 if (mViewManager->currentView()->isEventView()) {
2742 if ( incidence && incidence->typeID() == eventID ) { 2808 if ( incidence && incidence->typeID() == eventID ) {
2743 anEvent = static_cast<Event *>(incidence); 2809 anEvent = static_cast<Event *>(incidence);
2744 } 2810 }
2745 } 2811 }
2746 2812
2747 if (!anEvent) { 2813 if (!anEvent) {
2748 KNotifyClient::beep(); 2814 KNotifyClient::beep();
2749 return; 2815 return;
2750 } 2816 }
2751 DndFactory factory( mCalendar ); 2817 DndFactory factory( mCalendar );
2752 factory.copyIncidence(anEvent); 2818 factory.copyIncidence(anEvent);
2753} 2819}
2754 2820
2755void CalendarView::edit_paste() 2821void CalendarView::edit_paste()
2756{ 2822{
2757 QDate date = mNavigator->selectedDates().first(); 2823 QDate date = mNavigator->selectedDates().first();
2758 2824
2759 DndFactory factory( mCalendar ); 2825 DndFactory factory( mCalendar );
2760 Event *pastedEvent = (Event *)factory.pasteIncidence( date ); 2826 Event *pastedEvent = (Event *)factory.pasteIncidence( date );
2761 2827
2762 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); 2828 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED );
2763} 2829}
2764void CalendarView::edit_global_options() 2830void CalendarView::edit_global_options()
2765{ 2831{
2766 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; 2832 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId;
2767 emit save(); 2833 emit save();
2768 emit saveStopTimer(); 2834 emit saveStopTimer();
2769 mDialogManager->showGlobalOptionsDialog(); 2835 mDialogManager->showGlobalOptionsDialog();
2770 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { 2836 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) {
2771 emit saveStopTimer(); 2837 emit saveStopTimer();
2772 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), 2838 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"),
2773 i18n("Timezone settings"),i18n("Reload"))) { 2839 i18n("Timezone settings"),i18n("Reload"))) {
2774 qDebug("KO: TZ reload cancelled "); 2840 qDebug("KO: TZ reload cancelled ");
2775 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 2841 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2776 return; 2842 return;
2777 } 2843 }
2778 qDebug("KO: Timezone change "); 2844 qDebug("KO: Timezone change ");
2779 loadCalendars(); 2845 loadCalendars();
2780 setModified(true); 2846 setModified(true);
2781 } 2847 }
2782 else 2848 else
2783 qDebug("KO: No tz change "); 2849 qDebug("KO: No tz change ");
2784} 2850}
2785void CalendarView::edit_options() 2851void CalendarView::edit_options()
2786{ 2852{
2787 mDialogManager->showOptionsDialog(); 2853 mDialogManager->showOptionsDialog();
2788} 2854}
2789 2855
2790 2856
2791void CalendarView::slotSelectPickerDate( QDate d) 2857void CalendarView::slotSelectPickerDate( QDate d)
2792{ 2858{
2793 mDateFrame->hide(); 2859 mDateFrame->hide();
2794 if ( mDatePickerMode == 1 ) { 2860 if ( mDatePickerMode == 1 ) {
2795 mNavigator->slotDaySelect( d ); 2861 mNavigator->slotDaySelect( d );
2796 } else if ( mDatePickerMode == 2 ) { 2862 } else if ( mDatePickerMode == 2 ) {
2797 if ( mMoveIncidence->typeID() == todoID ) { 2863 if ( mMoveIncidence->typeID() == todoID ) {
2798 Todo * to = (Todo *) mMoveIncidence; 2864 Todo * to = (Todo *) mMoveIncidence;
2799 QTime tim; 2865 QTime tim;
2800 int len = 0; 2866 int len = 0;
2801 if ( to->hasStartDate() && to->hasDueDate() ) 2867 if ( to->hasStartDate() && to->hasDueDate() )
2802 len = to->dtStart().secsTo( to->dtDue()); 2868 len = to->dtStart().secsTo( to->dtDue());
2803 if ( to->hasDueDate() ) 2869 if ( to->hasDueDate() )
2804 tim = to->dtDue().time(); 2870 tim = to->dtDue().time();
2805 else { 2871 else {
2806 tim = QTime ( 0,0,0 ); 2872 tim = QTime ( 0,0,0 );
2807 to->setFloats( true ); 2873 to->setFloats( true );
2808 to->setHasDueDate( true ); 2874 to->setHasDueDate( true );
2809 } 2875 }
2810 QDateTime dt ( d,tim ); 2876 QDateTime dt ( d,tim );
2811 to->setDtDue( dt ); 2877 to->setDtDue( dt );
2812 2878
2813 if ( to->hasStartDate() ) { 2879 if ( to->hasStartDate() ) {
2814 if ( len>0 ) 2880 if ( len>0 )
2815 to->setDtStart(to->dtDue().addSecs( -len )); 2881 to->setDtStart(to->dtDue().addSecs( -len ));
2816 else 2882 else
2817 if (to->dtStart() > to->dtDue() ) 2883 if (to->dtStart() > to->dtDue() )
2818 to->setDtStart(to->dtDue().addDays( -3 )); 2884 to->setDtStart(to->dtDue().addDays( -3 ));
2819 } 2885 }
2820 2886
2821 todoChanged( to ); 2887 todoChanged( to );
2822 } else if ( mMoveIncidence->typeID() == eventID ) { 2888 } else if ( mMoveIncidence->typeID() == eventID ) {
2823 if ( mMoveIncidence->doesRecur() ) { 2889 if ( mMoveIncidence->doesRecur() ) {
2824#if 0 2890#if 0
2825 // PENDING implement this 2891 // PENDING implement this
2826 Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); 2892 Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate );
2827 mCalendar()->addIncidence( newInc ); 2893 mCalendar()->addIncidence( newInc );
2828 if ( mMoveIncidence->typeID() == todoID ) 2894 if ( mMoveIncidence->typeID() == todoID )
2829 emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); 2895 emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED );
2830 else 2896 else
2831 emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); 2897 emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED);
2832 mMoveIncidence = newInc; 2898 mMoveIncidence = newInc;
2833 2899
2834#endif 2900#endif
2835 } 2901 }
2836 QTime tim = mMoveIncidence->dtStart().time(); 2902 QTime tim = mMoveIncidence->dtStart().time();
2837 int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); 2903 int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd());
2838 QDateTime dt ( d,tim ); 2904 QDateTime dt ( d,tim );
2839 mMoveIncidence->setDtStart( dt ); 2905 mMoveIncidence->setDtStart( dt );
2840 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); 2906 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) );
2841 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); 2907 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED);
2842 } else if ( mMoveIncidence->typeID() == journalID ) { 2908 } else if ( mMoveIncidence->typeID() == journalID ) {
2843 QTime tim = mMoveIncidence->dtStart().time(); 2909 QTime tim = mMoveIncidence->dtStart().time();
2844 QDateTime dt ( d,tim ); 2910 QDateTime dt ( d,tim );
2845 mMoveIncidence->setDtStart( dt ); 2911 mMoveIncidence->setDtStart( dt );
2846 updateView(); 2912 updateView();
2847 } 2913 }
2848 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); 2914 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 );
2849 } 2915 }
2850} 2916}
2851 2917
2852void CalendarView::removeCategories() 2918void CalendarView::removeCategories()
2853{ 2919{
2854 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 2920 QPtrList<Incidence> incList = mCalendar->rawIncidences();
2855 QStringList catList = KOPrefs::instance()->mCustomCategories; 2921 QStringList catList = KOPrefs::instance()->mCustomCategories;
2856 QStringList catIncList; 2922 QStringList catIncList;
2857 QStringList newCatList; 2923 QStringList newCatList;
2858 Incidence* inc = incList.first(); 2924 Incidence* inc = incList.first();
2859 uint i; 2925 uint i;
2860 while ( inc ) { 2926 while ( inc ) {
2861 newCatList.clear(); 2927 newCatList.clear();
2862 catIncList = inc->categories() ; 2928 catIncList = inc->categories() ;
2863 for( i = 0; i< catIncList.count(); ++i ) { 2929 for( i = 0; i< catIncList.count(); ++i ) {
2864 if ( catList.contains (catIncList[i])) 2930 if ( catList.contains (catIncList[i]))
2865 newCatList.append( catIncList[i] ); 2931 newCatList.append( catIncList[i] );
2866 } 2932 }
2867 newCatList.sort(); 2933 newCatList.sort();
2868 inc->setCategories( newCatList.join(",") ); 2934 inc->setCategories( newCatList.join(",") );
2869 inc = incList.next(); 2935 inc = incList.next();
2870 } 2936 }
2871} 2937}
2872 2938
2873int CalendarView::addCategories() 2939int CalendarView::addCategories()
2874{ 2940{
2875 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 2941 QPtrList<Incidence> incList = mCalendar->rawIncidences();
2876 QStringList catList = KOPrefs::instance()->mCustomCategories; 2942 QStringList catList = KOPrefs::instance()->mCustomCategories;
2877 QStringList catIncList; 2943 QStringList catIncList;
2878 Incidence* inc = incList.first(); 2944 Incidence* inc = incList.first();
2879 uint i; 2945 uint i;
2880 int count = 0; 2946 int count = 0;
2881 while ( inc ) { 2947 while ( inc ) {
2882 catIncList = inc->categories() ; 2948 catIncList = inc->categories() ;
2883 for( i = 0; i< catIncList.count(); ++i ) { 2949 for( i = 0; i< catIncList.count(); ++i ) {
2884 if ( !catList.contains (catIncList[i])) { 2950 if ( !catList.contains (catIncList[i])) {
2885 catList.append( catIncList[i] ); 2951 catList.append( catIncList[i] );
2886 //qDebug("add cat %s ", catIncList[i].latin1()); 2952 //qDebug("add cat %s ", catIncList[i].latin1());
2887 ++count; 2953 ++count;
2888 } 2954 }
2889 } 2955 }
2890 inc = incList.next(); 2956 inc = incList.next();
2891 } 2957 }
2892 catList.sort(); 2958 catList.sort();
2893 KOPrefs::instance()->mCustomCategories = catList; 2959 KOPrefs::instance()->mCustomCategories = catList;
2894 return count; 2960 return count;
2895} 2961}
2896 2962
2897void CalendarView::editCategories() 2963void CalendarView::editCategories()
2898{ 2964{
2899 qDebug("CalendarView::editCategories() "); 2965 qDebug("CalendarView::editCategories() ");
2900 KPIM::CategoryEditDialog ced (KOPrefs::instance(),this ); 2966 KPIM::CategoryEditDialog ced (KOPrefs::instance(),this );
2901 ced.exec(); 2967 ced.exec();
2902} 2968}
2903void CalendarView::manageCategories() 2969void CalendarView::manageCategories()
2904{ 2970{
2905 KOCatPrefs* cp = new KOCatPrefs(); 2971 KOCatPrefs* cp = new KOCatPrefs();
2906 cp->show(); 2972 cp->show();
2907 int w =cp->sizeHint().width() ; 2973 int w =cp->sizeHint().width() ;
2908 int h = cp->sizeHint().height() ; 2974 int h = cp->sizeHint().height() ;
2909 int dw = QApplication::desktop()->width(); 2975 int dw = QApplication::desktop()->width();
2910 int dh = QApplication::desktop()->height(); 2976 int dh = QApplication::desktop()->height();
2911 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2977 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2912 if ( !cp->exec() ) { 2978 if ( !cp->exec() ) {
2913 delete cp; 2979 delete cp;
2914 return; 2980 return;
2915 } 2981 }
2916 int count = 0; 2982 int count = 0;
2917 if ( cp->addCat() ) { 2983 if ( cp->addCat() ) {
2918 count = addCategories(); 2984 count = addCategories();
2919 if ( count ) { 2985 if ( count ) {
2920 topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); 2986 topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! "));
2921 writeSettings(); 2987 writeSettings();
2922 } else 2988 } else
2923 topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); 2989 topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! "));
2924 } else { 2990 } else {
2925 removeCategories(); 2991 removeCategories();
2926 updateView(); 2992 updateView();
2927 } 2993 }
2928 delete cp; 2994 delete cp;
2929} 2995}
2930 2996
2931void CalendarView::beamIncidence(Incidence * Inc) 2997void CalendarView::beamIncidence(Incidence * Inc)
2932{ 2998{
2933 QPtrList<Incidence> delSel ; 2999 QPtrList<Incidence> delSel ;
2934 delSel.append(Inc); 3000 delSel.append(Inc);
2935 beamIncidenceList( delSel ); 3001 beamIncidenceList( delSel );
2936} 3002}
2937void CalendarView::beamCalendar() 3003void CalendarView::beamCalendar()
2938{ 3004{
2939 QPtrList<Incidence> delSel = mCalendar->rawIncidences(); 3005 QPtrList<Incidence> delSel = mCalendar->rawIncidences();
2940 //qDebug("beamCalendar() "); 3006 //qDebug("beamCalendar() ");
2941 beamIncidenceList( delSel ); 3007 beamIncidenceList( delSel );
2942} 3008}
2943void CalendarView::beamFilteredCalendar() 3009void CalendarView::beamFilteredCalendar()
2944{ 3010{
2945 QPtrList<Incidence> delSel = mCalendar->incidences(); 3011 QPtrList<Incidence> delSel = mCalendar->incidences();
2946 //qDebug("beamFilteredCalendar() "); 3012 //qDebug("beamFilteredCalendar() ");
2947 beamIncidenceList( delSel ); 3013 beamIncidenceList( delSel );
2948} 3014}
2949void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) 3015void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2950{ 3016{
2951 3017
2952 KOBeamPrefs beamDialog; 3018 KOBeamPrefs beamDialog;
2953 if ( beamDialog.exec () == QDialog::Rejected ) 3019 if ( beamDialog.exec () == QDialog::Rejected )
2954 return; 3020 return;
2955#ifdef DESKTOP_VERSION 3021#ifdef DESKTOP_VERSION
2956 QString fn = locateLocal( "tmp", "kopibeamfile" ); 3022 QString fn = locateLocal( "tmp", "kopibeamfile" );
2957#else 3023#else
2958 QString fn = "/tmp/kopibeamfile"; 3024 QString fn = "/tmp/kopibeamfile";
2959#endif 3025#endif
2960 QString mes; 3026 QString mes;
2961 bool createbup = true; 3027 bool createbup = true;
2962 if ( createbup ) { 3028 if ( createbup ) {
2963 QString description = "\n"; 3029 QString description = "\n";
2964 CalendarLocal* cal = new CalendarLocal(); 3030 CalendarLocal* cal = new CalendarLocal();
2965 if ( beamDialog.beamLocal() ) 3031 if ( beamDialog.beamLocal() )
2966 cal->setLocalTime(); 3032 cal->setLocalTime();
2967 else 3033 else
2968 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 3034 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2969 Incidence *incidence = delSel.first(); 3035 Incidence *incidence = delSel.first();
2970 bool addText = false; 3036 bool addText = false;
2971 if ( delSel.count() < 10 ) 3037 if ( delSel.count() < 10 )
2972 addText = true; 3038 addText = true;
2973 else { 3039 else {
2974 description.sprintf(i18n(" %d items?"),delSel.count() ); 3040 description.sprintf(i18n(" %d items?"),delSel.count() );
2975 } 3041 }
2976 while ( incidence ) { 3042 while ( incidence ) {
2977 Incidence *in = incidence->clone(); 3043 Incidence *in = incidence->clone();
2978 if ( ! in->summary().isEmpty() ) { 3044 if ( ! in->summary().isEmpty() ) {
2979 in->setDescription(""); 3045 in->setDescription("");
2980 } else { 3046 } else {
2981 in->setSummary( in->description().left(20)); 3047 in->setSummary( in->description().left(20));
2982 in->setDescription(""); 3048 in->setDescription("");
2983 } 3049 }
2984 if ( addText ) 3050 if ( addText )
2985 description += in->summary() + "\n"; 3051 description += in->summary() + "\n";
2986 cal->addIncidence( in ); 3052 cal->addIncidence( in );
2987 incidence = delSel.next(); 3053 incidence = delSel.next();
2988 } 3054 }
2989 if ( beamDialog.beamVcal() ) { 3055 if ( beamDialog.beamVcal() ) {
2990 fn += ".vcs"; 3056 fn += ".vcs";
2991 FileStorage storage( cal, fn, new VCalFormat ); 3057 FileStorage storage( cal, fn, new VCalFormat );
2992 storage.save(); 3058 storage.save();
2993 } else { 3059 } else {
2994 fn += ".ics"; 3060 fn += ".ics";
2995 FileStorage storage( cal, fn, new ICalFormat( ) ); 3061 FileStorage storage( cal, fn, new ICalFormat( ) );
2996 storage.save(); 3062 storage.save();
2997 } 3063 }
2998 delete cal; 3064 delete cal;
2999 mes = i18n("KO/Pi: Ready for beaming"); 3065 mes = i18n("KO/Pi: Ready for beaming");
3000 topLevelWidget()->setCaption(mes); 3066 topLevelWidget()->setCaption(mes);
3001 KApplication::convert2latin1( fn ); 3067 KApplication::convert2latin1( fn );
3002#ifndef DESKTOP_VERSION 3068#ifndef DESKTOP_VERSION
3003 Ir *ir = new Ir( this ); 3069 Ir *ir = new Ir( this );
3004 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 3070 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
3005 ir->send( fn, description, "text/x-vCalendar" ); 3071 ir->send( fn, description, "text/x-vCalendar" );
3006#endif 3072#endif
3007 } 3073 }
3008} 3074}
3009 3075
3010#ifndef DESKTOP_VERSION 3076#ifndef DESKTOP_VERSION
3011void CalendarView::beamDone( Ir *ir ) 3077void CalendarView::beamDone( Ir *ir )
3012{ 3078{
3013 delete ir; 3079 delete ir;
3014 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); 3080 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") );
3015 topLevelWidget()->raise(); 3081 topLevelWidget()->raise();
3016} 3082}
3017#else 3083#else
3018void CalendarView::beamDone( Ir *){;} 3084void CalendarView::beamDone( Ir *){;}
3019#endif 3085#endif
3020void CalendarView::moveIncidence(Incidence * inc ) 3086void CalendarView::moveIncidence(Incidence * inc )
3021{ 3087{
3022 if ( !inc ) return; 3088 if ( !inc ) return;
3023 showDatePickerPopup(); 3089 showDatePickerPopup();
3024 mDatePickerMode = 2; 3090 mDatePickerMode = 2;
3025 mMoveIncidence = inc ; 3091 mMoveIncidence = inc ;
3026 QDate da; 3092 QDate da;
3027 if ( mMoveIncidence->typeID() == todoID ) { 3093 if ( mMoveIncidence->typeID() == todoID ) {
3028 Todo * to = (Todo *) mMoveIncidence; 3094 Todo * to = (Todo *) mMoveIncidence;
3029 if ( to->hasDueDate() ) 3095 if ( to->hasDueDate() )
3030 da = to->dtDue().date(); 3096 da = to->dtDue().date();
3031 else 3097 else
3032 da = QDate::currentDate(); 3098 da = QDate::currentDate();
3033 } else { 3099 } else {
3034 da = mMoveIncidence->dtStart().date(); 3100 da = mMoveIncidence->dtStart().date();
3035 } 3101 }
3036 //PENDING set date for recurring incidence to date of recurrence 3102 //PENDING set date for recurring incidence to date of recurrence
3037 //mMoveIncidenceOldDate; 3103 //mMoveIncidenceOldDate;
3038 mDatePicker->setDate( da ); 3104 mDatePicker->setDate( da );
3039} 3105}
3040void CalendarView::showDatePickerPopup() 3106void CalendarView::showDatePickerPopup()
3041{ 3107{
3042 if ( mDateFrame->isVisible() ) 3108 if ( mDateFrame->isVisible() )
3043 mDateFrame->hide(); 3109 mDateFrame->hide();
3044 else { 3110 else {
3045 int offX = 0, offY = 0; 3111 int offX = 0, offY = 0;
3046#ifdef DESKTOP_VERSION 3112#ifdef DESKTOP_VERSION
3047 int w =mDatePicker->sizeHint().width() ; 3113 int w =mDatePicker->sizeHint().width() ;
3048 int h = mDatePicker->sizeHint().height() ; 3114 int h = mDatePicker->sizeHint().height() ;
3049 int dw = topLevelWidget()->width(); 3115 int dw = topLevelWidget()->width();
3050 int dh = topLevelWidget()->height(); 3116 int dh = topLevelWidget()->height();
3051 offX = topLevelWidget()->x(); 3117 offX = topLevelWidget()->x();
3052 offY = topLevelWidget()->y(); 3118 offY = topLevelWidget()->y();
3053#else 3119#else
3054 int w =mDatePicker->sizeHint().width() ; 3120 int w =mDatePicker->sizeHint().width() ;
3055 int h = mDatePicker->sizeHint().height() ; 3121 int h = mDatePicker->sizeHint().height() ;
3056 int dw = QApplication::desktop()->width(); 3122 int dw = QApplication::desktop()->width();
3057 int dh = QApplication::desktop()->height(); 3123 int dh = QApplication::desktop()->height();
3058#endif 3124#endif
3059 mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); 3125 mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h );
3060 mDateFrame->show(); 3126 mDateFrame->show();
3061 } 3127 }
3062} 3128}
3063void CalendarView::showDatePicker( ) 3129void CalendarView::showDatePicker( )
3064{ 3130{
3065 showDatePickerPopup(); 3131 showDatePickerPopup();
3066 mDatePickerMode = 1; 3132 mDatePickerMode = 1;
3067 mDatePicker->setDate( mNavigator->selectedDates().first() ); 3133 mDatePicker->setDate( mNavigator->selectedDates().first() );
3068} 3134}
3069 3135
3070void CalendarView::showEventEditor() 3136void CalendarView::showEventEditor()
3071{ 3137{
3072#ifdef DESKTOP_VERSION 3138#ifdef DESKTOP_VERSION
3073 int x,y,w,h; 3139 int x,y,w,h;
3074 x = mEventEditor->geometry().x(); 3140 x = mEventEditor->geometry().x();
3075 y = mEventEditor->geometry().y(); 3141 y = mEventEditor->geometry().y();
3076 w = mEventEditor->width(); 3142 w = mEventEditor->width();
3077 h = mEventEditor->height(); 3143 h = mEventEditor->height();
3078 mEventEditor->show(); 3144 mEventEditor->show();
3079 mEventEditor->setGeometry(x,y,w,h); 3145 mEventEditor->setGeometry(x,y,w,h);
3080#else 3146#else
3081 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { 3147 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
3082 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 3148 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
3083 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); 3149 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
3084 qApp->processEvents(); 3150 qApp->processEvents();
3085 delete mEventEditor; 3151 delete mEventEditor;
3086 mEventEditor = mDialogManager->getEventEditor(); 3152 mEventEditor = mDialogManager->getEventEditor();
3087 topLevelWidget()->setCaption( i18n("") ); 3153 topLevelWidget()->setCaption( i18n("") );
3088 } 3154 }
3089 mEventEditor->showMaximized(); 3155 mEventEditor->showMaximized();
3090#endif 3156#endif
3091} 3157}
3092void CalendarView::showTodoEditor() 3158void CalendarView::showTodoEditor()
3093{ 3159{
3094#ifdef DESKTOP_VERSION 3160#ifdef DESKTOP_VERSION
3095 int x,y,w,h; 3161 int x,y,w,h;
3096 x = mTodoEditor->geometry().x(); 3162 x = mTodoEditor->geometry().x();
3097 y = mTodoEditor->geometry().y(); 3163 y = mTodoEditor->geometry().y();
3098 w = mTodoEditor->width(); 3164 w = mTodoEditor->width();
3099 h = mTodoEditor->height(); 3165 h = mTodoEditor->height();
3100 mTodoEditor->show(); 3166 mTodoEditor->show();
3101 mTodoEditor->setGeometry(x,y,w,h); 3167 mTodoEditor->setGeometry(x,y,w,h);
3102#else 3168#else
3103 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { 3169 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
3104 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 3170 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
3105 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); 3171 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
3106 qApp->processEvents(); 3172 qApp->processEvents();
3107 delete mTodoEditor; 3173 delete mTodoEditor;
3108 mTodoEditor = mDialogManager->getTodoEditor(); 3174 mTodoEditor = mDialogManager->getTodoEditor();
3109 topLevelWidget()->setCaption( i18n("") ); 3175 topLevelWidget()->setCaption( i18n("") );
3110 } 3176 }
3111 mTodoEditor->showMaximized(); 3177 mTodoEditor->showMaximized();
3112#endif 3178#endif
3113} 3179}
3114 3180
3115void CalendarView::cloneIncidence() 3181void CalendarView::cloneIncidence()
3116{ 3182{
3117 Incidence *incidence = currentSelection(); 3183 Incidence *incidence = currentSelection();
3118 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3184 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3119 if ( incidence ) { 3185 if ( incidence ) {
3120 cloneIncidence(incidence); 3186 cloneIncidence(incidence);
3121 } 3187 }
3122} 3188}
3123void CalendarView::moveIncidence() 3189void CalendarView::moveIncidence()
3124{ 3190{
3125 Incidence *incidence = currentSelection(); 3191 Incidence *incidence = currentSelection();
3126 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3192 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3127 if ( incidence ) { 3193 if ( incidence ) {
3128 moveIncidence(incidence); 3194 moveIncidence(incidence);
3129 } 3195 }
3130} 3196}
3131void CalendarView::beamIncidence() 3197void CalendarView::beamIncidence()
3132{ 3198{
3133 Incidence *incidence = currentSelection(); 3199 Incidence *incidence = currentSelection();
3134 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3200 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3135 if ( incidence ) { 3201 if ( incidence ) {
3136 beamIncidence(incidence); 3202 beamIncidence(incidence);
3137 } 3203 }
3138} 3204}
3139void CalendarView::toggleCancelIncidence() 3205void CalendarView::toggleCancelIncidence()
3140{ 3206{
3141 Incidence *incidence = currentSelection(); 3207 Incidence *incidence = currentSelection();
3142 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3208 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3143 if ( incidence ) { 3209 if ( incidence ) {
3144 cancelIncidence(incidence); 3210 cancelIncidence(incidence);
3145 } 3211 }
3146} 3212}
3147 3213
3148 3214
3149void CalendarView::cancelIncidence(Incidence * inc ) 3215void CalendarView::cancelIncidence(Incidence * inc )
3150{ 3216{
3151 inc->setCancelled( ! inc->cancelled() ); 3217 inc->setCancelled( ! inc->cancelled() );
3152 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); 3218 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED );
3153 updateView(); 3219 updateView();
3154} 3220}
3155void CalendarView::cloneIncidence(Incidence * orgInc ) 3221void CalendarView::cloneIncidence(Incidence * orgInc )
3156{ 3222{
3157 Incidence * newInc = orgInc->clone(); 3223 Incidence * newInc = orgInc->clone();
3158 newInc->recreate(); 3224 newInc->recreate();
3159 3225
3160 if ( newInc->typeID() == todoID ) { 3226 if ( newInc->typeID() == todoID ) {
3161 Todo* t = (Todo*) newInc; 3227 Todo* t = (Todo*) newInc;
3162 bool cloneSub = false; 3228 bool cloneSub = false;
3163 if ( orgInc->relations().count() ) { 3229 if ( orgInc->relations().count() ) {
3164 int result = KMessageBox::warningYesNoCancel(this, 3230 int result = KMessageBox::warningYesNoCancel(this,
3165 i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( newInc->summary().left ( 25 ) ), 3231 i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( KGlobal::formatMessage ( newInc->summary(),0 ) ),
3166 i18n("Todo has subtodos"), 3232 i18n("Todo has subtodos"),
3167 i18n("Yes"), 3233 i18n("Yes"),
3168 i18n("No")); 3234 i18n("No"));
3169 3235
3170 if ( result == KMessageBox::Cancel ) { 3236 if ( result == KMessageBox::Cancel ) {
3171 delete t; 3237 delete t;
3172 return; 3238 return;
3173 } 3239 }
3174 if (result == KMessageBox::Yes) cloneSub = true; 3240 if (result == KMessageBox::Yes) cloneSub = true;
3175 } 3241 }
3176 showTodoEditor(); 3242 showTodoEditor();
3177 mTodoEditor->editTodo( t ); 3243 mTodoEditor->editTodo( t );
3178 if ( mTodoEditor->exec() ) { 3244 if ( mTodoEditor->exec() ) {
3179 if ( cloneSub ) { 3245 if ( cloneSub ) {
3180 orgInc->cloneRelations( t ); 3246 orgInc->cloneRelations( t );
3181 mCalendar->addIncidenceBranch( t ); 3247 mCalendar->addIncidenceBranch( t );
3182 updateView(); 3248 updateView();
3183 3249
3184 } else { 3250 } else {
3185 mCalendar->addTodo( t ); 3251 mCalendar->addTodo( t );
3186 updateView(); 3252 updateView();
3187 } 3253 }
3188 } else { 3254 } else {
3189 delete t; 3255 delete t;
3190 } 3256 }
3191 } 3257 }
3192 else if ( newInc->typeID() == eventID ) { 3258 else if ( newInc->typeID() == eventID ) {
3193 Event* e = (Event*) newInc; 3259 Event* e = (Event*) newInc;
3194 showEventEditor(); 3260 showEventEditor();
3195 mEventEditor->editEvent( e ); 3261 mEventEditor->editEvent( e );
3196 if ( mEventEditor->exec() ) { 3262 if ( mEventEditor->exec() ) {
3197 mCalendar->addEvent( e ); 3263 mCalendar->addEvent( e );
3198 updateView(); 3264 updateView();
3199 } else { 3265 } else {
3200 delete e; 3266 delete e;
3201 } 3267 }
3202 } if ( newInc->typeID() == journalID ) { 3268 } if ( newInc->typeID() == journalID ) {
3203 mCalendar->addJournal( (Journal*) newInc ); 3269 mCalendar->addJournal( (Journal*) newInc );
3204 editJournal( (Journal*) newInc ); 3270 editJournal( (Journal*) newInc );
3205 } 3271 }
3206 setActiveWindow(); 3272 setActiveWindow();
3207} 3273}
3208 3274
3209void CalendarView::newEvent() 3275void CalendarView::newEvent()
3210{ 3276{
3211 // TODO: Replace this code by a common eventDurationHint of KOBaseView. 3277 // TODO: Replace this code by a common eventDurationHint of KOBaseView.
3212 KOAgendaView *aView = mViewManager->agendaView(); 3278 KOAgendaView *aView = mViewManager->agendaView();
3213 if (aView) { 3279 if (aView) {
3214 if (aView->selectionStart().isValid()) { 3280 if (aView->selectionStart().isValid()) {
3215 if (aView->selectedIsAllDay()) { 3281 if (aView->selectedIsAllDay()) {
3216 newEvent(aView->selectionStart(),aView->selectionEnd(),true); 3282 newEvent(aView->selectionStart(),aView->selectionEnd(),true);
3217 } else { 3283 } else {
3218 newEvent(aView->selectionStart(),aView->selectionEnd()); 3284 newEvent(aView->selectionStart(),aView->selectionEnd());
3219 } 3285 }
3220 return; 3286 return;
3221 } 3287 }
3222 } 3288 }
3223 3289
3224 QDate date = mNavigator->selectedDates().first(); 3290 QDate date = mNavigator->selectedDates().first();
3225 QDateTime current = QDateTime::currentDateTime(); 3291 QDateTime current = QDateTime::currentDateTime();
3226 if ( date <= current.date() ) { 3292 if ( date <= current.date() ) {
3227 int hour = current.time().hour() +1; 3293 int hour = current.time().hour() +1;
3228 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), 3294 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ),
3229 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 3295 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
3230 } else 3296 } else
3231 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), 3297 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ),
3232 QDateTime( date, QTime( KOPrefs::instance()->mStartTime + 3298 QDateTime( date, QTime( KOPrefs::instance()->mStartTime +
3233 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 3299 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
3234} 3300}
3235 3301
3236void CalendarView::newEvent(QDateTime fh) 3302void CalendarView::newEvent(QDateTime fh)
3237{ 3303{
3238 newEvent(fh, 3304 newEvent(fh,
3239 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); 3305 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration)));
3240} 3306}
3241 3307
3242void CalendarView::newEvent(QDate dt) 3308void CalendarView::newEvent(QDate dt)
3243{ 3309{
3244 newEvent(QDateTime(dt, QTime(0,0,0)), 3310 newEvent(QDateTime(dt, QTime(0,0,0)),
3245 QDateTime(dt, QTime(0,0,0)), true); 3311 QDateTime(dt, QTime(0,0,0)), true);
3246} 3312}
3247void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) 3313void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint)
3248{ 3314{
3249 newEvent(fromHint, toHint, false); 3315 newEvent(fromHint, toHint, false);
3250} 3316}
3251void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) 3317void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
3252{ 3318{
3253 3319
3254 showEventEditor(); 3320 showEventEditor();
3255 mEventEditor->newEvent(fromHint,toHint,allDay); 3321 mEventEditor->newEvent(fromHint,toHint,allDay);
3256 if ( mFilterView->filtersEnabled() ) { 3322 if ( mFilterView->filtersEnabled() ) {
3257 CalFilter *filter = mFilterView->selectedFilter(); 3323 CalFilter *filter = mFilterView->selectedFilter();
3258 if (filter && filter->showCategories()) { 3324 if (filter && filter->showCategories()) {
3259 mEventEditor->setCategories(filter->categoryList().join(",") ); 3325 mEventEditor->setCategories(filter->categoryList().join(",") );
3260 } 3326 }
3261 if ( filter ) 3327 if ( filter )
3262 mEventEditor->setSecrecy( filter->getSecrecy() ); 3328 mEventEditor->setSecrecy( filter->getSecrecy() );
3263 } 3329 }
3264 mEventEditor->exec(); 3330 mEventEditor->exec();
3265 setActiveWindow(); 3331 setActiveWindow();
3266} 3332}
3267void CalendarView::todoAdded(Todo * t) 3333void CalendarView::todoAdded(Todo * t)
3268{ 3334{
3269 3335
3270 changeTodoDisplay ( t ,KOGlobals::EVENTADDED); 3336 changeTodoDisplay ( t ,KOGlobals::EVENTADDED);
3271 updateTodoViews(); 3337 updateTodoViews();
3272} 3338}
3273void CalendarView::todoChanged(Todo * t) 3339void CalendarView::todoChanged(Todo * t)
3274{ 3340{
3275 emit todoModified( t, 4 ); 3341 emit todoModified( t, 4 );
3276 // updateTodoViews(); 3342 // updateTodoViews();
3277} 3343}
3278void CalendarView::todoToBeDeleted(Todo *) 3344void CalendarView::todoToBeDeleted(Todo *)
3279{ 3345{
3280 //qDebug("todoToBeDeleted(Todo *) "); 3346 //qDebug("todoToBeDeleted(Todo *) ");
3281 updateTodoViews(); 3347 updateTodoViews();
3282} 3348}
3283void CalendarView::todoDeleted() 3349void CalendarView::todoDeleted()
3284{ 3350{
3285 //qDebug(" todoDeleted()"); 3351 //qDebug(" todoDeleted()");
3286 updateTodoViews(); 3352 updateTodoViews();
3287} 3353}
3288 3354
3289 3355
3290void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) 3356void CalendarView::newTodoDateTime( QDateTime dt, bool allday )
3291{ 3357{
3292 showTodoEditor(); 3358 showTodoEditor();
3293 mTodoEditor->newTodo(dt,0,allday); 3359 mTodoEditor->newTodo(dt,0,allday);
3294 if ( mFilterView->filtersEnabled() ) { 3360 if ( mFilterView->filtersEnabled() ) {
3295 CalFilter *filter = mFilterView->selectedFilter(); 3361 CalFilter *filter = mFilterView->selectedFilter();
3296 if (filter && filter->showCategories()) { 3362 if (filter && filter->showCategories()) {
3297 mTodoEditor->setCategories(filter->categoryList().join(",") ); 3363 mTodoEditor->setCategories(filter->categoryList().join(",") );
3298 } 3364 }
3299 if ( filter ) 3365 if ( filter )
3300 mTodoEditor->setSecrecy( filter->getSecrecy() ); 3366 mTodoEditor->setSecrecy( filter->getSecrecy() );
3301 } 3367 }
3302 mTodoEditor->exec(); 3368 mTodoEditor->exec();
3303 setActiveWindow(); 3369 setActiveWindow();
3304} 3370}
3305 3371
3306void CalendarView::newTodo() 3372void CalendarView::newTodo()
3307{ 3373{
3308 newTodoDateTime( QDateTime(),true ); 3374 newTodoDateTime( QDateTime(),true );
3309} 3375}
3310 3376
3311void CalendarView::newSubTodo() 3377void CalendarView::newSubTodo()
3312{ 3378{
3313 Todo *todo = selectedTodo(); 3379 Todo *todo = selectedTodo();
3314 if ( todo ) newSubTodo( todo ); 3380 if ( todo ) newSubTodo( todo );
3315} 3381}
3316 3382
3317void CalendarView::newSubTodo(Todo *parentEvent) 3383void CalendarView::newSubTodo(Todo *parentEvent)
3318{ 3384{
3319 3385
3320 showTodoEditor(); 3386 showTodoEditor();
3321 mTodoEditor->newTodo(QDateTime(),parentEvent,true); 3387 mTodoEditor->newTodo(QDateTime(),parentEvent,true);
3322 mTodoEditor->exec(); 3388 mTodoEditor->exec();
3323 setActiveWindow(); 3389 setActiveWindow();
3324} 3390}
3325 3391
3326void CalendarView::newFloatingEvent() 3392void CalendarView::newFloatingEvent()
3327{ 3393{
3328 DateList tmpList = mNavigator->selectedDates(); 3394 DateList tmpList = mNavigator->selectedDates();
3329 QDate date = tmpList.first(); 3395 QDate date = tmpList.first();
3330 3396
3331 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), 3397 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ),
3332 QDateTime( date, QTime( 12, 0, 0 ) ), true ); 3398 QDateTime( date, QTime( 12, 0, 0 ) ), true );
3333} 3399}
3334 3400
3335 3401
3336void CalendarView::editEvent( Event *event ) 3402void CalendarView::editEvent( Event *event )
3337{ 3403{
3338 3404
3339 if ( !event ) return; 3405 if ( !event ) return;
3340 if ( event->isReadOnly() ) { 3406 if ( event->isReadOnly() ) {
3341 showEvent( event ); 3407 showEvent( event );
3342 return; 3408 return;
3343 } 3409 }
3344 showEventEditor(); 3410 showEventEditor();
3345 mEventEditor->editEvent( event , mFlagEditDescription); 3411 mEventEditor->editEvent( event , mFlagEditDescription);
3346 mEventEditor->exec(); 3412 mEventEditor->exec();
3347 setActiveWindow(); 3413 setActiveWindow();
3348 3414
3349} 3415}
3350void CalendarView::editJournal( Journal *jour ) 3416void CalendarView::editJournal( Journal *jour )
3351{ 3417{
3352 if ( !jour ) return; 3418 if ( !jour ) return;
3353 mDialogManager->hideSearchDialog(); 3419 mDialogManager->hideSearchDialog();
3354 mViewManager->showJournalView(); 3420 mViewManager->showJournalView();
3355 mNavigator->slotDaySelect( jour->dtStart().date() ); 3421 mNavigator->slotDaySelect( jour->dtStart().date() );
3356} 3422}
3357void CalendarView::editTodo( Todo *todo ) 3423void CalendarView::editTodo( Todo *todo )
3358{ 3424{
3359 if ( !todo ) return; 3425 if ( !todo ) return;
3360 3426
3361 if ( todo->isReadOnly() ) { 3427 if ( todo->isReadOnly() ) {
3362 showTodo( todo ); 3428 showTodo( todo );
3363 return; 3429 return;
3364 } 3430 }
3365 showTodoEditor(); 3431 showTodoEditor();
3366 mTodoEditor->editTodo( todo ,mFlagEditDescription); 3432 mTodoEditor->editTodo( todo ,mFlagEditDescription);
3367 mTodoEditor->exec(); 3433 mTodoEditor->exec();
3368 setActiveWindow(); 3434 setActiveWindow();
3369 3435
3370} 3436}
3371 3437
3372KOEventViewerDialog* CalendarView::getEventViewerDialog() 3438KOEventViewerDialog* CalendarView::getEventViewerDialog()
3373{ 3439{
3374 if ( !mEventViewerDialog ) { 3440 if ( !mEventViewerDialog ) {
3375 mEventViewerDialog = new KOEventViewerDialog(0); 3441 mEventViewerDialog = new KOEventViewerDialog(0);
3376 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); 3442 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
3377 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); 3443 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
3378 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), 3444 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
3379 dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); 3445 dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
3380 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), 3446 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
3381 viewManager(), SLOT( showAgendaView( bool ) ) ); 3447 viewManager(), SLOT( showAgendaView( bool ) ) );
3382 connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), 3448 connect( mEventViewerDialog, SIGNAL(signalViewerClosed()),
3383 this, SLOT( slotViewerClosed() ) ); 3449 this, SLOT( slotViewerClosed() ) );
3384 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), 3450 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ),
3385 this, SLOT( todoChanged(Todo *) ) ); 3451 this, SLOT( todoChanged(Todo *) ) );
3386 connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); 3452 connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) ));
3387 mEventViewerDialog->resize( 640, 480 ); 3453 mEventViewerDialog->resize( 640, 480 );
3388 3454
3389 } 3455 }
3390 return mEventViewerDialog; 3456 return mEventViewerDialog;
3391} 3457}
3392void CalendarView::showEvent(Event *event) 3458void CalendarView::showEvent(Event *event)
3393{ 3459{
3394 getEventViewerDialog()->setEvent(event); 3460 getEventViewerDialog()->setEvent(event);
3395 getEventViewerDialog()->showMe(); 3461 getEventViewerDialog()->showMe();
3396} 3462}
3397 3463
3398void CalendarView::showTodo(Todo *event) 3464void CalendarView::showTodo(Todo *event)
3399{ 3465{
3400 getEventViewerDialog()->setTodo(event); 3466 getEventViewerDialog()->setTodo(event);
3401 getEventViewerDialog()->showMe(); 3467 getEventViewerDialog()->showMe();
3402} 3468}
3403void CalendarView::showJournal( Journal *jour ) 3469void CalendarView::showJournal( Journal *jour )
3404{ 3470{
3405 getEventViewerDialog()->setJournal(jour); 3471 getEventViewerDialog()->setJournal(jour);
3406 getEventViewerDialog()->showMe(); 3472 getEventViewerDialog()->showMe();
3407 3473
3408} 3474}
3409// void CalendarView::todoModified (Todo *event, int changed) 3475// void CalendarView::todoModified (Todo *event, int changed)
3410// { 3476// {
3411// // if (mDialogList.find (event) != mDialogList.end ()) { 3477// // if (mDialogList.find (event) != mDialogList.end ()) {
3412// // kdDebug() << "Todo modified and open" << endl; 3478// // kdDebug() << "Todo modified and open" << endl;
3413// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; 3479// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event];
3414// // temp->modified (changed); 3480// // temp->modified (changed);
3415 3481
3416// // } 3482// // }
3417 3483
3418// mViewManager->updateView(); 3484// mViewManager->updateView();
3419// } 3485// }
3420 3486
3421void CalendarView::appointment_show() 3487void CalendarView::appointment_show()
3422{ 3488{
3423 Event *anEvent = 0; 3489 Event *anEvent = 0;
3424 3490
3425 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 3491 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
3426 3492
3427 if (mViewManager->currentView()->isEventView()) { 3493 if (mViewManager->currentView()->isEventView()) {
3428 if ( incidence && incidence->typeID() == eventID ) { 3494 if ( incidence && incidence->typeID() == eventID ) {
3429 anEvent = static_cast<Event *>(incidence); 3495 anEvent = static_cast<Event *>(incidence);
3430 } 3496 }
3431 } 3497 }
3432 3498
3433 if (!anEvent) { 3499 if (!anEvent) {
3434 KNotifyClient::beep(); 3500 KNotifyClient::beep();
3435 return; 3501 return;
3436 } 3502 }
3437 3503
3438 showEvent(anEvent); 3504 showEvent(anEvent);
3439} 3505}
3440 3506
3441void CalendarView::appointment_edit() 3507void CalendarView::appointment_edit()
3442{ 3508{
3443 Event *anEvent = 0; 3509 Event *anEvent = 0;
3444 3510
3445 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 3511 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
3446 3512
3447 if (mViewManager->currentView()->isEventView()) { 3513 if (mViewManager->currentView()->isEventView()) {
3448 if ( incidence && incidence->typeID() == eventID ) { 3514 if ( incidence && incidence->typeID() == eventID ) {
3449 anEvent = static_cast<Event *>(incidence); 3515 anEvent = static_cast<Event *>(incidence);
3450 } 3516 }
3451 } 3517 }
3452 3518
3453 if (!anEvent) { 3519 if (!anEvent) {
3454 KNotifyClient::beep(); 3520 KNotifyClient::beep();
3455 return; 3521 return;
3456 } 3522 }
3457 3523
3458 editEvent(anEvent); 3524 editEvent(anEvent);
3459} 3525}
3460 3526
3461void CalendarView::appointment_delete() 3527void CalendarView::appointment_delete()
3462{ 3528{
3463 Event *anEvent = 0; 3529 Event *anEvent = 0;
3464 3530
3465 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 3531 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
3466 3532
3467 if (mViewManager->currentView()->isEventView()) { 3533 if (mViewManager->currentView()->isEventView()) {
3468 if ( incidence && incidence->typeID() == eventID ) { 3534 if ( incidence && incidence->typeID() == eventID ) {
3469 anEvent = static_cast<Event *>(incidence); 3535 anEvent = static_cast<Event *>(incidence);
3470 } 3536 }
3471 } 3537 }
3472 3538
3473 if (!anEvent) { 3539 if (!anEvent) {
3474 KNotifyClient::beep(); 3540 KNotifyClient::beep();
3475 return; 3541 return;
3476 } 3542 }
3477 3543
3478 deleteEvent(anEvent); 3544 deleteEvent(anEvent);
3479} 3545}
3480 3546
3481void CalendarView::todo_resub( Todo * parent, Todo * sub ) 3547void CalendarView::todo_resub( Todo * parent, Todo * sub )
3482{ 3548{
3483 if (!sub) return; 3549 if (!sub) return;
3484 if ( sub->relatedTo() == parent ) 3550 if ( sub->relatedTo() == parent )
3485 return; 3551 return;
3486 sub->setRelatedTo(parent); 3552 sub->setRelatedTo(parent);
3487 sub->updated(); 3553 sub->updated();
3488 setModified(true); 3554 setModified(true);
3489 updateView(); 3555 updateView();
3490} 3556}
3491void CalendarView::todo_unsub(Todo *anTodo ) 3557void CalendarView::todo_unsub(Todo *anTodo )
3492{ 3558{
3493 todo_resub( 0, anTodo ); 3559 todo_resub( 0, anTodo );
3494} 3560}
3495 3561
3496void CalendarView::deleteTodo(Todo *todo) 3562void CalendarView::deleteTodo(Todo *todo)
3497{ 3563{
3498 if (!todo) { 3564 if (!todo) {
3499 KNotifyClient::beep(); 3565 KNotifyClient::beep();
3500 return; 3566 return;
3501 } 3567 }
3502 if (KOPrefs::instance()->mConfirm) { 3568 if (KOPrefs::instance()->mConfirm) {
3503 QString text = todo->summary().left(20); 3569 QString text = KGlobal::formatMessage ( todo->summary(),0 );
3504 if (!todo->relations().isEmpty()) { 3570 if (!todo->relations().isEmpty()) {
3505 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); 3571 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!");
3506 3572
3507 } 3573 }
3508 switch (msgItemDelete(i18n("Todo:") +"\n"+text)) { 3574 switch (msgItemDelete(i18n("Todo:") +"\n"+text)) {
3509 case KMessageBox::Continue: // OK 3575 case KMessageBox::Continue: // OK
3510 bool deleteT = false; 3576 bool deleteT = false;
3511 if (!todo->relations().isEmpty()) { 3577 if (!todo->relations().isEmpty()) {
3512 deleteT = removeCompletedSubTodos( todo ); 3578 deleteT = removeCompletedSubTodos( todo );
3513 } 3579 }
3514 // deleteT == true: todo already deleted in removeCompletedSubTodos 3580 // deleteT == true: todo already deleted in removeCompletedSubTodos
3515 if ( !deleteT ) { 3581 if ( !deleteT ) {
3516 checkExternalId( todo ); 3582 checkExternalId( todo );
3517 calendar()->deleteTodo(todo); 3583 calendar()->deleteTodo(todo);
3518 changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); 3584 changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
3519 updateView(); 3585 updateView();
3520 } 3586 }
3521 break; 3587 break;
3522 } // switch 3588 } // switch
3523 } else { 3589 } else {
3524 checkExternalId( todo ); 3590 checkExternalId( todo );
3525 mCalendar->deleteTodo(todo); 3591 mCalendar->deleteTodo(todo);
3526 changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); 3592 changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
3527 updateView(); 3593 updateView();
3528 } 3594 }
3529 3595
3530 emit updateSearchDialog(); 3596 emit updateSearchDialog();
3531} 3597}
3532void CalendarView::deleteJournal(Journal *jour) 3598void CalendarView::deleteJournal(Journal *jour)
3533{ 3599{
3534 if (!jour) { 3600 if (!jour) {
3535 KNotifyClient::beep(); 3601 KNotifyClient::beep();
3536 return; 3602 return;
3537 } 3603 }
3538 if (KOPrefs::instance()->mConfirm) { 3604 if (KOPrefs::instance()->mConfirm) {
3539 3605
3540 QString des; 3606 QString des;
3541 if ( !jour->summary().isEmpty() ) { 3607 if ( !jour->summary().isEmpty() ) {
3542 des = jour->summary(); 3608 des = jour->summary();
3543 } else { 3609 } else {
3544 des = jour->description().left(30); 3610 des = jour->description().left(30);
3545 des = des.simplifyWhiteSpace (); 3611 des = des.simplifyWhiteSpace ();
3546 des.replace (QRegExp ("\\n"),"" ); 3612 des.replace (QRegExp ("\\n"),"" );
3547 des.replace (QRegExp ("\\r"),"" ); 3613 des.replace (QRegExp ("\\r"),"" );
3548 } 3614 }
3549 switch (msgItemDelete( i18n("Journal:") +"\n"+des.left(20))) { 3615 switch (msgItemDelete( i18n("Journal:") +"\n"+KGlobal::formatMessage ( des,0 ))) {
3550 case KMessageBox::Continue: // OK 3616 case KMessageBox::Continue: // OK
3551 calendar()->deleteJournal(jour); 3617 calendar()->deleteJournal(jour);
3552 updateView(); 3618 updateView();
3553 break; 3619 break;
3554 } // switch 3620 } // switch
3555 } else { 3621 } else {
3556 calendar()->deleteJournal(jour);; 3622 calendar()->deleteJournal(jour);;
3557 updateView(); 3623 updateView();
3558 } 3624 }
3559 emit updateSearchDialog(); 3625 emit updateSearchDialog();
3560} 3626}
3561 3627
3562void CalendarView::deleteEvent(Event *anEvent) 3628void CalendarView::deleteEvent(Event *anEvent)
3563{ 3629{
3564 if (!anEvent) { 3630 if (!anEvent) {
3565 KNotifyClient::beep(); 3631 KNotifyClient::beep();
3566 return; 3632 return;
3567 } 3633 }
3568 3634
3569 if (anEvent->recurrence()->doesRecur()) { 3635 if (anEvent->recurrence()->doesRecur()) {
3570 QDate itemDate = mViewManager->currentSelectionDate(); 3636 QDate itemDate = mViewManager->currentSelectionDate();
3571 int km; 3637 int km;
3572 if (!itemDate.isValid()) { 3638 if (!itemDate.isValid()) {
3573 //kdDebug() << "Date Not Valid" << endl; 3639 //kdDebug() << "Date Not Valid" << endl;
3574 if (KOPrefs::instance()->mConfirm) { 3640 if (KOPrefs::instance()->mConfirm) {
3575 km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + 3641 km = KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) +
3576 i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), 3642 i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"),
3577 i18n("KO/Pi Confirmation"),i18n("Delete All")); 3643 i18n("KO/Pi Confirmation"),i18n("Delete All"));
3578 if ( km == KMessageBox::Continue ) 3644 if ( km == KMessageBox::Continue )
3579 km = KMessageBox::No; // No = all below 3645 km = KMessageBox::No; // No = all below
3580 } else 3646 } else
3581 km = KMessageBox::No; 3647 km = KMessageBox::No;
3582 } else { 3648 } else {
3583 km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) + 3649 km = KMessageBox::warningYesNoCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) +
3584 i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ 3650 i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+
3585 KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), 3651 KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"),
3586 i18n("KO/Pi Confirmation"),i18n("Current"), 3652 i18n("KO/Pi Confirmation"),i18n("Current"),
3587 i18n("All")); 3653 i18n("All"));
3588 } 3654 }
3589 switch(km) { 3655 switch(km) {
3590 3656
3591 case KMessageBox::No: // Continue // all 3657 case KMessageBox::No: // Continue // all
3592 //qDebug("KMessageBox::No "); 3658 //qDebug("KMessageBox::No ");
3593 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) 3659 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0)
3594 schedule(Scheduler::Cancel,anEvent); 3660 schedule(Scheduler::Cancel,anEvent);
3595 3661
3596 checkExternalId( anEvent); 3662 checkExternalId( anEvent);
3597 mCalendar->deleteEvent(anEvent); 3663 mCalendar->deleteEvent(anEvent);
3598 changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); 3664 changeEventDisplay(anEvent,KOGlobals::EVENTDELETED);
3599 break; 3665 break;
3600 3666
3601 // Disabled because it does not work 3667 // Disabled because it does not work
3602 //#if 0 3668 //#if 0
3603 case KMessageBox::Yes: // just this one 3669 case KMessageBox::Yes: // just this one
3604 //QDate qd = mNavigator->selectedDates().first(); 3670 //QDate qd = mNavigator->selectedDates().first();
3605 //if (!qd.isValid()) { 3671 //if (!qd.isValid()) {
3606 // kdDebug() << "no date selected, or invalid date" << endl; 3672 // kdDebug() << "no date selected, or invalid date" << endl;
3607 // KNotifyClient::beep(); 3673 // KNotifyClient::beep();
3608 // return; 3674 // return;
3609 //} 3675 //}
3610 //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); 3676 //while (!anEvent->recursOn(qd)) qd = qd.addDays(1);
3611 if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { 3677 if (itemDate!=QDate(1,1,1) || itemDate.isValid()) {
3612 anEvent->addExDate(itemDate); 3678 anEvent->addExDate(itemDate);
3613 int duration = anEvent->recurrence()->duration(); 3679 int duration = anEvent->recurrence()->duration();
3614 if ( duration > 0 ) { 3680 if ( duration > 0 ) {
3615 anEvent->recurrence()->setDuration( duration - 1 ); 3681 anEvent->recurrence()->setDuration( duration - 1 );
3616 } 3682 }
3617 changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); 3683 changeEventDisplay(anEvent, KOGlobals::EVENTEDITED);
3618 } 3684 }
3619 break; 3685 break;
3620 //#endif 3686 //#endif
3621 } // switch 3687 } // switch
3622 } else { 3688 } else {
3623 if (KOPrefs::instance()->mConfirm) { 3689 if (KOPrefs::instance()->mConfirm) {
3624 switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + 3690 switch (KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) +
3625 i18n("\nAre you sure you want\nto delete this event?"), 3691 i18n("\nAre you sure you want\nto delete this event?"),
3626 i18n("KO/Pi Confirmation"),i18n("Delete"))) { 3692 i18n("KO/Pi Confirmation"),i18n("Delete"))) {
3627 case KMessageBox::Continue: // OK 3693 case KMessageBox::Continue: // OK
3628 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) 3694 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0)
3629 schedule(Scheduler::Cancel,anEvent); 3695 schedule(Scheduler::Cancel,anEvent);
3630 checkExternalId( anEvent); 3696 checkExternalId( anEvent);
3631 mCalendar->deleteEvent(anEvent); 3697 mCalendar->deleteEvent(anEvent);
3632 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 3698 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
3633 break; 3699 break;
3634 } // switch 3700 } // switch
3635 } else { 3701 } else {
3636 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) 3702 if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0)
3637 schedule(Scheduler::Cancel,anEvent); 3703 schedule(Scheduler::Cancel,anEvent);
3638 checkExternalId( anEvent); 3704 checkExternalId( anEvent);
3639 mCalendar->deleteEvent(anEvent); 3705 mCalendar->deleteEvent(anEvent);
3640 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 3706 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
3641 } 3707 }
3642 } // if-else 3708 } // if-else
3643 emit updateSearchDialog(); 3709 emit updateSearchDialog();
3644} 3710}
3645 3711
3646bool CalendarView::deleteEvent(const QString &uid) 3712bool CalendarView::deleteEvent(const QString &uid)
3647{ 3713{
3648 Event *ev = mCalendar->event(uid); 3714 Event *ev = mCalendar->event(uid);
3649 if (ev) { 3715 if (ev) {
3650 deleteEvent(ev); 3716 deleteEvent(ev);
3651 return true; 3717 return true;
3652 } else { 3718 } else {
3653 return false; 3719 return false;
3654 } 3720 }
3655} 3721}
3656 3722
3657/*****************************************************************************/ 3723/*****************************************************************************/
3658 3724
3659void CalendarView::action_mail() 3725void CalendarView::action_mail()
3660{ 3726{
3661#ifndef KORG_NOMAIL 3727#ifndef KORG_NOMAIL
3662 KOMailClient mailClient; 3728 KOMailClient mailClient;
3663 3729
3664 Incidence *incidence = currentSelection(); 3730 Incidence *incidence = currentSelection();
3665 3731
3666 if (!incidence) { 3732 if (!incidence) {
3667 KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); 3733 KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected."));
3668 return; 3734 return;
3669 } 3735 }
3670 if(incidence->attendeeCount() == 0 ) { 3736 if(incidence->attendeeCount() == 0 ) {
3671 KMessageBox::sorry(this, 3737 KMessageBox::sorry(this,
3672 i18n("Can't generate mail:\nNo attendees defined.\n")); 3738 i18n("Can't generate mail:\nNo attendees defined.\n"));
3673 return; 3739 return;
3674 } 3740 }
3675 3741
3676 CalendarLocal cal_tmp; 3742 CalendarLocal cal_tmp;
3677 Event *event = 0; 3743 Event *event = 0;
3678 Event *ev = 0; 3744 Event *ev = 0;
3679 if ( incidence && incidence->typeID() == eventID ) { 3745 if ( incidence && incidence->typeID() == eventID ) {
3680 event = static_cast<Event *>(incidence); 3746 event = static_cast<Event *>(incidence);
3681 ev = new Event(*event); 3747 ev = new Event(*event);
3682 cal_tmp.addEvent(ev); 3748 cal_tmp.addEvent(ev);
3683 } 3749 }
3684 ICalFormat mForm(); 3750 ICalFormat mForm();
3685 QString attachment = mForm.toString( &cal_tmp ); 3751 QString attachment = mForm.toString( &cal_tmp );
3686 if (ev) delete(ev); 3752 if (ev) delete(ev);
3687 3753
3688 mailClient.mailAttendees(currentSelection(), attachment); 3754 mailClient.mailAttendees(currentSelection(), attachment);
3689 3755
3690#endif 3756#endif
3691 3757
3692#if 0 3758#if 0
3693 Event *anEvent = 0; 3759 Event *anEvent = 0;
3694 if (mViewManager->currentView()->isEventView()) { 3760 if (mViewManager->currentView()->isEventView()) {
3695 anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first()); 3761 anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first());
3696 } 3762 }
3697 3763
3698 if (!anEvent) { 3764 if (!anEvent) {
3699 KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); 3765 KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected."));
3700 return; 3766 return;
3701 } 3767 }
3702 if(anEvent->attendeeCount() == 0 ) { 3768 if(anEvent->attendeeCount() == 0 ) {
3703 KMessageBox::sorry(this, 3769 KMessageBox::sorry(this,
3704 i18n("Can't generate mail:\nNo attendees defined.\n")); 3770 i18n("Can't generate mail:\nNo attendees defined.\n"));
3705 return; 3771 return;
3706 } 3772 }
3707 3773
3708 mailobject.emailEvent(anEvent); 3774 mailobject.emailEvent(anEvent);
3709#endif 3775#endif
3710} 3776}
3711 3777
3712 3778
3713void CalendarView::schedule_publish(Incidence *incidence) 3779void CalendarView::schedule_publish(Incidence *incidence)
3714{ 3780{
3715 Event *event = 0; 3781 Event *event = 0;
3716 Todo *todo = 0; 3782 Todo *todo = 0;
3717 3783
3718 if (incidence == 0) { 3784 if (incidence == 0) {
3719 incidence = mViewManager->currentView()->selectedIncidences().first(); 3785 incidence = mViewManager->currentView()->selectedIncidences().first();
3720 if (incidence == 0) { 3786 if (incidence == 0) {
3721 incidence = mTodoList->selectedIncidences().first(); 3787 incidence = mTodoList->selectedIncidences().first();
3722 } 3788 }
3723 } 3789 }
3724 if ( incidence && incidence->typeID() == eventID ) { 3790 if ( incidence && incidence->typeID() == eventID ) {
3725 event = static_cast<Event *>(incidence); 3791 event = static_cast<Event *>(incidence);
3726 } else { 3792 } else {
3727 if ( incidence && incidence->typeID() == todoID ) { 3793 if ( incidence && incidence->typeID() == todoID ) {
3728 todo = static_cast<Todo *>(incidence); 3794 todo = static_cast<Todo *>(incidence);
3729 } 3795 }
3730 } 3796 }
3731 3797
3732 if (!event && !todo) { 3798 if (!event && !todo) {
3733 KMessageBox::sorry(this,i18n("No event selected.")); 3799 KMessageBox::sorry(this,i18n("No event selected."));
3734 return; 3800 return;
3735 } 3801 }
3736 3802
3737 PublishDialog *publishdlg = new PublishDialog(); 3803 PublishDialog *publishdlg = new PublishDialog();
3738 if (incidence->attendeeCount()>0) { 3804 if (incidence->attendeeCount()>0) {
3739 QPtrList<Attendee> attendees = incidence->attendees(); 3805 QPtrList<Attendee> attendees = incidence->attendees();
3740 attendees.first(); 3806 attendees.first();
3741 while ( attendees.current()!=0 ) { 3807 while ( attendees.current()!=0 ) {
3742 publishdlg->addAttendee(attendees.current()); 3808 publishdlg->addAttendee(attendees.current());
3743 attendees.next(); 3809 attendees.next();
3744 } 3810 }
3745 } 3811 }
3746 bool send = true; 3812 bool send = true;
3747 if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) { 3813 if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) {
3748 if ( publishdlg->exec() != QDialog::Accepted ) 3814 if ( publishdlg->exec() != QDialog::Accepted )
3749 send = false; 3815 send = false;
3750 } 3816 }
3751 if ( send ) { 3817 if ( send ) {
3752 OutgoingDialog *dlg = mDialogManager->outgoingDialog(); 3818 OutgoingDialog *dlg = mDialogManager->outgoingDialog();
3753 if ( event ) { 3819 if ( event ) {
3754 Event *ev = new Event(*event); 3820 Event *ev = new Event(*event);
3755 ev->registerObserver(0); 3821 ev->registerObserver(0);
3756 ev->clearAttendees(); 3822 ev->clearAttendees();
3757 if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { 3823 if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) {
3758 delete(ev); 3824 delete(ev);
3759 } 3825 }
3760 } else { 3826 } else {
3761 if ( todo ) { 3827 if ( todo ) {
3762 Todo *ev = new Todo(*todo); 3828 Todo *ev = new Todo(*todo);
3763 ev->registerObserver(0); 3829 ev->registerObserver(0);
3764 ev->clearAttendees(); 3830 ev->clearAttendees();
3765 if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { 3831 if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) {
3766 delete(ev); 3832 delete(ev);
3767 } 3833 }
3768 } 3834 }
3769 } 3835 }
3770 } 3836 }
3771 delete publishdlg; 3837 delete publishdlg;
3772} 3838}
3773 3839
3774void CalendarView::schedule_request(Incidence *incidence) 3840void CalendarView::schedule_request(Incidence *incidence)
3775{ 3841{
3776 schedule(Scheduler::Request,incidence); 3842 schedule(Scheduler::Request,incidence);
3777} 3843}
3778 3844
3779void CalendarView::schedule_refresh(Incidence *incidence) 3845void CalendarView::schedule_refresh(Incidence *incidence)
3780{ 3846{
3781 schedule(Scheduler::Refresh,incidence); 3847 schedule(Scheduler::Refresh,incidence);
3782} 3848}
3783 3849
3784void CalendarView::schedule_cancel(Incidence *incidence) 3850void CalendarView::schedule_cancel(Incidence *incidence)
3785{ 3851{
3786 schedule(Scheduler::Cancel,incidence); 3852 schedule(Scheduler::Cancel,incidence);
3787} 3853}
3788 3854
3789void CalendarView::schedule_add(Incidence *incidence) 3855void CalendarView::schedule_add(Incidence *incidence)
3790{ 3856{
3791 schedule(Scheduler::Add,incidence); 3857 schedule(Scheduler::Add,incidence);
3792} 3858}
3793 3859
3794void CalendarView::schedule_reply(Incidence *incidence) 3860void CalendarView::schedule_reply(Incidence *incidence)
3795{ 3861{
3796 schedule(Scheduler::Reply,incidence); 3862 schedule(Scheduler::Reply,incidence);
3797} 3863}
3798 3864
3799void CalendarView::schedule_counter(Incidence *incidence) 3865void CalendarView::schedule_counter(Incidence *incidence)
3800{ 3866{
3801 schedule(Scheduler::Counter,incidence); 3867 schedule(Scheduler::Counter,incidence);
3802} 3868}
3803 3869
3804void CalendarView::schedule_declinecounter(Incidence *incidence) 3870void CalendarView::schedule_declinecounter(Incidence *incidence)
3805{ 3871{
3806 schedule(Scheduler::Declinecounter,incidence); 3872 schedule(Scheduler::Declinecounter,incidence);
3807} 3873}
3808 3874
3809void CalendarView::schedule_publish_freebusy(int daysToPublish) 3875void CalendarView::schedule_publish_freebusy(int daysToPublish)
3810{ 3876{
3811 QDateTime start = QDateTime::currentDateTime(); 3877 QDateTime start = QDateTime::currentDateTime();
3812 QDateTime end = start.addDays(daysToPublish); 3878 QDateTime end = start.addDays(daysToPublish);
3813 3879
3814 FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); 3880 FreeBusy *freebusy = new FreeBusy(mCalendar, start, end);
3815 freebusy->setOrganizer(KOPrefs::instance()->email()); 3881 freebusy->setOrganizer(KOPrefs::instance()->email());
3816 3882
3817 3883
3818 PublishDialog *publishdlg = new PublishDialog(); 3884 PublishDialog *publishdlg = new PublishDialog();
3819 if ( publishdlg->exec() == QDialog::Accepted ) { 3885 if ( publishdlg->exec() == QDialog::Accepted ) {
3820 OutgoingDialog *dlg = mDialogManager->outgoingDialog(); 3886 OutgoingDialog *dlg = mDialogManager->outgoingDialog();
3821 if (!dlg->addMessage(freebusy,Scheduler::Publish,publishdlg->addresses())) { 3887 if (!dlg->addMessage(freebusy,Scheduler::Publish,publishdlg->addresses())) {
3822 delete(freebusy); 3888 delete(freebusy);
3823 } 3889 }
3824 } 3890 }
3825 delete publishdlg; 3891 delete publishdlg;
3826} 3892}
3827 3893
3828void CalendarView::schedule(Scheduler::Method method, Incidence *incidence) 3894void CalendarView::schedule(Scheduler::Method method, Incidence *incidence)
3829{ 3895{
3830 Event *event = 0; 3896 Event *event = 0;
3831 Todo *todo = 0; 3897 Todo *todo = 0;
3832 3898
3833 if (incidence == 0) { 3899 if (incidence == 0) {
3834 incidence = mViewManager->currentView()->selectedIncidences().first(); 3900 incidence = mViewManager->currentView()->selectedIncidences().first();
3835 if (incidence == 0) { 3901 if (incidence == 0) {
3836 incidence = mTodoList->selectedIncidences().first(); 3902 incidence = mTodoList->selectedIncidences().first();
3837 } 3903 }
3838 } 3904 }
3839 if ( incidence && incidence->typeID() == eventID ) { 3905 if ( incidence && incidence->typeID() == eventID ) {
3840 event = static_cast<Event *>(incidence); 3906 event = static_cast<Event *>(incidence);
3841 } 3907 }
3842 if ( incidence && incidence->typeID() == todoID ) { 3908 if ( incidence && incidence->typeID() == todoID ) {
3843 todo = static_cast<Todo *>(incidence); 3909 todo = static_cast<Todo *>(incidence);
3844 } 3910 }
3845 3911
3846 if (!event && !todo) { 3912 if (!event && !todo) {
3847 KMessageBox::sorry(this,i18n("No event selected.")); 3913 KMessageBox::sorry(this,i18n("No event selected."));
3848 return; 3914 return;
3849 } 3915 }
3850 3916
3851 if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) { 3917 if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) {
3852 KMessageBox::sorry(this,i18n("The event has no attendees.")); 3918 KMessageBox::sorry(this,i18n("The event has no attendees."));
3853 return; 3919 return;
3854 } 3920 }
3855 3921
3856 Event *ev = 0; 3922 Event *ev = 0;
3857 if (event) ev = new Event(*event); 3923 if (event) ev = new Event(*event);
3858 Todo *to = 0; 3924 Todo *to = 0;
3859 if (todo) to = new Todo(*todo); 3925 if (todo) to = new Todo(*todo);
3860 3926
3861 if (method == Scheduler::Reply || method == Scheduler::Refresh) { 3927 if (method == Scheduler::Reply || method == Scheduler::Refresh) {
3862 Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); 3928 Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email());
3863 if (!me) { 3929 if (!me) {
3864 KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails.")); 3930 KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails."));
3865 return; 3931 return;
3866 } 3932 }
3867 if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) { 3933 if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) {
3868 StatusDialog *statdlg = new StatusDialog(this); 3934 StatusDialog *statdlg = new StatusDialog(this);
3869 if (!statdlg->exec()==QDialog::Accepted) return; 3935 if (!statdlg->exec()==QDialog::Accepted) return;
3870 me->setStatus( statdlg->status() ); 3936 me->setStatus( statdlg->status() );
3871 delete(statdlg); 3937 delete(statdlg);
3872 } 3938 }
3873 Attendee *menew = new Attendee(*me); 3939 Attendee *menew = new Attendee(*me);
3874 if (ev) { 3940 if (ev) {
3875 ev->clearAttendees(); 3941 ev->clearAttendees();
3876 ev->addAttendee(menew,false); 3942 ev->addAttendee(menew,false);
3877 } else { 3943 } else {
3878 if (to) { 3944 if (to) {
3879 todo->clearAttendees(); 3945 todo->clearAttendees();
3880 todo->addAttendee(menew,false); 3946 todo->addAttendee(menew,false);
3881 } 3947 }
3882 } 3948 }
3883 } 3949 }
3884 3950
3885 OutgoingDialog *dlg = mDialogManager->outgoingDialog(); 3951 OutgoingDialog *dlg = mDialogManager->outgoingDialog();
3886 if (ev) { 3952 if (ev) {
3887 if ( !dlg->addMessage(ev,method) ) delete(ev); 3953 if ( !dlg->addMessage(ev,method) ) delete(ev);
3888 } else { 3954 } else {
3889 if (to) { 3955 if (to) {
3890 if ( !dlg->addMessage(to,method) ) delete(to); 3956 if ( !dlg->addMessage(to,method) ) delete(to);
3891 } 3957 }
3892 } 3958 }
3893} 3959}
3894 3960
3895void CalendarView::openAddressbook() 3961void CalendarView::openAddressbook()
3896{ 3962{
3897 KRun::runCommand("kaddressbook"); 3963 KRun::runCommand("kaddressbook");
3898} 3964}
3899 3965
3900void CalendarView::setModified(bool modified) 3966void CalendarView::setModified(bool modified)
3901{ 3967{
3902 if ( modified ) 3968 if ( modified )
3903 emit signalmodified(); 3969 emit signalmodified();
3904 if (mModified != modified) { 3970 if (mModified != modified) {
3905 mModified = modified; 3971 mModified = modified;
3906 emit modifiedChanged(mModified); 3972 emit modifiedChanged(mModified);
3907 } 3973 }
3908} 3974}
3909 3975
3910bool CalendarView::isReadOnly() 3976bool CalendarView::isReadOnly()
3911{ 3977{
3912 return mReadOnly; 3978 return mReadOnly;
3913} 3979}
3914 3980
3915void CalendarView::setReadOnly(bool readOnly) 3981void CalendarView::setReadOnly(bool readOnly)
3916{ 3982{
3917 if (mReadOnly != readOnly) { 3983 if (mReadOnly != readOnly) {
3918 mReadOnly = readOnly; 3984 mReadOnly = readOnly;
3919 emit readOnlyChanged(mReadOnly); 3985 emit readOnlyChanged(mReadOnly);
3920 } 3986 }
3921} 3987}
3922 3988
3923bool CalendarView::isModified() 3989bool CalendarView::isModified()
3924{ 3990{
3925 return mModified; 3991 return mModified;
3926} 3992}
3927void CalendarView::slotprintSelInc() 3993void CalendarView::slotprintSelInc()
3928{ 3994{
3929 if ( currentSelection() == 0 ) { 3995 if ( currentSelection() == 0 ) {
3930 KMessageBox::sorry(this,i18n("There is nothing selected!")); 3996 KMessageBox::sorry(this,i18n("There is nothing selected!"));
3931 return; 3997 return;
3932 } 3998 }
3933 showIncidence(); 3999 showIncidence();
3934 getEventViewerDialog()->print(); 4000 getEventViewerDialog()->print();
3935 4001
3936} 4002}
3937void CalendarView::printSetup() 4003void CalendarView::printSetup()
3938{ 4004{
3939#ifndef KORG_NOPRINTER 4005#ifndef KORG_NOPRINTER
3940 createPrinter(); 4006 createPrinter();
3941 4007
3942 mCalPrinter->setupPrinter(); 4008 mCalPrinter->setupPrinter();
3943#endif 4009#endif
3944} 4010}
3945 4011
3946void CalendarView::print() 4012void CalendarView::print()
3947{ 4013{
3948#ifndef KORG_NOPRINTER 4014#ifndef KORG_NOPRINTER
3949 createPrinter(); 4015 createPrinter();
3950 4016
3951 DateList tmpDateList = mNavigator->selectedDates(); 4017 DateList tmpDateList = mNavigator->selectedDates();
3952 mCalPrinter->print(CalPrinter::Month, 4018 mCalPrinter->print(CalPrinter::Month,
3953 tmpDateList.first(), tmpDateList.last()); 4019 tmpDateList.first(), tmpDateList.last());
3954#endif 4020#endif
3955} 4021}
3956 4022
3957void CalendarView::printPreview() 4023void CalendarView::printPreview()
3958{ 4024{
3959#ifndef KORG_NOPRINTER 4025#ifndef KORG_NOPRINTER
3960 kdDebug() << "CalendarView::printPreview()" << endl; 4026 kdDebug() << "CalendarView::printPreview()" << endl;
3961 4027
3962 createPrinter(); 4028 createPrinter();
3963 4029
3964 DateList tmpDateList = mNavigator->selectedDates(); 4030 DateList tmpDateList = mNavigator->selectedDates();
3965 4031
3966 mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(), 4032 mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(),
3967 tmpDateList.last()); 4033 tmpDateList.last());
3968#endif 4034#endif
3969} 4035}
3970 4036
3971void CalendarView::exportICalendar() 4037void CalendarView::exportICalendar()
3972{ 4038{
3973 QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); 4039 QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this);
3974 4040
3975 // Force correct extension 4041 // Force correct extension
3976 if (filename.right(4) != ".ics") filename += ".ics"; 4042 if (filename.right(4) != ".ics") filename += ".ics";
3977 4043
3978 FileStorage storage( mCalendar, filename, new ICalFormat() ); 4044 FileStorage storage( mCalendar, filename, new ICalFormat() );
3979 storage.save(); 4045 storage.save();
3980} 4046}
3981 4047
3982bool CalendarView::exportVCalendar( QString filename ) 4048bool CalendarView::exportVCalendar( QString filename )
3983{ 4049{
3984 if (mCalendar->journals().count() > 0) { 4050 if (mCalendar->journals().count() > 0) {
3985 int result = KMessageBox::warningContinueCancel(this, 4051 int result = KMessageBox::warningContinueCancel(this,
3986 i18n("The journal entries can not be\nexported to a vCalendar file."), 4052 i18n("The journal entries can not be\nexported to a vCalendar file."),
3987 i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), 4053 i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"),
3988 true); 4054 true);
3989 if (result != KMessageBox::Continue) return false; 4055 if (result != KMessageBox::Continue) return false;
3990 } 4056 }
3991 4057
3992 //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this); 4058 //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this);
3993 4059
3994 // Force correct extension 4060 // Force correct extension
3995 if (filename.right(4) != ".vcs") filename += ".vcs"; 4061 if (filename.right(4) != ".vcs") filename += ".vcs";
3996 4062
3997 FileStorage storage( mCalendar, filename, new VCalFormat ); 4063 FileStorage storage( mCalendar, filename, new VCalFormat );
3998 return storage.save(); 4064 return storage.save();
3999 4065
4000} 4066}
4001 4067
4002void CalendarView::eventUpdated(Incidence *) 4068void CalendarView::eventUpdated(Incidence *)
4003{ 4069{
4004 setModified(); 4070 setModified();
4005 // Don't call updateView here. The code, which has caused the update of the 4071 // Don't call updateView here. The code, which has caused the update of the
4006 // event is responsible for updating the view. 4072 // event is responsible for updating the view.
4007 // updateView(); 4073 // updateView();
4008} 4074}
4009 4075
4010void CalendarView::adaptNavigationUnits() 4076void CalendarView::adaptNavigationUnits()
4011{ 4077{
4012 if (mViewManager->currentView()->isEventView()) { 4078 if (mViewManager->currentView()->isEventView()) {
4013 int days = mViewManager->currentView()->currentDateCount(); 4079 int days = mViewManager->currentView()->currentDateCount();
4014 if (days == 1) { 4080 if (days == 1) {
4015 emit changeNavStringPrev(i18n("&Previous Day")); 4081 emit changeNavStringPrev(i18n("&Previous Day"));
4016 emit changeNavStringNext(i18n("&Next Day")); 4082 emit changeNavStringNext(i18n("&Next Day"));
4017 } else { 4083 } else {
4018 emit changeNavStringPrev(i18n("&Previous Week")); 4084 emit changeNavStringPrev(i18n("&Previous Week"));
4019 emit changeNavStringNext(i18n("&Next Week")); 4085 emit changeNavStringNext(i18n("&Next Week"));
4020 } 4086 }
4021 } 4087 }
4022} 4088}
4023 4089
4024void CalendarView::processMainViewSelection( Incidence *incidence ) 4090void CalendarView::processMainViewSelection( Incidence *incidence )
4025{ 4091{
4026 if ( incidence ) mTodoList->clearSelection(); 4092 if ( incidence ) mTodoList->clearSelection();
4027 processIncidenceSelection( incidence ); 4093 processIncidenceSelection( incidence );
4028} 4094}
4029 4095
4030void CalendarView::processTodoListSelection( Incidence *incidence ) 4096void CalendarView::processTodoListSelection( Incidence *incidence )
4031{ 4097{
4032 if ( incidence && mViewManager->currentView() ) { 4098 if ( incidence && mViewManager->currentView() ) {
4033 mViewManager->currentView()->clearSelection(); 4099 mViewManager->currentView()->clearSelection();
4034 } 4100 }
4035 processIncidenceSelection( incidence ); 4101 processIncidenceSelection( incidence );
4036} 4102}
4037 4103
4038void CalendarView::processIncidenceSelection( Incidence *incidence ) 4104void CalendarView::processIncidenceSelection( Incidence *incidence )
4039{ 4105{
4040 emit incidenceSelected( incidence ); 4106 emit incidenceSelected( incidence );
4041 if ( incidence == mSelectedIncidence ) return; 4107 if ( incidence == mSelectedIncidence ) return;
4042 mSelectedIncidence = incidence; 4108 mSelectedIncidence = incidence;
4043 4109
4044 if ( incidence && incidence->typeID() == eventID ) { 4110 if ( incidence && incidence->typeID() == eventID ) {
4045 Event *event = static_cast<Event *>( incidence ); 4111 Event *event = static_cast<Event *>( incidence );
4046 if ( event->organizer() == KOPrefs::instance()->email() ) { 4112 if ( event->organizer() == KOPrefs::instance()->email() ) {
4047 emit organizerEventsSelected( true ); 4113 emit organizerEventsSelected( true );
4048 } else { 4114 } else {
4049 emit organizerEventsSelected(false); 4115 emit organizerEventsSelected(false);
4050 } 4116 }
4051 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, 4117 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
4052 KOPrefs::instance()->email() ) ) { 4118 KOPrefs::instance()->email() ) ) {
4053 emit groupEventsSelected( true ); 4119 emit groupEventsSelected( true );
4054 } else { 4120 } else {
4055 emit groupEventsSelected(false); 4121 emit groupEventsSelected(false);
4056 } 4122 }
4057 return; 4123 return;
4058 } else { 4124 } else {
4059 if ( incidence && incidence->typeID() == todoID ) { 4125 if ( incidence && incidence->typeID() == todoID ) {
4060 emit todoSelected( true ); 4126 emit todoSelected( true );
4061 Todo *event = static_cast<Todo *>( incidence ); 4127 Todo *event = static_cast<Todo *>( incidence );
4062 if ( event->organizer() == KOPrefs::instance()->email() ) { 4128 if ( event->organizer() == KOPrefs::instance()->email() ) {
4063 emit organizerEventsSelected( true ); 4129 emit organizerEventsSelected( true );
4064 } else { 4130 } else {
4065 emit organizerEventsSelected(false); 4131 emit organizerEventsSelected(false);
4066 } 4132 }
4067 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, 4133 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
4068 KOPrefs::instance()->email() ) ) { 4134 KOPrefs::instance()->email() ) ) {
4069 emit groupEventsSelected( true ); 4135 emit groupEventsSelected( true );
4070 } else { 4136 } else {
4071 emit groupEventsSelected(false); 4137 emit groupEventsSelected(false);
4072 } 4138 }
4073 return; 4139 return;
4074 } else { 4140 } else {
4075 emit todoSelected( false ); 4141 emit todoSelected( false );
4076 emit organizerEventsSelected(false); 4142 emit organizerEventsSelected(false);
4077 emit groupEventsSelected(false); 4143 emit groupEventsSelected(false);
4078 } 4144 }
4079 return; 4145 return;
4080 } 4146 }
4081 4147
4082 /* if ( incidence && incidence->typeID() == todoID ) { 4148 /* if ( incidence && incidence->typeID() == todoID ) {
4083 emit todoSelected( true ); 4149 emit todoSelected( true );
4084 } else { 4150 } else {
4085 emit todoSelected( false ); 4151 emit todoSelected( false );
4086 }*/ 4152 }*/
4087} 4153}
4088 4154
4089 4155
4090void CalendarView::checkClipboard() 4156void CalendarView::checkClipboard()
4091{ 4157{
4092#ifndef KORG_NODND 4158#ifndef KORG_NODND
4093 if (ICalDrag::canDecode(QApplication::clipboard()->data())) { 4159 if (ICalDrag::canDecode(QApplication::clipboard()->data())) {
4094 emit pasteEnabled(true); 4160 emit pasteEnabled(true);
4095 } else { 4161 } else {
4096 emit pasteEnabled(false); 4162 emit pasteEnabled(false);
4097 } 4163 }
4098#endif 4164#endif
4099} 4165}
4100 4166
4101void CalendarView::showDates(const DateList &selectedDates) 4167void CalendarView::showDates(const DateList &selectedDates)
4102{ 4168{
4103 // kdDebug() << "CalendarView::selectDates()" << endl; 4169 // kdDebug() << "CalendarView::selectDates()" << endl;
4104 4170
4105 4171
4106 if ( !mBlockShowDates ) { 4172 if ( !mBlockShowDates ) {
4107 if ( mViewManager->currentView() ) { 4173 if ( mViewManager->currentView() ) {
4108 updateView( selectedDates.first(), selectedDates.last() ); 4174 updateView( selectedDates.first(), selectedDates.last() );
4109 } else { 4175 } else {
4110 mViewManager->showAgendaView(); 4176 mViewManager->showAgendaView();
4111 } 4177 }
4112 } 4178 }
4113 4179
4114 QDate date = selectedDates.first(); 4180 QDate date = selectedDates.first();
4115 if ( ! date.isValid() ) { 4181 if ( ! date.isValid() ) {
4116 topLevelWidget()->setCaption(""); 4182 topLevelWidget()->setCaption("");
4117 return; 4183 return;
4118 } 4184 }
4119 4185
4120 QString selDates; 4186 QString selDates;
4121 selDates = KGlobal::locale()->formatDate( date, true); 4187 selDates = KGlobal::locale()->formatDate( date, true);
4122 if (selectedDates.first() < selectedDates.last() ) 4188 if (selectedDates.first() < selectedDates.last() )
4123 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); 4189 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true);
4124 else { 4190 else {
4125 QString addString; 4191 QString addString;
4126 if ( date == QDateTime::currentDateTime().date() ) 4192 if ( date == QDateTime::currentDateTime().date() )
4127 addString = i18n("Today"); 4193 addString = i18n("Today");
4128 else if ( date == QDateTime::currentDateTime().date().addDays(1) ) 4194 else if ( date == QDateTime::currentDateTime().date().addDays(1) )
4129 addString = i18n("Tomorrow"); 4195 addString = i18n("Tomorrow");
4130 else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) 4196 else if ( date == QDateTime::currentDateTime().date().addDays(-1) )
4131 addString = i18n("Yesterday"); 4197 addString = i18n("Yesterday");
4132 else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) 4198 else if ( date == QDateTime::currentDateTime().date().addDays(-2) )
4133 addString = i18n("Day before yesterday"); 4199 addString = i18n("Day before yesterday");
4134 else if ( date == QDateTime::currentDateTime().date().addDays(2) ) 4200 else if ( date == QDateTime::currentDateTime().date().addDays(2) )
4135 addString = i18n("Day after tomorrow"); 4201 addString = i18n("Day after tomorrow");
4136 if ( !addString.isEmpty() ) { 4202 if ( !addString.isEmpty() ) {
4137 topLevelWidget()->setCaption( addString+", " + selDates ); 4203 topLevelWidget()->setCaption( addString+", " + selDates );
4138 return; 4204 return;
4139 } 4205 }
4140 } 4206 }
4141 topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); 4207 topLevelWidget()->setCaption( i18n("Dates: ") + selDates );
4142 4208
4143} 4209}
4144 4210
4145QPtrList<CalFilter> CalendarView::filters() 4211QPtrList<CalFilter> CalendarView::filters()
4146{ 4212{
4147 return mFilters; 4213 return mFilters;
4148 4214
4149} 4215}
4150void CalendarView::editFilters() 4216void CalendarView::editFilters()
4151{ 4217{
4152 // kdDebug() << "CalendarView::editFilters()" << endl; 4218 // kdDebug() << "CalendarView::editFilters()" << endl;
4153 4219
4154 CalFilter *filter = mFilters.first(); 4220 CalFilter *filter = mFilters.first();
4155 while(filter) { 4221 while(filter) {
4156 filter = mFilters.next(); 4222 filter = mFilters.next();
4157 } 4223 }
4158 4224
4159 mDialogManager->showFilterEditDialog(&mFilters); 4225 mDialogManager->showFilterEditDialog(&mFilters);
4160 updateFilter(); 4226 updateFilter();
4161} 4227}
4162void CalendarView::toggleFilter() 4228void CalendarView::toggleFilter()
4163{ 4229{
4164 if ( mLeftFrame->isHidden() ) { 4230 if ( mLeftFrame->isHidden() ) {
4165 toggleExpand(); 4231 toggleExpand();
4166 showFilter( true ); 4232 showFilter( true );
4167 } else 4233 } else
4168 showFilter(! mCalEditView->isVisible()); 4234 showFilter(! mCalEditView->isVisible());
4169} 4235}
4170 4236
4171KOFilterView *CalendarView::filterView() 4237KOFilterView *CalendarView::filterView()
4172{ 4238{
4173 return mFilterView; 4239 return mFilterView;
4174} 4240}
4175void CalendarView::selectFilter( int fil ) 4241void CalendarView::selectFilter( int fil )
4176{ 4242{
4177 mFilterView->setSelectedFilter( fil ); 4243 mFilterView->setSelectedFilter( fil );
4178 updateUnmanagedViews(); 4244 updateUnmanagedViews();
4179} 4245}
4180void CalendarView::showFilter(bool visible) 4246void CalendarView::showFilter(bool visible)
4181{ 4247{
4182#if 1 4248#if 1
4183 if (visible) { 4249 if (visible) {
4184 mCalEditView->readConfig(); 4250 mCalEditView->readConfig();
4185 mCalEditView->show(); 4251 mCalEditView->show();
4186 QValueList<int> sizes; 4252 QValueList<int> sizes;
4187 sizes = mLeftFrame->sizes(); 4253 sizes = mLeftFrame->sizes();
4188 if ( sizes.count() == 4 && sizes[3] < 20 ) { 4254 if ( sizes.count() == 4 && sizes[3] < 20 ) {
4189 sizes.clear(); 4255 sizes.clear();
4190 sizes << 100; 4256 sizes << 100;
4191 sizes << 0; 4257 sizes << 0;
4192 sizes << 0; 4258 sizes << 0;
4193 sizes << 100; 4259 sizes << 100;
4194 mLeftFrame->setSizes(sizes); 4260 mLeftFrame->setSizes(sizes);
4195 } 4261 }
4196#if 0 4262#if 0
4197 sizes = mLeftFrame->sizes(); 4263 sizes = mLeftFrame->sizes();
4198 int ccc = 0; 4264 int ccc = 0;
4199 while ( ccc < sizes.count()) { 4265 while ( ccc < sizes.count()) {
4200 qDebug("size %d %d ", ccc, sizes[ccc]); 4266 qDebug("size %d %d ", ccc, sizes[ccc]);
4201 ++ccc; 4267 ++ccc;
4202 } 4268 }
4203#endif 4269#endif
4204 4270
4205 } 4271 }
4206 else { 4272 else {
4207 mCalEditView->hide(); 4273 mCalEditView->hide();
4208 } 4274 }
4209#else 4275#else
4210 if (visible) mFilterView->show(); 4276 if (visible) mFilterView->show();
4211 else mFilterView->hide(); 4277 else mFilterView->hide();
4212#endif 4278#endif
4213} 4279}
4214void CalendarView::toggleFilerEnabled( ) 4280void CalendarView::toggleFilerEnabled( )
4215{ 4281{
4216 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); 4282 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() );
4217 if ( !mFilterView->filtersEnabled() ) 4283 if ( !mFilterView->filtersEnabled() )
4218 topLevelWidget()->setCaption( i18n("Filter disabled ") ); 4284 topLevelWidget()->setCaption( i18n("Filter disabled ") );
4219 updateUnmanagedViews(); 4285 updateUnmanagedViews();
4220 4286
4221} 4287}
4222void CalendarView::updateFilter() 4288void CalendarView::updateFilter()
4223{ 4289{
4224 CalFilter *filter = mFilterView->selectedFilter(); 4290 CalFilter *filter = mFilterView->selectedFilter();
4225 if (filter) { 4291 if (filter) {
4226 QString mess; 4292 QString mess;
4227 if (mFilterView->filtersEnabled()) { 4293 if (mFilterView->filtersEnabled()) {
4228 mess = i18n("Filter selected: ")+filter->name(); 4294 mess = i18n("Filter selected: ")+filter->name();
4229 filter->setEnabled(true); 4295 filter->setEnabled(true);
4230 } 4296 }
4231 else filter->setEnabled(false); 4297 else filter->setEnabled(false);
4232 mCalendar->setFilter(filter); 4298 mCalendar->setFilter(filter);
4233 updateView(); 4299 updateView();
4234 if ( !mess.isEmpty() ) 4300 if ( !mess.isEmpty() )
4235 topLevelWidget()->setCaption( mess ); 4301 topLevelWidget()->setCaption( mess );
4236 4302
4237 } 4303 }
4238 emit filtersUpdated(); 4304 emit filtersUpdated();
4239} 4305}
4240 4306
4241void CalendarView::filterEdited() 4307void CalendarView::filterEdited()
4242{ 4308{
4243 mFilterView->updateFilters(); 4309 mFilterView->updateFilters();
4244 updateFilter(); 4310 updateFilter();
4245 writeSettings(); 4311 writeSettings();
4246} 4312}
4247 4313
4248 4314
4249void CalendarView::takeOverEvent() 4315void CalendarView::takeOverEvent()
4250{ 4316{
4251 Incidence *incidence = currentSelection(); 4317 Incidence *incidence = currentSelection();
4252 4318
4253 if (!incidence) return; 4319 if (!incidence) return;
4254 4320
4255 incidence->setOrganizer(KOPrefs::instance()->email()); 4321 incidence->setOrganizer(KOPrefs::instance()->email());
4256 incidence->recreate(); 4322 incidence->recreate();
4257 incidence->setReadOnly(false); 4323 incidence->setReadOnly(false);
4258 4324
4259 updateView(); 4325 updateView();
4260} 4326}
4261 4327
4262void CalendarView::takeOverCalendar() 4328void CalendarView::takeOverCalendar()
4263{ 4329{
4264 // TODO: Create Calendar::allIncidences() function and use it here 4330 // TODO: Create Calendar::allIncidences() function and use it here
4265 4331
4266 clearAllViews(); 4332 clearAllViews();
4267 QPtrList<Event> events = mCalendar->events(); 4333 QPtrList<Event> events = mCalendar->events();
4268 for(uint i=0; i<events.count(); ++i) { 4334 for(uint i=0; i<events.count(); ++i) {
4269 events.at(i)->setOrganizer(KOPrefs::instance()->email()); 4335 events.at(i)->setOrganizer(KOPrefs::instance()->email());
4270 events.at(i)->recreate(); 4336 events.at(i)->recreate();
4271 events.at(i)->setReadOnly(false); 4337 events.at(i)->setReadOnly(false);
4272 } 4338 }
4273 4339
4274 QPtrList<Todo> todos = mCalendar->todos(); 4340 QPtrList<Todo> todos = mCalendar->todos();
4275 for(uint i=0; i<todos.count(); ++i) { 4341 for(uint i=0; i<todos.count(); ++i) {
4276 todos.at(i)->setOrganizer(KOPrefs::instance()->email()); 4342 todos.at(i)->setOrganizer(KOPrefs::instance()->email());
4277 todos.at(i)->recreate(); 4343 todos.at(i)->recreate();
4278 todos.at(i)->setReadOnly(false); 4344 todos.at(i)->setReadOnly(false);
4279 } 4345 }
4280 4346
4281 QPtrList<Journal> journals = mCalendar->journals(); 4347 QPtrList<Journal> journals = mCalendar->journals();
4282 for(uint i=0; i<journals.count(); ++i) { 4348 for(uint i=0; i<journals.count(); ++i) {
4283 journals.at(i)->setOrganizer(KOPrefs::instance()->email()); 4349 journals.at(i)->setOrganizer(KOPrefs::instance()->email());
4284 journals.at(i)->recreate(); 4350 journals.at(i)->recreate();
4285 journals.at(i)->setReadOnly(false); 4351 journals.at(i)->setReadOnly(false);
4286 } 4352 }
4287 4353
4288 updateView(); 4354 updateView();
4289} 4355}
4290 4356
4291void CalendarView::showIntro() 4357void CalendarView::showIntro()
4292{ 4358{
4293 kdDebug() << "To be implemented." << endl; 4359 kdDebug() << "To be implemented." << endl;
4294} 4360}
4295 4361
4296QWidgetStack *CalendarView::viewStack() 4362QWidgetStack *CalendarView::viewStack()
4297{ 4363{
4298 return mRightFrame; 4364 return mRightFrame;
4299} 4365}
4300 4366
4301QWidget *CalendarView::leftFrame() 4367QWidget *CalendarView::leftFrame()
4302{ 4368{
4303 return ( QWidget *)mLeftFrame; 4369 return ( QWidget *)mLeftFrame;
4304} 4370}
4305 4371
4306DateNavigator *CalendarView::dateNavigator() 4372DateNavigator *CalendarView::dateNavigator()
4307{ 4373{
4308 return mNavigator; 4374 return mNavigator;
4309} 4375}
4310 4376
4311KDateNavigator* CalendarView::dateNavigatorWidget() 4377KDateNavigator* CalendarView::dateNavigatorWidget()
4312{ 4378{
4313 return mDateNavigator->navigatorView(); 4379 return mDateNavigator->navigatorView();
4314} 4380}
4315void CalendarView::toggleDateNavigatorWidget() 4381void CalendarView::toggleDateNavigatorWidget()
4316{ 4382{
4317 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; 4383 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ;
4318 4384
4319 if (!KOPrefs::instance()->mShowDateNavigator ) 4385 if (!KOPrefs::instance()->mShowDateNavigator )
4320 mDateNavigator->hide(); 4386 mDateNavigator->hide();
4321 else 4387 else
4322 mDateNavigator->show(); 4388 mDateNavigator->show();
4323} 4389}
4324void CalendarView::addView(KOrg::BaseView *view) 4390void CalendarView::addView(KOrg::BaseView *view)
4325{ 4391{
4326 mViewManager->addView(view); 4392 mViewManager->addView(view);
4327} 4393}
4328 4394
4329void CalendarView::showView(KOrg::BaseView *view) 4395void CalendarView::showView(KOrg::BaseView *view)
4330{ 4396{
4331 mViewManager->showView(view, mLeftFrame->isVisible()); 4397 mViewManager->showView(view, mLeftFrame->isVisible());
4332} 4398}
4333 4399
4334Incidence *CalendarView::currentSelection() 4400Incidence *CalendarView::currentSelection()
4335{ 4401{
4336 return mViewManager->currentSelection(); 4402 return mViewManager->currentSelection();
4337} 4403}
4338void CalendarView::toggleAllDaySize() 4404void CalendarView::toggleAllDaySize()
4339{ 4405{
4340 /* 4406 /*
4341 if ( KOPrefs::instance()->mAllDaySize > 47 ) 4407 if ( KOPrefs::instance()->mAllDaySize > 47 )
4342 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; 4408 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2;
4343 else 4409 else
4344 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; 4410 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2;
4345 */ 4411 */
4346 viewManager()->agendaView()->toggleAllDay(); 4412 viewManager()->agendaView()->toggleAllDay();
4347} 4413}
4348void CalendarView::toggleExpand() 4414void CalendarView::toggleExpand()
4349{ 4415{
4350 // if ( mLeftFrame->isHidden() ) { 4416 // if ( mLeftFrame->isHidden() ) {
4351 // mLeftFrame->show(); 4417 // mLeftFrame->show();
4352 // emit calendarViewExpanded( false ); 4418 // emit calendarViewExpanded( false );
4353 // } else { 4419 // } else {
4354 // mLeftFrame->hide(); 4420 // mLeftFrame->hide();
4355 // emit calendarViewExpanded( true ); 4421 // emit calendarViewExpanded( true );
4356 // } 4422 // }
4357 //qDebug(" CalendarView::toggleExpand()"); 4423 //qDebug(" CalendarView::toggleExpand()");
4358 globalFlagBlockAgenda = 1; 4424 globalFlagBlockAgenda = 1;
4359 emit calendarViewExpanded( !mLeftFrame->isHidden() ); 4425 emit calendarViewExpanded( !mLeftFrame->isHidden() );
4360 globalFlagBlockAgenda = 5; 4426 globalFlagBlockAgenda = 5;
4361 mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); 4427 mViewManager->raiseCurrentView( !mLeftFrame->isHidden() );
4362 //mViewManager->showView( 0, true ); 4428 //mViewManager->showView( 0, true );
4363} 4429}
4364 4430
4365void CalendarView::calendarModified( bool modified, Calendar * ) 4431void CalendarView::calendarModified( bool modified, Calendar * )
4366{ 4432{
4367 setModified( modified ); 4433 setModified( modified );
4368} 4434}
4369 4435
4370Todo *CalendarView::selectedTodo() 4436Todo *CalendarView::selectedTodo()
4371{ 4437{
4372 Incidence *incidence = currentSelection(); 4438 Incidence *incidence = currentSelection();
4373 if ( incidence && incidence->typeID() == todoID ) { 4439 if ( incidence && incidence->typeID() == todoID ) {
4374 return static_cast<Todo *>( incidence ); 4440 return static_cast<Todo *>( incidence );
4375 } 4441 }
4376 4442
4377 incidence = mTodoList->selectedIncidences().first(); 4443 incidence = mTodoList->selectedIncidences().first();
4378 if ( incidence && incidence->typeID() == todoID ) { 4444 if ( incidence && incidence->typeID() == todoID ) {
4379 return static_cast<Todo *>( incidence ); 4445 return static_cast<Todo *>( incidence );
4380 } 4446 }
4381 4447
4382 return 0; 4448 return 0;
4383} 4449}
4384 4450
4385void CalendarView::showIncidence() 4451void CalendarView::showIncidence()
4386{ 4452{
4387 mViewerCallerIsSearchDialog = false; 4453 mViewerCallerIsSearchDialog = false;
4388 Incidence *incidence = currentSelection(); 4454 Incidence *incidence = currentSelection();
4389 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 4455 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
4390 if ( incidence ) { 4456 if ( incidence ) {
4391 ShowIncidenceVisitor v; 4457 ShowIncidenceVisitor v;
4392 v.act( incidence, this ); 4458 v.act( incidence, this );
4393 } 4459 }
4394} 4460}
4395void CalendarView::editIncidenceDescription() 4461void CalendarView::editIncidenceDescription()
4396{ 4462{
4397 mFlagEditDescription = true; 4463 mFlagEditDescription = true;
4398 editIncidence(); 4464 editIncidence();
4399 mFlagEditDescription = false; 4465 mFlagEditDescription = false;
4400} 4466}
4401void CalendarView::editIncidence() 4467void CalendarView::editIncidence()
4402{ 4468{
4403 // qDebug("editIncidence() "); 4469 // qDebug("editIncidence() ");
4404 Incidence *incidence = currentSelection(); 4470 Incidence *incidence = currentSelection();
4405 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 4471 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
4406 if ( incidence ) { 4472 if ( incidence ) {
4407 EditIncidenceVisitor v; 4473 EditIncidenceVisitor v;
4408 v.act( incidence, this ); 4474 v.act( incidence, this );
4409 } 4475 }
4410} 4476}
4411 4477
4412void CalendarView::deleteIncidence() 4478void CalendarView::deleteIncidence()
4413{ 4479{
4414 Incidence *incidence = currentSelection(); 4480 Incidence *incidence = currentSelection();
4415 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 4481 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
4416 if ( incidence ) { 4482 if ( incidence ) {
4417 deleteIncidence(incidence); 4483 deleteIncidence(incidence);
4418 } 4484 }
4419} 4485}
4420void CalendarView::showIncidence(QString uid) 4486void CalendarView::showIncidence(QString uid)
4421{ 4487{
4422 Incidence *inc = mCalendar->incidence( uid ); 4488 Incidence *inc = mCalendar->incidence( uid );
4423 if ( inc ) 4489 if ( inc )
4424 showIncidence( inc ); 4490 showIncidence( inc );
4425} 4491}
4426void CalendarView::showIncidence(Incidence *incidence) 4492void CalendarView::showIncidence(Incidence *incidence)
4427{ 4493{
4428 mViewerCallerIsSearchDialog = false; 4494 mViewerCallerIsSearchDialog = false;
4429 //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() ); 4495 //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() );
4430 if ( sender() && mDialogManager->getSearchDialog() ) { 4496 if ( sender() && mDialogManager->getSearchDialog() ) {
4431 if ( sender () == mDialogManager->getSearchDialog()->listview() ) { 4497 if ( sender () == mDialogManager->getSearchDialog()->listview() ) {
4432 mViewerCallerIsSearchDialog = true; 4498 mViewerCallerIsSearchDialog = true;
4433 } 4499 }
4434 } 4500 }
4435 if ( incidence ) { 4501 if ( incidence ) {
4436 ShowIncidenceVisitor v; 4502 ShowIncidenceVisitor v;
4437 v.act( incidence, this ); 4503 v.act( incidence, this );
4438 } 4504 }
4439} 4505}
4440 4506
4441void CalendarView::editIncidence(Incidence *incidence) 4507void CalendarView::editIncidence(Incidence *incidence)
4442{ 4508{
4443 if ( incidence ) { 4509 if ( incidence ) {
4444 4510
4445 EditIncidenceVisitor v; 4511 EditIncidenceVisitor v;
4446 v.act( incidence, this ); 4512 v.act( incidence, this );
4447 4513
4448 } 4514 }
4449} 4515}
4450 4516
4451void CalendarView::deleteIncidence(Incidence *incidence) 4517void CalendarView::deleteIncidence(Incidence *incidence)
4452{ 4518{
4453 //qDebug(" CalendarView::deleteIncidence "); 4519 //qDebug(" CalendarView::deleteIncidence ");
4454 if ( incidence == 0 ) { 4520 if ( incidence == 0 ) {
4455 updateView(); 4521 updateView();
4456 emit updateSearchDialog(); 4522 emit updateSearchDialog();
4457 return; 4523 return;
4458 } 4524 }
4459 if ( incidence ) { 4525 if ( incidence ) {
4460 DeleteIncidenceVisitor v; 4526 DeleteIncidenceVisitor v;
4461 v.act( incidence, this ); 4527 v.act( incidence, this );
4462 } 4528 }
4463} 4529}
4464 4530
4465 4531
4466void CalendarView::lookForOutgoingMessages() 4532void CalendarView::lookForOutgoingMessages()
4467{ 4533{
4468 OutgoingDialog *ogd = mDialogManager->outgoingDialog(); 4534 OutgoingDialog *ogd = mDialogManager->outgoingDialog();
4469 ogd->loadMessages(); 4535 ogd->loadMessages();
4470} 4536}
4471 4537
4472void CalendarView::lookForIncomingMessages() 4538void CalendarView::lookForIncomingMessages()
4473{ 4539{
4474 IncomingDialog *icd = mDialogManager->incomingDialog(); 4540 IncomingDialog *icd = mDialogManager->incomingDialog();
4475 icd->retrieve(); 4541 icd->retrieve();
4476} 4542}
4477 4543
4478bool CalendarView::removeCompletedSubTodos( Todo* t ) 4544bool CalendarView::removeCompletedSubTodos( Todo* t )
4479{ 4545{
4480 bool deleteTodo = true; 4546 bool deleteTodo = true;
4481 QPtrList<Incidence> subTodos; 4547 QPtrList<Incidence> subTodos;
4482 Incidence *aTodo; 4548 Incidence *aTodo;
4483 subTodos = t->relations(); 4549 subTodos = t->relations();
4484 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { 4550 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) {
4485 if (! removeCompletedSubTodos( (Todo*) aTodo )) 4551 if (! removeCompletedSubTodos( (Todo*) aTodo ))
4486 deleteTodo = false; 4552 deleteTodo = false;
4487 } 4553 }
4488 if ( deleteTodo ) { 4554 if ( deleteTodo ) {
4489 if ( t->isCompleted() && !t->doesRecur()) { 4555 if ( t->isCompleted() && !t->doesRecur()) {
4490 checkExternalId( t ); 4556 checkExternalId( t );
4491 mCalendar->deleteTodo( t ); 4557 mCalendar->deleteTodo( t );
4492 changeTodoDisplay( t,KOGlobals::EVENTDELETED ); 4558 changeTodoDisplay( t,KOGlobals::EVENTDELETED );
4493 } 4559 }
4494 else 4560 else
4495 deleteTodo = false; 4561 deleteTodo = false;
4496 } 4562 }
4497 return deleteTodo; 4563 return deleteTodo;
4498 4564
4499} 4565}
4500void CalendarView::purgeCompleted() 4566void CalendarView::purgeCompleted()
4501{ 4567{
4502 int result = KMessageBox::warningContinueCancel(this, 4568 int result = KMessageBox::warningContinueCancel(this,
4503 i18n("Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)"),i18n("Purge Todos"),i18n("Purge")); 4569 i18n("Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)"),i18n("Purge Todos"),i18n("Purge"));
4504 4570
4505 if (result == KMessageBox::Continue) { 4571 if (result == KMessageBox::Continue) {
4506 4572
4507 QPtrList<Todo> todoCal; 4573 QPtrList<Todo> todoCal;
4508 QPtrList<Todo> rootTodos; 4574 QPtrList<Todo> rootTodos;
4509 //QPtrList<Incidence> rel; 4575 //QPtrList<Incidence> rel;
4510 Todo *aTodo; 4576 Todo *aTodo;
4511 todoCal = calendar()->todos(); 4577 todoCal = calendar()->todos();
4512 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { 4578 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) {
4513 if ( !aTodo->relatedTo() ) 4579 if ( !aTodo->relatedTo() )
4514 rootTodos.append( aTodo ); 4580 rootTodos.append( aTodo );
4515 } 4581 }
4516 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { 4582 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) {
4517 removeCompletedSubTodos( aTodo ); 4583 removeCompletedSubTodos( aTodo );
4518 } 4584 }
4519 4585
4520 updateView(); 4586 updateView();
4521 } 4587 }
4522} 4588}
4523 4589
4524void CalendarView::slotCalendarChanged() 4590void CalendarView::slotCalendarChanged()
4525{ 4591{
4526 ; 4592 ;
4527} 4593}
4528 4594
4529void CalendarView::keyPressEvent ( QKeyEvent *e) 4595void CalendarView::keyPressEvent ( QKeyEvent *e)
4530{ 4596{
4531 //qDebug(" alendarView::keyPressEvent "); 4597 //qDebug(" alendarView::keyPressEvent ");
4532 e->ignore(); 4598 e->ignore();
4533} 4599}
4534 4600
4535 4601
4536bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) 4602bool CalendarView::sync(KSyncManager* manager, QString filename, int mode)
4537{ 4603{
4538 4604
4539 if ( manager != mSyncManager) 4605 if ( manager != mSyncManager)
4540 qDebug("KO: Internal error-1. SyncManager mismatch "); 4606 qDebug("KO: Internal error-1. SyncManager mismatch ");
4541 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { 4607 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) {
4542 qDebug("KO: SyncKDE request detected!"); 4608 qDebug("KO: SyncKDE request detected!");
4543 } 4609 }
4544 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 4610 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
4545 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 4611 mCurrentSyncName = mSyncManager->getCurrentSyncName();
4546 return syncCalendar( filename, mode ); 4612 return syncCalendar( filename, mode );
4547} 4613}
4548bool CalendarView::syncExternal(KSyncManager* manager, QString resource) 4614bool CalendarView::syncExternal(KSyncManager* manager, QString resource)
4549{ 4615{
4550 //mSyncManager = manager; 4616 //mSyncManager = manager;
4551 if ( manager != mSyncManager) 4617 if ( manager != mSyncManager)
4552 qDebug("KO: Internal error-2. SyncManager mismatch "); 4618 qDebug("KO: Internal error-2. SyncManager mismatch ");
4553 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 4619 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
4554 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 4620 mCurrentSyncName = mSyncManager->getCurrentSyncName();
4555 if ( resource == "sharp" ) 4621 if ( resource == "sharp" )
4556 syncExternal( 0 ); 4622 syncExternal( 0 );
4557 if ( resource == "phone" ) 4623 if ( resource == "phone" )
4558 syncExternal( 1 ); 4624 syncExternal( 1 );
4559 // pending setmodified 4625 // pending setmodified
4560 return true; 4626 return true;
4561} 4627}
4562void CalendarView::setSyncManager(KSyncManager* manager) 4628void CalendarView::setSyncManager(KSyncManager* manager)
4563{ 4629{
4564 mSyncManager = manager; 4630 mSyncManager = manager;
4565} 4631}
4566 4632
4567void CalendarView::removeSyncInfo( QString syncProfile) 4633void CalendarView::removeSyncInfo( QString syncProfile)
4568{ 4634{
4569 qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); 4635 qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1());
4570 mCalendar->removeSyncInfo( syncProfile ); 4636 mCalendar->removeSyncInfo( syncProfile );
4571 4637
4572} 4638}
4573 4639
4574void CalendarView::undo_delete() 4640void CalendarView::undo_delete()
4575{ 4641{
4576 //qDebug("undo_delete() "); 4642 //qDebug("undo_delete() ");
4577 Incidence* undo = mCalendar->undoIncidence(); 4643 Incidence* undo = mCalendar->undoIncidence();
4578 if ( !undo ) { 4644 if ( !undo ) {
4579 KMessageBox::sorry(this,i18n("There is nothing to undo!"), 4645 KMessageBox::sorry(this,i18n("There is nothing to undo!"),
4580 i18n("KO/Pi")); 4646 i18n("KO/Pi"));
4581 return; 4647 return;
4582 } 4648 }
4583 if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,undo->summary().left(25) + 4649 if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( undo->summary(),0 ) +
4584 i18n("\nAre you sure you want\nto restore this?"), 4650 i18n("\nAre you sure you want\nto restore this?"),
4585 i18n("KO/Pi Confirmation"),i18n("Restore"))) { 4651 i18n("KO/Pi Confirmation"),i18n("Restore"))) {
4586 mCalendar->undoDeleteIncidence(); 4652 mCalendar->undoDeleteIncidence();
4587 updateView(); 4653 updateView();
4588 } 4654 }
4589} 4655}
4590 4656
4591void CalendarView::slotViewerClosed() 4657void CalendarView::slotViewerClosed()
4592{ 4658{
4593 QTimer::singleShot( 50, this, SLOT ( resetFocus() ) ); 4659 QTimer::singleShot( 50, this, SLOT ( resetFocus() ) );
4594} 4660}
4595 4661
4596void CalendarView::resetFocus() 4662void CalendarView::resetFocus()
4597{ 4663{
4598 if ( mViewerCallerIsSearchDialog ) { 4664 if ( mViewerCallerIsSearchDialog ) {
4599 if ( mDialogManager->getSearchDialog()->isVisible() ){ 4665 if ( mDialogManager->getSearchDialog()->isVisible() ){
4600 mDialogManager->getSearchDialog()->raise(); 4666 mDialogManager->getSearchDialog()->raise();
4601 mDialogManager->getSearchDialog()->setActiveWindow(); 4667 mDialogManager->getSearchDialog()->setActiveWindow();
4602 mDialogManager->getSearchDialog()->listview()->resetFocus(); 4668 mDialogManager->getSearchDialog()->listview()->resetFocus();
4603 } else 4669 } else
4604 mViewerCallerIsSearchDialog = false; 4670 mViewerCallerIsSearchDialog = false;
4605 } 4671 }
4606 if ( !mViewerCallerIsSearchDialog ) { 4672 if ( !mViewerCallerIsSearchDialog ) {
4607 //mViewManager->currentView()->setFocus(); 4673 //mViewManager->currentView()->setFocus();
4608 //qDebug("sssssssssssssssset focus "); 4674 //qDebug("sssssssssssssssset focus ");
4609 topLevelWidget()->raise(); 4675 topLevelWidget()->raise();
4610 setActiveWindow(); 4676 setActiveWindow();
4611 //setFocus(); 4677 //setFocus();
4612 } 4678 }
4613 mViewerCallerIsSearchDialog = false; 4679 mViewerCallerIsSearchDialog = false;
4614} 4680}
4615 4681
4616void CalendarView::showNextAlarms() 4682void CalendarView::showNextAlarms()
4617{ 4683{
4618 QString message; 4684 QString message;
4619 QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); 4685 QDateTime nextAl = mCalendar->nextAlarmEventDateTime();
4620 if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) { 4686 if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) {
4621 QString sum = mCalendar->nextSummary(); 4687 QString sum = mCalendar->nextSummary();
4622 QDateTime nextA = mNextAlarmDateTime; 4688 QDateTime nextA = mNextAlarmDateTime;
4623 QDateTime cur = QDateTime::currentDateTime(); 4689 QDateTime cur = QDateTime::currentDateTime();
4624 int secs = cur.secsTo( nextA ); 4690 int secs = cur.secsTo( nextA );
4625 int min = secs /60; 4691 int min = secs /60;
4626 int hours = min /60; 4692 int hours = min /60;
4627 min = min % 60; 4693 min = min % 60;
4628 int days = hours /24; 4694 int days = hours /24;
4629 hours = hours % 24; 4695 hours = hours % 24;
4630 4696
4631 //message = i18n("The next alarm is in:\n"); 4697 //message = i18n("The next alarm is in:\n");
4632 if ( days > 1 ) 4698 if ( days > 1 )
4633 message += i18n("%1 days\n").arg( days ); 4699 message += i18n("%1 days\n").arg( days );
4634 else if ( days == 1 ) 4700 else if ( days == 1 )
4635 message += i18n("1 day\n"); 4701 message += i18n("1 day\n");
4636 if ( hours > 1 ) 4702 if ( hours > 1 )
4637 message += i18n("%1 hours\n").arg( hours ); 4703 message += i18n("%1 hours\n").arg( hours );
4638 else if ( hours == 1 ) 4704 else if ( hours == 1 )
4639 message += i18n("1 hour\n"); 4705 message += i18n("1 hour\n");
4640 if ( min > 1 ) 4706 if ( min > 1 )
4641 message += i18n("%1 minutes\n").arg( min ); 4707 message += i18n("%1 minutes\n").arg( min );
4642 else if ( min == 1 ) 4708 else if ( min == 1 )
4643 message += i18n("1 minute\n"); 4709 message += i18n("1 minute\n");
4644 if ( message.isEmpty() ) 4710 if ( message.isEmpty() )
4645 message = i18n("The next alarm is in\nless than one minute!"); 4711 message = i18n("The next alarm is in\nless than one minute!");
4646 else 4712 else
4647 message = i18n("The next alarm is in:\n") + message; 4713 message = i18n("The next alarm is in:\n") + message;
4648 message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; 4714 message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ;
4649 } else { 4715 } else {
4650 message = i18n("There is no next alarm."); 4716 message = i18n("There is no next alarm.");
4651 4717
4652 } 4718 }
4653#ifdef DESKTOP_VERSION 4719#ifdef DESKTOP_VERSION
4654 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 4720 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
4655 message += i18n("\nThe internal alarm notification is disabled!\n"); 4721 message += i18n("\nThe internal alarm notification is disabled!\n");
4656 message += i18n("Enable it in the settings menu, TAB alarm."); 4722 message += i18n("Enable it in the settings menu, TAB alarm.");
4657 } 4723 }
4658 4724
4659#endif 4725#endif
4660 KMessageBox::information( this, message); 4726 KMessageBox::information( this, message);
4661} 4727}
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index a5f230a..51eb1d4 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -1,660 +1,664 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000, 2001 3 Copyright (c) 2000, 2001
4 Cornelius Schumacher <schumacher@kde.org> 4 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or 8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24#ifndef CALENDARVIEW_H 24#ifndef CALENDARVIEW_H
25#define CALENDARVIEW_H 25#define CALENDARVIEW_H
26 26
27#include <qframe.h> 27#include <qframe.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qwidget.h> 29#include <qwidget.h>
30#include <qptrlist.h> 30#include <qptrlist.h>
31#include <qvbox.h> 31#include <qvbox.h>
32#include <qmap.h> 32#include <qmap.h>
33#include <qscrollbar.h> 33#include <qscrollbar.h>
34#ifndef DESKTOP_VERSION 34#ifndef DESKTOP_VERSION
35#include <qtopia/ir.h> 35#include <qtopia/ir.h>
36#else 36#else
37#define Ir char 37#define Ir char
38#endif 38#endif
39#include <libkcal/calendar.h> 39#include <libkcal/calendar.h>
40#include <libkcal/scheduler.h> 40#include <libkcal/scheduler.h>
41#include <libkcal/calendarresources.h> 41#include <libkcal/calendarresources.h>
42#include <libkcal/resourcecalendar.h> 42#include <libkcal/resourcecalendar.h>
43#include <KDGanttMinimizeSplitter.h> 43#include <KDGanttMinimizeSplitter.h>
44 44
45#include <korganizer/calendarviewbase.h> 45#include <korganizer/calendarviewbase.h>
46 46
47#include <ksyncmanager.h> 47#include <ksyncmanager.h>
48//#include <koprefs.h> 48//#include <koprefs.h>
49 49
50class QWidgetStack; 50class QWidgetStack;
51class QSplitter; 51class QSplitter;
52class KopiCalendarFile; 52class KopiCalendarFile;
53class CalPrinter; 53class CalPrinter;
54class KOFilterView; 54class KOFilterView;
55class KOCalEditView; 55class KOCalEditView;
56class KOViewManager; 56class KOViewManager;
57class KODialogManager; 57class KODialogManager;
58class KOTodoView; 58class KOTodoView;
59class KDateNavigator; 59class KDateNavigator;
60class DateNavigatorContainer; 60class DateNavigatorContainer;
61class DateNavigator; 61class DateNavigator;
62class KOIncidenceEditor; 62class KOIncidenceEditor;
63class KDatePicker; 63class KDatePicker;
64class ResourceView; 64class ResourceView;
65class KOEventEditor; 65class KOEventEditor;
66class KOTodoEditor ; 66class KOTodoEditor ;
67class KOEventViewerDialog; 67class KOEventViewerDialog;
68class KOBeamPrefs; 68class KOBeamPrefs;
69class KSyncProfile; 69class KSyncProfile;
70class AlarmDialog; 70class AlarmDialog;
71class KCal::Attendee; 71class KCal::Attendee;
72 72
73namespace KCal { class FileStorage; } 73namespace KCal { class FileStorage; }
74 74
75using namespace KCal; 75using namespace KCal;
76 76
77/** 77/**
78 This is the main calendar widget. It provides the different vies on t he 78 This is the main calendar widget. It provides the different vies on t he
79 calendar data as well as the date navigator. It also handles synchronisation 79 calendar data as well as the date navigator. It also handles synchronisation
80 of the different views and controls the different dialogs like preferences, 80 of the different views and controls the different dialogs like preferences,
81 event editor, search dialog etc. 81 event editor, search dialog etc.
82 82
83 @short main calendar view widget 83 @short main calendar view widget
84 @author Cornelius Schumacher 84 @author Cornelius Schumacher
85*/ 85*/
86 86
87#include <qtextbrowser.h> 87#include <qtextbrowser.h>
88#include <qtextcodec.h> 88#include <qtextcodec.h>
89 89
90class MissedAlarmTextBrowser : public QTextBrowser { 90class MissedAlarmTextBrowser : public QTextBrowser {
91 Q_OBJECT 91 Q_OBJECT
92 public: 92 public:
93 MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); 93 MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start);
94 ~MissedAlarmTextBrowser(); 94 ~MissedAlarmTextBrowser();
95 void setSource(const QString & n); 95 void setSource(const QString & n);
96 96
97 private: 97 private:
98 Incidence * getNextInc(QDateTime start ); 98 Incidence * getNextInc(QDateTime start );
99 QPtrList<Incidence> mAlarms; 99 QPtrList<Incidence> mAlarms;
100 signals: 100 signals:
101 void showIncidence( QString uid); 101 void showIncidence( QString uid);
102}; 102};
103 103
104 104
105class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface 105class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface
106{ 106{
107 Q_OBJECT 107 Q_OBJECT
108 public: 108 public:
109 /** 109 /**
110 Constructs a new calendar view widget. 110 Constructs a new calendar view widget.
111 111
112 @param calendar calendar document 112 @param calendar calendar document
113 @param parent parent window 113 @param parent parent window
114 @param name Qt internal widget object name 114 @param name Qt internal widget object name
115 */ 115 */
116 CalendarView( CalendarResources *calendar, QWidget *parent = 0, 116 CalendarView( CalendarResources *calendar, QWidget *parent = 0,
117 const char *name = 0 ); 117 const char *name = 0 );
118 CalendarView( Calendar *calendar, QWidget *parent = 0, 118 CalendarView( Calendar *calendar, QWidget *parent = 0,
119 const char *name = 0 ); 119 const char *name = 0 );
120 virtual ~CalendarView(); 120 virtual ~CalendarView();
121 121
122 Calendar *calendar() { return mCalendar; } 122 Calendar *calendar() { return mCalendar; }
123 123
124 KOViewManager *viewManager(); 124 KOViewManager *viewManager();
125 KODialogManager *dialogManager(); 125 KODialogManager *dialogManager();
126 126
127 QDate startDate(); 127 QDate startDate();
128 QDate endDate(); 128 QDate endDate();
129 129
130 QWidgetStack *viewStack(); 130 QWidgetStack *viewStack();
131 QWidget *leftFrame(); 131 QWidget *leftFrame();
132 132
133 DateNavigator *dateNavigator(); 133 DateNavigator *dateNavigator();
134 KDateNavigator *dateNavigatorWidget(); 134 KDateNavigator *dateNavigatorWidget();
135 135
136 void addView(KOrg::BaseView *); 136 void addView(KOrg::BaseView *);
137 void showView(KOrg::BaseView *); 137 void showView(KOrg::BaseView *);
138 KOEventViewerDialog* getEventViewerDialog(); 138 KOEventViewerDialog* getEventViewerDialog();
139 Incidence *currentSelection(); 139 Incidence *currentSelection();
140 void checkSuspendAlarm(); 140 void checkSuspendAlarm();
141 141
142 signals: 142 signals:
143 void save (); 143 void save ();
144 void saveStopTimer (); 144 void saveStopTimer ();
145 void tempDisableBR(bool); 145 void tempDisableBR(bool);
146 /** This todo has been modified */ 146 /** This todo has been modified */
147 void todoModified(Todo *, int); 147 void todoModified(Todo *, int);
148 148
149 /** when change is made to options dialog, the topwidget will catch this 149 /** when change is made to options dialog, the topwidget will catch this
150 * and emit this signal which notifies all widgets which have registered 150 * and emit this signal which notifies all widgets which have registered
151 * for notification to update their settings. */ 151 * for notification to update their settings. */
152 void configChanged(); 152 void configChanged();
153 /** emitted when the topwidget is closing down, so that any attached 153 /** emitted when the topwidget is closing down, so that any attached
154 child windows can also close. */ 154 child windows can also close. */
155 void closingDown(); 155 void closingDown();
156 /** emitted right before we die */ 156 /** emitted right before we die */
157 void closed(QWidget *); 157 void closed(QWidget *);
158 158
159 /** Emitted when state of modified flag changes */ 159 /** Emitted when state of modified flag changes */
160 void modifiedChanged(bool); 160 void modifiedChanged(bool);
161 void signalmodified(); 161 void signalmodified();
162 162
163 /** Emitted when state of read-only flag changes */ 163 /** Emitted when state of read-only flag changes */
164 void readOnlyChanged(bool); 164 void readOnlyChanged(bool);
165 165
166 /** Emitted when the unit of navigation changes */ 166 /** Emitted when the unit of navigation changes */
167 void changeNavStringPrev(const QString &); 167 void changeNavStringPrev(const QString &);
168 void changeNavStringNext(const QString &); 168 void changeNavStringNext(const QString &);
169 169
170 /** Emitted when state of events selection has changed and user is organizer*/ 170 /** Emitted when state of events selection has changed and user is organizer*/
171 void organizerEventsSelected(bool); 171 void organizerEventsSelected(bool);
172 /** Emitted when state of events selection has changed and user is attendee*/ 172 /** Emitted when state of events selection has changed and user is attendee*/
173 void groupEventsSelected(bool); 173 void groupEventsSelected(bool);
174 /** 174 /**
175 Emitted when an incidence gets selected. If the selection is cleared the 175 Emitted when an incidence gets selected. If the selection is cleared the
176 signal is emitted with 0 as argument. 176 signal is emitted with 0 as argument.
177 */ 177 */
178 void incidenceSelected( Incidence * ); 178 void incidenceSelected( Incidence * );
179 /** Emitted, when a todoitem is selected or deselected. */ 179 /** Emitted, when a todoitem is selected or deselected. */
180 void todoSelected( bool ); 180 void todoSelected( bool );
181 181
182 /** 182 /**
183 Emitted, when clipboard content changes. Parameter indicates if paste 183 Emitted, when clipboard content changes. Parameter indicates if paste
184 is possible or not. 184 is possible or not.
185 */ 185 */
186 void pasteEnabled(bool); 186 void pasteEnabled(bool);
187 187
188 /** Emitted, when the number of incoming messages has changed. */ 188 /** Emitted, when the number of incoming messages has changed. */
189 void numIncomingChanged(int); 189 void numIncomingChanged(int);
190 190
191 /** Emitted, when the number of outgoing messages has changed. */ 191 /** Emitted, when the number of outgoing messages has changed. */
192 void numOutgoingChanged(int); 192 void numOutgoingChanged(int);
193 193
194 /** Send status message, which can e.g. be displayed in the status bar. */ 194 /** Send status message, which can e.g. be displayed in the status bar. */
195 void statusMessage(const QString &); 195 void statusMessage(const QString &);
196 196
197 void calendarViewExpanded( bool ); 197 void calendarViewExpanded( bool );
198 void updateSearchDialog(); 198 void updateSearchDialog();
199 void filtersUpdated(); 199 void filtersUpdated();
200 200
201 201
202 public slots: 202 public slots:
203 void nextConflict( bool all, bool allday );
204 void conflictAll();
205 void conflictAllday();
206 void conflictNotAll();
203 void setCalReadOnly( int id, bool readO ); 207 void setCalReadOnly( int id, bool readO );
204 void checkAlarms(); 208 void checkAlarms();
205 void checkFiles(); 209 void checkFiles();
206 void slotprintSelInc(); 210 void slotprintSelInc();
207 void showNextAlarms(); 211 void showNextAlarms();
208 void showOpenError(); 212 void showOpenError();
209 void watchSavedFile(); 213 void watchSavedFile();
210 void recheckTimerAlarm(); 214 void recheckTimerAlarm();
211 void checkNextTimerAlarm(); 215 void checkNextTimerAlarm();
212 void addAlarm(const QDateTime &qdt, const QString &noti ); 216 void addAlarm(const QDateTime &qdt, const QString &noti );
213 void addSuspendAlarm(const QDateTime &qdt, const QString &noti ); 217 void addSuspendAlarm(const QDateTime &qdt, const QString &noti );
214 void removeAlarm(const QDateTime &qdt, const QString &noti ); 218 void removeAlarm(const QDateTime &qdt, const QString &noti );
215 219
216 /** options dialog made a changed to the configuration. we catch this 220 /** options dialog made a changed to the configuration. we catch this
217 * and notify all widgets which need to update their configuration. */ 221 * and notify all widgets which need to update their configuration. */
218 void updateConfig(); 222 void updateConfig();
219 223
220 void insertBirthdays(const QString& uid, const QStringList& birthdayList, 224 void insertBirthdays(const QString& uid, const QStringList& birthdayList,
221 const QStringList& anniversaryList, const QStringList& realNameList, 225 const QStringList& anniversaryList, const QStringList& realNameList,
222 const QStringList& emailList, const QStringList& assembledNameList, 226 const QStringList& emailList, const QStringList& assembledNameList,
223 const QStringList& uidList); 227 const QStringList& uidList);
224 228
225 /** 229 /**
226 Load calendar from file \a filename. If \a merge is true, load 230 Load calendar from file \a filename. If \a merge is true, load
227 calendar into existing one, if it is false, clear calendar, before 231 calendar into existing one, if it is false, clear calendar, before
228 loading. Return true, if calendar could be successfully loaded. 232 loading. Return true, if calendar could be successfully loaded.
229 */ 233 */
230 bool openCalendar(QString filename, bool merge=false); 234 bool openCalendar(QString filename, bool merge=false);
231 bool loadCalendars(); 235 bool loadCalendars();
232 bool saveCalendars(); 236 bool saveCalendars();
233 bool restoreCalendarSettings(); 237 bool restoreCalendarSettings();
234 bool addCalendar( KopiCalendarFile * ); 238 bool addCalendar( KopiCalendarFile * );
235 void addCalendarId( int id ); 239 void addCalendarId( int id );
236 bool syncCalendar(QString filename,int mode = 0 ); 240 bool syncCalendar(QString filename,int mode = 0 );
237 241
238 /** 242 /**
239 Save calendar data to file. Return true if calendar could be 243 Save calendar data to file. Return true if calendar could be
240 successfully saved. 244 successfully saved.
241 */ 245 */
242 bool saveCalendar(QString filename); 246 bool saveCalendar(QString filename);
243 247
244 /** 248 /**
245 Close calendar. Clear calendar data and reset views to display an empty 249 Close calendar. Clear calendar data and reset views to display an empty
246 calendar. 250 calendar.
247 */ 251 */
248 void closeCalendar(); 252 void closeCalendar();
249 253
250 /** Archive old events of calendar */ 254 /** Archive old events of calendar */
251 void archiveCalendar(); 255 void archiveCalendar();
252 256
253 void showIncidence(); 257 void showIncidence();
254 void editIncidence(); 258 void editIncidence();
255 void editIncidenceDescription(); 259 void editIncidenceDescription();
256 void deleteIncidence(); 260 void deleteIncidence();
257 void cloneIncidence(); 261 void cloneIncidence();
258 void moveIncidence(); 262 void moveIncidence();
259 void beamIncidence(); 263 void beamIncidence();
260 void toggleCancelIncidence(); 264 void toggleCancelIncidence();
261 265
262 /** create an editeventwin with supplied date/time, and if bool is true, 266 /** create an editeventwin with supplied date/time, and if bool is true,
263 * make the event take all day. */ 267 * make the event take all day. */
264 void newEvent(QDateTime, QDateTime, bool allDay ); 268 void newEvent(QDateTime, QDateTime, bool allDay );
265 void newEvent(QDateTime, QDateTime); 269 void newEvent(QDateTime, QDateTime);
266 void newEvent(QDateTime fh); 270 void newEvent(QDateTime fh);
267 void newEvent(QDate dt); 271 void newEvent(QDate dt);
268 /** create new event without having a date hint. Takes current date as 272 /** create new event without having a date hint. Takes current date as
269 default hint. */ 273 default hint. */
270 void newEvent(); 274 void newEvent();
271 void newFloatingEvent(); 275 void newFloatingEvent();
272 276
273 /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ 277 /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/
274 void showIncidence(Incidence *); 278 void showIncidence(Incidence *);
275 void showIncidence(QString uid); 279 void showIncidence(QString uid);
276 /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ 280 /** Create an editor for the supplied incidence. It calls the correct editXXX method*/
277 void editIncidence(Incidence *); 281 void editIncidence(Incidence *);
278 /** Delete the supplied incidence. It calls the correct deleteXXX method*/ 282 /** Delete the supplied incidence. It calls the correct deleteXXX method*/
279 void deleteIncidence(Incidence *); 283 void deleteIncidence(Incidence *);
280 void cloneIncidence(Incidence *); 284 void cloneIncidence(Incidence *);
281 void cancelIncidence(Incidence *); 285 void cancelIncidence(Incidence *);
282 /** Create an editor for the supplied event. */ 286 /** Create an editor for the supplied event. */
283 void editEvent(Event *); 287 void editEvent(Event *);
284 /** Delete the supplied event. */ 288 /** Delete the supplied event. */
285 void deleteEvent(Event *); 289 void deleteEvent(Event *);
286 /** Delete the event with the given unique ID. Returns false, if event wasn't 290 /** Delete the event with the given unique ID. Returns false, if event wasn't
287 found. */ 291 found. */
288 bool deleteEvent(const QString &uid); 292 bool deleteEvent(const QString &uid);
289 /** Create a read-only viewer dialog for the supplied event. */ 293 /** Create a read-only viewer dialog for the supplied event. */
290 void showEvent(Event *); 294 void showEvent(Event *);
291 295
292 void editJournal(Journal *); 296 void editJournal(Journal *);
293 void showJournal(Journal *); 297 void showJournal(Journal *);
294 void deleteJournal(Journal *); 298 void deleteJournal(Journal *);
295 /** Create an editor dialog for a todo */ 299 /** Create an editor dialog for a todo */
296 void editTodo(Todo *); 300 void editTodo(Todo *);
297 /** Create a read-only viewer dialog for the supplied todo */ 301 /** Create a read-only viewer dialog for the supplied todo */
298 void showTodo(Todo *); 302 void showTodo(Todo *);
299 /** create new todo */ 303 /** create new todo */
300 void newTodo(); 304 void newTodo();
301 void newTodoDateTime(QDateTime, bool allday); 305 void newTodoDateTime(QDateTime, bool allday);
302 /** create new todo with a parent todo */ 306 /** create new todo with a parent todo */
303 void newSubTodo(); 307 void newSubTodo();
304 /** create new todo with a parent todo */ 308 /** create new todo with a parent todo */
305 void newSubTodo(Todo *); 309 void newSubTodo(Todo *);
306 /** Delete todo */ 310 /** Delete todo */
307 void deleteTodo(Todo *); 311 void deleteTodo(Todo *);
308 312
309 313
310 /** Check if clipboard contains vCalendar event. The signal pasteEnabled() is 314 /** Check if clipboard contains vCalendar event. The signal pasteEnabled() is
311 * emitted as result. */ 315 * emitted as result. */
312 void checkClipboard(); 316 void checkClipboard();
313 317
314 /** using the KConfig associated with the kapp variable, read in the 318 /** using the KConfig associated with the kapp variable, read in the
315 * settings from the config file. 319 * settings from the config file.
316 */ 320 */
317 void readSettings(); 321 void readSettings();
318 322
319 /** write current state to config file. */ 323 /** write current state to config file. */
320 void writeSettings(); 324 void writeSettings();
321 325
322 /** read settings for calendar filters */ 326 /** read settings for calendar filters */
323 void readFilterSettings(KConfig *config); 327 void readFilterSettings(KConfig *config);
324 328
325 /** write settings for calendar filters */ 329 /** write settings for calendar filters */
326 void writeFilterSettings(KConfig *config); 330 void writeFilterSettings(KConfig *config);
327 331
328 /** passes on the message that an event has changed to the currently 332 /** passes on the message that an event has changed to the currently
329 * activated view so that it can make appropriate display changes. */ 333 * activated view so that it can make appropriate display changes. */
330 void changeEventDisplay(Event *, int); 334 void changeEventDisplay(Event *, int);
331 void changeIncidenceDisplay(Incidence *, int); 335 void changeIncidenceDisplay(Incidence *, int);
332 void changeTodoDisplay(Todo *, int); 336 void changeTodoDisplay(Todo *, int);
333 337
334 void eventAdded(Event *); 338 void eventAdded(Event *);
335 void eventChanged(Event *); 339 void eventChanged(Event *);
336 void eventToBeDeleted(Event *); 340 void eventToBeDeleted(Event *);
337 void eventDeleted(); 341 void eventDeleted();
338 342
339 void todoAdded(Todo *); 343 void todoAdded(Todo *);
340 void todoChanged(Todo *); 344 void todoChanged(Todo *);
341 void todoToBeDeleted(Todo *); 345 void todoToBeDeleted(Todo *);
342 void todoDeleted(); 346 void todoDeleted();
343 347
344 void updateView(const QDate &start, const QDate &end); 348 void updateView(const QDate &start, const QDate &end);
345 void updateView(); 349 void updateView();
346 void clearAllViews(); 350 void clearAllViews();
347 351
348 /** Full update of visible todo views */ 352 /** Full update of visible todo views */
349 void updateTodoViews(); 353 void updateTodoViews();
350 354
351 void updateUnmanagedViews(); 355 void updateUnmanagedViews();
352 356
353 /** cut the current appointment to the clipboard */ 357 /** cut the current appointment to the clipboard */
354 void edit_cut(); 358 void edit_cut();
355 359
356 /** copy the current appointment(s) to the clipboard */ 360 /** copy the current appointment(s) to the clipboard */
357 void edit_copy(); 361 void edit_copy();
358 362
359 /** paste the current vobject(s) in the clipboard buffer into calendar */ 363 /** paste the current vobject(s) in the clipboard buffer into calendar */
360 void edit_paste(); 364 void edit_paste();
361 365
362 /** edit viewing and configuration options. */ 366 /** edit viewing and configuration options. */
363 void edit_options(); 367 void edit_options();
364 void edit_global_options(); 368 void edit_global_options();
365 /** 369 /**
366 Functions for printing, previewing a print, and setting up printing 370 Functions for printing, previewing a print, and setting up printing
367 parameters. 371 parameters.
368 */ 372 */
369 void print(); 373 void print();
370 void printSetup(); 374 void printSetup();
371 void printPreview(); 375 void printPreview();
372 376
373 /** Export as iCalendar file */ 377 /** Export as iCalendar file */
374 void exportICalendar(); 378 void exportICalendar();
375 379
376 /** Export as vCalendar file */ 380 /** Export as vCalendar file */
377 bool exportVCalendar( QString fn); 381 bool exportVCalendar( QString fn);
378 382
379 /** pop up a dialog to show an existing appointment. */ 383 /** pop up a dialog to show an existing appointment. */
380 void appointment_show(); 384 void appointment_show();
381 /** 385 /**
382 * pop up an Appointment Dialog to edit an existing appointment.Get 386 * pop up an Appointment Dialog to edit an existing appointment.Get
383 * information on the appointment from the list of unique IDs that is 387 * information on the appointment from the list of unique IDs that is
384 * currently in the View, called currIds. 388 * currently in the View, called currIds.
385 */ 389 */
386 void appointment_edit(); 390 void appointment_edit();
387 /** 391 /**
388 * pop up dialog confirming deletion of currently selected event in the 392 * pop up dialog confirming deletion of currently selected event in the
389 * View. 393 * View.
390 */ 394 */
391 void appointment_delete(); 395 void appointment_delete();
392 396
393 /** mails the currently selected event to a particular user as a vCalendar 397 /** mails the currently selected event to a particular user as a vCalendar
394 attachment. */ 398 attachment. */
395 void action_mail(); 399 void action_mail();
396 400
397 /* frees a subtodo from it's relation */ 401 /* frees a subtodo from it's relation */
398 void todo_unsub( Todo * ); 402 void todo_unsub( Todo * );
399 void todo_resub( Todo * parent, Todo * sub ); 403 void todo_resub( Todo * parent, Todo * sub );
400 404
401 /** Take ownership of selected event. */ 405 /** Take ownership of selected event. */
402 void takeOverEvent(); 406 void takeOverEvent();
403 407
404 /** Take ownership of all events in calendar. */ 408 /** Take ownership of all events in calendar. */
405 void takeOverCalendar(); 409 void takeOverCalendar();
406 410
407 /** query whether or not the calendar is "dirty". */ 411 /** query whether or not the calendar is "dirty". */
408 bool isModified(); 412 bool isModified();
409 /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ 413 /** set the state of calendar. Modified means "dirty", i.e. needing a save. */
410 void setModified(bool modified=true); 414 void setModified(bool modified=true);
411 415
412 /** query if the calendar is read-only. */ 416 /** query if the calendar is read-only. */
413 bool isReadOnly(); 417 bool isReadOnly();
414 /** set state of calendar to read-only */ 418 /** set state of calendar to read-only */
415 void setReadOnly(bool readOnly=true); 419 void setReadOnly(bool readOnly=true);
416 420
417 void eventUpdated(Incidence *); 421 void eventUpdated(Incidence *);
418 422
419 /* iTIP scheduling actions */ 423 /* iTIP scheduling actions */
420 void schedule_publish(Incidence *incidence = 0); 424 void schedule_publish(Incidence *incidence = 0);
421 void schedule_request(Incidence *incidence = 0); 425 void schedule_request(Incidence *incidence = 0);
422 void schedule_refresh(Incidence *incidence = 0); 426 void schedule_refresh(Incidence *incidence = 0);
423 void schedule_cancel(Incidence *incidence = 0); 427 void schedule_cancel(Incidence *incidence = 0);
424 void schedule_add(Incidence *incidence = 0); 428 void schedule_add(Incidence *incidence = 0);
425 void schedule_reply(Incidence *incidence = 0); 429 void schedule_reply(Incidence *incidence = 0);
426 void schedule_counter(Incidence *incidence = 0); 430 void schedule_counter(Incidence *incidence = 0);
427 void schedule_declinecounter(Incidence *incidence = 0); 431 void schedule_declinecounter(Incidence *incidence = 0);
428 void schedule_publish_freebusy(int daysToPublish = 30); 432 void schedule_publish_freebusy(int daysToPublish = 30);
429 433
430 void openAddressbook(); 434 void openAddressbook();
431 435
432 void editFilters(); 436 void editFilters();
433 void toggleFilerEnabled(); 437 void toggleFilerEnabled();
434 QPtrList<CalFilter> filters(); 438 QPtrList<CalFilter> filters();
435 void toggleFilter(); 439 void toggleFilter();
436 void showFilter(bool visible); 440 void showFilter(bool visible);
437 void updateFilter(); 441 void updateFilter();
438 void filterEdited(); 442 void filterEdited();
439 void selectFilter( int ); 443 void selectFilter( int );
440 KOFilterView *filterView(); 444 KOFilterView *filterView();
441 445
442 void showIntro(); 446 void showIntro();
443 447
444 /** Move the curdatepient view date to today */ 448 /** Move the curdatepient view date to today */
445 void goToday(); 449 void goToday();
446 450
447 /** Move to the next date(s) in the current view */ 451 /** Move to the next date(s) in the current view */
448 void goNext(); 452 void goNext();
449 453
450 /** Move to the previous date(s) in the current view */ 454 /** Move to the previous date(s) in the current view */
451 void goPrevious(); 455 void goPrevious();
452 /** Move to the next date(s) in the current view */ 456 /** Move to the next date(s) in the current view */
453 void goNextMonth(); 457 void goNextMonth();
454 458
455 /** Move to the previous date(s) in the current view */ 459 /** Move to the previous date(s) in the current view */
456 void goPreviousMonth(); 460 void goPreviousMonth();
457 461
458 void toggleExpand(); 462 void toggleExpand();
459 void toggleDateNavigatorWidget(); 463 void toggleDateNavigatorWidget();
460 void toggleAllDaySize(); 464 void toggleAllDaySize();
461 465
462 /** Look for new messages in the inbox */ 466 /** Look for new messages in the inbox */
463 void lookForIncomingMessages(); 467 void lookForIncomingMessages();
464 /** Look for new messages in the outbox */ 468 /** Look for new messages in the outbox */
465 void lookForOutgoingMessages(); 469 void lookForOutgoingMessages();
466 470
467 void processMainViewSelection( Incidence * ); 471 void processMainViewSelection( Incidence * );
468 void processTodoListSelection( Incidence * ); 472 void processTodoListSelection( Incidence * );
469 473
470 void processIncidenceSelection( Incidence * ); 474 void processIncidenceSelection( Incidence * );
471 475
472 void purgeCompleted(); 476 void purgeCompleted();
473 bool removeCompletedSubTodos( Todo* ); 477 bool removeCompletedSubTodos( Todo* );
474 void slotCalendarChanged(); 478 void slotCalendarChanged();
475 bool importBday(); 479 bool importBday();
476 bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); 480 bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday );
477 bool importQtopia( const QString &categoriesFile, 481 bool importQtopia( const QString &categoriesFile,
478 const QString &datebookFile, 482 const QString &datebookFile,
479 const QString &tasklistFile ); 483 const QString &tasklistFile );
480 void syncExternal( int mode ); 484 void syncExternal( int mode );
481 void slotSelectPickerDate( QDate ) ; 485 void slotSelectPickerDate( QDate ) ;
482 void showDatePicker() ; 486 void showDatePicker() ;
483 void showDatePickerPopup() ; 487 void showDatePickerPopup() ;
484 void moveIncidence(Incidence *) ; 488 void moveIncidence(Incidence *) ;
485 void beamIncidence(Incidence *) ; 489 void beamIncidence(Incidence *) ;
486 void beamCalendar() ; 490 void beamCalendar() ;
487 void beamFilteredCalendar() ; 491 void beamFilteredCalendar() ;
488 void beamIncidenceList(QPtrList<Incidence>) ; 492 void beamIncidenceList(QPtrList<Incidence>) ;
489 void manageCategories(); 493 void manageCategories();
490 void editCategories(); 494 void editCategories();
491 int addCategories(); 495 int addCategories();
492 void removeCategories(); 496 void removeCategories();
493 void setSyncDevice( QString ); 497 void setSyncDevice( QString );
494 void setSyncName( QString ); 498 void setSyncName( QString );
495 void showDay( QDate ); 499 void showDay( QDate );
496 void undo_delete(); 500 void undo_delete();
497 protected slots: 501 protected slots:
498 void resetFocus(); 502 void resetFocus();
499 void scrollBarValue(int); 503 void scrollBarValue(int);
500 void slotViewerClosed(); 504 void slotViewerClosed();
501 void timerAlarm(); 505 void timerAlarm();
502 void suspendAlarm(); 506 void suspendAlarm();
503 void beamDone( Ir *ir ); 507 void beamDone( Ir *ir );
504 /** Select a view or adapt the current view to display the specified dates. */ 508 /** Select a view or adapt the current view to display the specified dates. */
505 void showDates( const KCal::DateList & ); 509 void showDates( const KCal::DateList & );
506 void selectWeekNum ( int ); 510 void selectWeekNum ( int );
507 511
508 public: 512 public:
509 // show a standard warning 513 // show a standard warning
510 // returns KMsgBox::yesNoCancel() 514 // returns KMsgBox::yesNoCancel()
511 int msgCalModified(); 515 int msgCalModified();
512 virtual bool sync(KSyncManager* manager, QString filename, int mode); 516 virtual bool sync(KSyncManager* manager, QString filename, int mode);
513 517
514 virtual bool syncExternal(KSyncManager* manager, QString resource); 518 virtual bool syncExternal(KSyncManager* manager, QString resource);
515 virtual void removeSyncInfo( QString syncProfile); 519 virtual void removeSyncInfo( QString syncProfile);
516 void setSyncManager(KSyncManager* manager); 520 void setSyncManager(KSyncManager* manager);
517 void setLoadedFileVersion(QDateTime); 521 void setLoadedFileVersion(QDateTime);
518 bool checkFileVersion(QString fn); 522 bool checkFileVersion(QString fn);
519 bool checkAllFileVersions(); 523 bool checkAllFileVersions();
520 bool checkFileChanged(QString fn); 524 bool checkFileChanged(QString fn);
521 Event* getLastSyncEvent(); 525 Event* getLastSyncEvent();
522 /** Adapt navigation units correpsonding to step size of navigation of the 526 /** Adapt navigation units correpsonding to step size of navigation of the
523 * current view. 527 * current view.
524 */ 528 */
525 void adaptNavigationUnits(); 529 void adaptNavigationUnits();
526 bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); 530 bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode );
527 int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); 531 int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false );
528 //Attendee* getYourAttendee(Event *event); 532 //Attendee* getYourAttendee(Event *event);
529 void setBlockShowDates( bool b ) { mBlockShowDates = b ;} 533 void setBlockShowDates( bool b ) { mBlockShowDates = b ;}
530 void setScrollBarStep(int val ); 534 void setScrollBarStep(int val );
531 535
532 protected: 536 protected:
533 void schedule(Scheduler::Method, Incidence *incidence = 0); 537 void schedule(Scheduler::Method, Incidence *incidence = 0);
534 538
535 // returns KMsgBox::OKCandel() 539 // returns KMsgBox::OKCandel()
536 int msgItemDelete(const QString name); 540 int msgItemDelete(const QString name);
537 void showEventEditor(); 541 void showEventEditor();
538 void showTodoEditor(); 542 void showTodoEditor();
539 Todo *selectedTodo(); 543 Todo *selectedTodo();
540 private: 544 private:
541#ifdef DESKTOP_VERSION 545#ifdef DESKTOP_VERSION
542 QScrollBar * mDateScrollBar; 546 QScrollBar * mDateScrollBar;
543#endif 547#endif
544 QDateTime mNextAlarmDateTime; 548 QDateTime mNextAlarmDateTime;
545 bool mViewerCallerIsSearchDialog; 549 bool mViewerCallerIsSearchDialog;
546 bool mBlockShowDates; 550 bool mBlockShowDates;
547 KSyncManager* mSyncManager; 551 KSyncManager* mSyncManager;
548 AlarmDialog * mAlarmDialog; 552 AlarmDialog * mAlarmDialog;
549 QString mAlarmNotification; 553 QString mAlarmNotification;
550 QString mSuspendAlarmNotification; 554 QString mSuspendAlarmNotification;
551 QTimer* mSuspendTimer; 555 QTimer* mSuspendTimer;
552 QTimer* mAlarmTimer; 556 QTimer* mAlarmTimer;
553 QTimer* mRecheckAlarmTimer; 557 QTimer* mRecheckAlarmTimer;
554 void computeAlarm( QString ); 558 void computeAlarm( QString );
555 void startAlarm( QString, QString ); 559 void startAlarm( QString, QString );
556 void setSyncEventsReadOnly(); 560 void setSyncEventsReadOnly();
557 561
558 QDateTime loadedFileVersion; 562 QDateTime loadedFileVersion;
559 void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); 563 void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete );
560 void checkExternalId( Incidence * inc ); 564 void checkExternalId( Incidence * inc );
561 int mGlobalSyncMode; 565 int mGlobalSyncMode;
562 QString mCurrentSyncDevice; 566 QString mCurrentSyncDevice;
563 QString mCurrentSyncName; 567 QString mCurrentSyncName;
564 void init(); 568 void init();
565 int mDatePickerMode; 569 int mDatePickerMode;
566 bool mFlagEditDescription; 570 bool mFlagEditDescription;
567 QDateTime mLastCalendarSync; 571 QDateTime mLastCalendarSync;
568 void createPrinter(); 572 void createPrinter();
569 573
570 void calendarModified( bool, Calendar * ); 574 void calendarModified( bool, Calendar * );
571 575
572 CalPrinter *mCalPrinter; 576 CalPrinter *mCalPrinter;
573 577
574 QSplitter *mPanner; 578 QSplitter *mPanner;
575 QSplitter *mLeftSplitter; 579 QSplitter *mLeftSplitter;
576 KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; 580 KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame;
577 QWidgetStack *mRightFrame; 581 QWidgetStack *mRightFrame;
578 582
579 KDatePicker* mDatePicker; 583 KDatePicker* mDatePicker;
580 QVBox* mDateFrame; 584 QVBox* mDateFrame;
581 585
582 DateNavigatorContainer *mDateNavigator; // widget showing small month view. 586 DateNavigatorContainer *mDateNavigator; // widget showing small month view.
583 587
584 KOFilterView *mFilterView; 588 KOFilterView *mFilterView;
585 KOCalEditView *mCalEditView; 589 KOCalEditView *mCalEditView;
586 590
587 ResourceView *mResourceView; 591 ResourceView *mResourceView;
588 592
589 // calendar object for this viewing instance 593 // calendar object for this viewing instance
590 Calendar *mCalendar; 594 Calendar *mCalendar;
591 595
592 CalendarResourceManager *mResourceManager; 596 CalendarResourceManager *mResourceManager;
593 597
594 FileStorage *mStorage; 598 FileStorage *mStorage;
595 599
596 DateNavigator *mNavigator; 600 DateNavigator *mNavigator;
597 601
598 KOViewManager *mViewManager; 602 KOViewManager *mViewManager;
599 KODialogManager *mDialogManager; 603 KODialogManager *mDialogManager;
600 604
601 // Calendar filters 605 // Calendar filters
602 QPtrList<CalFilter> mFilters; 606 QPtrList<CalFilter> mFilters;
603 607
604 // various housekeeping variables. 608 // various housekeeping variables.
605 bool mModified; // flag indicating if calendar is modified 609 bool mModified; // flag indicating if calendar is modified
606 bool mReadOnly; // flag indicating if calendar is read-only 610 bool mReadOnly; // flag indicating if calendar is read-only
607 QDate mSaveSingleDate; 611 QDate mSaveSingleDate;
608 612
609 Incidence *mSelectedIncidence; 613 Incidence *mSelectedIncidence;
610 Incidence *mMoveIncidence; 614 Incidence *mMoveIncidence;
611 QDate mMoveIncidenceOldDate; 615 QDate mMoveIncidenceOldDate;
612 KOTodoView *mTodoList; 616 KOTodoView *mTodoList;
613 KOEventEditor * mEventEditor; 617 KOEventEditor * mEventEditor;
614 KOTodoEditor * mTodoEditor; 618 KOTodoEditor * mTodoEditor;
615 KOEventViewerDialog * mEventViewerDialog; 619 KOEventViewerDialog * mEventViewerDialog;
616 void keyPressEvent ( QKeyEvent *e) ; 620 void keyPressEvent ( QKeyEvent *e) ;
617 //QMap<Incidence*,KOIncidenceEditor*> mDialogList; 621 //QMap<Incidence*,KOIncidenceEditor*> mDialogList;
618}; 622};
619 623
620 624
621class CalendarViewVisitor : public Incidence::Visitor 625class CalendarViewVisitor : public Incidence::Visitor
622{ 626{
623 public: 627 public:
624 CalendarViewVisitor() : mView( 0 ) {} 628 CalendarViewVisitor() : mView( 0 ) {}
625 629
626 bool act( Incidence *incidence, CalendarView *view ) 630 bool act( Incidence *incidence, CalendarView *view )
627 { 631 {
628 mView = view; 632 mView = view;
629 return incidence->accept( *this ); 633 return incidence->accept( *this );
630 } 634 }
631 635
632 protected: 636 protected:
633 CalendarView *mView; 637 CalendarView *mView;
634}; 638};
635 639
636class ShowIncidenceVisitor : public CalendarViewVisitor 640class ShowIncidenceVisitor : public CalendarViewVisitor
637{ 641{
638 protected: 642 protected:
639 bool visit( Event *event ) { mView->showEvent( event ); return true; } 643 bool visit( Event *event ) { mView->showEvent( event ); return true; }
640 bool visit( Todo *todo ) { mView->showTodo( todo ); return true; } 644 bool visit( Todo *todo ) { mView->showTodo( todo ); return true; }
641 bool visit( Journal * j ) { mView->showJournal( j );return true; } 645 bool visit( Journal * j ) { mView->showJournal( j );return true; }
642}; 646};
643 647
644class EditIncidenceVisitor : public CalendarViewVisitor 648class EditIncidenceVisitor : public CalendarViewVisitor
645{ 649{
646 protected: 650 protected:
647 bool visit( Event *event ) { mView->editEvent( event ); return true; } 651 bool visit( Event *event ) { mView->editEvent( event ); return true; }
648 bool visit( Todo *todo ) { mView->editTodo( todo ); return true; } 652 bool visit( Todo *todo ) { mView->editTodo( todo ); return true; }
649 bool visit( Journal *j ) { mView->editJournal( j); return true; } 653 bool visit( Journal *j ) { mView->editJournal( j); return true; }
650}; 654};
651 655
652class DeleteIncidenceVisitor : public CalendarViewVisitor 656class DeleteIncidenceVisitor : public CalendarViewVisitor
653{ 657{
654 protected: 658 protected:
655 bool visit( Event *event ) { mView->deleteEvent( event ); return true; } 659 bool visit( Event *event ) { mView->deleteEvent( event ); return true; }
656 bool visit( Todo *todo ) { mView->deleteTodo( todo ); return true; } 660 bool visit( Todo *todo ) { mView->deleteTodo( todo ); return true; }
657 bool visit( Journal * j) {mView->deleteJournal( j ); return true; } 661 bool visit( Journal * j) {mView->deleteJournal( j ); return true; }
658}; 662};
659 663
660#endif 664#endif
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 9c2ac82..bfae1b5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1,2591 +1,2618 @@
1#include <stdlib.h> 1#include <stdlib.h>
2 2
3#include <qaction.h> 3#include <qaction.h>
4#include <qpopupmenu.h> 4#include <qpopupmenu.h>
5#include <qpainter.h> 5#include <qpainter.h>
6#include <qwhatsthis.h> 6#include <qwhatsthis.h>
7#include <qpushbutton.h> 7#include <qpushbutton.h>
8#include <qmessagebox.h> 8#include <qmessagebox.h>
9#include <qlineedit.h> 9#include <qlineedit.h>
10#include <qtextcodec.h> 10#include <qtextcodec.h>
11#include <qfile.h> 11#include <qfile.h>
12#include <qdir.h> 12#include <qdir.h>
13#include <qapp.h> 13#include <qapp.h>
14#include <qfileinfo.h> 14#include <qfileinfo.h>
15#include <qlabel.h> 15#include <qlabel.h>
16#include <qspinbox.h> 16#include <qspinbox.h>
17#include <qcheckbox.h> 17#include <qcheckbox.h>
18#include <qmap.h> 18#include <qmap.h>
19#include <qwmatrix.h> 19#include <qwmatrix.h>
20#include <qtextbrowser.h> 20#include <qtextbrowser.h>
21#include <qtextstream.h> 21#include <qtextstream.h>
22#ifndef DESKTOP_VERSION 22#ifndef DESKTOP_VERSION
23#include <qpe/global.h> 23#include <qpe/global.h>
24#include <qpe/qpemenubar.h> 24#include <qpe/qpemenubar.h>
25#include <qpe/qpetoolbar.h> 25#include <qpe/qpetoolbar.h>
26#include <qpe/resource.h> 26#include <qpe/resource.h>
27#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
28#include <qtopia/alarmserver.h> 28#include <qtopia/alarmserver.h>
29#include <qtopia/qcopenvelope_qws.h> 29#include <qtopia/qcopenvelope_qws.h>
30#include <unistd.h> // for sleep 30#include <unistd.h> // for sleep
31#else 31#else
32#include <qmenubar.h> 32#include <qmenubar.h>
33#include <qtoolbar.h> 33#include <qtoolbar.h>
34#include <qapplication.h> 34#include <qapplication.h>
35//#include <resource.h> 35//#include <resource.h>
36 36
37#endif 37#endif
38#include <libkcal/calendarlocal.h> 38#include <libkcal/calendarlocal.h>
39#include <libkcal/todo.h> 39#include <libkcal/todo.h>
40#include <libkcal/phoneformat.h> 40#include <libkcal/phoneformat.h>
41#include <libkdepim/ksyncprofile.h> 41#include <libkdepim/ksyncprofile.h>
42#include <libkdepim/phoneaccess.h> 42#include <libkdepim/phoneaccess.h>
43#include <libkcal/kincidenceformatter.h> 43#include <libkcal/kincidenceformatter.h>
44#include <libkdepim/kpimglobalprefs.h> 44#include <libkdepim/kpimglobalprefs.h>
45 45
46#include "calendarview.h" 46#include "calendarview.h"
47#include "koviewmanager.h" 47#include "koviewmanager.h"
48#include "datenavigator.h" 48#include "datenavigator.h"
49#include "koagendaview.h" 49#include "koagendaview.h"
50#include "kojournalview.h" 50#include "kojournalview.h"
51#include "koagenda.h" 51#include "koagenda.h"
52#include "kodialogmanager.h" 52#include "kodialogmanager.h"
53#include "kdialogbase.h" 53#include "kdialogbase.h"
54#include "kapplication.h" 54#include "kapplication.h"
55#include "kofilterview.h" 55#include "kofilterview.h"
56#include "kstandarddirs.h" 56#include "kstandarddirs.h"
57#include "koprefs.h" 57#include "koprefs.h"
58#include "kfiledialog.h" 58#include "kfiledialog.h"
59#include "koglobals.h" 59#include "koglobals.h"
60#include "kglobal.h" 60#include "kglobal.h"
61#include "ktoolbar.h" 61#include "ktoolbar.h"
62#include "klocale.h" 62#include "klocale.h"
63#include "kconfig.h" 63#include "kconfig.h"
64#include "externalapphandler.h" 64#include "externalapphandler.h"
65#include <kglobalsettings.h> 65#include <kglobalsettings.h>
66 66
67using namespace KCal; 67using namespace KCal;
68#ifndef _WIN32_ 68#ifndef _WIN32_
69#include <unistd.h> 69#include <unistd.h>
70#else 70#else
71#ifdef _OL_IMPORT_ 71#ifdef _OL_IMPORT_
72#include "koimportoldialog.h" 72#include "koimportoldialog.h"
73#endif 73#endif
74#endif 74#endif
75#include "mainwindow.h" 75#include "mainwindow.h"
76 76
77 77
78class KOex2phonePrefs : public QDialog 78class KOex2phonePrefs : public QDialog
79{ 79{
80 public: 80 public:
81 KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : 81 KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
82 QDialog( parent, name, true ) 82 QDialog( parent, name, true )
83 { 83 {
84 setCaption( i18n("Export to phone options") ); 84 setCaption( i18n("Export to phone options") );
85 QVBoxLayout* lay = new QVBoxLayout( this ); 85 QVBoxLayout* lay = new QVBoxLayout( this );
86 lay->setSpacing( 3 ); 86 lay->setSpacing( 3 );
87 lay->setMargin( 3 ); 87 lay->setMargin( 3 );
88 QLabel *lab; 88 QLabel *lab;
89 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 89 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
90 lab->setAlignment (AlignHCenter ); 90 lab->setAlignment (AlignHCenter );
91 QHBox* temphb; 91 QHBox* temphb;
92 temphb = new QHBox( this ); 92 temphb = new QHBox( this );
93 new QLabel( i18n("I/O device: "), temphb ); 93 new QLabel( i18n("I/O device: "), temphb );
94 mPhoneDevice = new QLineEdit( temphb); 94 mPhoneDevice = new QLineEdit( temphb);
95 lay->addWidget( temphb ); 95 lay->addWidget( temphb );
96 temphb = new QHBox( this ); 96 temphb = new QHBox( this );
97 new QLabel( i18n("Connection: "), temphb ); 97 new QLabel( i18n("Connection: "), temphb );
98 mPhoneConnection = new QLineEdit( temphb); 98 mPhoneConnection = new QLineEdit( temphb);
99 lay->addWidget( temphb ); 99 lay->addWidget( temphb );
100 temphb = new QHBox( this ); 100 temphb = new QHBox( this );
101 new QLabel( i18n("Model(opt.): "), temphb ); 101 new QLabel( i18n("Model(opt.): "), temphb );
102 mPhoneModel = new QLineEdit( temphb); 102 mPhoneModel = new QLineEdit( temphb);
103 lay->addWidget( temphb ); 103 lay->addWidget( temphb );
104 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); 104 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this );
105 mWriteBackFuture->setChecked( true ); 105 mWriteBackFuture->setChecked( true );
106 lay->addWidget( mWriteBackFuture ); 106 lay->addWidget( mWriteBackFuture );
107 temphb = new QHBox( this ); 107 temphb = new QHBox( this );
108 new QLabel( i18n("Max. weeks in future: ") , temphb ); 108 new QLabel( i18n("Max. weeks in future: ") , temphb );
109 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); 109 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb);
110 mWriteBackFutureWeeks->setValue( 8 ); 110 mWriteBackFutureWeeks->setValue( 8 );
111 lay->addWidget( temphb ); 111 lay->addWidget( temphb );
112 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); 112 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) );
113 lab->setAlignment (AlignHCenter ); 113 lab->setAlignment (AlignHCenter );
114 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 114 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
115 lay->addWidget( ok ); 115 lay->addWidget( ok );
116 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 116 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
117 lay->addWidget( cancel ); 117 lay->addWidget( cancel );
118 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 118 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
119 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 119 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
120 resize( 220, 240 ); 120 resize( 220, 240 );
121 qApp->processEvents(); 121 qApp->processEvents();
122 int dw = QApplication::desktop()->width(); 122 int dw = QApplication::desktop()->width();
123 int dh = QApplication::desktop()->height(); 123 int dh = QApplication::desktop()->height();
124 move( (dw-width())/2, (dh - height() )/2 ); 124 move( (dw-width())/2, (dh - height() )/2 );
125 } 125 }
126 126
127public: 127public:
128 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 128 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
129 QCheckBox* mWriteBackFuture; 129 QCheckBox* mWriteBackFuture;
130 QSpinBox* mWriteBackFutureWeeks; 130 QSpinBox* mWriteBackFutureWeeks;
131}; 131};
132 132
133QPixmap* sgListViewCompletedPix[6]; 133QPixmap* sgListViewCompletedPix[6];
134QPixmap* sgListViewJournalPix; 134QPixmap* sgListViewJournalPix;
135 135
136 136
137int globalFlagBlockStartup; 137int globalFlagBlockStartup;
138MainWindow::MainWindow( QWidget *parent, const char *name ) : 138MainWindow::MainWindow( QWidget *parent, const char *name ) :
139 QMainWindow( parent, name ) 139 QMainWindow( parent, name )
140{ 140{
141 sgListViewCompletedPix[5] = &listviewPix; 141 sgListViewCompletedPix[5] = &listviewPix;
142 sgListViewCompletedPix[0] = &listviewPix0; 142 sgListViewCompletedPix[0] = &listviewPix0;
143 sgListViewCompletedPix[1] = &listviewPix20; 143 sgListViewCompletedPix[1] = &listviewPix20;
144 sgListViewCompletedPix[2] = &listviewPix40; 144 sgListViewCompletedPix[2] = &listviewPix40;
145 sgListViewCompletedPix[3] = &listviewPix60; 145 sgListViewCompletedPix[3] = &listviewPix60;
146 sgListViewCompletedPix[4] = &listviewPix80; 146 sgListViewCompletedPix[4] = &listviewPix80;
147 //int size = 12; 147 //int size = 12;
148 { 148 {
149 sgListViewCompletedPix[5]->resize( 11, 11 ); 149 sgListViewCompletedPix[5]->resize( 11, 11 );
150 sgListViewCompletedPix[5]->fill( Qt::white ); 150 sgListViewCompletedPix[5]->fill( Qt::white );
151 QPainter p ( sgListViewCompletedPix[5] ); 151 QPainter p ( sgListViewCompletedPix[5] );
152 p.drawRect( 0,0,11,11); 152 p.drawRect( 0,0,11,11);
153 p.drawLine ( 2, 5, 4 , 7 ) ; 153 p.drawLine ( 2, 5, 4 , 7 ) ;
154 p.drawLine ( 4 , 7 , 8, 3) ; 154 p.drawLine ( 4 , 7 , 8, 3) ;
155 int iii = 0; 155 int iii = 0;
156 for ( iii = 0; iii < 5; ++iii ) { 156 for ( iii = 0; iii < 5; ++iii ) {
157 sgListViewCompletedPix[iii]->resize( 11, 11 ); 157 sgListViewCompletedPix[iii]->resize( 11, 11 );
158 sgListViewCompletedPix[iii]->fill( Qt::white ); 158 sgListViewCompletedPix[iii]->fill( Qt::white );
159 QPainter p ( sgListViewCompletedPix[iii] ); 159 QPainter p ( sgListViewCompletedPix[iii] );
160 p.drawRect( 0,0,11,11); 160 p.drawRect( 0,0,11,11);
161 if ( iii ) 161 if ( iii )
162 p.fillRect( 1,1,iii*2,9,Qt::gray ); 162 p.fillRect( 1,1,iii*2,9,Qt::gray );
163 } 163 }
164 sgListViewJournalPix = &journalPix; 164 sgListViewJournalPix = &journalPix;
165 sgListViewJournalPix->resize( 11, 11 ); 165 sgListViewJournalPix->resize( 11, 11 );
166 sgListViewJournalPix->fill( Qt::white ); 166 sgListViewJournalPix->fill( Qt::white );
167 { 167 {
168 QPainter p ( sgListViewJournalPix ); 168 QPainter p ( sgListViewJournalPix );
169 p.drawRect( 0,0,11,11); 169 p.drawRect( 0,0,11,11);
170 p.drawLine( 2,3,5,3); 170 p.drawLine( 2,3,5,3);
171 p.drawLine( 2,5,8,5); 171 p.drawLine( 2,5,8,5);
172 p.drawLine( 2,7,6,7); 172 p.drawLine( 2,7,6,7);
173 } 173 }
174 } 174 }
175 mClosed = false; 175 mClosed = false;
176 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 176 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
177 QString confFile = locateLocal("config","korganizerrc"); 177 QString confFile = locateLocal("config","korganizerrc");
178 QFileInfo finf ( confFile ); 178 QFileInfo finf ( confFile );
179 bool showWarning = !finf.exists(); 179 bool showWarning = !finf.exists();
180 setIcon(SmallIcon( "ko24" ) ); 180 setIcon(SmallIcon( "ko24" ) );
181 mBlockAtStartup = true; 181 mBlockAtStartup = true;
182 mFlagKeyPressed = false; 182 mFlagKeyPressed = false;
183 setCaption("KO/Pi"); 183 setCaption("KO/Pi");
184 KOPrefs *p = KOPrefs::instance(); 184 KOPrefs *p = KOPrefs::instance();
185 //KPimGlobalPrefs::instance()->setGlobalConfig(); 185 //KPimGlobalPrefs::instance()->setGlobalConfig();
186 p->mCurrentDisplayedView = 0; 186 p->mCurrentDisplayedView = 0;
187 if ( p->mHourSize > 22 ) 187 if ( p->mHourSize > 22 )
188 p->mHourSize = 22; 188 p->mHourSize = 22;
189 QMainWindow::ToolBarDock tbd; 189 QMainWindow::ToolBarDock tbd;
190 if ( p->mToolBarHor ) { 190 if ( p->mToolBarHor ) {
191 if ( p->mToolBarUp ) 191 if ( p->mToolBarUp )
192 tbd = Bottom; 192 tbd = Bottom;
193 else 193 else
194 tbd = Top; 194 tbd = Top;
195 } 195 }
196 else { 196 else {
197 if ( p->mToolBarUp ) 197 if ( p->mToolBarUp )
198 tbd = Right; 198 tbd = Right;
199 else 199 else
200 tbd = Left; 200 tbd = Left;
201 } 201 }
202 if ( KOPrefs::instance()->mUseAppColors ) 202 if ( KOPrefs::instance()->mUseAppColors )
203 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 203 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
204 globalFlagBlockStartup = 1; 204 globalFlagBlockStartup = 1;
205 iconToolBar = new QPEToolBar( this ); 205 iconToolBar = new QPEToolBar( this );
206 addToolBar (iconToolBar , tbd ); 206 addToolBar (iconToolBar , tbd );
207 207
208#ifdef DESKTOP_VERSION 208#ifdef DESKTOP_VERSION
209 if ( KOPrefs::instance()->mShowIconFilter ) 209 if ( KOPrefs::instance()->mShowIconFilter )
210#else 210#else
211 if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) 211 if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar )
212#endif 212#endif
213 213
214{ 214{
215 if ( p->mToolBarHorF ) { 215 if ( p->mToolBarHorF ) {
216 if ( p->mToolBarUpF ) 216 if ( p->mToolBarUpF )
217 tbd = Bottom; 217 tbd = Bottom;
218 else 218 else
219 tbd = Top; 219 tbd = Top;
220 } 220 }
221 else { 221 else {
222 if ( p->mToolBarUpF ) 222 if ( p->mToolBarUpF )
223 tbd = Right; 223 tbd = Right;
224 else 224 else
225 tbd = Left; 225 tbd = Left;
226 } 226 }
227 filterToolBar = new QPEToolBar ( this ); 227 filterToolBar = new QPEToolBar ( this );
228 filterMenubar = new QMenuBar( 0 ); 228 filterMenubar = new QMenuBar( 0 );
229 QFontMetrics fm ( filterMenubar->font() ); 229 QFontMetrics fm ( filterMenubar->font() );
230 230
231 filterPopupMenu = new QPopupMenu( this ); 231 filterPopupMenu = new QPopupMenu( this );
232 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); 232 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
233 QString addTest = "A"; 233 QString addTest = "A";
234 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); 234 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
235#ifdef DESKTOP_VERSION 235#ifdef DESKTOP_VERSION
236 addTest = "AAABBBCCCx"; 236 addTest = "AAABBBCCCx";
237#else 237#else
238 addTest = "AAx"; 238 addTest = "AAx";
239#endif 239#endif
240 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); 240 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) );
241 addToolBar (filterToolBar , tbd ); 241 addToolBar (filterToolBar , tbd );
242 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); 242 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) );
243 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); 243 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) );
244 if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) 244 if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar )
245 filterToolBar->hide(); 245 filterToolBar->hide();
246 } else { 246 } else {
247 filterToolBar = 0; 247 filterToolBar = 0;
248 filterMenubar = 0; 248 filterMenubar = 0;
249 filterPopupMenu = 0; 249 filterPopupMenu = 0;
250 } 250 }
251 if ( p->mShowIconOnetoolbar ) { 251 if ( p->mShowIconOnetoolbar ) {
252 viewToolBar = iconToolBar ; 252 viewToolBar = iconToolBar ;
253 navigatorToolBar = iconToolBar ; 253 navigatorToolBar = iconToolBar ;
254 } else { 254 } else {
255#ifndef DESKTOP_VERSION 255#ifndef DESKTOP_VERSION
256 setToolBarsMovable( false ); 256 setToolBarsMovable( false );
257#endif 257#endif
258 if ( p->mToolBarHorV ) { 258 if ( p->mToolBarHorV ) {
259 if ( p->mToolBarUpV ) 259 if ( p->mToolBarUpV )
260 tbd = Bottom; 260 tbd = Bottom;
261 else 261 else
262 tbd = Top; 262 tbd = Top;
263 } 263 }
264 else { 264 else {
265 if ( p->mToolBarUpV ) 265 if ( p->mToolBarUpV )
266 tbd = Right; 266 tbd = Right;
267 else 267 else
268 tbd = Left; 268 tbd = Left;
269 } 269 }
270 viewToolBar = new QPEToolBar( this ); 270 viewToolBar = new QPEToolBar( this );
271 addToolBar (viewToolBar , tbd ); 271 addToolBar (viewToolBar , tbd );
272 if ( p->mToolBarHorN ) { 272 if ( p->mToolBarHorN ) {
273 if ( p->mToolBarUpN ) 273 if ( p->mToolBarUpN )
274 tbd = Bottom; 274 tbd = Bottom;
275 else 275 else
276 tbd = Top; 276 tbd = Top;
277 } 277 }
278 else { 278 else {
279 if ( p->mToolBarUpN ) 279 if ( p->mToolBarUpN )
280 tbd = Right; 280 tbd = Right;
281 else 281 else
282 tbd = Left; 282 tbd = Left;
283 } 283 }
284 navigatorToolBar = new QPEToolBar( this ); 284 navigatorToolBar = new QPEToolBar( this );
285 addToolBar (navigatorToolBar , tbd ); 285 addToolBar (navigatorToolBar , tbd );
286 } 286 }
287 287
288 288
289 289
290 mCalendarModifiedFlag = false; 290 mCalendarModifiedFlag = false;
291 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); 291 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this );
292 splash->setAlignment ( AlignCenter ); 292 splash->setAlignment ( AlignCenter );
293 setCentralWidget( splash ); 293 setCentralWidget( splash );
294#ifndef DESKTOP_VERSION 294#ifndef DESKTOP_VERSION
295 showMaximized(); 295 showMaximized();
296#endif 296#endif
297 297
298 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); 298 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ());
299 setDefaultPreferences(); 299 setDefaultPreferences();
300 mCalendar = new CalendarLocal(); 300 mCalendar = new CalendarLocal();
301 mView = new CalendarView( mCalendar, this,"mCalendar " ); 301 mView = new CalendarView( mCalendar, this,"mCalendar " );
302 mView->hide(); 302 mView->hide();
303 //mView->resize(splash->size() ); 303 //mView->resize(splash->size() );
304 initActions(); 304 initActions();
305 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); 305 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu);
306 mSyncManager->setBlockSave(false); 306 mSyncManager->setBlockSave(false);
307 mView->setSyncManager(mSyncManager); 307 mView->setSyncManager(mSyncManager);
308#ifndef DESKTOP_VERSION 308#ifndef DESKTOP_VERSION
309 iconToolBar->show(); 309 iconToolBar->show();
310 qApp->processEvents(); 310 qApp->processEvents();
311#endif 311#endif
312 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); 312 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ());
313 int vh = height() ; 313 int vh = height() ;
314 int vw = width(); 314 int vw = width();
315 //qDebug("Toolbar hei %d ",iconToolBar->height() ); 315 //qDebug("Toolbar hei %d ",iconToolBar->height() );
316 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 316 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
317 vh -= iconToolBar->height(); 317 vh -= iconToolBar->height();
318 } else { 318 } else {
319 vw -= iconToolBar->height(); 319 vw -= iconToolBar->height();
320 } 320 }
321 //mView->setMaximumSize( splash->size() ); 321 //mView->setMaximumSize( splash->size() );
322 //mView->resize( splash->size() ); 322 //mView->resize( splash->size() );
323 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 323 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
324 mView->readSettings(); 324 mView->readSettings();
325 bool newFile = false; 325 bool newFile = false;
326 if( !QFile::exists( defaultFileName() ) ) { 326 if( !QFile::exists( defaultFileName() ) ) {
327 QFileInfo finfo ( defaultFileName() ); 327 QFileInfo finfo ( defaultFileName() );
328 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); 328 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics");
329 QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; 329 QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n";
330 finfo.setFile( oldFile ); 330 finfo.setFile( oldFile );
331 if (finfo.exists() ) { 331 if (finfo.exists() ) {
332 KMessageBox::information( this, message); 332 KMessageBox::information( this, message);
333 mView->openCalendar( oldFile ); 333 mView->openCalendar( oldFile );
334 qApp->processEvents(); 334 qApp->processEvents();
335 } else { 335 } else {
336 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); 336 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics");
337 finfo.setFile( oldFile ); 337 finfo.setFile( oldFile );
338 if (finfo.exists() ) { 338 if (finfo.exists() ) {
339 KMessageBox::information( this, message); 339 KMessageBox::information( this, message);
340 mView->openCalendar( oldFile ); 340 mView->openCalendar( oldFile );
341 qApp->processEvents(); 341 qApp->processEvents();
342 } 342 }
343 } 343 }
344 mView->saveCalendar( defaultFileName() ); 344 mView->saveCalendar( defaultFileName() );
345 newFile = true; 345 newFile = true;
346 } 346 }
347 347
348 QTime neededSaveTime = QDateTime::currentDateTime().time(); 348 QTime neededSaveTime = QDateTime::currentDateTime().time();
349 mView->loadCalendars(); 349 mView->loadCalendars();
350 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 350 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
351 qDebug("KO: Calendar loading time: %d ms",msNeeded ); 351 qDebug("KO: Calendar loading time: %d ms",msNeeded );
352 352
353 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { 353 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) {
354 KOPrefs::instance()->setAllDefaults(); 354 KOPrefs::instance()->setAllDefaults();
355 } 355 }
356 processIncidenceSelection( 0 ); 356 processIncidenceSelection( 0 );
357 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), 357 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
358 SLOT( processIncidenceSelection( Incidence * ) ) ); 358 SLOT( processIncidenceSelection( Incidence * ) ) );
359 connect( mView, SIGNAL( modifiedChanged( bool ) ), 359 connect( mView, SIGNAL( modifiedChanged( bool ) ),
360 SLOT( slotModifiedChanged( bool ) ) ); 360 SLOT( slotModifiedChanged( bool ) ) );
361 361
362 362
363 connect( mView, SIGNAL( tempDisableBR(bool) ), 363 connect( mView, SIGNAL( tempDisableBR(bool) ),
364 SLOT( disableBR(bool) ) ); 364 SLOT( disableBR(bool) ) );
365 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); 365 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
366 mView->setModified( false ); 366 mView->setModified( false );
367 mBlockAtStartup = false; 367 mBlockAtStartup = false;
368 mView->setModified( false ); 368 mView->setModified( false );
369 setCentralWidget( mView ); 369 setCentralWidget( mView );
370 globalFlagBlockStartup = 0; 370 globalFlagBlockStartup = 0;
371 mView->show(); 371 mView->show();
372 delete splash; 372 delete splash;
373 if ( newFile ) 373 if ( newFile )
374 mView->updateConfig(); 374 mView->updateConfig();
375 // qApp->processEvents(); 375 // qApp->processEvents();
376 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 376 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
377 //fillSyncMenu(); 377 //fillSyncMenu();
378 378
379 379
380 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 380 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
381 connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); 381 connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
382 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); 382 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
383 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 383 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
384 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 384 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
385 mSyncManager->setDefaultFileName( sentSyncFile()); 385 mSyncManager->setDefaultFileName( sentSyncFile());
386 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); 386 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
387 mSyncManager->fillSyncMenu(); 387 mSyncManager->fillSyncMenu();
388 388
389 389
390 390
391 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); 391 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
392 if ( showWarning ) { 392 if ( showWarning ) {
393 KMessageBox::information( this, 393 KMessageBox::information( this,
394 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); 394 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information");
395 qApp->processEvents(); 395 qApp->processEvents();
396 mView->dialogManager()->showSyncOptions(); 396 mView->dialogManager()->showSyncOptions();
397 } 397 }
398 398
399 //US listen for result adressed from Ka/Pi 399 //US listen for result adressed from Ka/Pi
400#ifndef DESKTOP_VERSION 400#ifndef DESKTOP_VERSION
401 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 401 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
402#endif 402#endif
403#ifndef DESKTOP_VERSION 403#ifndef DESKTOP_VERSION
404 infrared = 0; 404 infrared = 0;
405#endif 405#endif
406 updateFilterToolbar(); 406 updateFilterToolbar();
407 updateWeek( mView->startDate() ); 407 updateWeek( mView->startDate() );
408 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 408 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
409 SLOT( updateWeekNum( const KCal::DateList & ) ) ); 409 SLOT( updateWeekNum( const KCal::DateList & ) ) );
410 mBRdisabled = false; 410 mBRdisabled = false;
411 //toggleBeamReceive(); 411 //toggleBeamReceive();
412 412
413 QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); 413 QTimer::singleShot( 1000, mView, SLOT ( checkFiles() ));
414} 414}
415MainWindow::~MainWindow() 415MainWindow::~MainWindow()
416{ 416{
417 //qDebug("MainWindow::~MainWindow() "); 417 //qDebug("MainWindow::~MainWindow() ");
418 //save toolbar location 418 //save toolbar location
419 delete mCalendar; 419 delete mCalendar;
420 delete mSyncManager; 420 delete mSyncManager;
421#ifndef DESKTOP_VERSION 421#ifndef DESKTOP_VERSION
422 if ( infrared ) 422 if ( infrared )
423 delete infrared; 423 delete infrared;
424#endif 424#endif
425 425
426 426
427} 427}
428 428
429void MainWindow::disableBR(bool b) 429void MainWindow::disableBR(bool b)
430{ 430{
431#ifndef DESKTOP_VERSION 431#ifndef DESKTOP_VERSION
432 if ( b ) { 432 if ( b ) {
433 if ( infrared ) { 433 if ( infrared ) {
434 toggleBeamReceive(); 434 toggleBeamReceive();
435 mBRdisabled = true; 435 mBRdisabled = true;
436 } 436 }
437 mBRdisabled = true; 437 mBRdisabled = true;
438 } else { 438 } else {
439 if ( mBRdisabled ) { 439 if ( mBRdisabled ) {
440 mBRdisabled = false; 440 mBRdisabled = false;
441 //makes no sense,because other cal ap is probably running 441 //makes no sense,because other cal ap is probably running
442 // toggleBeamReceive(); 442 // toggleBeamReceive();
443 } 443 }
444 } 444 }
445#endif 445#endif
446 446
447} 447}
448bool MainWindow::beamReceiveEnabled() 448bool MainWindow::beamReceiveEnabled()
449{ 449{
450#ifndef DESKTOP_VERSION 450#ifndef DESKTOP_VERSION
451 return ( infrared != 0 ); 451 return ( infrared != 0 );
452#endif 452#endif
453 return false; 453 return false;
454} 454}
455 455
456void MainWindow::toggleBeamReceive() 456void MainWindow::toggleBeamReceive()
457{ 457{
458 if ( mBRdisabled ) 458 if ( mBRdisabled )
459 return; 459 return;
460#ifndef DESKTOP_VERSION 460#ifndef DESKTOP_VERSION
461 if ( infrared ) { 461 if ( infrared ) {
462 qDebug("KO: Disable BeamReceive "); 462 qDebug("KO: Disable BeamReceive ");
463 delete infrared; 463 delete infrared;
464 infrared = 0; 464 infrared = 0;
465 brAction->setOn(false); 465 brAction->setOn(false);
466 return; 466 return;
467 } 467 }
468 qDebug("KO: Enable BeamReceive "); 468 qDebug("KO: Enable BeamReceive ");
469 brAction->setOn(true); 469 brAction->setOn(true);
470 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 470 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
471 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 471 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
472#endif 472#endif
473} 473}
474void MainWindow::showMaximized () 474void MainWindow::showMaximized ()
475{ 475{
476#ifndef DESKTOP_VERSION 476#ifndef DESKTOP_VERSION
477 if ( ! globalFlagBlockStartup ) 477 if ( ! globalFlagBlockStartup )
478 if ( mClosed ) 478 if ( mClosed )
479 mView->goToday(); 479 mView->goToday();
480#endif 480#endif
481 QWidget::showMaximized () ; 481 QWidget::showMaximized () ;
482 mClosed = false; 482 mClosed = false;
483} 483}
484void MainWindow::closeEvent( QCloseEvent* ce ) 484void MainWindow::closeEvent( QCloseEvent* ce )
485{ 485{
486 486
487 487
488 488
489 if ( ! KOPrefs::instance()->mAskForQuit ) { 489 if ( ! KOPrefs::instance()->mAskForQuit ) {
490 saveOnClose(); 490 saveOnClose();
491 mClosed = true; 491 mClosed = true;
492 ce->accept(); 492 ce->accept();
493 return; 493 return;
494 494
495 } 495 }
496 496
497 switch( QMessageBox::information( this, "KO/Pi", 497 switch( QMessageBox::information( this, "KO/Pi",
498 i18n("Do you really want\nto close KO/Pi?"), 498 i18n("Do you really want\nto close KO/Pi?"),
499 i18n("Close"), i18n("No"), 499 i18n("Close"), i18n("No"),
500 0, 0 ) ) { 500 0, 0 ) ) {
501 case 0: 501 case 0:
502 saveOnClose(); 502 saveOnClose();
503 mClosed = true; 503 mClosed = true;
504 ce->accept(); 504 ce->accept();
505 break; 505 break;
506 case 1: 506 case 1:
507 ce->ignore(); 507 ce->ignore();
508 break; 508 break;
509 case 2: 509 case 2:
510 510
511 default: 511 default:
512 break; 512 break;
513 } 513 }
514 514
515 515
516} 516}
517 517
518void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 518void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
519{ 519{
520 QDataStream stream( data, IO_ReadOnly ); 520 QDataStream stream( data, IO_ReadOnly );
521 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); 521 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
522 //QString datamess; 522 //QString datamess;
523 //qDebug("message "); 523 //qDebug("message ");
524 qDebug("KO: QCOP message received: %s ", cmsg.data() ); 524 qDebug("KO: QCOP message received: %s ", cmsg.data() );
525 525
526 if ( cmsg == "setDocument(QString)" ) { 526 if ( cmsg == "setDocument(QString)" ) {
527 QDataStream stream( data, IO_ReadOnly ); 527 QDataStream stream( data, IO_ReadOnly );
528 QString fileName; 528 QString fileName;
529 stream >> fileName; 529 stream >> fileName;
530 //qDebug("filename %s ", fileName.latin1()); 530 //qDebug("filename %s ", fileName.latin1());
531 showMaximized(); 531 showMaximized();
532 raise(); 532 raise();
533 KOPrefs::instance()->mLastSyncedLocalFile = fileName ; 533 KOPrefs::instance()->mLastSyncedLocalFile = fileName ;
534 mSyncManager->slotSyncMenu( 1002 ); 534 mSyncManager->slotSyncMenu( 1002 );
535 return; 535 return;
536 } 536 }
537 537
538 if ( cmsg == "-writeFile" ) { 538 if ( cmsg == "-writeFile" ) {
539 // I made from the "-writeFile" an "-writeAlarm" 539 // I made from the "-writeFile" an "-writeAlarm"
540 mView->viewManager()->showWhatsNextView(); 540 mView->viewManager()->showWhatsNextView();
541 mCalendar->checkAlarmForIncidence( 0, true); 541 mCalendar->checkAlarmForIncidence( 0, true);
542 showMaximized(); 542 showMaximized();
543 raise(); 543 raise();
544 return; 544 return;
545 545
546 } 546 }
547 if ( cmsg == "-writeFileSilent" ) { 547 if ( cmsg == "-writeFileSilent" ) {
548 // I made from the "-writeFile" an "-writeAlarm" 548 // I made from the "-writeFile" an "-writeAlarm"
549 // mView->viewManager()->showWhatsNextView(); 549 // mView->viewManager()->showWhatsNextView();
550 mCalendar->checkAlarmForIncidence( 0, true); 550 mCalendar->checkAlarmForIncidence( 0, true);
551 //showMaximized(); 551 //showMaximized();
552 //raise(); 552 //raise();
553 hide(); 553 hide();
554 return; 554 return;
555 } 555 }
556 if ( cmsg == "-newCountdown" ) { 556 if ( cmsg == "-newCountdown" ) {
557 qDebug("newCountdown "); 557 qDebug("newCountdown ");
558 558
559 } 559 }
560 QString msg ; 560 QString msg ;
561 QString allmsg = cmsg; 561 QString allmsg = cmsg;
562 while ( allmsg.length() > 0 ) { 562 while ( allmsg.length() > 0 ) {
563 int nextC = allmsg.find( "-", 1 ); 563 int nextC = allmsg.find( "-", 1 );
564 if ( nextC == -1 ) { 564 if ( nextC == -1 ) {
565 msg = allmsg; 565 msg = allmsg;
566 allmsg = ""; 566 allmsg = "";
567 } else{ 567 } else{
568 msg = allmsg.left( nextC ); 568 msg = allmsg.left( nextC );
569 allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); 569 allmsg = allmsg.mid( nextC, allmsg.length()-nextC );
570 } 570 }
571 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); 571 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() );
572 if ( msg == "-newEvent" ) { 572 if ( msg == "-newEvent" ) {
573 QTimer::singleShot( 0, mView, SLOT ( newEvent())); 573 QTimer::singleShot( 0, mView, SLOT ( newEvent()));
574 } 574 }
575 if ( msg == "-newTodo" ) { 575 if ( msg == "-newTodo" ) {
576 QTimer::singleShot( 0, mView, SLOT ( newTodo())); 576 QTimer::singleShot( 0, mView, SLOT ( newTodo()));
577 } 577 }
578 if ( msg == "-showWN" ) { 578 if ( msg == "-showWN" ) {
579 mView->viewManager()->showWhatsNextView(); 579 mView->viewManager()->showWhatsNextView();
580 } 580 }
581 if ( msg == "-showTodo" ) { 581 if ( msg == "-showTodo" ) {
582 mView->viewManager()->showTodoView(); 582 mView->viewManager()->showTodoView();
583 } 583 }
584 if ( msg == "-showList" ) { 584 if ( msg == "-showList" ) {
585 mView->viewManager()->showListView(); 585 mView->viewManager()->showListView();
586 } 586 }
587 else if ( msg == "-showDay" ) { 587 else if ( msg == "-showDay" ) {
588 mView->viewManager()->showDayView(); 588 mView->viewManager()->showDayView();
589 } 589 }
590 else if ( msg == "-showWWeek" ) { 590 else if ( msg == "-showWWeek" ) {
591 mView->viewManager()->showWorkWeekView(); 591 mView->viewManager()->showWorkWeekView();
592 } 592 }
593 else if ( msg == "-ringSync" ) { 593 else if ( msg == "-ringSync" ) {
594 QTimer::singleShot( 0, this, SLOT (startMultiSync())); 594 QTimer::singleShot( 0, this, SLOT (startMultiSync()));
595 } 595 }
596 else if ( msg == "-showWeek" ) { 596 else if ( msg == "-showWeek" ) {
597 mView->viewManager()->showWeekView(); 597 mView->viewManager()->showWeekView();
598 } 598 }
599 else if ( msg == "-showTodo" ) { 599 else if ( msg == "-showTodo" ) {
600 mView->viewManager()->showTodoView(); 600 mView->viewManager()->showTodoView();
601 } 601 }
602 else if ( msg == "-showJournal" ) { 602 else if ( msg == "-showJournal" ) {
603 mView->dateNavigator()->selectDates( 1 ); 603 mView->dateNavigator()->selectDates( 1 );
604 mView->dateNavigator()->selectToday(); 604 mView->dateNavigator()->selectToday();
605 mView->viewManager()->showJournalView(); 605 mView->viewManager()->showJournalView();
606 } 606 }
607 else if ( msg == "-showKO" ) { 607 else if ( msg == "-showKO" ) {
608 mView->viewManager()->showNextXView(); 608 mView->viewManager()->showNextXView();
609 } 609 }
610 else if ( msg == "-showWNext" ) { 610 else if ( msg == "-showWNext" ) {
611 mView->viewManager()->showWhatsNextView(); 611 mView->viewManager()->showWhatsNextView();
612 } 612 }
613 else if ( msg == "nextView()" ) { 613 else if ( msg == "nextView()" ) {
614 mView->viewManager()->showNextView(); 614 mView->viewManager()->showNextView();
615 } 615 }
616 else if ( msg == "-showNextXView" ) { 616 else if ( msg == "-showNextXView" ) {
617 mView->viewManager()->showNextXView(); 617 mView->viewManager()->showNextXView();
618 } 618 }
619 619
620 620
621 } 621 }
622 622
623 showMaximized(); 623 showMaximized();
624 raise(); 624 raise();
625} 625}
626void MainWindow::startMultiSync() 626void MainWindow::startMultiSync()
627{ 627{
628 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); 628 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
629 if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), 629 if ( QMessageBox::information( this, i18n("KDE-Pim Sync"),
630 question, 630 question,
631 i18n("Yes"), i18n("No"), 631 i18n("Yes"), i18n("No"),
632 0, 0 ) != 0 ) { 632 0, 0 ) != 0 ) {
633 setCaption(i18n("Aborted! Nothing synced!")); 633 setCaption(i18n("Aborted! Nothing synced!"));
634 return; 634 return;
635 } 635 }
636 mSyncManager->multiSync( false ); 636 mSyncManager->multiSync( false );
637#ifndef DESKTOP_VERSION 637#ifndef DESKTOP_VERSION
638 QCopEnvelope e("QPE/Application/kapi", "doRingSync"); 638 QCopEnvelope e("QPE/Application/kapi", "doRingSync");
639#endif 639#endif
640} 640}
641QPixmap MainWindow::loadPixmap( QString name ) 641QPixmap MainWindow::loadPixmap( QString name )
642{ 642{
643 return SmallIcon( name ); 643 return SmallIcon( name );
644 644
645} 645}
646void MainWindow::setUsesBigPixmaps ( bool b ) 646void MainWindow::setUsesBigPixmaps ( bool b )
647{ 647{
648 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); 648 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
649 if ( b ) 649 if ( b )
650 qDebug("KO: BigPixmaps are not supported "); 650 qDebug("KO: BigPixmaps are not supported ");
651} 651}
652void MainWindow::initActions() 652void MainWindow::initActions()
653{ 653{
654 //KOPrefs::instance()->mShowFullMenu 654 //KOPrefs::instance()->mShowFullMenu
655 iconToolBar->clear(); 655 iconToolBar->clear();
656 KOPrefs *p = KOPrefs::instance(); 656 KOPrefs *p = KOPrefs::instance();
657 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 657 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
658 658
659 QPopupMenu *viewMenu = new QPopupMenu( this ); 659 QPopupMenu *viewMenu = new QPopupMenu( this );
660 QPopupMenu *actionMenu = new QPopupMenu( this ); 660 QPopupMenu *actionMenu = new QPopupMenu( this );
661 mCurrentItemMenu = new QPopupMenu ( this ); 661 mCurrentItemMenu = new QPopupMenu ( this );
662 QPopupMenu *nextConflictMenu = new QPopupMenu ( this );
662 QPopupMenu *importMenu = new QPopupMenu( this ); 663 QPopupMenu *importMenu = new QPopupMenu( this );
663 QPopupMenu *importMenu_X = new QPopupMenu( this ); 664 QPopupMenu *importMenu_X = new QPopupMenu( this );
664 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 665 QPopupMenu *exportMenu_X = new QPopupMenu( this );
665 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 666 QPopupMenu *beamMenu_X = new QPopupMenu( this );
666 selectFilterMenu = new QPopupMenu( this ); 667 selectFilterMenu = new QPopupMenu( this );
667 selectFilterMenu->setCheckable( true ); 668 selectFilterMenu->setCheckable( true );
668 syncMenu = new QPopupMenu( this ); 669 syncMenu = new QPopupMenu( this );
669 configureAgendaMenu = new QPopupMenu( this ); 670 configureAgendaMenu = new QPopupMenu( this );
670 configureToolBarMenu = new QPopupMenu( this ); 671 configureToolBarMenu = new QPopupMenu( this );
671 QPopupMenu *helpMenu = new QPopupMenu( this ); 672 QPopupMenu *helpMenu = new QPopupMenu( this );
672 QIconSet icon; 673 QIconSet icon;
673 int pixWid = 22, pixHei = 22; 674 int pixWid = 22, pixHei = 22;
674 QString pathString = ""; 675 QString pathString = "";
675 if ( !p->mToolBarMiniIcons ) { 676 if ( !p->mToolBarMiniIcons ) {
676 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { 677 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) {
677 pathString += "icons16/"; 678 pathString += "icons16/";
678 pixWid = 18; pixHei = 16; 679 pixWid = 18; pixHei = 16;
679 } 680 }
680 } else { 681 } else {
681 pathString += "iconsmini/"; 682 pathString += "iconsmini/";
682 pixWid = 18; pixHei = 16; 683 pixWid = 18; pixHei = 16;
683 } 684 }
684 if ( KOPrefs::instance()->mShowFullMenu ) { 685 if ( KOPrefs::instance()->mShowFullMenu ) {
685 QMenuBar *menuBar1; 686 QMenuBar *menuBar1;
686 menuBar1 = menuBar(); 687 menuBar1 = menuBar();
687 menuBar1->insertItem( i18n("File"), importMenu ); 688 menuBar1->insertItem( i18n("File"), importMenu );
688 menuBar1->insertItem( i18n("View"), viewMenu ); 689 menuBar1->insertItem( i18n("View"), viewMenu );
689 menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); 690 menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu );
690 menuBar1->insertItem( i18n("Action"), actionMenu ); 691 menuBar1->insertItem( i18n("Action"), actionMenu );
691#ifdef DESKTOP_VERSION 692#ifdef DESKTOP_VERSION
692 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 693 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
693 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 694 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
694#else 695#else
695 menuBar1->insertItem( i18n("Sync"), syncMenu ); 696 menuBar1->insertItem( i18n("Sync"), syncMenu );
696 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); 697 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu );
697#endif 698#endif
698 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); 699 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
699 menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); 700 menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
700 menuBar1->insertItem( i18n("Help"), helpMenu ); 701 menuBar1->insertItem( i18n("Help"), helpMenu );
701 } else { 702 } else {
702 QPEMenuBar *menuBar1; 703 QPEMenuBar *menuBar1;
703 menuBar1 = new QPEMenuBar( iconToolBar ); 704 menuBar1 = new QPEMenuBar( iconToolBar );
704 QPopupMenu *menuBar = new QPopupMenu( this ); 705 QPopupMenu *menuBar = new QPopupMenu( this );
705 icon = loadPixmap( pathString + "z_menu" ); 706 icon = loadPixmap( pathString + "z_menu" );
706 menuBar1->insertItem( icon.pixmap(), menuBar); 707 menuBar1->insertItem( icon.pixmap(), menuBar);
707 //menuBar1->insertItem( i18n("ME"), menuBar); 708 //menuBar1->insertItem( i18n("ME"), menuBar);
708 menuBar->insertItem( i18n("File"), importMenu ); 709 menuBar->insertItem( i18n("File"), importMenu );
709 menuBar->insertItem( i18n("View"), viewMenu ); 710 menuBar->insertItem( i18n("View"), viewMenu );
710 menuBar->insertItem( i18n("Edit"), mCurrentItemMenu ); 711 menuBar->insertItem( i18n("Edit"), mCurrentItemMenu );
711 menuBar->insertItem( i18n("Action"), actionMenu ); 712 menuBar->insertItem( i18n("Action"), actionMenu );
712 menuBar->insertItem( i18n("Synchronize"), syncMenu ); 713 menuBar->insertItem( i18n("Synchronize"), syncMenu );
713 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 714 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
714 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 715 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
715 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 716 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
716 menuBar->insertItem( i18n("Help"), helpMenu ); 717 menuBar->insertItem( i18n("Help"), helpMenu );
717 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 718 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
718 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 719 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
719 } 720 }
720 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 721 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
721 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 722 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
722 723
723 724
724 mWeekBgColor = iconToolBar->backgroundColor(); 725 mWeekBgColor = iconToolBar->backgroundColor();
725 mWeekPixmap.resize( pixWid , pixHei ); 726 mWeekPixmap.resize( pixWid , pixHei );
726 mWeekPixmap.fill( mWeekBgColor ); 727 mWeekPixmap.fill( mWeekBgColor );
727 icon = mWeekPixmap; 728 icon = mWeekPixmap;
728 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 729 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
729 if ( p-> mShowIconWeekNum ) 730 if ( p-> mShowIconWeekNum )
730 mWeekAction->addTo( iconToolBar ); 731 mWeekAction->addTo( iconToolBar );
731 mWeekFont = font(); 732 mWeekFont = font();
732 733
733 int fontPoint = mWeekFont.pointSize(); 734 int fontPoint = mWeekFont.pointSize();
734 QFontMetrics f( mWeekFont ); 735 QFontMetrics f( mWeekFont );
735 int fontWid = f.width( "30" ); 736 int fontWid = f.width( "30" );
736 while ( fontWid > pixWid ) { 737 while ( fontWid > pixWid ) {
737 --fontPoint; 738 --fontPoint;
738 mWeekFont.setPointSize( fontPoint ); 739 mWeekFont.setPointSize( fontPoint );
739 QFontMetrics f( mWeekFont ); 740 QFontMetrics f( mWeekFont );
740 fontWid = f.width( "30" ); 741 fontWid = f.width( "30" );
741 //qDebug("dec-- "); 742 //qDebug("dec-- ");
742 } 743 }
743 744
744 connect( mWeekAction, SIGNAL( activated() ), 745 connect( mWeekAction, SIGNAL( activated() ),
745 this, SLOT( weekAction() ) ); 746 this, SLOT( weekAction() ) );
746 747
747 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 748 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
748 if ( p->mShowIconFilterview ) { 749 if ( p->mShowIconFilterview ) {
749 icon = loadPixmap( pathString + "filter" ); 750 icon = loadPixmap( pathString + "filter" );
750 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); 751 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
751 connect( actionFilterMenuTB, SIGNAL( activated() ), 752 connect( actionFilterMenuTB, SIGNAL( activated() ),
752 this, SLOT( fillFilterMenuTB() ) ); 753 this, SLOT( fillFilterMenuTB() ) );
753 actionFilterMenuTB->addTo( iconToolBar ); 754 actionFilterMenuTB->addTo( iconToolBar );
754 selectFilterMenuTB = new QPopupMenu( this ); 755 selectFilterMenuTB = new QPopupMenu( this );
755 selectFilterMenuTB->setCheckable( true ); 756 selectFilterMenuTB->setCheckable( true );
756 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 757 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
757 } 758 }
758 759
759 //#endif 760 //#endif
760 // ****************** 761 // ******************
761 QAction *action; 762 QAction *action;
762 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 763 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
763 configureToolBarMenu->setCheckable( true ); 764 configureToolBarMenu->setCheckable( true );
764 765
765 766
766 configureAgendaMenu->setCheckable( true ); 767 configureAgendaMenu->setCheckable( true );
767 int iii ; 768 int iii ;
768 for ( iii = 1;iii<= 10 ;++iii ){ 769 for ( iii = 1;iii<= 10 ;++iii ){
769 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 770 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
770 } 771 }
771 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 772 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
772 773
773 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 774 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
774 this, SLOT( showConfigureAgenda( ) ) ); 775 this, SLOT( showConfigureAgenda( ) ) );
775 icon = loadPixmap( pathString + "today" ); 776 icon = loadPixmap( pathString + "today" );
776 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 777 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
777 today_action->addTo( actionMenu ); 778 today_action->addTo( actionMenu );
778 connect( today_action, SIGNAL( activated() ), 779 connect( today_action, SIGNAL( activated() ),
779 mView, SLOT( goToday() ) ); 780 mView, SLOT( goToday() ) );
780 781
781 icon = loadPixmap( pathString + "picker" ); 782 icon = loadPixmap( pathString + "picker" );
782 QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); 783 QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this );
783 dPickerAction->addTo( actionMenu ); 784 dPickerAction->addTo( actionMenu );
784 connect( dPickerAction, SIGNAL( activated() ), 785 connect( dPickerAction, SIGNAL( activated() ),
785 mView, SLOT( showDatePicker() ) ); 786 mView, SLOT( showDatePicker() ) );
786 787
787 icon = loadPixmap( pathString + "search" ); 788 icon = loadPixmap( pathString + "search" );
788 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 789 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
789 search_action->addTo( actionMenu ); 790 search_action->addTo( actionMenu );
790 connect( search_action, SIGNAL( activated() ), 791 connect( search_action, SIGNAL( activated() ),
791 mView->dialogManager(), SLOT( showSearchDialog() ) ); 792 mView->dialogManager(), SLOT( showSearchDialog() ) );
793 actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu );
792 794
795 action = new QAction( "Undo Delete", i18n("All events"), 0, this );
796 action->addTo( nextConflictMenu );
797 connect( action, SIGNAL( activated() ),
798 mView, SLOT( conflictAll() ) );
799
800 action = new QAction( "Undo Delete", i18n("Allday events"), 0, this );
801 action->addTo( nextConflictMenu );
802 connect( action, SIGNAL( activated() ),
803 mView, SLOT( conflictAllday() ) );
804
805 action = new QAction( "Undo Delete", i18n("Events with time"), 0, this );
806 action->addTo( nextConflictMenu );
807 connect( action, SIGNAL( activated() ),
808 mView, SLOT( conflictNotAll() ) );
809
793 actionMenu->insertSeparator(); 810 actionMenu->insertSeparator();
794 811
812 icon = loadPixmap( pathString + "newevent" );
813 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
814 ne_action->addTo( mCurrentItemMenu );
815 connect( ne_action, SIGNAL( activated() ),
816 mView, SLOT( newEvent() ) );
817 icon = loadPixmap( pathString + "newtodo" );
818 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
819 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
820 nt_action->addTo( mCurrentItemMenu );
821 connect( nt_action, SIGNAL( activated() ),
822 mView, SLOT( newTodo() ) );
823 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
824 this );
825 mNewSubTodoAction->addTo( mCurrentItemMenu );
826 connect( mNewSubTodoAction, SIGNAL( activated() ),
827 mView, SLOT( newSubTodo() ) );
795 828
796
797 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
798 action->addTo( mCurrentItemMenu );
799 connect( action, SIGNAL( activated() ),
800 mView, SLOT( undo_delete() ) );
801 mCurrentItemMenu->insertSeparator(); 829 mCurrentItemMenu->insertSeparator();
802 icon = loadPixmap( pathString + "newevent" ); 830 icon = loadPixmap( pathString + "newevent" );
803 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 831 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
804 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); 832 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
805 configureToolBarMenu->insertSeparator(); 833 configureToolBarMenu->insertSeparator();
806 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); 834 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
807 configureToolBarMenu->insertSeparator(); 835 configureToolBarMenu->insertSeparator();
808 configureToolBarMenu->insertItem(i18n("Week Number"), 400); 836 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
809 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 837 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
810 838
811 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); 839 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu);
812 mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); 840 mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this );
813 mShowAction->addTo( mCurrentItemMenu ); 841 mShowAction->addTo( mCurrentItemMenu );
814 connect( mShowAction, SIGNAL( activated() ), 842 connect( mShowAction, SIGNAL( activated() ),
815 mView, SLOT( showIncidence() ) ); 843 mView, SLOT( showIncidence() ) );
816 844
817 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 845 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
818 mEditAction->addTo( mCurrentItemMenu ); 846 mEditAction->addTo( mCurrentItemMenu );
819 connect( mEditAction, SIGNAL( activated() ), 847 connect( mEditAction, SIGNAL( activated() ),
820 mView, SLOT( editIncidence() ) ); 848 mView, SLOT( editIncidence() ) );
821 849
822 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 850 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
823 mDeleteAction->addTo( mCurrentItemMenu ); 851 mDeleteAction->addTo( mCurrentItemMenu );
824 connect( mDeleteAction, SIGNAL( activated() ), 852 connect( mDeleteAction, SIGNAL( activated() ),
825 mView, SLOT( deleteIncidence() ) ); 853 mView, SLOT( deleteIncidence() ) );
826 854
827 855
828 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 856 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
829 mCloneAction->addTo( mCurrentItemMenu ); 857 mCloneAction->addTo( mCurrentItemMenu );
830 connect( mCloneAction, SIGNAL( activated() ), 858 connect( mCloneAction, SIGNAL( activated() ),
831 mView, SLOT( cloneIncidence() ) ); 859 mView, SLOT( cloneIncidence() ) );
832 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 860 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
833 mMoveAction->addTo( mCurrentItemMenu ); 861 mMoveAction->addTo( mCurrentItemMenu );
834 connect( mMoveAction, SIGNAL( activated() ), 862 connect( mMoveAction, SIGNAL( activated() ),
835 mView, SLOT( moveIncidence() ) ); 863 mView, SLOT( moveIncidence() ) );
836#ifndef DESKTOP_VERSION 864#ifndef DESKTOP_VERSION
837 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 865 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
838 mBeamAction->addTo(mCurrentItemMenu ); 866 mBeamAction->addTo(mCurrentItemMenu );
839 connect( mBeamAction, SIGNAL( activated() ), 867 connect( mBeamAction, SIGNAL( activated() ),
840 mView, SLOT( beamIncidence() ) ); 868 mView, SLOT( beamIncidence() ) );
841#endif 869#endif
842 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 870 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
843 mCancelAction->addTo( mCurrentItemMenu ); 871 mCancelAction->addTo( mCurrentItemMenu );
844 connect( mCancelAction, SIGNAL( activated() ), 872 connect( mCancelAction, SIGNAL( activated() ),
845 mView, SLOT( toggleCancelIncidence() ) ); 873 mView, SLOT( toggleCancelIncidence() ) );
846 874
847 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 875
848 ne_action->addTo( actionMenu ); 876 mCurrentItemMenu->insertSeparator();
849 connect( ne_action, SIGNAL( activated() ), 877 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
850 mView, SLOT( newEvent() ) ); 878 action->addTo( mCurrentItemMenu );
851 icon = loadPixmap( pathString + "newtodo" ); 879 connect( action, SIGNAL( activated() ),
852 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 880 mView, SLOT( undo_delete() ) );
853 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
854 nt_action->addTo( actionMenu );
855 connect( nt_action, SIGNAL( activated() ),
856 mView, SLOT( newTodo() ) );
857
858
859 881
860 // *********************** 882 // ***********************
861 if ( KOPrefs::instance()->mVerticalScreen ) { 883 if ( KOPrefs::instance()->mVerticalScreen ) {
862 icon = SmallIcon( "1updownarrow" ); 884 icon = SmallIcon( "1updownarrow" );
863 } else { 885 } else {
864 icon = SmallIcon("1leftrightarrow" ); 886 icon = SmallIcon("1leftrightarrow" );
865 } 887 }
866 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); 888 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
867 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); 889 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
868 FSaction->addTo( viewMenu ); 890 FSaction->addTo( viewMenu );
869 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); 891 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
870 892
871 893
872 icon = loadPixmap( pathString + "filter" ); 894 icon = loadPixmap( pathString + "filter" );
873 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); 895 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
874 icon = loadPixmap( pathString + "configure" ); 896 icon = loadPixmap( pathString + "configure" );
875 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); 897 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
876 action->addTo( viewMenu ); 898 action->addTo( viewMenu );
877 connect( action, SIGNAL( activated() ), 899 connect( action, SIGNAL( activated() ),
878 mView, SLOT( toggleFilter() ) ); 900 mView, SLOT( toggleFilter() ) );
879 mToggleFilter = action; 901 mToggleFilter = action;
880 icon = loadPixmap( pathString + "navi" ); 902 icon = loadPixmap( pathString + "navi" );
881 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); 903 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
882 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 904 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
883 action->addTo( viewMenu ); 905 action->addTo( viewMenu );
884 connect( action, SIGNAL( activated() ), 906 connect( action, SIGNAL( activated() ),
885 mView, SLOT( toggleDateNavigatorWidget() ) ); 907 mView, SLOT( toggleDateNavigatorWidget() ) );
886 mToggleNav = action ; 908 mToggleNav = action ;
887 icon = loadPixmap( pathString + "allday" ); 909 icon = loadPixmap( pathString + "allday" );
888 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); 910 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
889 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 911 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
890 action->addTo( viewMenu ); 912 action->addTo( viewMenu );
891 connect( action, SIGNAL( activated() ), 913 connect( action, SIGNAL( activated() ),
892 mView, SLOT( toggleAllDaySize() ) ); 914 mView, SLOT( toggleAllDaySize() ) );
893 mToggleAllday = action; 915 mToggleAllday = action;
894 916
895 917
896 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 918 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
897 mToggleNav, SLOT( setEnabled ( bool ) ) ); 919 mToggleNav, SLOT( setEnabled ( bool ) ) );
898 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 920 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
899 // mToggleFilter, SLOT( setEnabled ( bool ) ) ); 921 // mToggleFilter, SLOT( setEnabled ( bool ) ) );
900 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 922 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
901 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 923 mToggleAllday, SLOT( setEnabled ( bool ) ) );
902 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 924 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
903 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); 925 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) );
904 926
905 927
906 dPickerAction->addTo( iconToolBar ); 928 dPickerAction->addTo( iconToolBar );
907 viewMenu->insertSeparator(); 929 viewMenu->insertSeparator();
908 930
909 if ( p-> mShowIconToggleFull ) 931 if ( p-> mShowIconToggleFull )
910 FSaction->addTo( iconToolBar ); 932 FSaction->addTo( iconToolBar );
911 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); 933 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar );
912 934
913 //******************** 935 //********************
914 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); 936 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar );
915 937
916 938
917 icon = loadPixmap( pathString + "whatsnext" ); 939 icon = loadPixmap( pathString + "whatsnext" );
918 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); 940 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
919 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 941 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
920 whatsnext_action->addTo( viewMenu ); 942 whatsnext_action->addTo( viewMenu );
921 connect( whatsnext_action, SIGNAL( activated() ), 943 connect( whatsnext_action, SIGNAL( activated() ),
922 mView->viewManager(), SLOT( showWhatsNextView() ) ); 944 mView->viewManager(), SLOT( showWhatsNextView() ) );
923 945
924 icon = loadPixmap( pathString + "xdays" ); 946 icon = loadPixmap( pathString + "xdays" );
925 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); 947 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 );
926 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 948 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
927 xdays_action->addTo( viewMenu ); 949 xdays_action->addTo( viewMenu );
928 connect( xdays_action, SIGNAL( activated() ), 950 connect( xdays_action, SIGNAL( activated() ),
929 mView->viewManager(), SLOT( showNextXView() ) ); 951 mView->viewManager(), SLOT( showNextXView() ) );
930 952
931 953
932 icon = loadPixmap( pathString + "journal" ); 954 icon = loadPixmap( pathString + "journal" );
933 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 955 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
934 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 956 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
935 viewjournal_action->addTo( viewMenu ); 957 viewjournal_action->addTo( viewMenu );
936 connect( viewjournal_action, SIGNAL( activated() ), 958 connect( viewjournal_action, SIGNAL( activated() ),
937 mView->viewManager(), SLOT( showJournalView() ) ); 959 mView->viewManager(), SLOT( showJournalView() ) );
938 960
939 961
940 icon = loadPixmap( pathString + "day" ); 962 icon = loadPixmap( pathString + "day" );
941 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 963 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
942 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 964 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
943 day1_action->addTo( viewMenu ); 965 day1_action->addTo( viewMenu );
944 // action->addTo( toolBar ); 966 // action->addTo( toolBar );
945 connect( day1_action, SIGNAL( activated() ), 967 connect( day1_action, SIGNAL( activated() ),
946 mView->viewManager(), SLOT( showDayView() ) ); 968 mView->viewManager(), SLOT( showDayView() ) );
947 969
948 icon = loadPixmap( pathString + "workweek" ); 970 icon = loadPixmap( pathString + "workweek" );
949 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 971 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
950 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 972 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
951 day5_action->addTo( viewMenu ); 973 day5_action->addTo( viewMenu );
952 connect( day5_action, SIGNAL( activated() ), 974 connect( day5_action, SIGNAL( activated() ),
953 mView->viewManager(), SLOT( showWorkWeekView() ) ); 975 mView->viewManager(), SLOT( showWorkWeekView() ) );
954 976
955 icon = loadPixmap( pathString + "week" ); 977 icon = loadPixmap( pathString + "week" );
956 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 978 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
957 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 979 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
958 day7_action->addTo( viewMenu ); 980 day7_action->addTo( viewMenu );
959 connect( day7_action, SIGNAL( activated() ), 981 connect( day7_action, SIGNAL( activated() ),
960 mView->viewManager(), SLOT( showWeekView() ) ); 982 mView->viewManager(), SLOT( showWeekView() ) );
961 983
962 icon = loadPixmap( pathString + "workweek2" ); 984 icon = loadPixmap( pathString + "workweek2" );
963 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 985 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
964 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 986 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
965 day6_action->addTo( viewMenu ); 987 day6_action->addTo( viewMenu );
966 connect( day6_action, SIGNAL( activated() ), 988 connect( day6_action, SIGNAL( activated() ),
967 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 989 mView->viewManager(), SLOT( showMonthViewWeek() ) );
968 990
969 icon = loadPixmap( pathString + "month" ); 991 icon = loadPixmap( pathString + "month" );
970 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 992 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
971 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 993 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
972 month_action->addTo( viewMenu ); 994 month_action->addTo( viewMenu );
973 connect( month_action, SIGNAL( activated() ), 995 connect( month_action, SIGNAL( activated() ),
974 mView->viewManager(), SLOT( showMonthView() ) ); 996 mView->viewManager(), SLOT( showMonthView() ) );
975 997
976 icon = loadPixmap( pathString + "list" ); 998 icon = loadPixmap( pathString + "list" );
977 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 999 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
978 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 1000 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
979 showlist_action->addTo( viewMenu ); 1001 showlist_action->addTo( viewMenu );
980 connect( showlist_action, SIGNAL( activated() ), 1002 connect( showlist_action, SIGNAL( activated() ),
981 mView->viewManager(), SLOT( showListView() ) ); 1003 mView->viewManager(), SLOT( showListView() ) );
982 1004
983 icon = loadPixmap( pathString + "todo" ); 1005 icon = loadPixmap( pathString + "todo" );
984 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 1006 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
985 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 1007 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
986 todoview_action->addTo( viewMenu ); 1008 todoview_action->addTo( viewMenu );
987 connect( todoview_action, SIGNAL( activated() ), 1009 connect( todoview_action, SIGNAL( activated() ),
988 mView->viewManager(), SLOT( showTodoView() ) ); 1010 mView->viewManager(), SLOT( showTodoView() ) );
989 1011
990 1012
991 1013
992#if 0 1014#if 0
993 action = new QAction( "view_timespan", "Time Span", 0, this ); 1015 action = new QAction( "view_timespan", "Time Span", 0, this );
994 action->addTo( viewMenu ); 1016 action->addTo( viewMenu );
995 connect( action, SIGNAL( activated() ), 1017 connect( action, SIGNAL( activated() ),
996 mView->viewManager(), SLOT( showTimeSpanView() ) ); 1018 mView->viewManager(), SLOT( showTimeSpanView() ) );
997#endif 1019#endif
998 1020
999 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 1021
1000 this );
1001 mNewSubTodoAction->addTo( actionMenu );
1002 connect( mNewSubTodoAction, SIGNAL( activated() ),
1003 mView, SLOT( newSubTodo() ) );
1004 1022
1005 action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, 1023 action = new QAction( "purge_completed", i18n("Purge Completed..."), 0,
1006 this ); 1024 this );
1007 action->addTo( actionMenu ); 1025 action->addTo( actionMenu );
1008 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 1026 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
1009 1027
1010 1028
1011 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); 1029 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
1012 1030
1013 1031
1014 1032
1015 actionMenu->insertSeparator(); 1033 actionMenu->insertSeparator();
1016 action = new QAction( "manage cat", i18n("Edit category list..."), 0, 1034 action = new QAction( "manage cat", i18n("Edit category list..."), 0,
1017 this ); 1035 this );
1018 action->addTo( actionMenu ); 1036 action->addTo( actionMenu );
1019 connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); 1037 connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) );
1020 1038
1021 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1039 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
1022 this ); 1040 this );
1023 action->addTo( actionMenu ); 1041 action->addTo( actionMenu );
1024 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1042 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
1025 1043
1026 1044
1027 actionMenu->insertSeparator(); 1045 actionMenu->insertSeparator();
1028 icon = loadPixmap( pathString + "configure" ); 1046 icon = loadPixmap( pathString + "configure" );
1029 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); 1047 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
1030 action->addTo( actionMenu ); 1048 action->addTo( actionMenu );
1031 connect( action, SIGNAL( activated() ), 1049 connect( action, SIGNAL( activated() ),
1032 mView, SLOT( edit_options() ) ); 1050 mView, SLOT( edit_options() ) );
1033 action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); 1051 action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this );
1034 action->addTo( actionMenu ); 1052 action->addTo( actionMenu );
1035 connect( action, SIGNAL( activated() ), 1053 connect( action, SIGNAL( activated() ),
1036 this, SLOT( calHint() ) ); 1054 this, SLOT( calHint() ) );
1037 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); 1055 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
1038 action->addTo( actionMenu ); 1056 action->addTo( actionMenu );
1039 connect( action, SIGNAL( activated() ), 1057 connect( action, SIGNAL( activated() ),
1040 mView, SLOT( edit_global_options() ) ); 1058 mView, SLOT( edit_global_options() ) );
1041 if ( KOPrefs::instance()->mShowFullMenu ) { 1059 if ( KOPrefs::instance()->mShowFullMenu ) {
1042 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); 1060 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
1043 1061
1044 } 1062 }
1045 // actionMenu->insertSeparator(); 1063 // actionMenu->insertSeparator();
1046 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 1064 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
1047 this ); 1065 this );
1048 action->addTo( importMenu_X ); 1066 action->addTo( importMenu_X );
1049 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 1067 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
1050 action = new QAction( "import_quick", i18n("Import last file"), 0, 1068 action = new QAction( "import_quick", i18n("Import last file"), 0,
1051 this ); 1069 this );
1052 action->addTo( importMenu_X ); 1070 action->addTo( importMenu_X );
1053 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 1071 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
1054 importMenu_X->insertSeparator(); 1072 importMenu_X->insertSeparator();
1055 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, 1073 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
1056 this ); 1074 this );
1057 action->addTo( importMenu_X ); 1075 action->addTo( importMenu_X );
1058 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 1076 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
1059 //#ifndef DESKTOP_VERSION 1077 //#ifndef DESKTOP_VERSION
1060 importMenu_X->insertSeparator(); 1078 importMenu_X->insertSeparator();
1061 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 1079 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
1062 this ); 1080 this );
1063 action->addTo( importMenu_X ); 1081 action->addTo( importMenu_X );
1064 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 1082 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
1065 //#else 1083 //#else
1066#ifdef _OL_IMPORT_ 1084#ifdef _OL_IMPORT_
1067 importMenu_X->insertSeparator(); 1085 importMenu_X->insertSeparator();
1068 action = new QAction( "import_ol", i18n("Import from OL"), 0, 1086 action = new QAction( "import_ol", i18n("Import from OL"), 0,
1069 this ); 1087 this );
1070 action->addTo( importMenu_X ); 1088 action->addTo( importMenu_X );
1071 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 1089 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
1072#endif 1090#endif
1073 //#endif 1091 //#endif
1074 1092
1075 //importMenu->insertSeparator(); 1093 //importMenu->insertSeparator();
1076#if 0 1094#if 0
1077 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 1095 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
1078 this ); 1096 this );
1079 action->addTo( importMenu ); 1097 action->addTo( importMenu );
1080 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); 1098 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
1081#endif 1099#endif
1082 action = new QAction( "save_cal", i18n("Save Backup..."), 0, 1100 action = new QAction( "save_cal", i18n("Save Backup..."), 0,
1083 this ); 1101 this );
1084 action->addTo( importMenu ); 1102 action->addTo( importMenu );
1085 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); 1103 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
1086 importMenu->insertSeparator(); 1104 importMenu->insertSeparator();
1087 importMenu->insertItem( i18n("Import"), importMenu_X ); 1105 importMenu->insertItem( i18n("Import"), importMenu_X );
1088 //importMenu->insertSeparator(); 1106 //importMenu->insertSeparator();
1089 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, 1107 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0,
1090 this ); 1108 this );
1091 action->addTo( exportMenu_X ); 1109 action->addTo( exportMenu_X );
1092 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); 1110 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
1093 1111
1094 1112
1095 //LR 1113 //LR
1096 QPopupMenu *ex2phone = new QPopupMenu( this ); 1114 QPopupMenu *ex2phone = new QPopupMenu( this );
1097 ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1115 ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1098 ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1116 ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1099 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); 1117 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) );
1100 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); 1118 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone );
1101 1119
1102 importMenu->insertItem( i18n("Export"), exportMenu_X ); 1120 importMenu->insertItem( i18n("Export"), exportMenu_X );
1103#ifndef DESKTOP_VERSION 1121#ifndef DESKTOP_VERSION
1104 //importMenu->insertSeparator(); 1122 //importMenu->insertSeparator();
1105 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, 1123 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0,
1106 this ); 1124 this );
1107 brAction->addTo( beamMenu_X ); 1125 brAction->addTo( beamMenu_X );
1108 brAction->setToggleAction (true ) ; 1126 brAction->setToggleAction (true ) ;
1109 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); 1127 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) );
1110 1128
1111 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, 1129 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0,
1112 this ); 1130 this );
1113 action->addTo( beamMenu_X ); 1131 action->addTo( beamMenu_X );
1114 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); 1132 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
1115 1133
1116 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, 1134 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
1117 this ); 1135 this );
1118 action->addTo( beamMenu_X ); 1136 action->addTo( beamMenu_X );
1119 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); 1137 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
1120 importMenu->insertItem( i18n("Beam"), beamMenu_X ); 1138 importMenu->insertItem( i18n("Beam"), beamMenu_X );
1121#else 1139#else
1122 //importMenu->insertSeparator(); 1140 //importMenu->insertSeparator();
1123 icon = loadPixmap( pathString + "print" ); 1141 icon = loadPixmap( pathString + "print" );
1124 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 1142 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
1125 action->addTo( beamMenu_X ); 1143 action->addTo( beamMenu_X );
1126 connect( action, SIGNAL( activated() ), 1144 connect( action, SIGNAL( activated() ),
1127 this, SLOT( printCal() ) ); 1145 this, SLOT( printCal() ) );
1128 1146
1129 icon = loadPixmap( pathString + "print" ); 1147 icon = loadPixmap( pathString + "print" );
1130 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 1148 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
1131 action->addTo( beamMenu_X ); 1149 action->addTo( beamMenu_X );
1132 connect( action, SIGNAL( activated() ), 1150 connect( action, SIGNAL( activated() ),
1133 this, SLOT( printSel() ) ); 1151 this, SLOT( printSel() ) );
1134 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 1152 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
1135 action->addTo( beamMenu_X ); 1153 action->addTo( beamMenu_X );
1136 connect( action, SIGNAL( activated() ), 1154 connect( action, SIGNAL( activated() ),
1137 mView->viewManager(), SLOT( slotprintWNV() ) ); 1155 mView->viewManager(), SLOT( slotprintWNV() ) );
1138 1156
1139 1157
1140 icon = loadPixmap( pathString + "print" ); 1158 icon = loadPixmap( pathString + "print" );
1141 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); 1159 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this );
1142 action->addTo( beamMenu_X ); 1160 action->addTo( beamMenu_X );
1143 connect( action, SIGNAL( activated() ), 1161 connect( action, SIGNAL( activated() ),
1144 this, SLOT( printListView() ) ); 1162 this, SLOT( printListView() ) );
1145 1163
1146 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); 1164 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
1147 action->addTo( beamMenu_X ); 1165 action->addTo( beamMenu_X );
1148 connect( action, SIGNAL( activated() ), 1166 connect( action, SIGNAL( activated() ),
1149 mView, SLOT( slotprintSelInc() ) ); 1167 mView, SLOT( slotprintSelInc() ) );
1150 1168
1151 importMenu->insertItem( i18n("Print"), beamMenu_X ); 1169 importMenu->insertItem( i18n("Print"), beamMenu_X );
1152#endif 1170#endif
1153 1171
1154 importMenu->insertSeparator(); 1172 importMenu->insertSeparator();
1155 action = new QAction( "beam all", i18n("Save"), 0, 1173 action = new QAction( "beam all", i18n("Save"), 0,
1156 this ); 1174 this );
1157 action->addTo( importMenu ); 1175 action->addTo( importMenu );
1158 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 1176 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
1159 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 1177 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
1160 this ); 1178 this );
1161 action->addTo( importMenu ); 1179 action->addTo( importMenu );
1162 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 1180 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
1163 1181
1164 //menuBar->insertItem( "Configure",configureMenu ); 1182 //menuBar->insertItem( "Configure",configureMenu );
1165 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 1183 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
1166 icon = loadPixmap( "korganizer/korganizer" ); 1184 icon = loadPixmap( "korganizer/korganizer" );
1167 1185
1168 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 1186 action = new QAction( "Whats New", i18n("What's new?"), 0,this );
1169 action->addTo( helpMenu ); 1187 action->addTo( helpMenu );
1170 connect( action, SIGNAL( activated() ), 1188 connect( action, SIGNAL( activated() ),
1171 SLOT( whatsNew() ) ); 1189 SLOT( whatsNew() ) );
1172 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 1190 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
1173 action->addTo( helpMenu ); 1191 action->addTo( helpMenu );
1174 connect( action, SIGNAL( activated() ), 1192 connect( action, SIGNAL( activated() ),
1175 SLOT( features() ) ); 1193 SLOT( features() ) );
1176 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 1194 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
1177 action->addTo( helpMenu ); 1195 action->addTo( helpMenu );
1178 connect( action, SIGNAL( activated() ), 1196 connect( action, SIGNAL( activated() ),
1179 SLOT( keyBindings() ) ); 1197 SLOT( keyBindings() ) );
1180 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); 1198 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this );
1181 action->addTo( helpMenu ); 1199 action->addTo( helpMenu );
1182 connect( action, SIGNAL( activated() ), 1200 connect( action, SIGNAL( activated() ),
1183 SLOT( storagehowto() ) ); 1201 SLOT( storagehowto() ) );
1184 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); 1202 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this );
1185 action->addTo( helpMenu ); 1203 action->addTo( helpMenu );
1186 connect( action, SIGNAL( activated() ), 1204 connect( action, SIGNAL( activated() ),
1187 SLOT( timetrackinghowto() ) ); 1205 SLOT( timetrackinghowto() ) );
1188 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 1206 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
1189 action->addTo( helpMenu ); 1207 action->addTo( helpMenu );
1190 connect( action, SIGNAL( activated() ), 1208 connect( action, SIGNAL( activated() ),
1191 SLOT( synchowto() ) ); 1209 SLOT( synchowto() ) );
1192 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 1210 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
1193 action->addTo( helpMenu ); 1211 action->addTo( helpMenu );
1194 connect( action, SIGNAL( activated() ), 1212 connect( action, SIGNAL( activated() ),
1195 SLOT( kdesynchowto() ) ); 1213 SLOT( kdesynchowto() ) );
1196 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 1214 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
1197 action->addTo( helpMenu ); 1215 action->addTo( helpMenu );
1198 connect( action, SIGNAL( activated() ), 1216 connect( action, SIGNAL( activated() ),
1199 SLOT( multisynchowto() ) ); 1217 SLOT( multisynchowto() ) );
1200 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 1218 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
1201 action->addTo( helpMenu ); 1219 action->addTo( helpMenu );
1202 connect( action, SIGNAL( activated() ), 1220 connect( action, SIGNAL( activated() ),
1203 SLOT( aboutAutoSaving() ) ); 1221 SLOT( aboutAutoSaving() ) );
1204 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 1222 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
1205 action->addTo( helpMenu ); 1223 action->addTo( helpMenu );
1206 connect( action, SIGNAL( activated() ), 1224 connect( action, SIGNAL( activated() ),
1207 SLOT( aboutKnownBugs() ) ); 1225 SLOT( aboutKnownBugs() ) );
1208 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 1226 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
1209 action->addTo( helpMenu ); 1227 action->addTo( helpMenu );
1210 connect( action, SIGNAL( activated() ), 1228 connect( action, SIGNAL( activated() ),
1211 SLOT( usertrans() ) ); 1229 SLOT( usertrans() ) );
1212 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 1230 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
1213 action->addTo( helpMenu ); 1231 action->addTo( helpMenu );
1214 connect( action, SIGNAL( activated() ), 1232 connect( action, SIGNAL( activated() ),
1215 SLOT( faq() ) ); 1233 SLOT( faq() ) );
1216 action = new QAction( "licence", i18n("Licence..."), 0, this ); 1234 action = new QAction( "licence", i18n("Licence..."), 0, this );
1217 action->addTo( helpMenu ); 1235 action->addTo( helpMenu );
1218 connect( action, SIGNAL( activated() ), 1236 connect( action, SIGNAL( activated() ),
1219 SLOT( licence() ) ); 1237 SLOT( licence() ) );
1220 action = new QAction( "about", i18n("About..."), 0, this ); 1238 action = new QAction( "about", i18n("About..."), 0, this );
1221 action->addTo( helpMenu ); 1239 action->addTo( helpMenu );
1222 connect( action, SIGNAL( activated() ), 1240 connect( action, SIGNAL( activated() ),
1223 SLOT( about() ) ); 1241 SLOT( about() ) );
1224 //menuBar->insertSeparator(); 1242 //menuBar->insertSeparator();
1225 1243
1226 // ****************************************************** 1244 // ******************************************************
1227 // menubar icons 1245 // menubar icons
1228 1246
1229 1247
1230 1248
1231 //menuBar->insertItem( iconToolBar ); 1249 //menuBar->insertItem( iconToolBar );
1232 //xdays_action 1250 //xdays_action
1233 if (p-> mShowIconNewEvent) 1251 if (p-> mShowIconNewEvent)
1234 ne_action->addTo( iconToolBar ); 1252 ne_action->addTo( iconToolBar );
1235 if (p->mShowIconNewTodo ) 1253 if (p->mShowIconNewTodo )
1236 nt_action->addTo( iconToolBar ); 1254 nt_action->addTo( iconToolBar );
1237 if (p-> mShowIconSearch) 1255 if (p-> mShowIconSearch)
1238 search_action->addTo( iconToolBar ); 1256 search_action->addTo( iconToolBar );
1239 if (p-> mShowIconWhatsThis) 1257 if (p-> mShowIconWhatsThis)
1240 QWhatsThis::whatsThisButton ( iconToolBar ); 1258 QWhatsThis::whatsThisButton ( iconToolBar );
1241 if (p-> mShowIconNext) 1259 if (p-> mShowIconNext)
1242 whatsnext_action->addTo( viewToolBar ); 1260 whatsnext_action->addTo( viewToolBar );
1243 if (p-> mShowIconNextDays) 1261 if (p-> mShowIconNextDays)
1244 xdays_action->addTo( viewToolBar ); 1262 xdays_action->addTo( viewToolBar );
1245 if (p-> mShowIconJournal) 1263 if (p-> mShowIconJournal)
1246 viewjournal_action->addTo( viewToolBar ); 1264 viewjournal_action->addTo( viewToolBar );
1247 if (p-> mShowIconDay1) 1265 if (p-> mShowIconDay1)
1248 day1_action->addTo( viewToolBar ); 1266 day1_action->addTo( viewToolBar );
1249 if (p-> mShowIconDay5) 1267 if (p-> mShowIconDay5)
1250 day5_action->addTo( viewToolBar ); 1268 day5_action->addTo( viewToolBar );
1251 if (p-> mShowIconDay7) 1269 if (p-> mShowIconDay7)
1252 day7_action->addTo( viewToolBar ); 1270 day7_action->addTo( viewToolBar );
1253 if (p-> mShowIconDay6) 1271 if (p-> mShowIconDay6)
1254 day6_action->addTo( viewToolBar ); 1272 day6_action->addTo( viewToolBar );
1255 if (p-> mShowIconMonth) 1273 if (p-> mShowIconMonth)
1256 month_action->addTo( viewToolBar ); 1274 month_action->addTo( viewToolBar );
1257 if (p-> mShowIconList) 1275 if (p-> mShowIconList)
1258 showlist_action->addTo( viewToolBar ); 1276 showlist_action->addTo( viewToolBar );
1259 if (p-> mShowIconTodoview) 1277 if (p-> mShowIconTodoview)
1260 todoview_action->addTo( viewToolBar ); 1278 todoview_action->addTo( viewToolBar );
1261 1279
1262 icon = loadPixmap( pathString + "2leftarrowB" ); 1280 icon = loadPixmap( pathString + "2leftarrowB" );
1263 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); 1281 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200);
1264 if (p-> mShowIconBackFast) { 1282 if (p-> mShowIconBackFast) {
1265 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1283 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1266 connect( action, SIGNAL( activated() ), 1284 connect( action, SIGNAL( activated() ),
1267 mView, SLOT( goPreviousMonth() ) ); 1285 mView, SLOT( goPreviousMonth() ) );
1268 action->addTo( navigatorToolBar ); 1286 action->addTo( navigatorToolBar );
1269 } 1287 }
1270 icon = loadPixmap( pathString + "1leftarrowB" ); 1288 icon = loadPixmap( pathString + "1leftarrowB" );
1271 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); 1289 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210);
1272 if (p-> mShowIconBack) { 1290 if (p-> mShowIconBack) {
1273 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1291 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1274 connect( action, SIGNAL( activated() ), 1292 connect( action, SIGNAL( activated() ),
1275 mView, SLOT( goPrevious() ) ); 1293 mView, SLOT( goPrevious() ) );
1276 action->addTo( navigatorToolBar ); 1294 action->addTo( navigatorToolBar );
1277 } 1295 }
1278 icon = loadPixmap( pathString + "today" ); 1296 icon = loadPixmap( pathString + "today" );
1279 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); 1297 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
1280 if (p-> mShowIconToday) 1298 if (p-> mShowIconToday)
1281 today_action->addTo( navigatorToolBar ); 1299 today_action->addTo( navigatorToolBar );
1282 icon = loadPixmap( pathString + "1rightarrowB" ); 1300 icon = loadPixmap( pathString + "1rightarrowB" );
1283 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1301 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1284 if (p-> mShowIconForward) { 1302 if (p-> mShowIconForward) {
1285 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1303 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1286 connect( action, SIGNAL( activated() ), 1304 connect( action, SIGNAL( activated() ),
1287 mView, SLOT( goNext() ) ); 1305 mView, SLOT( goNext() ) );
1288 action->addTo( navigatorToolBar ); 1306 action->addTo( navigatorToolBar );
1289 } 1307 }
1290 icon = loadPixmap( pathString + "2rightarrowB" ); 1308 icon = loadPixmap( pathString + "2rightarrowB" );
1291 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1309 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1292 if (p-> mShowIconForwardFast) { 1310 if (p-> mShowIconForwardFast) {
1293 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1311 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
1294 connect( action, SIGNAL( activated() ), 1312 connect( action, SIGNAL( activated() ),
1295 mView, SLOT( goNextMonth() ) ); 1313 mView, SLOT( goNextMonth() ) );
1296 action->addTo( navigatorToolBar ); 1314 action->addTo( navigatorToolBar );
1297 } 1315 }
1298 1316
1299 1317
1300 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); 1318 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6);
1301 1319
1302 1320
1303 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); 1321 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true);
1304 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); 1322 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true);
1305 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); 1323 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true);
1306 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); 1324 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true);
1307 1325
1308 if (p-> mShowIconNewEvent) 1326 if (p-> mShowIconNewEvent)
1309 configureToolBarMenu->setItemChecked( 10, true ); 1327 configureToolBarMenu->setItemChecked( 10, true );
1310 if (p->mShowIconNewTodo ) 1328 if (p->mShowIconNewTodo )
1311 configureToolBarMenu->setItemChecked( 20, true ); 1329 configureToolBarMenu->setItemChecked( 20, true );
1312 if (p-> mShowIconSearch) 1330 if (p-> mShowIconSearch)
1313 configureToolBarMenu->setItemChecked( 120, true ); 1331 configureToolBarMenu->setItemChecked( 120, true );
1314 if (p-> mShowIconList) 1332 if (p-> mShowIconList)
1315 configureToolBarMenu->setItemChecked( 30, true ); 1333 configureToolBarMenu->setItemChecked( 30, true );
1316 if (p-> mShowIconDay1) 1334 if (p-> mShowIconDay1)
1317 configureToolBarMenu->setItemChecked( 40, true ); 1335 configureToolBarMenu->setItemChecked( 40, true );
1318 if (p-> mShowIconDay5) 1336 if (p-> mShowIconDay5)
1319 configureToolBarMenu->setItemChecked( 50, true ); 1337 configureToolBarMenu->setItemChecked( 50, true );
1320 if (p-> mShowIconDay6) 1338 if (p-> mShowIconDay6)
1321 configureToolBarMenu->setItemChecked( 75, true ); 1339 configureToolBarMenu->setItemChecked( 75, true );
1322 if (p-> mShowIconDay7) 1340 if (p-> mShowIconDay7)
1323 configureToolBarMenu->setItemChecked( 60, true ); 1341 configureToolBarMenu->setItemChecked( 60, true );
1324 if (p-> mShowIconMonth) 1342 if (p-> mShowIconMonth)
1325 configureToolBarMenu->setItemChecked( 70, true ); 1343 configureToolBarMenu->setItemChecked( 70, true );
1326 if (p-> mShowIconTodoview) 1344 if (p-> mShowIconTodoview)
1327 configureToolBarMenu->setItemChecked( 80, true ); 1345 configureToolBarMenu->setItemChecked( 80, true );
1328 if (p-> mShowIconBackFast) 1346 if (p-> mShowIconBackFast)
1329 configureToolBarMenu->setItemChecked( 200, true ); 1347 configureToolBarMenu->setItemChecked( 200, true );
1330 if (p-> mShowIconBack) 1348 if (p-> mShowIconBack)
1331 configureToolBarMenu->setItemChecked( 210, true ); 1349 configureToolBarMenu->setItemChecked( 210, true );
1332 if (p-> mShowIconToday) 1350 if (p-> mShowIconToday)
1333 configureToolBarMenu->setItemChecked( 130, true ); 1351 configureToolBarMenu->setItemChecked( 130, true );
1334 if (p-> mShowIconForward) 1352 if (p-> mShowIconForward)
1335 configureToolBarMenu->setItemChecked( 220, true ); 1353 configureToolBarMenu->setItemChecked( 220, true );
1336 if (p-> mShowIconForwardFast) 1354 if (p-> mShowIconForwardFast)
1337 configureToolBarMenu->setItemChecked( 230, true ); 1355 configureToolBarMenu->setItemChecked( 230, true );
1338 if (p-> mShowIconNextDays) 1356 if (p-> mShowIconNextDays)
1339 configureToolBarMenu->setItemChecked( 100, true ); 1357 configureToolBarMenu->setItemChecked( 100, true );
1340 if (p-> mShowIconNext) 1358 if (p-> mShowIconNext)
1341 configureToolBarMenu->setItemChecked( 110, true ); 1359 configureToolBarMenu->setItemChecked( 110, true );
1342 if (p-> mShowIconJournal) 1360 if (p-> mShowIconJournal)
1343 configureToolBarMenu->setItemChecked( 90, true ); 1361 configureToolBarMenu->setItemChecked( 90, true );
1344 if (p-> mShowIconWhatsThis) 1362 if (p-> mShowIconWhatsThis)
1345 configureToolBarMenu->setItemChecked( 300, true ); 1363 configureToolBarMenu->setItemChecked( 300, true );
1346 if (p-> mShowIconWeekNum) 1364 if (p-> mShowIconWeekNum)
1347 configureToolBarMenu->setItemChecked( 400, true ); 1365 configureToolBarMenu->setItemChecked( 400, true );
1348 if (!p-> mShowIconStretch) { 1366 if (!p-> mShowIconStretch) {
1349 QLabel* dummy = new QLabel( iconToolBar ); 1367 QLabel* dummy = new QLabel( iconToolBar );
1350 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 1368 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
1351 dummy->setMinimumWidth( 0 ); 1369 dummy->setMinimumWidth( 0 );
1352 iconToolBar->setStretchableWidget ( dummy ) ; 1370 iconToolBar->setStretchableWidget ( dummy ) ;
1353 } 1371 }
1354 else { 1372 else {
1355 iconToolBar->setHorizontalStretchable (true ); 1373 iconToolBar->setHorizontalStretchable (true );
1356 viewToolBar->setHorizontalStretchable (true ); 1374 viewToolBar->setHorizontalStretchable (true );
1357 navigatorToolBar->setHorizontalStretchable (true ); 1375 navigatorToolBar->setHorizontalStretchable (true );
1358 iconToolBar->setVerticalStretchable (true ); 1376 iconToolBar->setVerticalStretchable (true );
1359 viewToolBar->setVerticalStretchable (true ); 1377 viewToolBar->setVerticalStretchable (true );
1360 navigatorToolBar->setVerticalStretchable (true ); 1378 navigatorToolBar->setVerticalStretchable (true );
1361 configureToolBarMenu->setItemChecked( 5, true ); 1379 configureToolBarMenu->setItemChecked( 5, true );
1362 } 1380 }
1363 if (p-> mShowIconFilter) 1381 if (p-> mShowIconFilter)
1364 configureToolBarMenu->setItemChecked( 7, true ); 1382 configureToolBarMenu->setItemChecked( 7, true );
1365 if (p-> mShowIconOnetoolbar) 1383 if (p-> mShowIconOnetoolbar)
1366 configureToolBarMenu->setItemChecked( 6, true ); 1384 configureToolBarMenu->setItemChecked( 6, true );
1367 1385
1368 1386
1369 if ( filterMenubar ) { 1387 if ( filterMenubar ) {
1370 filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); 1388 filterMenubar->reparent(filterToolBar,0,QPoint(0,0) );
1371 connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) ); 1389 connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) );
1372 } 1390 }
1373 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 1391 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
1374 configureAgenda( p->mHourSize ); 1392 configureAgenda( p->mHourSize );
1375 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 1393 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
1376} 1394}
1377void MainWindow::calHint() 1395void MainWindow::calHint()
1378{ 1396{
1379 QString message = i18n("You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>."); 1397 QString message = i18n("You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.");
1380 1398
1381 KMessageBox::information( this, message); 1399 KMessageBox::information( this, message);
1382} 1400}
1383void MainWindow::exportToPhone( int mode ) 1401void MainWindow::exportToPhone( int mode )
1384{ 1402{
1385 1403
1386 //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1404 //ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1387 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1405 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1388 KOex2phonePrefs ex2phone; 1406 KOex2phonePrefs ex2phone;
1389 1407
1390 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 1408 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
1391 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 1409 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
1392 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1410 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
1393 if ( mode == 1 ) 1411 if ( mode == 1 )
1394 ex2phone.setCaption(i18n("Export complete calendar")); 1412 ex2phone.setCaption(i18n("Export complete calendar"));
1395 if ( mode == 2 ) 1413 if ( mode == 2 )
1396 ex2phone.setCaption(i18n("Export filtered calendar")); 1414 ex2phone.setCaption(i18n("Export filtered calendar"));
1397 1415
1398 if ( !ex2phone.exec() ) { 1416 if ( !ex2phone.exec() ) {
1399 return; 1417 return;
1400 } 1418 }
1401 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 1419 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
1402 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 1420 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
1403 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 1421 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
1404 1422
1405 int inFuture = 0; 1423 int inFuture = 0;
1406 if ( ex2phone.mWriteBackFuture->isChecked() ) 1424 if ( ex2phone.mWriteBackFuture->isChecked() )
1407 inFuture = ex2phone.mWriteBackFutureWeeks->value(); 1425 inFuture = ex2phone.mWriteBackFutureWeeks->value();
1408 QPtrList<Incidence> delSel; 1426 QPtrList<Incidence> delSel;
1409 if ( mode == 1 ) 1427 if ( mode == 1 )
1410 delSel = mCalendar->rawIncidences(); 1428 delSel = mCalendar->rawIncidences();
1411 if ( mode == 2 ) 1429 if ( mode == 2 )
1412 delSel = mCalendar->incidences(); 1430 delSel = mCalendar->incidences();
1413 CalendarLocal* cal = new CalendarLocal(); 1431 CalendarLocal* cal = new CalendarLocal();
1414 cal->setLocalTime(); 1432 cal->setLocalTime();
1415 Incidence *incidence = delSel.first(); 1433 Incidence *incidence = delSel.first();
1416 QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); 1434 QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
1417 QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); 1435 QDateTime end = cur.addDays( ( inFuture +1 ) *7 );
1418 while ( incidence ) { 1436 while ( incidence ) {
1419 if ( incidence->typeID() != journalID ) { 1437 if ( incidence->typeID() != journalID ) {
1420 bool add = true; 1438 bool add = true;
1421 if ( inFuture ) { 1439 if ( inFuture ) {
1422 QDateTime dt; 1440 QDateTime dt;
1423 if ( incidence->typeID() == todoID ) { 1441 if ( incidence->typeID() == todoID ) {
1424 Todo * t = (Todo*)incidence; 1442 Todo * t = (Todo*)incidence;
1425 if ( t->hasDueDate() ) 1443 if ( t->hasDueDate() )
1426 dt = t->dtDue(); 1444 dt = t->dtDue();
1427 else 1445 else
1428 dt = cur.addSecs( 62 ); 1446 dt = cur.addSecs( 62 );
1429 } 1447 }
1430 else { 1448 else {
1431 bool ok; 1449 bool ok;
1432 dt = incidence->getNextOccurence( cur, &ok ); 1450 dt = incidence->getNextOccurence( cur, &ok );
1433 if ( !ok ) 1451 if ( !ok )
1434 dt = cur.addSecs( -62 ); 1452 dt = cur.addSecs( -62 );
1435 } 1453 }
1436 if ( dt < cur || dt > end ) { 1454 if ( dt < cur || dt > end ) {
1437 add = false; 1455 add = false;
1438 } 1456 }
1439 } 1457 }
1440 if ( add ) { 1458 if ( add ) {
1441 Incidence *in = incidence->clone(); 1459 Incidence *in = incidence->clone();
1442 cal->addIncidence( in ); 1460 cal->addIncidence( in );
1443 } 1461 }
1444 } 1462 }
1445 incidence = delSel.next(); 1463 incidence = delSel.next();
1446 } 1464 }
1447 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 1465 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
1448 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 1466 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
1449 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1467 KPimGlobalPrefs::instance()->mEx2PhoneModel );
1450 1468
1451 setCaption( i18n("Writing to phone...")); 1469 setCaption( i18n("Writing to phone..."));
1452 if ( PhoneFormat::writeToPhone( cal ) ) 1470 if ( PhoneFormat::writeToPhone( cal ) )
1453 setCaption( i18n("Export to phone successful!")); 1471 setCaption( i18n("Export to phone successful!"));
1454 else 1472 else
1455 setCaption( i18n("Error exporting to phone!")); 1473 setCaption( i18n("Error exporting to phone!"));
1456 delete cal; 1474 delete cal;
1457} 1475}
1458 1476
1459 1477
1460void MainWindow::setDefaultPreferences() 1478void MainWindow::setDefaultPreferences()
1461{ 1479{
1462 KOPrefs *p = KOPrefs::instance(); 1480 KOPrefs *p = KOPrefs::instance();
1463 1481
1464 p->mCompactDialogs = true; 1482 p->mCompactDialogs = true;
1465 p->mConfirm = true; 1483 p->mConfirm = true;
1466 // p->mEnableQuickTodo = false; 1484 // p->mEnableQuickTodo = false;
1467 1485
1468} 1486}
1469 1487
1470QString MainWindow::resourcePath() 1488QString MainWindow::resourcePath()
1471{ 1489{
1472 return KGlobal::iconLoader()->iconPath(); 1490 return KGlobal::iconLoader()->iconPath();
1473} 1491}
1474 1492
1475void MainWindow::displayText( QString text ,QString cap ) 1493void MainWindow::displayText( QString text ,QString cap )
1476{ 1494{
1477 QDialog dia( this, "name", true ); ; 1495 QDialog dia( this, "name", true ); ;
1478 dia.setCaption( cap ); 1496 dia.setCaption( cap );
1479 QVBoxLayout* lay = new QVBoxLayout( &dia ); 1497 QVBoxLayout* lay = new QVBoxLayout( &dia );
1480 lay->setSpacing( 3 ); 1498 lay->setSpacing( 3 );
1481 lay->setMargin( 3 ); 1499 lay->setMargin( 3 );
1482 QTextBrowser tb ( &dia ); 1500 QTextBrowser tb ( &dia );
1483 lay->addWidget( &tb ); 1501 lay->addWidget( &tb );
1484 tb.setText( text ); 1502 tb.setText( text );
1485#ifdef DESKTOP_VERSION 1503#ifdef DESKTOP_VERSION
1486 dia.resize( 640, 480); 1504 dia.resize( 640, 480);
1487#else 1505#else
1488 dia.showMaximized(); 1506 dia.showMaximized();
1489#endif 1507#endif
1490 dia.exec(); 1508 dia.exec();
1491} 1509}
1492 1510
1493void MainWindow::features() 1511void MainWindow::features()
1494{ 1512{
1495 1513
1496 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); 1514 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" );
1497} 1515}
1498 1516
1499void MainWindow::usertrans() 1517void MainWindow::usertrans()
1500{ 1518{
1501 1519
1502 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); 1520 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" );
1503} 1521}
1504 1522
1505void MainWindow::storagehowto() 1523void MainWindow::storagehowto()
1506{ 1524{
1507 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); 1525 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" );
1508} 1526}
1509void MainWindow::timetrackinghowto() 1527void MainWindow::timetrackinghowto()
1510{ 1528{
1511 KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); 1529 KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" );
1512} 1530}
1513void MainWindow::kdesynchowto() 1531void MainWindow::kdesynchowto()
1514{ 1532{
1515 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 1533 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
1516} 1534}
1517void MainWindow::multisynchowto() 1535void MainWindow::multisynchowto()
1518{ 1536{
1519 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 1537 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
1520} 1538}
1521void MainWindow::synchowto() 1539void MainWindow::synchowto()
1522{ 1540{
1523 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 1541 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
1524} 1542}
1525void MainWindow::faq() 1543void MainWindow::faq()
1526{ 1544{
1527 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); 1545 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" );
1528 1546
1529} 1547}
1530void MainWindow::whatsNew() 1548void MainWindow::whatsNew()
1531{ 1549{
1532 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 1550 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
1533 1551
1534} 1552}
1535void MainWindow::licence() 1553void MainWindow::licence()
1536{ 1554{
1537 KApplication::showLicence(); 1555 KApplication::showLicence();
1538 1556
1539} 1557}
1540void MainWindow::about() 1558void MainWindow::about()
1541{ 1559{
1542 QString version; 1560 QString version;
1543#include <../version> 1561#include <../version>
1544 QMessageBox::about( this, i18n("About KOrganizer/Pi"), 1562 QMessageBox::about( this, i18n("About KOrganizer/Pi"),
1545 i18n("KOrganizer/Platform-independent\n") + 1563 i18n("KOrganizer/Platform-independent\n") +
1546 "(KO/Pi) " + version + " - " + 1564 "(KO/Pi) " + version + " - " +
1547 1565
1548#ifdef DESKTOP_VERSION 1566#ifdef DESKTOP_VERSION
1549 i18n("Desktop Edition\n") + 1567 i18n("Desktop Edition\n") +
1550#else 1568#else
1551 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + 1569 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") +
1552#endif 1570#endif
1553 i18n("(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.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); 1571 i18n("(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.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") );
1554} 1572}
1555void MainWindow::keyBindings() 1573void MainWindow::keyBindings()
1556{ 1574{
1557 QString cap = i18n("KO/Pi Keys + Colors"); 1575 QString cap = i18n("KO/Pi Keys + Colors");
1558 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1576 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1559 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1577 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
1560 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + 1578 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") +
1561 i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + 1579 i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") +
1562 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + 1580 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
1563 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ 1581 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
1564 i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ 1582 i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+
1565 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ 1583 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
1566 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ 1584 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
1567 i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ 1585 i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+
1586 i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+
1568 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ 1587 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
1569 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ 1588 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
1570 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ 1589 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
1571 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ 1590 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+
1572 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ 1591 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
1573 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ 1592 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+
1574 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ 1593 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+
1575 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ 1594 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+
1576 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ 1595 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+
1577 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ 1596 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+
1578 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ 1597 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+
1579 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ 1598 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+
1580 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ 1599 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+
1581 i18n("<p><h3>In agenda view:</h3></p>\n") + 1600 i18n("<p><h3>In agenda view:</h3></p>\n") +
1582 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ 1601 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+
1583 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ 1602 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+
1584 i18n("<p><h3>In todo view:</h3></p>\n") + 1603 i18n("<p><h3>In todo view:</h3></p>\n") +
1585 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ 1604 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+
1586 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ 1605 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+
1587 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ 1606 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+
1588 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ 1607 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+
1589 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1608 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1590 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ 1609 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+
1591 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ 1610 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+
1592 i18n("<p><h3>In list view:</h3></p>\n") + 1611 i18n("<p><h3>In list view:</h3></p>\n") +
1593 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1612 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1594 i18n("<p><b>return</b>: Select item+one step down</p>\n")+ 1613 i18n("<p><b>return</b>: Select item+one step down</p>\n")+
1595 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ 1614 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+
1596 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ 1615 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+
1597 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ 1616 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+
1598 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ 1617 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+
1599 i18n("<p><h3>In event/todo viewer:</h3></p>\n") + 1618 i18n("<p><h3>In event/todo viewer:</h3></p>\n") +
1600 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ 1619 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+
1601 i18n("<p><b>A</b>: Show agenda view.</p>\n")+ 1620 i18n("<p><b>A</b>: Show agenda view.</p>\n")+
1602 i18n("<p><b>E</b>: Edit item</p>\n") + 1621 i18n("<p><b>E</b>: Edit item</p>\n") +
1603 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + 1622 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") +
1604 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + 1623 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") +
1605 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ 1624 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+
1606 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ 1625 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+
1607 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ 1626 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+
1608 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ 1627 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+
1609 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ 1628 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+
1610 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + 1629 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") +
1611 i18n("<p><b>White</b>: Item readonly</p>\n"); 1630 i18n("<p><b>White</b>: Item readonly</p>\n");
1612 displayText( text, cap); 1631 displayText( text, cap);
1613} 1632}
1614void MainWindow::aboutAutoSaving() 1633void MainWindow::aboutAutoSaving()
1615{ 1634{
1616 QString text = i18n("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"); 1635 QString text = i18n("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");
1617 1636
1618 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); 1637 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text);
1619 1638
1620} 1639}
1621void MainWindow::aboutKnownBugs() 1640void MainWindow::aboutKnownBugs()
1622{ 1641{
1623 QMessageBox* msg; 1642 QMessageBox* msg;
1624 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), 1643 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"),
1625 i18n("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")+ 1644 i18n("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")+
1626 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ 1645 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+
1627 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + 1646 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") +
1628 i18n("\nor report them in the bugtracker on\n") + 1647 i18n("\nor report them in the bugtracker on\n") +
1629 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), 1648 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"),
1630 QMessageBox::NoIcon, 1649 QMessageBox::NoIcon,
1631 QMessageBox::Ok, 1650 QMessageBox::Ok,
1632 QMessageBox::NoButton, 1651 QMessageBox::NoButton,
1633 QMessageBox::NoButton); 1652 QMessageBox::NoButton);
1634 msg->exec(); 1653 msg->exec();
1635 delete msg; 1654 delete msg;
1636 1655
1637} 1656}
1638 1657
1639QString MainWindow::defaultFileName() 1658QString MainWindow::defaultFileName()
1640{ 1659{
1641 return locateLocal( "data", "korganizer/mycalendar.ics" ); 1660 return locateLocal( "data", "korganizer/mycalendar.ics" );
1642} 1661}
1643QString MainWindow::syncFileName() 1662QString MainWindow::syncFileName()
1644{ 1663{
1645#ifdef DESKTOP_VERSION 1664#ifdef DESKTOP_VERSION
1646 return locateLocal( "tmp", "synccalendar.ics" ); 1665 return locateLocal( "tmp", "synccalendar.ics" );
1647#else 1666#else
1648 return QString( "/tmp/synccalendar.ics" ); 1667 return QString( "/tmp/synccalendar.ics" );
1649#endif 1668#endif
1650} 1669}
1651#include "koglobals.h" 1670#include "koglobals.h"
1652#include <kcalendarsystem.h> 1671#include <kcalendarsystem.h>
1653void MainWindow::updateWeek(QDate seda) 1672void MainWindow::updateWeek(QDate seda)
1654{ 1673{
1655 int weekNum = KGlobal::locale()->weekNum ( seda ); 1674 int weekNum = KGlobal::locale()->weekNum ( seda );
1656 mWeekPixmap.fill( mWeekBgColor ); 1675 mWeekPixmap.fill( mWeekBgColor );
1657 QPainter p ( &mWeekPixmap ); 1676 QPainter p ( &mWeekPixmap );
1658 p.setFont( mWeekFont ); 1677 p.setFont( mWeekFont );
1659 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); 1678 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) );
1660 p.end(); 1679 p.end();
1661 QIconSet icon3 ( mWeekPixmap ); 1680 QIconSet icon3 ( mWeekPixmap );
1662 mWeekAction->setIconSet ( icon3 ); 1681 mWeekAction->setIconSet ( icon3 );
1663 1682
1664} 1683}
1665void MainWindow::updateWeekNum(const DateList &selectedDates) 1684void MainWindow::updateWeekNum(const DateList &selectedDates)
1666{ 1685{
1667 updateWeek( selectedDates.first() ); 1686 updateWeek( selectedDates.first() );
1668} 1687}
1669void MainWindow::processIncidenceSelection( Incidence *incidence ) 1688void MainWindow::processIncidenceSelection( Incidence *incidence )
1670{ 1689{
1671 if ( !incidence ) { 1690 if ( !incidence ) {
1672 mShowAction->setMenuText( i18n("Show") ); 1691 mShowAction->setMenuText( i18n("Show") );
1673 enableIncidenceActions( false ); 1692 enableIncidenceActions( false );
1674 mNewSubTodoAction->setEnabled( false ); 1693 mNewSubTodoAction->setEnabled( false );
1675 setCaptionToDates(); 1694 setCaptionToDates();
1676 return; 1695 return;
1677 } 1696 }
1678 QString startString = ""; 1697 QString startString = "";
1679 if ( incidence->typeID() != todoID ) { 1698 if ( incidence->typeID() != todoID ) {
1680 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { 1699 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
1681 if ( incidence->doesFloat() ) { 1700 if ( incidence->doesFloat() ) {
1682 startString += ": "+incidence->dtStartDateStr( true ); 1701 startString += ": "+incidence->dtStartDateStr( true );
1683 startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); 1702 startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
1684 } else { 1703 } else {
1685 startString = ": "+incidence->dtStartStr(true); 1704 startString = ": "+incidence->dtStartStr(true);
1686 startString += " --- "+((Event*)incidence)->dtEndStr(true); 1705 startString += " --- "+((Event*)incidence)->dtEndStr(true);
1687 } 1706 }
1688 } else { 1707 } else {
1689 if ( incidence->dtStart().time() != incidence->dtEnd().time() ) 1708 if ( incidence->dtStart().time() != incidence->dtEnd().time() )
1690 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ 1709 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
1691 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); 1710 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
1692 if ( incidence->isBirthday() || incidence->isAnniversary() ) { 1711 if ( incidence->isBirthday() || incidence->isAnniversary() ) {
1693 bool ok; 1712 bool ok;
1694 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1713 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
1695 if ( ok ) { 1714 if ( ok ) {
1696 int years = noc.date().year() - incidence->dtStart().date().year(); 1715 int years = noc.date().year() - incidence->dtStart().date().year();
1697 startString += i18n(" (%1 y.)"). arg( years ); 1716 startString += i18n(" (%1 y.)"). arg( years );
1698 } 1717 }
1699 } 1718 }
1700 else 1719 else
1701 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); 1720 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
1702 } 1721 }
1703 } 1722 }
1704 else { 1723 else {
1705 if ( (( KCal::Todo*)incidence)->percentComplete() == 100 ) 1724 if ( (( KCal::Todo*)incidence)->percentComplete() == 100 )
1706 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+i18n("completed on %1").arg( (( KCal::Todo*)incidence)->completedStr(true) ); 1725 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+i18n("completed on %1").arg( (( KCal::Todo*)incidence)->completedStr(true) );
1707 else 1726 else
1708 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); 1727 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
1709 } 1728 }
1710 if ( !incidence->location().isEmpty() ) 1729 if ( !incidence->location().isEmpty() )
1711 startString += " (" +incidence->location()+")"; 1730 startString += " (" +incidence->location()+")";
1712 setCaption( incidence->summary()+startString); 1731 setCaption( incidence->summary()+startString);
1713 enableIncidenceActions( true ); 1732 enableIncidenceActions( true );
1714 if ( incidence->typeID() == eventID ) { 1733 if ( incidence->typeID() == eventID ) {
1715 mShowAction->setMenuText( i18n("Show Event") ); 1734 mShowAction->setMenuText( i18n("Show Event") );
1716 mNewSubTodoAction->setEnabled( false ); 1735 mNewSubTodoAction->setEnabled( false );
1717 } else if ( incidence->typeID() == todoID ) { 1736 } else if ( incidence->typeID() == todoID ) {
1718 mShowAction->setMenuText( i18n("Show Todo") ); 1737 mShowAction->setMenuText( i18n("Show Todo") );
1719 mNewSubTodoAction->setEnabled( true ); 1738 mNewSubTodoAction->setEnabled( true );
1720 } else { 1739 } else {
1721 mShowAction->setMenuText( i18n("Show") ); 1740 mShowAction->setMenuText( i18n("Show") );
1722 mNewSubTodoAction->setEnabled( false ); 1741 mNewSubTodoAction->setEnabled( false );
1723 } 1742 }
1724} 1743}
1725 1744
1726void MainWindow::enableIncidenceActions( bool enabled ) 1745void MainWindow::enableIncidenceActions( bool enabled )
1727{ 1746{
1728 mShowAction->setEnabled( enabled ); 1747 mShowAction->setEnabled( enabled );
1729 mEditAction->setEnabled( enabled ); 1748 mEditAction->setEnabled( enabled );
1730 mDeleteAction->setEnabled( enabled ); 1749 mDeleteAction->setEnabled( enabled );
1731 1750
1732 mCloneAction->setEnabled( enabled ); 1751 mCloneAction->setEnabled( enabled );
1733 mMoveAction->setEnabled( enabled ); 1752 mMoveAction->setEnabled( enabled );
1734#ifndef DESKTOP_VERSION 1753#ifndef DESKTOP_VERSION
1735 mBeamAction->setEnabled( enabled ); 1754 mBeamAction->setEnabled( enabled );
1736#endif 1755#endif
1737 mCancelAction->setEnabled( enabled ); 1756 mCancelAction->setEnabled( enabled );
1738} 1757}
1739 1758
1740void MainWindow::importOL() 1759void MainWindow::importOL()
1741{ 1760{
1742#ifdef _OL_IMPORT_ 1761#ifdef _OL_IMPORT_
1743 mView->clearAllViews(); 1762 mView->clearAllViews();
1744 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); 1763 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this );
1745 id->exec(); 1764 id->exec();
1746 delete id; 1765 delete id;
1747 mView->calendar()->checkAlarmForIncidence( 0, true ); 1766 mView->calendar()->checkAlarmForIncidence( 0, true );
1748 mView->updateView(); 1767 mView->updateView();
1749#endif 1768#endif
1750} 1769}
1751void MainWindow::importBday() 1770void MainWindow::importBday()
1752{ 1771{
1753 int result = QMessageBox::warning( this, i18n("KO/Pi import information!"), 1772 int result = QMessageBox::warning( this, i18n("KO/Pi import information!"),
1754 i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), 1773 i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"),
1755 i18n("Import!"), i18n("Cancel"), 0, 1774 i18n("Import!"), i18n("Cancel"), 0,
1756 0, 1 ); 1775 0, 1 );
1757 if ( result == 0 ) { 1776 if ( result == 0 ) {
1758 mView->importBday(); 1777 mView->importBday();
1759 1778
1760 } 1779 }
1761 1780
1762 1781
1763} 1782}
1764void MainWindow::importQtopia() 1783void MainWindow::importQtopia()
1765{ 1784{
1766 //#ifndef DESKTOP_VERSION 1785 //#ifndef DESKTOP_VERSION
1767 QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"); 1786 QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing");
1768#ifdef DESKTOP_VERSION 1787#ifdef DESKTOP_VERSION
1769 mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml"); 1788 mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml");
1770#endif 1789#endif
1771 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, 1790 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess,
1772 i18n("Import!"), i18n("Cancel"), 0, 1791 i18n("Import!"), i18n("Cancel"), 0,
1773 0, 1 ); 1792 0, 1 );
1774 if ( result == 0 ) { 1793 if ( result == 0 ) {
1775#ifndef DESKTOP_VERSION 1794#ifndef DESKTOP_VERSION
1776 QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); 1795 QString datebook = Global::applicationFileName( "datebook", "datebook.xml");
1777 QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); 1796 QString todolist = Global::applicationFileName( "todolist", "todolist.xml");
1778 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; 1797 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml";
1779#else 1798#else
1780 QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; 1799 QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml";
1781 QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; 1800 QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml";
1782 QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; 1801 QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml";
1783#endif 1802#endif
1784 mView->importQtopia( categories, datebook, todolist ); 1803 mView->importQtopia( categories, datebook, todolist );
1785 } 1804 }
1786 mView->calendar()->reInitAlarmSettings(); 1805 mView->calendar()->reInitAlarmSettings();
1787#if 0 1806#if 0
1788 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1807 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
1789 i18n("Not supported \non desktop!\n"), 1808 i18n("Not supported \non desktop!\n"),
1790 i18n("Ok"), i18n("Cancel"), 0, 1809 i18n("Ok"), i18n("Cancel"), 0,
1791 0, 1 ); 1810 0, 1 );
1792 1811
1793#endif 1812#endif
1794} 1813}
1795 1814
1796void MainWindow::saveOnClose() 1815void MainWindow::saveOnClose()
1797{ 1816{
1798 KOPrefs *p = KOPrefs::instance(); 1817 KOPrefs *p = KOPrefs::instance();
1799 p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); 1818 p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal );
1800 p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); 1819 p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal );
1801 p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); 1820 p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal );
1802 if ( filterToolBar ) { 1821 if ( filterToolBar ) {
1803 p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); 1822 p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal );
1804 } 1823 }
1805#ifdef DESKTOP_VERSION 1824#ifdef DESKTOP_VERSION
1806 1825
1807 QPoint myP; 1826 QPoint myP;
1808 myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); 1827 myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) );
1809 if ( p->mToolBarHor ) 1828 if ( p->mToolBarHor )
1810 p->mToolBarUp = myP.y() > height()/2; 1829 p->mToolBarUp = myP.y() > height()/2;
1811 else 1830 else
1812 p->mToolBarUp = myP.x() > width()/2; 1831 p->mToolBarUp = myP.x() > width()/2;
1813 myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); 1832 myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) );
1814 if ( p->mToolBarHorV ) 1833 if ( p->mToolBarHorV )
1815 p->mToolBarUpV = myP.y() > height()/2; 1834 p->mToolBarUpV = myP.y() > height()/2;
1816 else 1835 else
1817 p->mToolBarUpV = myP.x() > width()/2 ; 1836 p->mToolBarUpV = myP.x() > width()/2 ;
1818 myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); 1837 myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) );
1819 if ( p->mToolBarHorN ) 1838 if ( p->mToolBarHorN )
1820 p->mToolBarUpN = myP.y() > height()/2; 1839 p->mToolBarUpN = myP.y() > height()/2;
1821 else 1840 else
1822 p->mToolBarUpN = myP.x() > width()/2 ; 1841 p->mToolBarUpN = myP.x() > width()/2 ;
1823 if ( filterToolBar ) { 1842 if ( filterToolBar ) {
1824 myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); 1843 myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) );
1825 if ( p->mToolBarHorF ) 1844 if ( p->mToolBarHorF )
1826 p->mToolBarUpF = myP.y() > height()/2; 1845 p->mToolBarUpF = myP.y() > height()/2;
1827 else 1846 else
1828 p->mToolBarUpF = myP.x() > width()/2 ; 1847 p->mToolBarUpF = myP.x() > width()/2 ;
1829 } 1848 }
1830#else 1849#else
1831 if ( p->mToolBarHor ) 1850 if ( p->mToolBarHor )
1832 p->mToolBarUp = iconToolBar->y() > height()/2; 1851 p->mToolBarUp = iconToolBar->y() > height()/2;
1833 else 1852 else
1834 p->mToolBarUp = iconToolBar->x() > width()/2; 1853 p->mToolBarUp = iconToolBar->x() > width()/2;
1835 if ( p->mToolBarHorV ) 1854 if ( p->mToolBarHorV )
1836 p->mToolBarUpV = viewToolBar->y() > height()/2; 1855 p->mToolBarUpV = viewToolBar->y() > height()/2;
1837 else 1856 else
1838 p->mToolBarUpV = viewToolBar->x() > width()/2 ; 1857 p->mToolBarUpV = viewToolBar->x() > width()/2 ;
1839 1858
1840 if ( p->mToolBarHorN ) 1859 if ( p->mToolBarHorN )
1841 p->mToolBarUpN = navigatorToolBar->y() > height()/2; 1860 p->mToolBarUpN = navigatorToolBar->y() > height()/2;
1842 else 1861 else
1843 p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; 1862 p->mToolBarUpN = navigatorToolBar->x() > width()/2 ;
1844 if ( filterToolBar ) { 1863 if ( filterToolBar ) {
1845 if ( p->mToolBarHorF ) 1864 if ( p->mToolBarHorF )
1846 p->mToolBarUpF = filterToolBar->y() > height()/2; 1865 p->mToolBarUpF = filterToolBar->y() > height()/2;
1847 else 1866 else
1848 p->mToolBarUpF = filterToolBar->x() > width()/2 ; 1867 p->mToolBarUpF = filterToolBar->x() > width()/2 ;
1849 } 1868 }
1850#endif 1869#endif
1851 save(); 1870 save();
1852 mView->writeSettings(); 1871 mView->writeSettings();
1853 mView->checkSuspendAlarm(); 1872 mView->checkSuspendAlarm();
1854} 1873}
1855void MainWindow::slotModifiedChanged( bool ) 1874void MainWindow::slotModifiedChanged( bool )
1856{ 1875{
1857 if ( mBlockAtStartup ) 1876 if ( mBlockAtStartup )
1858 return; 1877 return;
1859 1878
1860 int msec; 1879 int msec;
1861 // we store the changes after 1 minute, 1880 // we store the changes after 1 minute,
1862 // and for safety reasons after 10 minutes again 1881 // and for safety reasons after 10 minutes again
1863 if ( !mSyncManager->blockSave() ) 1882 if ( !mSyncManager->blockSave() )
1864 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; 1883 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000;
1865 else 1884 else
1866 msec = 1000 * 600; 1885 msec = 1000 * 600;
1867 mSaveTimer.start( msec, true ); // 1 minute 1886 mSaveTimer.start( msec, true ); // 1 minute
1868 qDebug("KO: Saving File in %d secs!", msec/1000); 1887 qDebug("KO: Saving File in %d secs!", msec/1000);
1869 mCalendarModifiedFlag = true; 1888 mCalendarModifiedFlag = true;
1870} 1889}
1871void MainWindow::saveStopTimer() 1890void MainWindow::saveStopTimer()
1872{ 1891{
1873 mSaveTimer.stop(); 1892 mSaveTimer.stop();
1874} 1893}
1875void MainWindow::backupAllFiles() 1894void MainWindow::backupAllFiles()
1876{ 1895{
1877 QDate reference ( 2000,1,1); 1896 QDate reference ( 2000,1,1);
1878 int daysTo = reference.daysTo ( QDate::currentDate() ); 1897 int daysTo = reference.daysTo ( QDate::currentDate() );
1879 setCaption(i18n("Creating backup ... please wait ..." )); 1898 setCaption(i18n("Creating backup ... please wait ..." ));
1880 qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); 1899 qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate);
1881 // we need the file path, the backup dir and the number of bups as param 1900 // we need the file path, the backup dir and the number of bups as param
1882 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; 1901 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir;
1883 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) 1902 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir)
1884 bupDir = KGlobalSettings::backupDataDir(); 1903 bupDir = KGlobalSettings::backupDataDir();
1885 int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); 1904 int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
1886 if ( retval == 0 ) { 1905 if ( retval == 0 ) {
1887 setCaption(i18n("Backup cancelled" )); 1906 setCaption(i18n("Backup cancelled" ));
1888 qDebug("KO: Backup cancelled. Will try again tomorrow "); 1907 qDebug("KO: Backup cancelled. Will try again tomorrow ");
1889 // retval == 0 : backup skipped for today, try again tomorrow 1908 // retval == 0 : backup skipped for today, try again tomorrow
1890 KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; 1909 KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1;
1891 } else if ( retval == 1 ){ 1910 } else if ( retval == 1 ){
1892 qDebug("KO: Backup created."); 1911 qDebug("KO: Backup created.");
1893 // backup ok 1912 // backup ok
1894 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 1913 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
1895 KopiCalendarFile * cal = calendars.first(); 1914 KopiCalendarFile * cal = calendars.first();
1896 cal = calendars.next(); 1915 cal = calendars.next();
1897 while ( cal ) { 1916 while ( cal ) {
1898 if ( !cal->mErrorOnLoad ) { 1917 if ( !cal->mErrorOnLoad ) {
1899 KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); 1918 KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
1900 } 1919 }
1901 cal = calendars.next(); 1920 cal = calendars.next();
1902 } 1921 }
1903 KOPrefs::instance()->mLastBackupDate = daysTo; 1922 KOPrefs::instance()->mLastBackupDate = daysTo;
1904 setCaption(i18n("Backup succesfully finished" )); 1923 setCaption(i18n("Backup succesfully finished" ));
1905 } else if ( retval == 2 ){ 1924 } else if ( retval == 2 ){
1906 setCaption(i18n("Backup globally disabled" )); 1925 setCaption(i18n("Backup globally disabled" ));
1907 qDebug("KO: Backup globally cancelled."); 1926 qDebug("KO: Backup globally cancelled.");
1908 // backup globally cancelled 1927 // backup globally cancelled
1909 KPimGlobalPrefs::instance()->mBackupEnabled = false; 1928 KPimGlobalPrefs::instance()->mBackupEnabled = false;
1910 } 1929 }
1911 // retval == 3: do nothing, try again later 1930 // retval == 3: do nothing, try again later
1912} 1931}
1913void MainWindow::save() 1932void MainWindow::save()
1914{ 1933{
1915 1934
1916 if ( mView->viewManager()->journalView() ) 1935 if ( mView->viewManager()->journalView() )
1917 mView->viewManager()->journalView()->checkModified(); 1936 mView->viewManager()->journalView()->checkModified();
1918 if ( !mCalendarModifiedFlag ) { 1937 if ( !mCalendarModifiedFlag ) {
1919 qDebug("KO: Calendar not modified. Nothing saved."); 1938 qDebug("KO: Calendar not modified. Nothing saved.");
1920 return; 1939 return;
1921 } 1940 }
1922 if ( mSyncManager->blockSave() ) 1941 if ( mSyncManager->blockSave() )
1923 return; 1942 return;
1924 mSyncManager->setBlockSave(true); 1943 mSyncManager->setBlockSave(true);
1925 if ( mView->checkAllFileVersions() ) { 1944 if ( mView->checkAllFileVersions() ) {
1926 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ 1945 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){
1927 QDate reference ( 2000,1,1); 1946 QDate reference ( 2000,1,1);
1928 int daysTo = reference.daysTo ( QDate::currentDate() ); 1947 int daysTo = reference.daysTo ( QDate::currentDate() );
1929 if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { 1948 if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) {
1930 backupAllFiles(); 1949 backupAllFiles();
1931 } 1950 }
1932 ; // KPimGlobalPrefs::instance()->mLastBackupDate 1951 ; // KPimGlobalPrefs::instance()->mLastBackupDate
1933 } 1952 }
1934 QTime neededSaveTime = QDateTime::currentDateTime().time(); 1953 QTime neededSaveTime = QDateTime::currentDateTime().time();
1935 if ( !isMinimized () ) 1954 if ( !isMinimized () )
1936 setCaption(i18n("KO/Pi:Saving Data to File ..." )); 1955 setCaption(i18n("KO/Pi:Saving Data to File ..." ));
1937 qDebug("KO: Start saving data to file!"); 1956 qDebug("KO: Start saving data to file!");
1938 mView->saveCalendars(); 1957 mView->saveCalendars();
1939 mCalendarModifiedFlag = false; 1958 mCalendarModifiedFlag = false;
1940 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 1959 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
1941 qDebug("KO: Needed %d ms for saving.",msNeeded ); 1960 qDebug("KO: Needed %d ms for saving.",msNeeded );
1942 QString savemes; 1961 QString savemes;
1943 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); 1962 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
1944 if ( !isMinimized () ) 1963 if ( !isMinimized () )
1945 setCaption(savemes); 1964 setCaption(savemes);
1946 else 1965 else
1947 qDebug(savemes); 1966 qDebug(savemes);
1948 } else 1967 } else
1949 setCaption(i18n("Saving cancelled!")); 1968 setCaption(i18n("Saving cancelled!"));
1950 mSyncManager->setBlockSave( false ); 1969 mSyncManager->setBlockSave( false );
1951} 1970}
1952 1971
1953void MainWindow::keyReleaseEvent ( QKeyEvent * e) 1972void MainWindow::keyReleaseEvent ( QKeyEvent * e)
1954{ 1973{
1955 if ( !e->isAutoRepeat() ) { 1974 if ( !e->isAutoRepeat() ) {
1956 mFlagKeyPressed = false; 1975 mFlagKeyPressed = false;
1957 } 1976 }
1958} 1977}
1959void MainWindow::keyPressEvent ( QKeyEvent * e ) 1978void MainWindow::keyPressEvent ( QKeyEvent * e )
1960{ 1979{
1961 qApp->processEvents(); 1980 qApp->processEvents();
1962 if ( e->isAutoRepeat() && !mFlagKeyPressed ) { 1981 if ( e->isAutoRepeat() && !mFlagKeyPressed ) {
1963 e->ignore(); 1982 e->ignore();
1964 // qDebug(" ignore %d",e->isAutoRepeat() ); 1983 // qDebug(" ignore %d",e->isAutoRepeat() );
1965 return; 1984 return;
1966 } 1985 }
1967 if (! e->isAutoRepeat() ) 1986 if (! e->isAutoRepeat() )
1968 mFlagKeyPressed = true; 1987 mFlagKeyPressed = true;
1969 KOPrefs *p = KOPrefs::instance(); 1988 KOPrefs *p = KOPrefs::instance();
1970 bool showSelectedDates = false; 1989 bool showSelectedDates = false;
1971 int size; 1990 int size;
1972 int pro = 0; 1991 int pro = 0;
1973 //qDebug("MainWindow::keyPressEvent "); 1992 //qDebug("MainWindow::keyPressEvent ");
1974 switch ( e->key() ) { 1993 switch ( e->key() ) {
1975 case Qt::Key_Right: 1994 case Qt::Key_Right:
1976 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 1995 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
1977 mView->goNextMonth(); 1996 mView->goNextMonth();
1978 else 1997 else
1979 mView->goNext(); 1998 mView->goNext();
1980 showSelectedDates = true; 1999 showSelectedDates = true;
1981 break; 2000 break;
1982 case Qt::Key_Left: 2001 case Qt::Key_Left:
1983 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2002 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
1984 mView->goPreviousMonth(); 2003 mView->goPreviousMonth();
1985 else 2004 else
1986 mView->goPrevious(); 2005 mView->goPrevious();
1987 showSelectedDates = true; 2006 showSelectedDates = true;
1988 break; 2007 break;
1989 case Qt::Key_Down: 2008 case Qt::Key_Down:
1990 mView->viewManager()->agendaView()->scrollOneHourDown(); 2009 mView->viewManager()->agendaView()->scrollOneHourDown();
1991 break; 2010 break;
1992 case Qt::Key_Up: 2011 case Qt::Key_Up:
1993 mView->viewManager()->agendaView()->scrollOneHourUp(); 2012 mView->viewManager()->agendaView()->scrollOneHourUp();
1994 break; 2013 break;
1995 case Qt::Key_K: 2014 case Qt::Key_K:
1996 mView->viewManager()->showMonthViewWeek(); 2015 mView->viewManager()->showMonthViewWeek();
1997 break; 2016 break;
1998 case Qt::Key_I: 2017 case Qt::Key_I:
1999 mView->showIncidence(); 2018 mView->showIncidence();
2000 break; 2019 break;
2001 case Qt::Key_Delete: 2020 case Qt::Key_Delete:
2002 case Qt::Key_Backspace: 2021 case Qt::Key_Backspace:
2003 mView->deleteIncidence(); 2022 mView->deleteIncidence();
2004 break; 2023 break;
2005 case Qt::Key_D: 2024 case Qt::Key_D:
2006 mView->viewManager()->showDayView(); 2025 mView->viewManager()->showDayView();
2007 showSelectedDates = true; 2026 showSelectedDates = true;
2008 break; 2027 break;
2009 case Qt::Key_O: 2028 case Qt::Key_O:
2010 mView->toggleFilerEnabled( ); 2029 mView->toggleFilerEnabled( );
2011 break; 2030 break;
2012 case Qt::Key_0: 2031 case Qt::Key_0:
2013 case Qt::Key_1: 2032 case Qt::Key_1:
2014 case Qt::Key_2: 2033 case Qt::Key_2:
2015 case Qt::Key_3: 2034 case Qt::Key_3:
2016 case Qt::Key_4: 2035 case Qt::Key_4:
2017 case Qt::Key_5: 2036 case Qt::Key_5:
2018 case Qt::Key_6: 2037 case Qt::Key_6:
2019 case Qt::Key_7: 2038 case Qt::Key_7:
2020 case Qt::Key_8: 2039 case Qt::Key_8:
2021 case Qt::Key_9: 2040 case Qt::Key_9:
2022 pro = e->key()-48; 2041 pro = e->key()-48;
2023 if ( pro == 0 ) 2042 if ( pro == 0 )
2024 pro = 10; 2043 pro = 10;
2025 if ( e->state() == Qt::ControlButton) 2044 if ( e->state() == Qt::ControlButton)
2026 pro += 10; 2045 pro += 10;
2027 break; 2046 break;
2028 case Qt::Key_M: 2047 case Qt::Key_M:
2029 mView->viewManager()->showMonthView(); 2048 mView->viewManager()->showMonthView();
2030 showSelectedDates = true; 2049 showSelectedDates = true;
2031 break; 2050 break;
2032 case Qt::Key_Insert: 2051 case Qt::Key_Insert:
2033 mView->newEvent(); 2052 mView->newEvent();
2034 break; 2053 break;
2035 case Qt::Key_S : 2054 case Qt::Key_S :
2036 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 2055 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
2037 mView->newSubTodo(); 2056 mView->newSubTodo();
2038 else 2057 else
2039 mView->dialogManager()->showSearchDialog(); 2058 mView->dialogManager()->showSearchDialog();
2040 break; 2059 break;
2041 case Qt::Key_Y : 2060 case Qt::Key_Y :
2042 case Qt::Key_Z : 2061 case Qt::Key_Z :
2043 mView->viewManager()->showWorkWeekView(); 2062 mView->viewManager()->showWorkWeekView();
2044 showSelectedDates = true; 2063 showSelectedDates = true;
2045 break; 2064 break;
2046 case Qt::Key_U : 2065 case Qt::Key_U :
2047 mView->viewManager()->showWeekView(); 2066 mView->viewManager()->showWeekView();
2048 showSelectedDates = true; 2067 showSelectedDates = true;
2049 break; 2068 break;
2050 case Qt::Key_H : 2069 case Qt::Key_H :
2051 keyBindings(); 2070 keyBindings();
2052 break; 2071 break;
2053 case Qt::Key_W: 2072 case Qt::Key_W:
2054 mView->viewManager()->showWhatsNextView(); 2073 mView->viewManager()->showWhatsNextView();
2055 break; 2074 break;
2056 case Qt::Key_L: 2075 case Qt::Key_L:
2057 mView->viewManager()->showListView(); 2076 mView->viewManager()->showListView();
2058 break; 2077 break;
2059 case Qt::Key_N: 2078 case Qt::Key_N:
2060 mView->viewManager()->showNextView(); 2079 mView->viewManager()->showNextView();
2061 break; 2080 break;
2062 case Qt::Key_V: 2081 case Qt::Key_V:
2063 mView->viewManager()->showTodoView(); 2082 mView->viewManager()->showTodoView();
2064 break; 2083 break;
2065 case Qt::Key_C: 2084 case Qt::Key_C:
2066 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); 2085 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() );
2067 break; 2086 break;
2068 case Qt::Key_P: 2087 case Qt::Key_P:
2069 mView->showDatePicker( ); 2088 mView->showDatePicker( );
2070 break; 2089 break;
2071 case Qt::Key_F: 2090 case Qt::Key_F:
2072 mView->editFilters(); 2091 mView->editFilters();
2073 break; 2092 break;
2074 case Qt::Key_R: 2093 case Qt::Key_R:
2075 mView->toggleFilter(); 2094 mView->toggleFilter();
2076 break; 2095 break;
2077 case Qt::Key_X: 2096 case Qt::Key_X:
2078 if ( e->state() == Qt::ControlButton ) 2097 if ( e->state() == Qt::ControlButton )
2079 mView->toggleDateNavigatorWidget(); 2098 mView->toggleDateNavigatorWidget();
2080 else { 2099 else {
2081 mView->viewManager()->showNextXView(); 2100 mView->viewManager()->showNextXView();
2082 showSelectedDates = true; 2101 showSelectedDates = true;
2083 } 2102 }
2084 break; 2103 break;
2085 case Qt::Key_Space: 2104 case Qt::Key_Space:
2086 mView->toggleExpand(); 2105 mView->toggleExpand();
2087 break; 2106 break;
2088 case Qt::Key_A: 2107 case Qt::Key_A:
2089 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) 2108 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton )
2090 mView->showNextAlarms(); 2109 mView->showNextAlarms();
2091 else 2110 else
2092 mView->toggleAllDaySize(); 2111 mView->toggleAllDaySize();
2093 break; 2112 break;
2094 case Qt::Key_T: 2113 case Qt::Key_T:
2095 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2114 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2096 mView->newTodo(); 2115 mView->newTodo();
2097 else { 2116 else {
2098 mView->goToday(); 2117 mView->goToday();
2099 showSelectedDates = true; 2118 showSelectedDates = true;
2100 } 2119 }
2101 break; 2120 break;
2121 case Qt::Key_Q:
2122 if ( e->state() == Qt::ControlButton )
2123 mView->conflictNotAll();
2124 else if ( e->state() == Qt::ShiftButton )
2125 mView->conflictAllday();
2126 else
2127 mView->conflictAll();
2128 break;
2102 case Qt::Key_J: 2129 case Qt::Key_J:
2103 mView->viewManager()->showJournalView(); 2130 mView->viewManager()->showJournalView();
2104 break; 2131 break;
2105 case Qt::Key_B: 2132 case Qt::Key_B:
2106 mView->editIncidenceDescription();; 2133 mView->editIncidenceDescription();;
2107 break; 2134 break;
2108 // case Qt::Key_Return: 2135 // case Qt::Key_Return:
2109 case Qt::Key_E: 2136 case Qt::Key_E:
2110 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2137 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2111 mView->newEvent(); 2138 mView->newEvent();
2112 else 2139 else
2113 mView->editIncidence(); 2140 mView->editIncidence();
2114 break; 2141 break;
2115 case Qt::Key_Plus: 2142 case Qt::Key_Plus:
2116 size = p->mHourSize +2; 2143 size = p->mHourSize +2;
2117 if ( size <= 22 ) 2144 if ( size <= 22 )
2118 configureAgenda( size ); 2145 configureAgenda( size );
2119 break; 2146 break;
2120 case Qt::Key_Minus: 2147 case Qt::Key_Minus:
2121 size = p->mHourSize - 2; 2148 size = p->mHourSize - 2;
2122 if ( size >= 4 ) 2149 if ( size >= 4 )
2123 configureAgenda( size ); 2150 configureAgenda( size );
2124 break; 2151 break;
2125 2152
2126 2153
2127 default: 2154 default:
2128 e->ignore(); 2155 e->ignore();
2129 } 2156 }
2130 if ( pro > 0 ) { 2157 if ( pro > 0 ) {
2131 selectFilter( pro+1 ); 2158 selectFilter( pro+1 );
2132 } 2159 }
2133 if ( showSelectedDates ) { 2160 if ( showSelectedDates ) {
2134 ;// setCaptionToDates(); 2161 ;// setCaptionToDates();
2135 } 2162 }
2136 2163
2137} 2164}
2138void MainWindow::fillFilterMenuTB() 2165void MainWindow::fillFilterMenuTB()
2139{ 2166{
2140 selectFilterMenuTB->clear(); 2167 selectFilterMenuTB->clear();
2141 selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); 2168 selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 );
2142 selectFilterMenuTB->insertSeparator(); 2169 selectFilterMenuTB->insertSeparator();
2143 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); 2170 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 );
2144 2171
2145 selectFilterMenuTB->insertSeparator(); 2172 selectFilterMenuTB->insertSeparator();
2146 QPtrList<CalFilter> fili = mView->filters(); 2173 QPtrList<CalFilter> fili = mView->filters();
2147 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2174 CalFilter *curfilter = mView->filterView()->selectedFilter();
2148 CalFilter *filter = fili.first(); 2175 CalFilter *filter = fili.first();
2149 int iii = 2; 2176 int iii = 2;
2150 bool checkitem = mView->filterView()->filtersEnabled(); 2177 bool checkitem = mView->filterView()->filtersEnabled();
2151 while(filter) { 2178 while(filter) {
2152 selectFilterMenuTB->insertItem( filter->name(), iii ); 2179 selectFilterMenuTB->insertItem( filter->name(), iii );
2153 if ( filter == curfilter) 2180 if ( filter == curfilter)
2154 selectFilterMenuTB->setItemChecked( iii, checkitem ); 2181 selectFilterMenuTB->setItemChecked( iii, checkitem );
2155 filter = fili.next(); 2182 filter = fili.next();
2156 ++iii; 2183 ++iii;
2157 } 2184 }
2158 if ( !checkitem ) 2185 if ( !checkitem )
2159 selectFilterMenuTB->setItemChecked( 1, true ); 2186 selectFilterMenuTB->setItemChecked( 1, true );
2160 2187
2161 int x = 0; 2188 int x = 0;
2162 int y = iconToolBar->height(); 2189 int y = iconToolBar->height();
2163 int dX = 0; 2190 int dX = 0;
2164 int dY = 0; 2191 int dY = 0;
2165 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2192 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2166 if ( iconToolBar->y() > height()/2 ) { 2193 if ( iconToolBar->y() > height()/2 ) {
2167 dY = selectFilterMenuTB->sizeHint().height()+8; 2194 dY = selectFilterMenuTB->sizeHint().height()+8;
2168 y = 0; 2195 y = 0;
2169 } 2196 }
2170 } else { 2197 } else {
2171 if ( iconToolBar->x() > width()/2 ) { // right side 2198 if ( iconToolBar->x() > width()/2 ) { // right side
2172 x=0; 2199 x=0;
2173 dX= selectFilterMenuTB->sizeHint().width()+8; 2200 dX= selectFilterMenuTB->sizeHint().width()+8;
2174 y = 0; 2201 y = 0;
2175 } else { 2202 } else {
2176 x= iconToolBar->width(); 2203 x= iconToolBar->width();
2177 y = 0; 2204 y = 0;
2178 } 2205 }
2179 } 2206 }
2180 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2207 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2181 selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); 2208 selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)));
2182} 2209}
2183void MainWindow::fillFilterMenu() 2210void MainWindow::fillFilterMenu()
2184{ 2211{
2185 selectFilterMenu->clear(); 2212 selectFilterMenu->clear();
2186 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); 2213 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 );
2187 selectFilterMenu->insertSeparator(); 2214 selectFilterMenu->insertSeparator();
2188 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); 2215 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 );
2189 2216
2190 selectFilterMenu->insertSeparator(); 2217 selectFilterMenu->insertSeparator();
2191 QPtrList<CalFilter> fili = mView->filters(); 2218 QPtrList<CalFilter> fili = mView->filters();
2192 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2219 CalFilter *curfilter = mView->filterView()->selectedFilter();
2193 CalFilter *filter = fili.first(); 2220 CalFilter *filter = fili.first();
2194 int iii = 2; 2221 int iii = 2;
2195 bool checkitem = mView->filterView()->filtersEnabled(); 2222 bool checkitem = mView->filterView()->filtersEnabled();
2196 while(filter) { 2223 while(filter) {
2197 selectFilterMenu->insertItem( filter->name(), iii ); 2224 selectFilterMenu->insertItem( filter->name(), iii );
2198 if ( filter == curfilter) 2225 if ( filter == curfilter)
2199 selectFilterMenu->setItemChecked( iii, checkitem ); 2226 selectFilterMenu->setItemChecked( iii, checkitem );
2200 filter = fili.next(); 2227 filter = fili.next();
2201 ++iii; 2228 ++iii;
2202 } 2229 }
2203 if ( !checkitem ) 2230 if ( !checkitem )
2204 selectFilterMenu->setItemChecked( 1, true ); 2231 selectFilterMenu->setItemChecked( 1, true );
2205} 2232}
2206void MainWindow::fillFilterMenuPopup() 2233void MainWindow::fillFilterMenuPopup()
2207{ 2234{
2208 filterPopupMenu->clear(); 2235 filterPopupMenu->clear();
2209 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); 2236 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 );
2210 2237
2211 filterPopupMenu->insertSeparator(); 2238 filterPopupMenu->insertSeparator();
2212 QPtrList<CalFilter> fili = mView->filters(); 2239 QPtrList<CalFilter> fili = mView->filters();
2213 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2240 CalFilter *curfilter = mView->filterView()->selectedFilter();
2214 CalFilter *filter = fili.first(); 2241 CalFilter *filter = fili.first();
2215 int iii = 1; 2242 int iii = 1;
2216 bool checkitem = mView->filterView()->filtersEnabled(); 2243 bool checkitem = mView->filterView()->filtersEnabled();
2217 while(filter) { 2244 while(filter) {
2218 filterPopupMenu->insertItem( filter->name(), iii ); 2245 filterPopupMenu->insertItem( filter->name(), iii );
2219 if ( filter == curfilter) 2246 if ( filter == curfilter)
2220 filterPopupMenu->setItemChecked( iii, checkitem ); 2247 filterPopupMenu->setItemChecked( iii, checkitem );
2221 filter = fili.next(); 2248 filter = fili.next();
2222 ++iii; 2249 ++iii;
2223 } 2250 }
2224 if ( !checkitem ) 2251 if ( !checkitem )
2225 filterPopupMenu->setItemChecked( 0, true ); 2252 filterPopupMenu->setItemChecked( 0, true );
2226} 2253}
2227void MainWindow::selectFilter( int fil ) 2254void MainWindow::selectFilter( int fil )
2228{ 2255{
2229 2256
2230 if ( fil == 0 ) { 2257 if ( fil == 0 ) {
2231 mView->editFilters( ); 2258 mView->editFilters( );
2232 } else if ( fil == 1 ){ 2259 } else if ( fil == 1 ){
2233 if ( mView->filterView()->filtersEnabled() ) 2260 if ( mView->filterView()->filtersEnabled() )
2234 mView->toggleFilerEnabled( ); 2261 mView->toggleFilerEnabled( );
2235 } else { 2262 } else {
2236 if ( !mView->filterView()->filtersEnabled() ) { 2263 if ( !mView->filterView()->filtersEnabled() ) {
2237 mView->filterView()->blockSignals( true ); 2264 mView->filterView()->blockSignals( true );
2238 mView->toggleFilerEnabled( ); 2265 mView->toggleFilerEnabled( );
2239 mView->filterView()->blockSignals( false ); 2266 mView->filterView()->blockSignals( false );
2240 } 2267 }
2241 mView->selectFilter( fil-2 ); 2268 mView->selectFilter( fil-2 );
2242 } 2269 }
2243} 2270}
2244void MainWindow::updateFilterToolbar() 2271void MainWindow::updateFilterToolbar()
2245{ 2272{
2246 if ( filterMenubar ) { 2273 if ( filterMenubar ) {
2247 if ( !mView->filterView()->filtersEnabled() ) { 2274 if ( !mView->filterView()->filtersEnabled() ) {
2248 filterMenubar->changeItem( 0, i18n("No Filter") ); 2275 filterMenubar->changeItem( 0, i18n("No Filter") );
2249 } else { 2276 } else {
2250 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2277 CalFilter *curfilter = mView->filterView()->selectedFilter();
2251 if ( curfilter ) { 2278 if ( curfilter ) {
2252 filterMenubar->changeItem( 0, curfilter->name() ); 2279 filterMenubar->changeItem( 0, curfilter->name() );
2253 } 2280 }
2254 } 2281 }
2255 } 2282 }
2256} 2283}
2257void MainWindow::selectFilterPopup( int fil ) 2284void MainWindow::selectFilterPopup( int fil )
2258{ 2285{
2259 selectFilter( fil + 1 ); 2286 selectFilter( fil + 1 );
2260 2287
2261} 2288}
2262void MainWindow::configureToolBar( int item ) 2289void MainWindow::configureToolBar( int item )
2263{ 2290{
2264 2291
2265 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); 2292 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) );
2266 KOPrefs *p = KOPrefs::instance(); 2293 KOPrefs *p = KOPrefs::instance();
2267 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); 2294 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 );
2268 p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); 2295 p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 );
2269 p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); 2296 p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 );
2270 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); 2297 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 );
2271 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); 2298 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 );
2272 p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); 2299 p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 );
2273 p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); 2300 p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 );
2274 p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); 2301 p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 );
2275 p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); 2302 p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 );
2276 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); 2303 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 );
2277 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); 2304 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
2278 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); 2305 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );
2279 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); 2306 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 );
2280 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); 2307 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 );
2281 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); 2308 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 );
2282 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); 2309 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 );
2283 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); 2310 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 );
2284 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); 2311 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
2285 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); 2312 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
2286 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); 2313 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
2287 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); 2314 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
2288 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); 2315 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
2289 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); 2316 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
2290 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); 2317 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
2291 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); 2318 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
2292 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); 2319 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
2293 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); 2320 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 );
2294 // initActions(); 2321 // initActions();
2295 setCaption ( i18n("Toolbar changes needs a restart!") ); 2322 setCaption ( i18n("Toolbar changes needs a restart!") );
2296} 2323}
2297void MainWindow::setCaption ( const QString & c ) 2324void MainWindow::setCaption ( const QString & c )
2298{ 2325{
2299 QString cap = c; 2326 QString cap = c;
2300 cap.replace( QRegExp("\n"), " " ); 2327 cap.replace( QRegExp("\n"), " " );
2301 cap = cap.stripWhiteSpace(); 2328 cap = cap.stripWhiteSpace();
2302 if ( cap.isEmpty() ) 2329 if ( cap.isEmpty() )
2303 cap = "KO/Pi"; 2330 cap = "KO/Pi";
2304 QWidget::setCaption( cap ); 2331 QWidget::setCaption( cap );
2305} 2332}
2306void MainWindow::setCaptionToDates() 2333void MainWindow::setCaptionToDates()
2307{ 2334{
2308 QString selDates; 2335 QString selDates;
2309 QDate date = mView->startDate(); 2336 QDate date = mView->startDate();
2310 if ( ! date.isValid() ) { 2337 if ( ! date.isValid() ) {
2311 setCaption(""); 2338 setCaption("");
2312 return; 2339 return;
2313 } 2340 }
2314 selDates = KGlobal::locale()->formatDate( date, true); 2341 selDates = KGlobal::locale()->formatDate( date, true);
2315 if (mView->startDate() < mView->endDate() ) 2342 if (mView->startDate() < mView->endDate() )
2316 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); 2343 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
2317 else { 2344 else {
2318 QString addString; 2345 QString addString;
2319 if ( date == QDateTime::currentDateTime().date() ) 2346 if ( date == QDateTime::currentDateTime().date() )
2320 addString = i18n("Today"); 2347 addString = i18n("Today");
2321 else if ( date == QDateTime::currentDateTime().date().addDays(1) ) 2348 else if ( date == QDateTime::currentDateTime().date().addDays(1) )
2322 addString = i18n("Tomorrow"); 2349 addString = i18n("Tomorrow");
2323 if ( !addString.isEmpty() ) 2350 if ( !addString.isEmpty() )
2324 selDates = addString+", "+selDates ; 2351 selDates = addString+", "+selDates ;
2325 } 2352 }
2326 setCaption( i18n("Dates: ") + selDates ); 2353 setCaption( i18n("Dates: ") + selDates );
2327 2354
2328} 2355}
2329void MainWindow::showConfigureAgenda( ) 2356void MainWindow::showConfigureAgenda( )
2330{ 2357{
2331 int iii; 2358 int iii;
2332 for ( iii = 1;iii<= 10 ;++iii ){ 2359 for ( iii = 1;iii<= 10 ;++iii ){
2333 configureAgendaMenu->setItemChecked( (iii+1)*2, false ); 2360 configureAgendaMenu->setItemChecked( (iii+1)*2, false );
2334 } 2361 }
2335 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); 2362 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true );
2336} 2363}
2337void MainWindow::configureAgenda( int item ) 2364void MainWindow::configureAgenda( int item )
2338{ 2365{
2339 if ( KOPrefs::instance()->mHourSize == item ) 2366 if ( KOPrefs::instance()->mHourSize == item )
2340 return; 2367 return;
2341 KOPrefs::instance()->mHourSize=item; 2368 KOPrefs::instance()->mHourSize=item;
2342 mView->viewManager()->agendaView()->updateConfig(); 2369 mView->viewManager()->agendaView()->updateConfig();
2343} 2370}
2344 2371
2345void MainWindow::saveCalendar() 2372void MainWindow::saveCalendar()
2346{ 2373{
2347 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; 2374 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir;
2348 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) 2375 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir)
2349 bupDir = KGlobalSettings::backupDataDir(); 2376 bupDir = KGlobalSettings::backupDataDir();
2350 bupDir = KGlobal::formatMessage ( bupDir, 0 ); 2377 bupDir = KGlobal::formatMessage ( bupDir, 0 );
2351 QString bupHint; 2378 QString bupHint;
2352 if ( !KPimGlobalPrefs::instance()->mBackupEnabled ) 2379 if ( !KPimGlobalPrefs::instance()->mBackupEnabled )
2353 bupHint = i18n("(Hint: You can enable automatic backup in the global settings!)"); 2380 bupHint = i18n("(Hint: You can enable automatic backup in the global settings!)");
2354 if ( KMessageBox::warningContinueCancel( this, i18n("This will <b>backup all calendar files</b> to the directory %1 %2").arg(bupDir).arg(bupHint),i18n("Information") ) != KMessageBox::Continue ) return; 2381 if ( KMessageBox::warningContinueCancel( this, i18n("This will <b>backup all calendar files</b> to the directory %1 %2").arg(bupDir).arg(bupHint),i18n("Information") ) != KMessageBox::Continue ) return;
2355 bool enabled = KPimGlobalPrefs::instance()->mBackupEnabled; 2382 bool enabled = KPimGlobalPrefs::instance()->mBackupEnabled;
2356 KPimGlobalPrefs::instance()->mBackupEnabled = false; 2383 KPimGlobalPrefs::instance()->mBackupEnabled = false;
2357 save(); 2384 save();
2358 KPimGlobalPrefs::instance()->mBackupEnabled = enabled; 2385 KPimGlobalPrefs::instance()->mBackupEnabled = enabled;
2359 backupAllFiles(); 2386 backupAllFiles();
2360} 2387}
2361void MainWindow::loadCalendar() 2388void MainWindow::loadCalendar()
2362{ 2389{
2363 2390
2364 2391
2365#if 0 2392#if 0
2366 QString fn = KOPrefs::instance()->mLastLoadFile; 2393 QString fn = KOPrefs::instance()->mLastLoadFile;
2367 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); 2394 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this );
2368 2395
2369 if ( fn == "" ) 2396 if ( fn == "" )
2370 return; 2397 return;
2371 QFileInfo info; 2398 QFileInfo info;
2372 info.setFile( fn ); 2399 info.setFile( fn );
2373 QString mess; 2400 QString mess;
2374 bool loadbup = true; 2401 bool loadbup = true;
2375 if ( info. exists() ) { 2402 if ( info. exists() ) {
2376 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 2403 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
2377 int result = QMessageBox::warning( this, "KO/Pi: Warning!", 2404 int result = QMessageBox::warning( this, "KO/Pi: Warning!",
2378 mess, 2405 mess,
2379 i18n("Load!"), i18n("Cancel"), 0, 2406 i18n("Load!"), i18n("Cancel"), 0,
2380 0, 1 ); 2407 0, 1 );
2381 if ( result != 0 ) { 2408 if ( result != 0 ) {
2382 loadbup = false; 2409 loadbup = false;
2383 } 2410 }
2384 } else { 2411 } else {
2385 QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 2412 QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
2386 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, 2413 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0,
2387 0, 1 ); 2414 0, 1 );
2388 2415
2389 return; 2416 return;
2390 } 2417 }
2391 if ( loadbup ) { 2418 if ( loadbup ) {
2392 mView->openCalendar( fn ); 2419 mView->openCalendar( fn );
2393 KOPrefs::instance()->mLastLoadFile = fn; 2420 KOPrefs::instance()->mLastLoadFile = fn;
2394 mess = i18n("KO/Pi:Loaded %1").arg(fn) ; 2421 mess = i18n("KO/Pi:Loaded %1").arg(fn) ;
2395 setCaption(mess); 2422 setCaption(mess);
2396 } 2423 }
2397#endif 2424#endif
2398 2425
2399} 2426}
2400void MainWindow::quickImportIcal() 2427void MainWindow::quickImportIcal()
2401{ 2428{
2402 importFile( KOPrefs::instance()->mLastImportFile, false ); 2429 importFile( KOPrefs::instance()->mLastImportFile, false );
2403} 2430}
2404void MainWindow::importFile( QString fn, bool quick ) 2431void MainWindow::importFile( QString fn, bool quick )
2405{ 2432{
2406 QFileInfo info; 2433 QFileInfo info;
2407 info.setFile( fn ); 2434 info.setFile( fn );
2408 QString mess; 2435 QString mess;
2409 if ( !info. exists() ) { 2436 if ( !info. exists() ) {
2410 mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); 2437 mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30));
2411 QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 2438 QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
2412 mess ); 2439 mess );
2413 return; 2440 return;
2414 } 2441 }
2415 int result = 0; 2442 int result = 0;
2416 if ( !quick ) { 2443 if ( !quick ) {
2417 mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 2444 mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
2418 result = QMessageBox::warning( this, "KO/Pi: Warning!", 2445 result = QMessageBox::warning( this, "KO/Pi: Warning!",
2419 mess, 2446 mess,
2420 "Import", "Cancel", 0, 2447 "Import", "Cancel", 0,
2421 0, 1 ); 2448 0, 1 );
2422 } 2449 }
2423 if ( result == 0 ) { 2450 if ( result == 0 ) {
2424 if ( mView->openCalendar( fn, true )) { 2451 if ( mView->openCalendar( fn, true )) {
2425 KOPrefs::instance()->mLastImportFile = fn; 2452 KOPrefs::instance()->mLastImportFile = fn;
2426 setCaption(i18n("Imported file successfully")); 2453 setCaption(i18n("Imported file successfully"));
2427 } else { 2454 } else {
2428 setCaption(i18n("Error importing file")); 2455 setCaption(i18n("Error importing file"));
2429 } 2456 }
2430 } 2457 }
2431} 2458}
2432 2459
2433void MainWindow::importIcal() 2460void MainWindow::importIcal()
2434{ 2461{
2435 2462
2436 QString fn =KOPrefs::instance()->mLastImportFile; 2463 QString fn =KOPrefs::instance()->mLastImportFile;
2437 2464
2438 fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); 2465 fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this );
2439 if ( fn == "" ) 2466 if ( fn == "" )
2440 return; 2467 return;
2441 importFile( fn, true ); 2468 importFile( fn, true );
2442 2469
2443} 2470}
2444 2471
2445void MainWindow::exportVCalendar() 2472void MainWindow::exportVCalendar()
2446{ 2473{
2447 QString fn = KOPrefs::instance()->mLastVcalFile; 2474 QString fn = KOPrefs::instance()->mLastVcalFile;
2448 fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); 2475 fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this );
2449 if ( fn == "" ) 2476 if ( fn == "" )
2450 return; 2477 return;
2451 QFileInfo info; 2478 QFileInfo info;
2452 info.setFile( fn ); 2479 info.setFile( fn );
2453 QString mes; 2480 QString mes;
2454 bool createbup = true; 2481 bool createbup = true;
2455 if ( info. exists() ) { 2482 if ( info. exists() ) {
2456 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); 2483 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
2457 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 2484 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
2458 i18n("Overwrite!"), i18n("Cancel"), 0, 2485 i18n("Overwrite!"), i18n("Cancel"), 0,
2459 0, 1 ); 2486 0, 1 );
2460 if ( result != 0 ) { 2487 if ( result != 0 ) {
2461 createbup = false; 2488 createbup = false;
2462 } 2489 }
2463 } 2490 }
2464 if ( createbup ) { 2491 if ( createbup ) {
2465 if ( mView->exportVCalendar( fn ) ) { 2492 if ( mView->exportVCalendar( fn ) ) {
2466 KOPrefs::instance()->mLastVcalFile = fn; 2493 KOPrefs::instance()->mLastVcalFile = fn;
2467 if ( fn.length() > 20 ) 2494 if ( fn.length() > 20 )
2468 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; 2495 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ;
2469 else 2496 else
2470 mes = i18n("KO/Pi:Exported to %1").arg(fn ); 2497 mes = i18n("KO/Pi:Exported to %1").arg(fn );
2471 setCaption(mes); 2498 setCaption(mes);
2472 } 2499 }
2473 } 2500 }
2474 2501
2475} 2502}
2476QString MainWindow::sentSyncFile() 2503QString MainWindow::sentSyncFile()
2477{ 2504{
2478#ifdef DESKTOP_VERSION 2505#ifdef DESKTOP_VERSION
2479 return locateLocal( "tmp", "copysynccal.ics" ); 2506 return locateLocal( "tmp", "copysynccal.ics" );
2480#else 2507#else
2481 return QString( "/tmp/copysynccal.ics" ); 2508 return QString( "/tmp/copysynccal.ics" );
2482#endif 2509#endif
2483} 2510}
2484 2511
2485void MainWindow::syncFileRequest() 2512void MainWindow::syncFileRequest()
2486{ 2513{
2487 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2514 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2488 mSyncManager->slotSyncMenu( 999 ); 2515 mSyncManager->slotSyncMenu( 999 );
2489 } 2516 }
2490 2517
2491 setCaption(i18n("Saving Data to temp file ..." )); 2518 setCaption(i18n("Saving Data to temp file ..." ));
2492 mView->saveCalendar( sentSyncFile() ); 2519 mView->saveCalendar( sentSyncFile() );
2493 setCaption(i18n("Data saved to temp file!" )); 2520 setCaption(i18n("Data saved to temp file!" ));
2494 2521
2495} 2522}
2496void MainWindow::getFile( bool success ) 2523void MainWindow::getFile( bool success )
2497{ 2524{
2498 if ( ! success ) { 2525 if ( ! success ) {
2499 setCaption( i18n("Error receiving file. Nothing changed!") ); 2526 setCaption( i18n("Error receiving file. Nothing changed!") );
2500 return; 2527 return;
2501 } 2528 }
2502 mView->openCalendar( sentSyncFile() ); 2529 mView->openCalendar( sentSyncFile() );
2503 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2530 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2504 mSyncManager->slotSyncMenu( 999 ); 2531 mSyncManager->slotSyncMenu( 999 );
2505 } 2532 }
2506 setCaption( i18n("Pi-Sync successful!") ); 2533 setCaption( i18n("Pi-Sync successful!") );
2507} 2534}
2508void MainWindow::printListView() 2535void MainWindow::printListView()
2509{ 2536{
2510 2537
2511 QString message = i18n("You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items."); 2538 QString message = i18n("You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.");
2512 2539
2513 KMessageBox::information( this, message); 2540 KMessageBox::information( this, message);
2514} 2541}
2515void MainWindow::printSel( ) 2542void MainWindow::printSel( )
2516{ 2543{
2517 mView->viewManager()->agendaView()->agenda()->printSelection(); 2544 mView->viewManager()->agendaView()->agenda()->printSelection();
2518} 2545}
2519 2546
2520void MainWindow::printCal() 2547void MainWindow::printCal()
2521{ 2548{
2522 mView->print();//mCp->showDialog(); 2549 mView->print();//mCp->showDialog();
2523} 2550}
2524 2551
2525 2552
2526#include "libkdepim/kdatepicker.h" 2553#include "libkdepim/kdatepicker.h"
2527#include <kdatetbl.h> 2554#include <kdatetbl.h>
2528 2555
2529void MainWindow::weekAction() 2556void MainWindow::weekAction()
2530{ 2557{
2531 int month; 2558 int month;
2532 KPopupFrame* popup = new KPopupFrame(this); 2559 KPopupFrame* popup = new KPopupFrame(this);
2533 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); 2560 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup);
2534 // ----- 2561 // -----
2535 picker->resize(picker->sizeHint()); 2562 picker->resize(picker->sizeHint());
2536 popup->setMainWidget(picker); 2563 popup->setMainWidget(picker);
2537 picker->setFocus(); 2564 picker->setFocus();
2538 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 2565 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
2539 int x = 0; 2566 int x = 0;
2540 int y = iconToolBar->height(); 2567 int y = iconToolBar->height();
2541 int dX = 0; 2568 int dX = 0;
2542 int dY = 0; 2569 int dY = 0;
2543 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2570 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2544 if ( iconToolBar->y() > height()/2 ) { 2571 if ( iconToolBar->y() > height()/2 ) {
2545 dY = picker->sizeHint().height()+8; 2572 dY = picker->sizeHint().height()+8;
2546 y = 0; 2573 y = 0;
2547 } 2574 }
2548 } else { 2575 } else {
2549 if ( iconToolBar->x() > width()/2 ) { // right side 2576 if ( iconToolBar->x() > width()/2 ) { // right side
2550 x=0; 2577 x=0;
2551 dX= picker->sizeHint().width()+8; 2578 dX= picker->sizeHint().width()+8;
2552 y = 0; 2579 y = 0;
2553 } else { 2580 } else {
2554 x= iconToolBar->width(); 2581 x= iconToolBar->width();
2555 y = 0; 2582 y = 0;
2556 } 2583 }
2557 } 2584 }
2558 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2585 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2559 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) 2586 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))))
2560 { 2587 {
2561 month = picker->getResult(); 2588 month = picker->getResult();
2562 emit selectWeek ( month ); 2589 emit selectWeek ( month );
2563 //qDebug("weekSelected %d ", month); 2590 //qDebug("weekSelected %d ", month);
2564 } 2591 }
2565 delete popup; 2592 delete popup;
2566} 2593}
2567 2594
2568void MainWindow::hideEvent ( QHideEvent * ) 2595void MainWindow::hideEvent ( QHideEvent * )
2569{ 2596{
2570 QString message; 2597 QString message;
2571 QDateTime nextA = mCalendar->nextAlarmEventDateTime(); 2598 QDateTime nextA = mCalendar->nextAlarmEventDateTime();
2572 if ( nextA.isValid() ) { 2599 if ( nextA.isValid() ) {
2573 QString sum = mCalendar->nextSummary(); 2600 QString sum = mCalendar->nextSummary();
2574 2601
2575 message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false)); 2602 message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false));
2576 setCaption( message ); 2603 setCaption( message );
2577 } 2604 }
2578} 2605}
2579 2606
2580void MainWindow::resizeEvent( QResizeEvent* e) 2607void MainWindow::resizeEvent( QResizeEvent* e)
2581{ 2608{
2582#ifndef DESKTOP_VERSION 2609#ifndef DESKTOP_VERSION
2583 if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) { 2610 if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) {
2584 if (QApplication::desktop()->width() > QApplication::desktop()->height() ) 2611 if (QApplication::desktop()->width() > QApplication::desktop()->height() )
2585 filterToolBar->hide(); 2612 filterToolBar->hide();
2586 else 2613 else
2587 filterToolBar->show(); 2614 filterToolBar->show();
2588 } 2615 }
2589#endif 2616#endif
2590 QMainWindow::resizeEvent( e); 2617 QMainWindow::resizeEvent( e);
2591} 2618}