summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt3
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--korganizer/calendarview.cpp17
-rw-r--r--korganizer/kofilterview.cpp32
-rw-r--r--korganizer/kofilterview.h3
-rw-r--r--korganizer/koprefs.cpp4
-rw-r--r--korganizer/main.cpp1
-rw-r--r--korganizer/mainwindow.cpp9
8 files changed, 60 insertions, 13 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index dfc9553..2e120df 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,160 +1,163 @@
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.10 ************ 3********** VERSION 2.1.10 ************
4 4
5KO/Pi:
6Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file.
7
5********** VERSION 2.1.9 ************ 8********** VERSION 2.1.9 ************
6 9
7KO/Pi: 10KO/Pi:
8Fixed some problems of the new search options in the search dialog. 11Fixed some problems of the new search options in the search dialog.
9Fixed some problems in the new resource config options. 12Fixed some problems in the new resource config options.
10Changed 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. 13Changed 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.
11Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: 14Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
12Now 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. 15Now 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.
13 16
14Fixed a problem in recurrence range in syncing with DTM. 17Fixed a problem in recurrence range in syncing with DTM.
15 18
16KA/Pi: 19KA/Pi:
17Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...) 20Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...)
18 21
19PwM/Pi: 22PwM/Pi:
20Added "sec" to the timeout config settings to make it clear the timeout values are seconds. 23Added "sec" to the timeout config settings to make it clear the timeout values are seconds.
21 24
22********** VERSION 2.1.8 ************ 25********** VERSION 2.1.8 ************
23 26
24KO/Pi: 27KO/Pi:
25Added info about the completion state of a todo in the ListView/Searchdialog. 28Added info about the completion state of a todo in the ListView/Searchdialog.
26If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well. 29If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
27Fixed some updating problems when changing the filter. 30Fixed some updating problems when changing the filter.
28 31
29KA/Pi: 32KA/Pi:
30In the addressee selection dialog now the formatted name is shown, if not empty. 33In the addressee selection dialog now the formatted name is shown, if not empty.
31Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category. 34Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category.
32Now in the addressee selection dialog a selected contact is remove with a single click from the selected list. 35Now in the addressee selection dialog a selected contact is remove with a single click from the selected list.
33 36
34Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored. 37Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
35Fixed the sorting for size in the file selector on the Z. 38Fixed the sorting for size in the file selector on the Z.
36 39
37Changed the color selection dialog on the Zaurus to a more user friendly version. 40Changed the color selection dialog on the Zaurus to a more user friendly version.
38 41
39********** VERSION 2.1.7 ************ 42********** VERSION 2.1.7 ************
40 43
41KO/Pi: 44KO/Pi:
42Fixed several problems in the new Resource handling. 45Fixed several problems in the new Resource handling.
43Added more options to the search dialog. 46Added more options to the search dialog.
44Fixed a problem in the Month view. 47Fixed a problem in the Month view.
45Added more options to the dialog when setting a todo to stopped. 48Added more options to the dialog when setting a todo to stopped.
46 49
47Fixed two small problems in KO/Pi Alarm applet. 50Fixed two small problems in KO/Pi Alarm applet.
48 51
49********** VERSION 2.1.6 ************ 52********** VERSION 2.1.6 ************
50 53
51This release is for testing only. 54This release is for testing only.
52 55
53KO/Pi: 56KO/Pi:
54Added to the list view (the list view is used in search dialog as well) the possibility to print it. 57Added to the list view (the list view is used in search dialog as well) the possibility to print it.
55Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view. 58Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
56Added to the list view the possibility to add all subtodos of selected todos to an export/beam. 59Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
57Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout. 60Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
58Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus. 61Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
59Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly. 62Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
60 63
61Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars. 64Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars.
62In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later. 65In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later.
63Now on every sync the set of calendars is synced which are enabled in the resource view. 66Now on every sync the set of calendars is synced which are enabled in the resource view.
64 67
65A calendar is enabled in the resource view if the "eye" column is checked. 68A calendar is enabled in the resource view if the "eye" column is checked.
66You can set a calendar to be the default for new items( "+" column ). 69You can set a calendar to be the default for new items( "+" column ).
67You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly. 70You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly.
68To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ... 71To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ...
69 72
70 73
71********** VERSION 2.1.5 ************ 74********** VERSION 2.1.5 ************
72 75
73This is the new stable version. 76This is the new stable version.
74Bugfix: 77Bugfix:
75Fixed a problem with agenda popup on the desktop in KO/Pi. 78Fixed a problem with agenda popup on the desktop in KO/Pi.
76Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. 79Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
77Added config option to not display completed todos in agenda view. 80Added config option to not display completed todos in agenda view.
78Addressee view is now using the formatted name, if defined. 81Addressee view is now using the formatted name, if defined.
79That makes it possible to display "lastname, firstname" in that view now. 82That makes it possible to display "lastname, firstname" in that view now.
80To set the formatted name for all contacts, please use menu: 83To set the formatted name for all contacts, please use menu:
81Edit->Change->Set formatted name. 84Edit->Change->Set formatted name.
82Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. 85Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
83 86
84********** VERSION 2.1.4 ************ 87********** VERSION 2.1.4 ************
85 88
86Fixed two more bugs in the KA/Pi CSV import dialog: 89Fixed two more bugs in the KA/Pi CSV import dialog:
87Made it possible to read multi-line fields and import it to the "Note" field. 90Made it possible to read multi-line fields and import it to the "Note" field.
88Fixed a problem in mapping custom fields, whatever a custem field is... 91Fixed a problem in mapping custom fields, whatever a custem field is...
89 92
90********** VERSION 2.1.3 ************ 93********** VERSION 2.1.3 ************
91 94
92Changed the menu structure of the alarm applet: 95Changed the menu structure of the alarm applet:
93Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". 96Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
94 97
95Fixed several problems in the KA/Pi CSV import dialog: 98Fixed several problems in the KA/Pi CSV import dialog:
96Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. 99Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
97 100
98 101
99********** VERSION 2.1.2 ************ 102********** VERSION 2.1.2 ************
100 103
101Fixed a problem closing the alarm dialog on Zaurus with "OK" button. 104Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
102 105
103Fixed a problem when importing data from Outlook with mutiple categories set. 106Fixed a problem when importing data from Outlook with mutiple categories set.
104 107
105Changed display of days in datenavigator: 108Changed display of days in datenavigator:
106Birthdays are now blue, not dark green. 109Birthdays are now blue, not dark green.
107When todo view is shown, no birtdays are shown and days with due todos are shown blue. 110When todo view is shown, no birtdays are shown and days with due todos are shown blue.
108When journal view is shown, only holidays are shown and days with journals are blue. 111When journal view is shown, only holidays are shown and days with journals are blue.
109 112
110Added Backup options to global config: 113Added Backup options to global config:
111You 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 ). 114You 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 ).
112It 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. 115It 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.
113The 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. 116The 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.
114 117
115********** VERSION 2.1.1 ************ 118********** VERSION 2.1.1 ************
116 119
117Stable release 2.1.1! 120Stable release 2.1.1!
118 121
119KO/Pi: 122KO/Pi:
120Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. 123Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
121 124
122********** VERSION 2.1.0 ************ 125********** VERSION 2.1.0 ************
123 126
124Stable release 2.1.0! 127Stable release 2.1.0!
125 128
126Summary of changes/fixes compared to version 2.0.6: 129Summary of changes/fixes compared to version 2.0.6:
127 130
128Many bugs of version 2.0.6 fixed. 131Many bugs of version 2.0.6 fixed.
129Most of them were small bugs, but some of them were important. 132Most of them were small bugs, but some of them were important.
130It is recommended to use version 2.1.0 and not version 2.0.6. 133It is recommended to use version 2.1.0 and not version 2.0.6.
131 134
132Important changes: 135Important changes:
133 136
134Added recurring todos to KO/Pi. 137Added recurring todos to KO/Pi.
135 138
136Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. 139Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
137 140
138Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 141Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
139 142
140Datenavigator can now display many months. Very useful on the desktop. 143Datenavigator can now display many months. Very useful on the desktop.
141 144
142KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. 145KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
143 146
144Made alarm sound working on Linux desktop. 147Made alarm sound working on Linux desktop.
145 148
146Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. 149Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details.
147 150
148Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. 151Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details.
149 152
150Many other usebility enhancements. 153Many other usebility enhancements.
151Special thanks to Ben for his suggestions! 154Special thanks to Ben for his suggestions!
152 155
153You can find the complete changelog 156You can find the complete changelog
154from version 1.7.7 to 2.1.0 157from version 1.7.7 to 2.1.0
155in the source package or on 158in the source package or on
156 159
157http://www.pi-sync.net/html/changelog.html 160http://www.pi-sync.net/html/changelog.html
158 161
159 162
160 163
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 2ade5bd..01c707e 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1,1464 +1,1464 @@
1{ "10 minutes","10 Minuten" }, 1{ "10 minutes","10 Minuten" },
2{ "10th","10." }, 2{ "10th","10." },
3{ "11th","11." }, 3{ "11th","11." },
4{ "12 pm Format","12 AM/PM Format" }, 4{ "12 pm Format","12 AM/PM Format" },
5{ "12th","12." }, 5{ "12th","12." },
6{ "13th","13." }, 6{ "13th","13." },
7{ "14th","14." }, 7{ "14th","14." },
8{ "15th","15." }, 8{ "15th","15." },
9{ "16th","16." }, 9{ "16th","16." },
10{ "17th","17." }, 10{ "17th","17." },
11{ "18th","18." }, 11{ "18th","18." },
12{ "19th","19." }, 12{ "19th","19." },
13{ "1 Day","1 Tag" }, 13{ "1 Day","1 Tag" },
14{ "1 h","1 Std" }, 14{ "1 h","1 Std" },
15{ "1 (high)","1 (hoch)" }, 15{ "1 (high)","1 (hoch)" },
16{ "5 (low)","5" }, 16{ "5 (low)","5" },
17{ "1st","1." }, 17{ "1st","1." },
18{ "20th","20." }, 18{ "20th","20." },
19{ "21st","21." }, 19{ "21st","21." },
20{ "22nd","22." }, 20{ "22nd","22." },
21{ "23rd","23." }, 21{ "23rd","23." },
22{ "24:00 Hour Format","24:00 Stunden Format" }, 22{ "24:00 Hour Format","24:00 Stunden Format" },
23{ "24th","24." }, 23{ "24th","24." },
24{ "25th","25." }, 24{ "25th","25." },
25{ "26th","26." }, 25{ "26th","26." },
26{ "27th","27." }, 26{ "27th","27." },
27{ "28th","28." }, 27{ "28th","28." },
28{ "29th","29." }, 28{ "29th","29." },
29{ "2nd","2." }, 29{ "2nd","2." },
30{ "30 minutes","30 Minuten" }, 30{ "30 minutes","30 Minuten" },
31{ "30th","30." }, 31{ "30th","30." },
32{ "31st","31." }, 32{ "31st","31." },
33{ "3rd","3." }, 33{ "3rd","3." },
34{ "4th","4." }, 34{ "4th","4." },
35{ "5 (lowest)","5 (Niedrigster)" }, 35{ "5 (lowest)","5 (Niedrigster)" },
36{ "5th","5." }, 36{ "5th","5." },
37{ "6th","6." }, 37{ "6th","6." },
38{ "7th","7." }, 38{ "7th","7." },
39{ "8th","8." }, 39{ "8th","8." },
40{ "9th","9." }, 40{ "9th","9." },
41{ "About...","Über..." }, 41{ "About...","Über..." },
42{ "&Accept","&Akzeptieren" }, 42{ "&Accept","&Akzeptieren" },
43{ "Accept","Akzeptieren" }, 43{ "Accept","Akzeptieren" },
44{ "Accept A&ll","A&lles Akzepieren" }, 44{ "Accept A&ll","A&lles Akzepieren" },
45{ "Access:","Zugriff:" }, 45{ "Access:","Zugriff:" },
46{ "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, 46{ "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" },
47{ "Actions","Aktionen" }, 47{ "Actions","Aktionen" },
48{ "Add Filter","Filter Hinzufügen" }, 48{ "Add Filter","Filter Hinzufügen" },
49{ "&Add","Hinzufügen" }, 49{ "&Add","Hinzufügen" },
50{ "Add","Hinzufügen" }, 50{ "Add","Hinzufügen" },
51{ "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, 51{ "Additional email addresses:","Zusätzliche E-Mail Adressen:" },
52{ "Additional email address:","Zusätzliche E-Mail Adresse:" }, 52{ "Additional email address:","Zusätzliche E-Mail Adresse:" },
53{ "&Addressbook","&Adressbuch" }, 53{ "&Addressbook","&Adressbuch" },
54{ "Address &Book...","Adress&buch..." }, 54{ "Address &Book...","Adress&buch..." },
55{ "Agenda Size","Agende Größe" }, 55{ "Agenda Size","Agende Größe" },
56{ "Agenda Size:","Größe der Agenda:" }, 56{ "Agenda Size:","Größe der Agenda:" },
57{ "Agenda view:","Agenda Ansicht:" }, 57{ "Agenda view:","Agenda Ansicht:" },
58{ "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, 58{ "Agenda view background color:","Hintergrund der Agenda Ansicht:" },
59{ "All attendees","Alle Teilnehmer" }, 59{ "All attendees","Alle Teilnehmer" },
60{ "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, 60{ "AllDayAgenda Height:","Höhe Ganztages Agenda:" },
61{ "All day event","Ganztägig" }, 61{ "All day event","Ganztägig" },
62{ "Anonymous","Anonym" }, 62{ "Anonymous","Anonym" },
63{ "Apply","Anwenden" }, 63{ "Apply","Anwenden" },
64{ "Apr","Apr" }, 64{ "Apr","Apr" },
65{ "April","April" }, 65{ "April","April" },
66{"Ask for every entry on conflict","Frage bei Konflikten nach"}, 66{"Ask for every entry on conflict","Frage bei Konflikten nach"},
67{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, 67{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" },
68{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, 68{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" },
69{ "Attendees","Teilnehmer" }, 69{ "Attendees","Teilnehmer" },
70{ "Aug","Aug" }, 70{ "Aug","Aug" },
71{ "August","August" }, 71{ "August","August" },
72{ "Auto-Save","Automatisches Abspeichern" }, 72{ "Auto-Save","Automatisches Abspeichern" },
73{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, 73{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" },
74{ "Auto saving...","Automatische Sicherung..." }, 74{ "Auto saving...","Automatische Sicherung..." },
75{ "Begin on:","Starte mit:" }, 75{ "Begin on:","Starte mit:" },
76{ "Begins on: %1","Starte mit: %1" }, 76{ "Begins on: %1","Starte mit: %1" },
77{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, 77{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" },
78{ "<b>On:</b> %1","<b>Am:</b> %1" }, 78{ "<b>On:</b> %1","<b>Am:</b> %1" },
79{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, 79{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" },
80{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, 80{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" },
81{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, 81{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" },
82{ "Busy","Belegt" }, 82{ "Busy","Belegt" },
83{ "&Cancel","Abbre&chen" }, 83{ "&Cancel","Abbre&chen" },
84{ "Cancel","Abbrechen" }, 84{ "Cancel","Abbrechen" },
85{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, 85{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" },
86{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, 86{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." },
87{ "Categories...","Kategorien..." }, 87{ "Categories...","Kategorien..." },
88{ "Categories","Kategorien" }, 88{ "Categories","Kategorien" },
89{ "Category","Kategorie" }, 89{ "Category","Kategorie" },
90{ "Center View","Zentriere Ansicht" }, 90{ "Center View","Zentriere Ansicht" },
91{ "Change","Ändere" }, 91{ "Change","Ändere" },
92{ "Cinema","Kino" }, 92{ "Cinema","Kino" },
93{ "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, 93{ "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" },
94{ "Clone Item","Klone Eintrag" }, 94{ "Clone Item","Klone Eintrag" },
95{ "&Close","S&chließen" }, 95{ "&Close","S&chließen" },
96{ "Close","Schließen" }, 96{ "Close","Schließen" },
97{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, 97{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" },
98{ "Colors","Farben" }, 98{ "Colors","Farben" },
99{ "completed","erledigt" }, 99{ "completed","erledigt" },
100{ "completed on %1","erledigt am %1" }, 100{ "completed on %1","erledigt am %1" },
101{ "Complete","Erledigt" }, 101{ "Complete","Erledigt" },
102{ "Confidential","Vertraulich" }, 102{ "Confidential","Vertraulich" },
103{ "Configure...","Einstellungen..." }, 103{ "Configure...","Einstellungen..." },
104{ "Confirm &deletes","Löschvogang bestätigen" }, 104{ "Confirm &deletes","Löschvogang bestätigen" },
105{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, 105{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." },
106{ "Counter-event Viewer","Terminzähler Ansicht" }, 106{ "Counter-event Viewer","Terminzähler Ansicht" },
107{ "Daily ending hour:","Feierabend:" }, 107{ "Daily ending hour:","Feierabend:" },
108{ "Daily starting hour:","Anfangszeit:" }, 108{ "Daily starting hour:","Anfangszeit:" },
109{ "Daily","Täglich" }, 109{ "Daily","Täglich" },
110{ "Date Format","Datums Format" }, 110{ "Date Format","Datums Format" },
111{ "Date Format:","Datums Format:" }, 111{ "Date Format:","Datums Format:" },
112{ "DateNavigator:(nr)","Datums Navigator" }, 112{ "DateNavigator:(nr)","Datums Navigator" },
113{ "Dates: ","Datum: " }, 113{ "Dates: ","Datum: " },
114{ "Date && Time","Datum && Zeit" }, 114{ "Date && Time","Datum && Zeit" },
115{ "Day begins at:","Der Tag beginnt um:" }, 115{ "Day begins at:","Der Tag beginnt um:" },
116{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, 116{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" },
117{ "Days in What's Next:","Tage in What's Next:" }, 117{ "Days in What's Next:","Tage in What's Next:" },
118{ "day(s)","Tag(e)" }, 118{ "day(s)","Tag(e)" },
119{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, 119{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" },
120{ "day","Tag" }, 120{ "day","Tag" },
121{ "Dec","Dez" }, 121{ "Dec","Dez" },
122{ "December","Dezember" }, 122{ "December","Dezember" },
123{ "Default alarm time:","Standard Alarmzeit:" }, 123{ "Default alarm time:","Standard Alarmzeit:" },
124{ "Default appointment time:","Standard Termin Startzeit:" }, 124{ "Default appointment time:","Standard Termin Startzeit:" },
125{ "Default event color:","Standard Terminfarbe:" }, 125{ "Default event color:","Standard Terminfarbe:" },
126{ "Default","Standard" }, 126{ "Default","Standard" },
127{ "Def. duration of new app.:","Standard Termin Länge:" }, 127{ "Def. duration of new app.:","Standard Termin Länge:" },
128{ "Delete All","Lösche alles" }, 128{ "Delete All","Lösche alles" },
129{ "Delete all selected","Lösche alle Selektierten" }, 129{ "Delete all selected","Lösche alle Selektierten" },
130{ "Delete Current","Aktuellen löschen" }, 130{ "Delete Current","Aktuellen löschen" },
131{ "Delete Event...","Lösche Termin..." }, 131{ "Delete Event...","Lösche Termin..." },
132{ "Delete Event","Lösche Termin" }, 132{ "Delete Event","Lösche Termin" },
133{ "&Delete","Löschen" }, 133{ "&Delete","Löschen" },
134{ "Delete...","Löschen..." }, 134{ "Delete...","Löschen..." },
135{ "Delete","Löschen" }, 135{ "Delete","Löschen" },
136{ "Delete Todo...","Lösche Todo..." }, 136{ "Delete Todo...","Lösche Todo..." },
137{ "Delete To-Do","Lösche Todo" }, 137{ "Delete To-Do","Lösche Todo" },
138{ "Deleting item %d ...","Lösche Eintrag %d..." }, 138{ "Deleting item %d ...","Lösche Eintrag %d..." },
139{ "Descriptions","Beschreibungen" }, 139{ "Descriptions","Beschreibungen" },
140{ "Deselect all","Deselektiere Alle" }, 140{ "Deselect all","Deselektiere Alle" },
141{ "Details","Details" }, 141{ "Details","Details" },
142{ "Dinner","Abendessen" }, 142{ "Dinner","Abendessen" },
143{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, 143{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" },
144{ "Due Date","Fällig am" }, 144{ "Due Date","Fällig am" },
145{ "Due: ","Fällig: "}, 145{ "Due: ","Fällig: "},
146{ "Due Time","Fällig um" }, 146{ "Due Time","Fällig um" },
147{ "Due:","Fällig:"}, 147{ "Due:","Fällig:"},
148{ "Duration: ","Dauer: " }, 148{ "Duration: ","Dauer: " },
149{ "Edit...","Bearbeite..." }, 149{ "Edit...","Bearbeite..." },
150{ "Edit","Bearbeite" }, 150{ "Edit","Bearbeite" },
151{ "Edit Event...","Bearbeite Termin..." }, 151{ "Edit Event...","Bearbeite Termin..." },
152{ "Edit Event","Bearbeite Termin" }, 152{ "Edit Event","Bearbeite Termin" },
153{ "Edit exceptions","Bearbeite Ausnahmen" }, 153{ "Edit exceptions","Bearbeite Ausnahmen" },
154{ "EditorBox:","Editor Fenster:" }, 154{ "EditorBox:","Editor Fenster:" },
155{ "Edit Recurrence Range","Bearbeite Wiederholung" }, 155{ "Edit Recurrence Range","Bearbeite Wiederholung" },
156{ "Edit Todo...","Berabeite Todo..." }, 156{ "Edit Todo...","Berabeite Todo..." },
157{ "Edit To-Do","Todo bearbeiten" }, 157{ "Edit To-Do","Todo bearbeiten" },
158{ "E&mail address:","E&mail Adresse:" }, 158{ "E&mail address:","E&mail Adresse:" },
159{ "(EmptyEmail)","(KeineEmail)" }, 159{ "(EmptyEmail)","(KeineEmail)" },
160{ "(EmptyName)","(KeinName)" }, 160{ "(EmptyName)","(KeinName)" },
161{ "Enable Recurrence","Wiederholung anschalten" }, 161{ "Enable Recurrence","Wiederholung anschalten" },
162{ "End after","Endet nach"}, 162{ "End after","Endet nach"},
163{ "End by:","Endet am"}, 163{ "End by:","Endet am"},
164{ "End Date","End Datum" }, 164{ "End Date","End Datum" },
165{ "End:","Ende:" }, 165{ "End:","Ende:" },
166{ "End Time","End Zeit" }, 166{ "End Time","End Zeit" },
167{ "English","Englisch" }, 167{ "English","Englisch" },
168{ "Event","Termin" }, 168{ "Event","Termin" },
169{ "Event list","Termin Liste" }, 169{ "Event list","Termin Liste" },
170{ "Events","Termine" }, 170{ "Events","Termine" },
171{ "Event Viewer:","Termin Übersicht:" }, 171{ "Event Viewer:","Termin Übersicht:" },
172{ "every","jede" }, 172{ "every","jede" },
173{ "Exceptions...","Ausnahmen..." }, 173{ "Exceptions...","Ausnahmen..." },
174{ "Exceptions","Ausnahmen" }, 174{ "Exceptions","Ausnahmen" },
175{ "Exclude holidays","Ohne freie Tage" }, 175{ "Exclude holidays","Ohne freie Tage" },
176{ "Exclude Saturdays","Ohne Samstage" }, 176{ "Exclude Saturdays","Ohne Samstage" },
177{ "Feb","Feb" }, 177{ "Feb","Feb" },
178{ "February","Februar" }, 178{ "February","Februar" },
179{ "&Find","Suche!" }, 179{ "&Find","Suche!" },
180{ "Fonts","Schriftart" }, 180{ "Fonts","Schriftart" },
181{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, 181{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" },
182{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, 182{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"},
183{ "Free","Frei" }, 183{ "Free","Frei" },
184{ "Friday","Freitag" }, 184{ "Friday","Freitag" },
185{ "Fri","Fr" }, 185{ "Fri","Fr" },
186{ "From:","Vom:" }, 186{ "From:","Vom:" },
187{ "Full &name:","Vor- und &Nachname:" }, 187{ "Full &name:","Vor- und &Nachname:" },
188{ "General","Allgemein" }, 188{ "General","Allgemein" },
189{ "German","Deutsch" }, 189{ "German","Deutsch" },
190{ "Gifts","Geschenke" }, 190{ "Gifts","Geschenke" },
191{ "Go to Today","Heute anzeigen" }, 191{ "Go to Today","Heute anzeigen" },
192{ "Help","Hilfe" }, 192{ "Help","Hilfe" },
193{ "Hide Dates","Daten ausblenden" }, 193{ "Hide Dates","Daten ausblenden" },
194{ "Highlight color:","Markierungen:" }, 194{ "Highlight color:","Markierungen:" },
195{ "Holiday color:","Freie Tage:" }, 195{ "Holiday color:","Freie Tage:" },
196{ "hour(s)","Stunde(n)" }, 196{ "hour(s)","Stunde(n)" },
197{ "In %1 days: ","In %1 Tagen: " }, 197{ "In %1 days: ","In %1 Tagen: " },
198{ "Incomplete Todo:","Unerledigte Aufgaben:" }, 198{ "Incomplete Todo:","Unerledigte Aufgaben:" },
199{ "Information","Information" }, 199{ "Information","Information" },
200{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, 200{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" },
201{ "Jan","Jan" }, 201{ "Jan","Jan" },
202{ "January","Januar" }, 202{ "January","Januar" },
203{ "JournalView:","Journal Ansicht:" }, 203{ "JournalView:","Journal Ansicht:" },
204{ "Journals","Journale" }, 204{ "Journals","Journale" },
205{ "Jul","Jul" }, 205{ "Jul","Jul" },
206{ "July","Juli" }, 206{ "July","Juli" },
207{ "Jump to date","Springe zum Datum" }, 207{ "Jump to date","Springe zum Datum" },
208{ "June","Juni" }, 208{ "June","Juni" },
209{ "Jun","Jun" }, 209{ "Jun","Jun" },
210{ "Key Bindings...","Tastenzuordnung..." }, 210{ "Key Bindings...","Tastenzuordnung..." },
211{ "Kids","Kinder" }, 211{ "Kids","Kinder" },
212{ "Known Problems...","Bekannte Probleme..." }, 212{ "Known Problems...","Bekannte Probleme..." },
213{ "KO/Pi Find ","KO/Pi Suchdialog " }, 213{ "KO/Pi Find ","KO/Pi Suchdialog " },
214{ "KO/Pi Find: ","KO/Pi Suchen: " }, 214{ "KO/Pi Find: ","KO/Pi Suchen: " },
215{ "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, 215{ "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." },
216{ "Language:(needs restart)","Sprache (Neustart!)" }, 216{ "Language:(needs restart)","Sprache (Neustart!)" },
217{ "Language:","Sprache" }, 217{ "Language:","Sprache" },
218{ "Large","Etwas mehr" }, 218{ "Large","Etwas mehr" },
219{ "List View:","Listenansicht:" }, 219{ "List View:","Listenansicht:" },
220{ "List View","Listenansicht" }, 220{ "List View","Listenansicht" },
221{ "Load/Save","Laden/Speichern" }, 221{ "Load/Save","Laden/Speichern" },
222{ "Load Template","Lade Vorlage" }, 222{ "Load Template","Lade Vorlage" },
223{ "Locale","Localisation" }, 223{ "Locale","Localisation" },
224{ "Local temp file:","Lokale temp. Datei:" }, 224{ "Local temp file:","Lokale temp. Datei:" },
225{ "Location: ","Ort: " }, 225{ "Location: ","Ort: " },
226{ "Location:","Ort:" }, 226{ "Location:","Ort:" },
227{ "Mail client","Mail Programm" }, 227{ "Mail client","Mail Programm" },
228{ "Mail Client","Mail Programm" }, 228{ "Mail Client","Mail Programm" },
229{ "March","März" }, 229{ "March","März" },
230{ "Mar","Mär" }, 230{ "Mar","Mär" },
231{ "May","Mai" }, 231{ "May","Mai" },
232{ "M. Bains line:","M. Bains Linie:" }, 232{ "M. Bains line:","M. Bains Linie:" },
233{ "Medium","Medium" }, 233{ "Medium","Medium" },
234{ "Method","Methode" }, 234{ "Method","Methode" },
235{ "minute(s)","Minute(n)" }, 235{ "minute(s)","Minute(n)" },
236{ "Monday","Montag" }, 236{ "Monday","Montag" },
237{ "Mon","Mo" }, 237{ "Mon","Mo" },
238{ "Monthly","Monatlich" }, 238{ "Monthly","Monatlich" },
239{ "Month not long enough","Monat ist nicht lang genug" }, 239{ "Month not long enough","Monat ist nicht lang genug" },
240{ "month(s)","Monat(e)" }, 240{ "month(s)","Monat(e)" },
241{ "Month view:","Monatsansicht:" }, 241{ "Month view:","Monatsansicht:" },
242{ "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, 242{ "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" },
243{ "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" }, 243{ "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" },
244{ "Move &Down","Nach unten verschieben" }, 244{ "Move &Down","Nach unten verschieben" },
245{ "Move &Up","Nach oben verschieben" }, 245{ "Move &Up","Nach oben verschieben" },
246{ "Name:","Name:" }, 246{ "Name:","Name:" },
247{ "Name","Name" }, 247{ "Name","Name" },
248{ "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, 248{ "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" },
249{ "%n Days","%n Tage" }, 249{ "%n Days","%n Tage" },
250{ "Never","Nie" }, 250{ "Never","Nie" },
251{ "New event...","Neuer Termin..." }, 251{ "New event...","Neuer Termin..." },
252{ "New event","Neuer Termin" }, 252{ "New event","Neuer Termin" },
253{ "New Event...","Neuer Termin..." }, 253{ "New Event...","Neuer Termin..." },
254{ "New Events/Todos should","Neue Termine/Todos sollten" }, 254{ "New Events/Todos should","Neue Termine/Todos sollten" },
255{ "&New","&Neu" }, 255{ "&New","&Neu" },
256{ "New","Neu", }, 256{ "New","Neu", },
257{ "New Sub-Todo...","Neues Sub-Todo..." }, 257{ "New Sub-Todo...","Neues Sub-Todo..." },
258{ "New Todo...","Neues Todo..." }, 258{ "New Todo...","Neues Todo..." },
259{ "Next Alarm: ","Nächster Alarm: ", }, 259{ "Next Alarm: ","Nächster Alarm: ", },
260{ "&Next Day","&Nächster Tag", }, 260{ "&Next Day","&Nächster Tag", },
261{ "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, 261{ "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" },
262{ "Next month","Nächster Monat" }, 262{ "Next month","Nächster Monat" },
263{ "&Next Week","&Nächste Woche" }, 263{ "&Next Week","&Nächste Woche" },
264{ "Next year","Nächstes Jahr" }, 264{ "Next year","Nächstes Jahr" },
265{ "Next Year","Nächstes Jahr" }, 265{ "Next Year","Nächstes Jahr" },
266{ "%n h","%n Std" }, 266{ "%n h","%n Std" },
267{ "No ending date","Kein End-Datum", }, 267{ "No ending date","Kein End-Datum", },
268{ "No event, nothing to do.","Kein Termin, nichts zu tun.", }, 268{ "No event, nothing to do.","Kein Termin, nichts zu tun.", },
269{ "No event selected.","Kein Termin selektiert" }, 269{ "No event selected.","Kein Termin selektiert" },
270{ "No","Nein" }, 270{ "No","Nein" },
271{ "No program set","Kein Programm ausgewählt", }, 271{ "No program set","Kein Programm ausgewählt", },
272{ "Normal","Normal" }, 272{ "Normal","Normal" },
273{ "[No selection]","Keine Selektion", }, 273{ "[No selection]","Keine Selektion", },
274{ "No sound set","Kein Sound ausgewählt", }, 274{ "No sound set","Kein Sound ausgewählt", },
275{ "no time ","keine Zeit ", }, 275{ "no time ","keine Zeit ", },
276{ "no time","keine Zeit", }, 276{ "no time","keine Zeit", },
277{ "No Time","Keine Zeit" }, 277{ "No Time","Keine Zeit" },
278{ "November","November" }, 278{ "November","November" },
279{ "Nov","Nov", }, 279{ "Nov","Nov", },
280{ "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, 280{ "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" },
281{ "occurrence(s)","Vorkommen" }, 281{ "occurrence(s)","Vorkommen" },
282{ "October","Oktober" }, 282{ "October","Oktober" },
283{ "Oct","Okt", }, 283{ "Oct","Okt", },
284{ "O-due!","Ü-fällig! " }, 284{ "O-due!","Ü-fällig! " },
285{ "&OK","&OK" }, 285{ "&OK","&OK" },
286{ "Ok+Show!","Ok+Anzeigen" }, 286{ "Ok+Show!","Ok+Anzeigen" },
287{ "Organizer: %1","Organisator %1" }, 287{ "Organizer: %1","Organisator %1" },
288{ "Organizer","Organisator" }, 288{ "Organizer","Organisator" },
289{ "Owner: ","Besitzer: " }, 289{ "Owner: ","Besitzer: " },
290{ "Owner:","Besitzer:" }, 290{ "Owner:","Besitzer:" },
291{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, 291{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" },
292{ "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, 292{ "Pick a date to display","Wähle einen Tag zum anzeigen aus" },
293{ "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, 293{ "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."},
294{ "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, 294{ "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." },
295{ "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, 295{ "Please specify a valid start date.","Bitte gültiges Startdatum angeben." },
296{ "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, 296{ "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." },
297{ "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, 297{ "Please specify a valid start time.","Bitte gültige Startzeit angeben."},
298{ "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, 298{ "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." },
299{ "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, 299{ "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" },
300{ "&Previous Day","Vorheriger Tag" }, 300{ "&Previous Day","Vorheriger Tag" },
301{ "Previous month","Vorheriger Monat" }, 301{ "Previous month","Vorheriger Monat" },
302{ "Previous Month","Vorheriger Monat" }, 302{ "Previous Month","Vorheriger Monat" },
303{ "&Previous Week","Vorherige Woche" }, 303{ "&Previous Week","Vorherige Woche" },
304{ "Previous year","Vorheriges Jahr" }, 304{ "Previous year","Vorheriges Jahr" },
305{ "Previous Year","Vorheriges Jahr" }, 305{ "Previous Year","Vorheriges Jahr" },
306{ "Printing","Drucken" }, 306{ "Printing","Drucken" },
307{ "Priority:","Priorität:" }, 307{ "Priority:","Priorität:" },
308{ "Private","Privat" }, 308{ "Private","Privat" },
309{ "Proceed","Weiter" }, 309{ "Proceed","Weiter" },
310{ "Public","Öffentlich" }, 310{ "Public","Öffentlich" },
311{ "Purge","Entferne" }, 311{ "Purge","Entferne" },
312{ "Purge Completed","Entferne erledigte Todos" }, 312{ "Purge Completed","Entferne erledigte Todos" },
313{ "Purge Todos","Todos bereinigen" }, 313{ "Purge Todos","Todos bereinigen" },
314{ "read-only","schreibgeschützt" }, 314{ "read-only","schreibgeschützt" },
315{ "Recur every","Wiederh. alle" }, 315{ "Recur every","Wiederh. alle" },
316{ "Recur in the month of","Wiederh. im Monat" }, 316{ "Recur in the month of","Wiederh. im Monat" },
317{ "Recur on the","Wiederh. am" }, 317{ "Recur on the","Wiederh. am" },
318{ "Recur on this day","Wiederh. am diesen Tag" }, 318{ "Recur on this day","Wiederh. am diesen Tag" },
319{ "Recurrence Range...","Wiederholungs Zeitraum..." }, 319{ "Recurrence Range...","Wiederholungs Zeitraum..." },
320{ "Recurrence Range","Wiederholungs Zeitraum" }, 320{ "Recurrence Range","Wiederholungs Zeitraum" },
321{ "Recurrence Rule","Wiederholungs Regel" }, 321{ "Recurrence Rule","Wiederholungs Regel" },
322{ "Recurrence","Wiederholung" }, 322{ "Recurrence","Wiederholung" },
323{ "Recurs","Wiederholung" }, 323{ "Recurs","Wiederholung" },
324{"&Reject","Abweisen"}, 324{"&Reject","Abweisen"},
325{ "Reminder:","Alarm:" }, 325{ "Reminder:","Alarm:" },
326{ "Rem.:","Alarm:" }, 326{ "Rem.:","Alarm:" },
327{ "Rem.","Alarm:" }, 327{ "Rem.","Alarm:" },
328{ "Remote file:","Remote Datei:"}, 328{ "Remote file:","Remote Datei:"},
329{ "Remote IP:","Remote (ferne) IP:" }, 329{ "Remote IP:","Remote (ferne) IP:" },
330{ "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, 330{ "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " },
331{ "Remote user:","Remote Benutzer"}, 331{ "Remote user:","Remote Benutzer"},
332{ "&Remove","Entfe&rnen" }, 332{ "&Remove","Entfe&rnen" },
333{ "Remove","Entfernen" }, 333{ "Remove","Entfernen" },
334{ "Request response","Bemerkung anfordern" }, 334{ "Request response","Bemerkung anfordern" },
335{ "Role:","Rolle:" }, 335{ "Role:","Rolle:" },
336{ "Role","Rolle" }, 336{ "Role","Rolle" },
337{ "Sat","Sa" }, 337{ "Sat","Sa" },
338{ "Saturday","Samstag" }, 338{ "Saturday","Samstag" },
339{ "Search for:","Suche nach:" }, 339{ "Search for:","Suche nach:" },
340{ "Search In","Suche in" }, 340{ "Search In","Suche in" },
341{ "Search...","Suche..." }, 341{ "Search...","Suche..." },
342{ "Search","Suche" }, 342{ "Search","Suche" },
343{ "Select Addresses","Wähle Adressen" }, 343{ "Select Addresses","Wähle Adressen" },
344{ "Select all","Selektiere Alle" }, 344{ "Select all","Selektiere Alle" },
345{ "Select a month","Wähle Monat" }, 345{ "Select a month","Wähle Monat" },
346{ "Select a week","Wähle Woche" }, 346{ "Select a week","Wähle Woche" },
347{ "Select a year","Wähle Jahr" }, 347{ "Select a year","Wähle Jahr" },
348{ "Send directly","Sende direkt" }, 348{ "Send directly","Sende direkt" },
349{ "&Send Messages","&Sende Nachrichten", }, 349{ "&Send Messages","&Sende Nachrichten", },
350{ "Sep","Sep" }, 350{ "Sep","Sep" },
351{ "September","September" }, 351{ "September","September" },
352{ "Shopping","Einkaufen" }, 352{ "Shopping","Einkaufen" },
353{ "Show Dates","Zeige Daten" }, 353{ "Show Dates","Zeige Daten" },
354{ "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, 354{ "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." },
355{ "Show Event...","Zeige Termin..." }, 355{ "Show Event...","Zeige Termin..." },
356{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, 356{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." },
357{ "Show Marcus Bains line","Zeige Marcus Bains Linie" }, 357{ "Show Marcus Bains line","Zeige Marcus Bains Linie" },
358{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, 358{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." },
359{ "Show time as:","Zeige Zeit als" }, 359{ "Show time as:","Zeige Zeit als" },
360{ "Show Todo...","Zeige To-Do" }, 360{ "Show Todo...","Zeige To-Do" },
361{ "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, 361{ "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" },
362{ "&Show","Zeige" }, 362{ "&Show","Zeige" },
363{ "Show...","Zeige..." }, 363{ "Show...","Zeige..." },
364{ "Show","Zeige" }, 364{ "Show","Zeige" },
365{ "Small","Klein" }, 365{ "Small","Klein" },
366{ "Sorry","Entschuldigung" }, 366{ "Sorry","Entschuldigung" },
367{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, 367{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"},
368{ "Start:","Start:" }, 368{ "Start:","Start:" },
369{ "Start Date","Start Datum" }, 369{ "Start Date","Start Datum" },
370{ "Start date: %1","Start Datum: %1" }, 370{ "Start date: %1","Start Datum: %1" },
371{ "Start Time","Start Zeit" }, 371{ "Start Time","Start Zeit" },
372{ "Status:","Status:" }, 372{ "Status:","Status:" },
373{ "Status","Status:" }, 373{ "Status","Status:" },
374{ "Summaries","Titel" }, 374{ "Summaries","Titel" },
375{ "Summary:","Titel:" }, 375{ "Summary:","Titel:" },
376{ "Summary","Titel" }, 376{ "Summary","Titel" },
377{ "Sunday","Sonntag" }, 377{ "Sunday","Sonntag" },
378{ "Sun","So" }, 378{ "Sun","So" },
379{ "Sync preferences:","Sync Einstellungen" }, 379{ "Sync preferences:","Sync Einstellungen" },
380{ "Sync Prefs","Sync Einstellungen" }, 380{ "Sync Prefs","Sync Einstellungen" },
381{ "Syncronize","Daten abgleich" }, 381{ "Syncronize","Daten abgleich" },
382{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, 382{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
383{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, 383{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
384{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, 384{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" },
385{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, 385{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" },
386{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, 386{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" },
387{ "Template...","Vorlage..." }, 387{ "Template...","Vorlage..." },
388{ "This day","Dieser Tag" }, 388{ "This day","Dieser Tag" },
389{ "This is an experimental feature. ","Dieses Feature ist experimentel" }, 389{ "This is an experimental feature. ","Dieses Feature ist experimentel" },
390{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, 390{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." },
391{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, 391{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." },
392{ "Thu","Do" }, 392{ "Thu","Do" },
393{ "Thursday","Donnerstag" }, 393{ "Thursday","Donnerstag" },
394{ "Time associated","Mit Zeit" }, 394{ "Time associated","Mit Zeit" },
395{ "Time bar:","Uhrzeit Zeile:" }, 395{ "Time bar:","Uhrzeit Zeile:" },
396{ "Time && Date","Zeit und Datum" }, 396{ "Time && Date","Zeit und Datum" },
397{ "Time Format","Zeit Format" }, 397{ "Time Format","Zeit Format" },
398{ "Time Format(nr):","Zeit Format(Neustart!)" }, 398{ "Time Format(nr):","Zeit Format(Neustart!)" },
399{ "Date Labels:","Datumsleiste:" }, 399{ "Date Labels:","Datumsleiste:" },
400{ "Time: ","Zeit: " }, 400{ "Time: ","Zeit: " },
401{ "Timezone:","Zeitzone:" }, 401{ "Timezone:","Zeitzone:" },
402{ "To: ","Bis: " }, 402{ "To: ","Bis: " },
403{ "To:","Bis:" }, 403{ "To:","Bis:" },
404{ "Today: ","Heute: " }, 404{ "Today: ","Heute: " },
405{ "Todo due today color:","Heute fällige To-Do's" }, 405{ "Todo due today color:","Heute fällige To-Do's" },
406{ "To-do items:","To-Do items:" }, 406{ "To-do items:","To-Do items:" },
407{ "Todo overdue color:","Überfällige To-Do's" }, 407{ "Todo overdue color:","Überfällige To-Do's" },
408{ "Todo","Todo" }, 408{ "Todo","Todo" },
409{ "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, 409{ "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" },
410{ "ToDoView:","Todo Ansicht:" }, 410{ "ToDoView:","Todo Ansicht:" },
411{ "Toggle Alarm","Wechsle Alarm" }, 411{ "Toggle Alarm","Wechsle Alarm" },
412{ "Toggle Allday","Umschalten Ganztag" }, 412{ "Toggle Allday","Umschalten Ganztag" },
413{ "Tomorrow: ","Morgen: " }, 413{ "Tomorrow: ","Morgen: " },
414{ "Tue","Di" }, 414{ "Tue","Di" },
415{ "Tuesday","Dienstag" }, 415{ "Tuesday","Dienstag" },
416{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, 416{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" },
417{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, 417{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." },
418{ "Unknown","Unbekannt" }, 418{ "Unknown","Unbekannt" },
419{ "Up","Hinauf" }, 419{ "Up","Hinauf" },
420{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, 420{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" },
421{ "User defined","Benutzerdefiniert" }, 421{ "User defined","Benutzerdefiniert" },
422{ "User long date:","Format langes Datum:" }, 422{ "User long date:","Format langes Datum:" },
423{ "User short date:","Forma kurzes Datum:" }, 423{ "User short date:","Forma kurzes Datum:" },
424{ "View","Ansicht" }, 424{ "View","Ansicht" },
425{ "View Fonts","Schriftarten Ansichten" }, 425{ "View Fonts","Schriftarten Ansichten" },
426{ "Views","Ansichten" }, 426{ "Views","Ansichten" },
427{ "Wed","Mi" }, 427{ "Wed","Mi" },
428{ "Wednesday","Mittwoch" }, 428{ "Wednesday","Mittwoch" },
429{ "Week %1","Woche %1" }, 429{ "Week %1","Woche %1" },
430{ "Weekly","Wöchentlich" }, 430{ "Weekly","Wöchentlich" },
431{ "Week starts on Sunday","Woche beginnt Sonntags" }, 431{ "Week starts on Sunday","Woche beginnt Sonntags" },
432{ "What's Next View:","What's Next Anz." }, 432{ "What's Next View:","What's Next Anz." },
433{ "What's next ?","Was kommt als nächstes?(What's Next)" }, 433{ "What's next ?","Was kommt als nächstes?(What's Next)" },
434{ "Working Hours","Tägliche Arbeitszeit" }, 434{ "Working Hours","Tägliche Arbeitszeit" },
435{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, 435{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" },
436{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, 436{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" },
437{ "Write back synced file","Syncronisierte Datei zurückschreiben" }, 437{ "Write back synced file","Syncronisierte Datei zurückschreiben" },
438{ "Yearly","Jährlich" }, 438{ "Yearly","Jährlich" },
439{ "year(s)","Jahr(e)" }, 439{ "year(s)","Jahr(e)" },
440{ "Yes","Ja" }, 440{ "Yes","Ja" },
441{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, 441{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" },
442{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, 442{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." },
443{ "week(s) on:","Woche(n) am: " }, 443{ "week(s) on:","Woche(n) am: " },
444{ "Full menu bar(nr)","Volle Menuleiste(bn)" }, 444{ "Full menu bar(nr)","Volle Menuleiste(bn)" },
445{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 445{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
446{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 446{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
447{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 447{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
448{ "Daylight start:","Sommerzeit Start:" }, 448{ "Daylight start:","Sommerzeit Start:" },
449{ "Daylight end:","Sommerzeit Ende:" }, 449{ "Daylight end:","Sommerzeit Ende:" },
450{ "Time Zone","Zeitzone" }, 450{ "Time Zone","Zeitzone" },
451{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, 451{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" },
452{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, 452{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" },
453{ "minutely","minütlich" }, 453{ "minutely","minütlich" },
454{ "hourly","stündlich" }, 454{ "hourly","stündlich" },
455{ "daily","täglich" }, 455{ "daily","täglich" },
456{ "weekly","wöchentlich" }, 456{ "weekly","wöchentlich" },
457{ "monthly","monatlich" }, 457{ "monthly","monatlich" },
458{ "day-monthly","tag-monatlich" }, 458{ "day-monthly","tag-monatlich" },
459{ "month-yearly","monat-jährlich" }, 459{ "month-yearly","monat-jährlich" },
460{ "day-yearly","tag-jährlich" }, 460{ "day-yearly","tag-jährlich" },
461{ "position-yearly","pos-jährlich" }, 461{ "position-yearly","pos-jährlich" },
462{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, 462{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" },
463{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, 463{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" },
464{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, 464{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" },
465{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, 465{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" },
466{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, 466{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" },
467{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, 467{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." },
468{ "Event list view uses full window","Listenansicht nutzt Vollbild" }, 468{ "Event list view uses full window","Listenansicht nutzt Vollbild" },
469{ "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, 469{ "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" },
470{ "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, 470{ "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" },
471{ "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, 471{ "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" },
472{ "ViewChange","Ansichtswechsel" }, 472{ "ViewChange","Ansichtswechsel" },
473{ "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, 473{ "Default alarm *.wav file:","Standard Alarm *.wav Datei:" },
474{ "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, 474{ "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" },
475{ "File","Datei" }, 475{ "File","Datei" },
476{ "Clone...","Dupliziere.." }, 476{ "Clone...","Dupliziere.." },
477{ "Move...","Bewege..." }, 477{ "Move...","Bewege..." },
478{ "Beam...","Sende via IR..." }, 478{ "Beam...","Sende via IR..." },
479{ "&Clone...","Dupliziere.." }, 479{ "&Clone...","Dupliziere.." },
480{ "&Move...","Bewege..." }, 480{ "&Move...","Bewege..." },
481{ "&Beam...","Sende via IR..." }, 481{ "&Beam...","Sende via IR..." },
482{ "Show Completed","Zeige erledigte Todos" }, 482{ "Show Completed","Zeige erledigte Todos" },
483{ "Show Quick Todo","Zeige Quick Todo" }, 483{ "Show Quick Todo","Zeige Quick Todo" },
484{ "Unparent Todo","Un-sub Todo" }, 484{ "Unparent Todo","Un-sub Todo" },
485{ "Save selected to file...","Speichere Selektierte..." }, 485{ "Save selected to file...","Speichere Selektierte..." },
486{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, 486{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." },
487{ "Set Categ. for selected...","Setze Kateg. für Selekt." }, 487{ "Set Categ. for selected...","Setze Kateg. für Selekt." },
488{ "Beam selected via IR","Sende Selekt. via IR..." }, 488{ "Beam selected via IR","Sende Selekt. via IR..." },
489{ "Search","Suchen" }, 489{ "Search","Suchen" },
490{ "Date Picker","Datum auswählen" }, 490{ "Date Picker","Datum auswählen" },
491{ "Day View","Tagesansicht" }, 491{ "Day View","Tagesansicht" },
492{ "Work Week","Arbeitswoche" }, 492{ "Work Week","Arbeitswoche" },
493{ "Week","Wochenansicht" }, 493{ "Week","Wochenansicht" },
494{ "Month","Monatsansicht" }, 494{ "Month","Monatsansicht" },
495{ "Todo View","Todo Liste" }, 495{ "Todo View","Todo Liste" },
496{ "Journal","Journal" }, 496{ "Journal","Journal" },
497{ "Next days","Nächste Tage" }, 497{ "Next days","Nächste Tage" },
498{ "Print agenda selection...","Drucke Agendaselektion..." }, 498{ "Print agenda selection...","Drucke Agendaselektion..." },
499{ "Toggle DateNavigator","Navigator umschalten" }, 499{ "Toggle DateNavigator","Navigator umschalten" },
500{ "Toggle FilterView","Filteransicht umschalten" }, 500{ "Toggle FilterView","Filteransicht umschalten" },
501{ "Prev. month","Vorheriger Monat" }, 501{ "Prev. month","Vorheriger Monat" },
502{ "Go backward","Gehe zurück" }, 502{ "Go backward","Gehe zurück" },
503{ "Go forward","Gehe weiter" }, 503{ "Go forward","Gehe weiter" },
504{ "Synchronize","Synchronisieren" }, 504{ "Synchronize","Synchronisieren" },
505{ "AgendaSize","Agendagröße" }, 505{ "AgendaSize","Agendagröße" },
506{ "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, 506{ "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" },
507{ "Import last file","Importiere letzte Datei" }, 507{ "Import last file","Importiere letzte Datei" },
508{ "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, 508{ "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." },
509{ "Load Calendar Backup","Lade Kalender Backup" }, 509{ "Load Calendar Backup","Lade Kalender Backup" },
510{ "Save Calendar Backup","Speichere Kalender Backup" }, 510{ "Save Calendar Backup","Speichere Kalender Backup" },
511{ "Export VCalendar","Exportiere VCalendar" }, 511{ "Export VCalendar","Exportiere VCalendar" },
512{ "Manage new categories...","Verwalte neue Kategorien..." }, 512{ "Manage new categories...","Verwalte neue Kategorien..." },
513{ "Beam complete calendar...","Sende kompletten Kalender via IR" }, 513{ "Beam complete calendar...","Sende kompletten Kalender via IR" },
514{ "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, 514{ "Beam filtered calendar...","Sende gefilterten Kalender via IR" },
515{ "Remote via ssh","Über Netzwerk via ssh" }, 515{ "Remote via ssh","Über Netzwerk via ssh" },
516{ "With local file","Mit lokaler Datei" }, 516{ "With local file","Mit lokaler Datei" },
517{ "With last file","Mit letzter Datei" }, 517{ "With last file","Mit letzter Datei" },
518{ "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, 518{ "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" },
519{ "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, 519{ "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" },
520{ "Save filename","Speichern: Dateinamen wählen" }, 520{ "Save filename","Speichern: Dateinamen wählen" },
521{ "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, 521{ "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" },
522{ "KO/Pi: Warning!","KO/Pi: Warnung!" }, 522{ "KO/Pi: Warning!","KO/Pi: Warnung!" },
523{ "Overwrite!","Überschreibe!" }, 523{ "Overwrite!","Überschreibe!" },
524{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 524{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
525{ "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" }, 525{ "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" },
526{ "KO/Pi Confirmation","KO/Pi Bestätigung" }, 526{ "KO/Pi Confirmation","KO/Pi Bestätigung" },
527{ "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, 527{ "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" },
528{ "Deleting item %d ...","Lösche Eintrag %d ..." }, 528{ "Deleting item %d ...","Lösche Eintrag %d ..." },
529{ "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, 529{ "%d items remaining in list.","%d Einträge sind in der Liste verblieben." },
530{ "Size","Größe" }, 530{ "Size","Größe" },
531{ "Date","Datum" }, 531{ "Date","Datum" },
532{ "Mime Type","Datei Typ" }, 532{ "Mime Type","Datei Typ" },
533{ "All Files","Alle Dateien" }, 533{ "All Files","Alle Dateien" },
534{ "Files","Dateien" }, 534{ "Files","Dateien" },
535{ "Documents","DoKumente" }, 535{ "Documents","DoKumente" },
536{ "Select Categories","Selektiere Kategorien" }, 536{ "Select Categories","Selektiere Kategorien" },
537{ " &Deselect All "," Auswahl aufheben " }, 537{ " &Deselect All "," Auswahl aufheben " },
538{ "A&dd","Hinzu" }, 538{ "A&dd","Hinzu" },
539{ "&Modify","Ändern" }, 539{ "&Modify","Ändern" },
540{ "Edit Categories","Editiere Kategorien" }, 540{ "Edit Categories","Editiere Kategorien" },
541{ " &Edit Categories "," &Editiere Kategorien " }, 541{ " &Edit Categories "," &Editiere Kategorien " },
542{ "Beam Options","Beam Einstellungen" }, 542{ "Beam Options","Beam Einstellungen" },
543{ " With timezone "," Mit Zeitzone " }, 543{ " With timezone "," Mit Zeitzone " },
544{ " Local time ", " Lokale Zeit " }, 544{ " Local time ", " Lokale Zeit " },
545{ "Manage new Categories","Verwalte neue Kategorien" }, 545{ "Manage new Categories","Verwalte neue Kategorien" },
546{ "Add to category list","Füge zur Kategorieliste hinzu" }, 546{ "Add to category list","Füge zur Kategorieliste hinzu" },
547{ "Remove from Events/Todos","Entferne von Terminen/Todos" }, 547{ "Remove from Events/Todos","Entferne von Terminen/Todos" },
548{ "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, 548{ "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " },
549{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, 549{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" },
550{ "File format","Datei Format" }, 550{ "File format","Datei Format" },
551{ "Time format","Zeit Format" }, 551{ "Time format","Zeit Format" },
552{ "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, 552{ "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." },
553{ "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, 553{ "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" },
554{ "h","Std" }, 554{ "h","Std" },
555{ "min","Min" }, 555{ "min","Min" },
556{ "hou","Std" }, 556{ "hou","Std" },
557{ "day","Tag" }, 557{ "day","Tag" },
558{ "French","Französich" }, 558{ "French","Französich" },
559{ "Time","Zeit" }, 559{ "Time","Zeit" },
560{ "Event Viewer","Termin Ansicht" }, 560{ "Event Viewer","Termin Ansicht" },
561{ "Cancel Sync","Sync Abbrechen" }, 561{ "Cancel Sync","Sync Abbrechen" },
562{ "Remote","Fern" }, 562{ "Remote","Fern" },
563{ "Local","Lokal" }, 563{ "Local","Lokal" },
564{ "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, 564{ "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" },
565{ "Local: ","Lokal: " }, 565{ "Local: ","Lokal: " },
566{ "Remote: ","Fern: " }, 566{ "Remote: ","Fern: " },
567{ "Last modified: ","Zuletzt geändert: " }, 567{ "Last modified: ","Zuletzt geändert: " },
568{ "Location: ","Ort: " }, 568{ "Location: ","Ort: " },
569{ "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, 569{ "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" },
570{ "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, 570{ "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" },
571{ "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, 571{ "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " },
572{ "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, 572{ "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" },
573{ "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, 573{ "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " },
574{ "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, 574{ "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" },
575{ "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, 575{ "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." },
576{ "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, 576{ "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" },
577{ "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, 577{ "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" },
578{ "( %1 min before )","( %1 min vorher )" }, 578{ "( %1 min before )","( %1 min vorher )" },
579{ "<b>Alarm on: ","<b>Alarm am: " }, 579{ "<b>Alarm on: ","<b>Alarm am: " },
580{ "<b>Details: </b>","<b>Details: </b>" }, 580{ "<b>Details: </b>","<b>Details: </b>" },
581{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, 581{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" },
582{ "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, 582{ "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" },
583{ "Organizer","Organisator" }, 583{ "Organizer","Organisator" },
584{ "Save","Speichern" }, 584{ "Save","Speichern" },
585{ "Exit (+save)","Beenden (+ speichern)" }, 585{ "Exit (+save)","Beenden (+ speichern)" },
586{ "Home","Zuhause" }, 586{ "Home","Zuhause" },
587{ "Office","Büro" }, 587{ "Office","Büro" },
588{ "Library","Bibliothek" }, 588{ "Library","Bibliothek" },
589{ "Doctor","Arzt" }, 589{ "Doctor","Arzt" },
590{ "Beach","Strand" }, 590{ "Beach","Strand" },
591{ "Conference room","Konferenzraum" }, 591{ "Conference room","Konferenzraum" },
592{ "Drive Home","Heimfahrt" }, 592{ "Drive Home","Heimfahrt" },
593{ "Watch TV","Tv gucken" }, 593{ "Watch TV","Tv gucken" },
594{ "Phone call","Telefonanruf" }, 594{ "Phone call","Telefonanruf" },
595{ "Pay bill","Rechnung bezahlen" }, 595{ "Pay bill","Rechnung bezahlen" },
596{ "Read book","Buch lesen" }, 596{ "Read book","Buch lesen" },
597{ "Watering plants","Pflanzen giessen" }, 597{ "Watering plants","Pflanzen giessen" },
598{"Appointment","Verabredung" }, 598{"Appointment","Verabredung" },
599{"Birthday","Geburtstag" }, 599{"Birthday","Geburtstag" },
600{"Business","Geschäft" }, 600{"Business","Geschäft" },
601{"Business Travel","Geschäftsreise" }, 601{"Business Travel","Geschäftsreise" },
602{"Cinema","Kino" }, 602{"Cinema","Kino" },
603{"Customer","Kunde" }, 603{"Customer","Kunde" },
604{"Break","Pause" }, 604{"Break","Pause" },
605{"Breakfast","Frühstück" }, 605{"Breakfast","Frühstück" },
606{"Competition","Wettkampf" }, 606{"Competition","Wettkampf" },
607{"Dinner","Abendessen" }, 607{"Dinner","Abendessen" },
608{"Education","Erziehung" }, 608{"Education","Erziehung" },
609{"Family","Familie" }, 609{"Family","Familie" },
610{"Favorites","Favoriten" }, 610{"Favorites","Favoriten" },
611{"Festival","Festival" }, 611{"Festival","Festival" },
612{"Fishing","Angeln" }, 612{"Fishing","Angeln" },
613{"Flight","Flug" }, 613{"Flight","Flug" },
614{"Gifts","Geschenk" }, 614{"Gifts","Geschenk" },
615{"Holiday","Feiertag" }, 615{"Holiday","Feiertag" },
616{"Holiday Cards","Ansichtskarten" }, 616{"Holiday Cards","Ansichtskarten" },
617{"Hot Contacts","Heisse Kontakte" }, 617{"Hot Contacts","Heisse Kontakte" },
618{"Hiking","Wandern" }, 618{"Hiking","Wandern" },
619{"Hunting","Jagen" }, 619{"Hunting","Jagen" },
620{"Key Customer","Wichtiger Kunde" }, 620{"Key Customer","Wichtiger Kunde" },
621{"Kids","Kinder" }, 621{"Kids","Kinder" },
622{"Lunch","Mittagessen" }, 622{"Lunch","Mittagessen" },
623{"Meeting","Treffen" }, 623{"Meeting","Treffen" },
624{"Miscellaneous","Verschiedenes" }, 624{"Miscellaneous","Verschiedenes" },
625{"Partner","Partner" }, 625{"Partner","Partner" },
626{"Party","Partie" }, 626{"Party","Partie" },
627{"Personal","Privat" }, 627{"Personal","Privat" },
628{"Personal Travel","Privatreise"}, 628{"Personal Travel","Privatreise"},
629{"PHB","PHB" }, 629{"PHB","PHB" },
630{"Phone Calls","Telefonanruf" }, 630{"Phone Calls","Telefonanruf" },
631{"Projects","Projekt" }, 631{"Projects","Projekt" },
632{"Recurring","Wiederholend" }, 632{"Recurring","Wiederholend" },
633{"School","Schule" }, 633{"School","Schule" },
634{"Shopping","Einkaufen" }, 634{"Shopping","Einkaufen" },
635{"Speach","Rede" }, 635{"Speach","Rede" },
636{"Special Occasion","Spez.Gelegenheit" }, 636{"Special Occasion","Spez.Gelegenheit" },
637{"Sports","Sport" }, 637{"Sports","Sport" },
638{"Talk","Vortrag" }, 638{"Talk","Vortrag" },
639{"Travel","Reise" }, 639{"Travel","Reise" },
640{"TV","TV" }, 640{"TV","TV" },
641{"Germany","Deutschland" }, 641{"Germany","Deutschland" },
642{"Sweden","Schweden" }, 642{"Sweden","Schweden" },
643{"Forest","Wald" }, 643{"Forest","Wald" },
644{ "Desert","Wüste" }, 644{ "Desert","Wüste" },
645{ "Kitchen","Küche" }, 645{ "Kitchen","Küche" },
646{ "Lake","See" }, 646{ "Lake","See" },
647{"University","Universität"}, 647{"University","Universität"},
648{"Vacation","Urlaub" }, 648{"Vacation","Urlaub" },
649{"VIP","VIP" }, 649{"VIP","VIP" },
650{ "Import Sharp Calendar","Importiere Sharp Kalender" }, 650{ "Import Sharp Calendar","Importiere Sharp Kalender" },
651{ "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, 651{ "This todo has been cancelled!","Dieses Todo wurde gecancelt!" },
652{ "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, 652{ "This event has been cancelled!","Dieser Termin wurde gecancelt!" },
653{ "Cancelled","Gecancelt" }, 653{ "Cancelled","Gecancelt" },
654{ "Multiple sync","Mehrfach Sync" }, 654{ "Multiple sync","Mehrfach Sync" },
655{ "Local file","Lokale Datei" }, 655{ "Local file","Lokale Datei" },
656{ "Last file","Letzte Datei" }, 656{ "Last file","Letzte Datei" },
657{ "Keys + Colors...","Tasten + Farben..." }, 657{ "Keys + Colors...","Tasten + Farben..." },
658{ "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, 658{ "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" },
659{ "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, 659{ "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" },
660{ "Choose...","Wähle..." }, 660{ "Choose...","Wähle..." },
661{ "Use colors for application:","Setze Farben für Programm:" }, 661{ "Use colors for application:","Setze Farben für Programm:" },
662{ "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, 662{ "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" },
663{ "Frames, labels, etc.:","Rahmen, Label, etc.:" }, 663{ "Frames, labels, etc.:","Rahmen, Label, etc.:" },
664{ "Show parent To-Do's","Zeige Ober-Todos" }, 664{ "Show parent To-Do's","Zeige Ober-Todos" },
665{ "Show location","Zeige Orte" }, 665{ "Show location","Zeige Orte" },
666{ "Show events that recur ","Zeige Termine, die sich wiederholen:" }, 666{ "Show events that recur ","Zeige Termine, die sich wiederholen:" },
667{ "Show in every cell ","Zeige in jeder Zelle " }, 667{ "Show in every cell ","Zeige in jeder Zelle " },
668{ "short month","kurzen Monat" }, 668{ "short month","kurzen Monat" },
669{ "icons","Icons" }, 669{ "icons","Icons" },
670{ "Show Sat/Sun together","Zeige Sam/Son zusammen" }, 670{ "Show Sat/Sun together","Zeige Sam/Son zusammen" },
671{ "Category colors are applied to text","Kategorie Farben färben Text" }, 671{ "Category colors are applied to text","Kategorie Farben färben Text" },
672{ "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, 672{ "Month view uses day colors","Monatsansicht zeigt Tagesfarben" },
673{ "Day color odd months","Tagesfarbe ungerade Monate" }, 673{ "Day color odd months","Tagesfarbe ungerade Monate" },
674{ "Day color even months","Tagesfarbe gerade Monate" }, 674{ "Day color even months","Tagesfarbe gerade Monate" },
675{ "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, 675{ "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" },
676{ "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, 676{ "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" },
677{ "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, 677{ "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" },
678{ "Colors are applied to text","Farben werden auf Text angewendet" }, 678{ "Colors are applied to text","Farben werden auf Text angewendet" },
679{ "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, 679{ "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" },
680{ "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" }, 680{ "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" },
681{ "Play beeps count:","Anzahl der Alarmpiepse: " }, 681{ "Play beeps count:","Anzahl der Alarmpiepse: " },
682{ "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, 682{ "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " },
683{ "Default suspend time in min:","Standard Supendierungs Zeit: " }, 683{ "Default suspend time in min:","Standard Supendierungs Zeit: " },
684{ "Auto suspend count:","Anzahl der auto Suspendierungen" }, 684{ "Auto suspend count:","Anzahl der auto Suspendierungen" },
685{ "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, 685{ "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" },
686{ "New profile","Neues Profil" }, 686{ "New profile","Neues Profil" },
687{ "Clone profile","Klone Profil" }, 687{ "Clone profile","Klone Profil" },
688{ "Delete profile","Lösche Profil" }, 688{ "Delete profile","Lösche Profil" },
689{ "Profile:","Profil:" }, 689{ "Profile:","Profil:" },
690{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, 690{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" },
691{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 691{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
692{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 692{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
693{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 693{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
694{ "Write back file","Schreibe Datei zurück" }, 694{ "Write back file","Schreibe Datei zurück" },
695{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 695{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
696{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 696{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
697{ "Local device name:","Name dieses Gerätes:" }, 697{ "Local device name:","Name dieses Gerätes:" },
698{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 698{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
699{ "Sync preferences","Synchronisations Einstellungen" }, 699{ "Sync preferences","Synchronisations Einstellungen" },
700{ "Profile kind","Profil Art" }, 700{ "Profile kind","Profil Art" },
701{ "Local file","Lokale Datei" }, 701{ "Local file","Lokale Datei" },
702{ "Local file:","Lokale Datei:" }, 702{ "Local file:","Lokale Datei:" },
703{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 703{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
704{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 704{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
705{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 705{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
706{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, 706{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"},
707{ "Device","Gerät:" }, 707{ "Device","Gerät:" },
708{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, 708{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" },
709{ "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" }, 709{ "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" },
710{ "Synchronization successful","Synchronisation erfolgreich" }, 710{ "Synchronization successful","Synchronisation erfolgreich" },
711{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, 711{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." },
712{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, 712{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" },
713{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, 713{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" },
714{ "Enter password","Passwort eingeben" }, 714{ "Enter password","Passwort eingeben" },
715{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, 715{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" },
716{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, 716{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." },
717{ "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" }, 717{ "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" },
718{ "Writing back file result: ","Resultat des Dateizurückschreibens: " }, 718{ "Writing back file result: ","Resultat des Dateizurückschreibens: " },
719{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, 719{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" },
720{ "Edit Calendar Filters","Editiere Kalendar Filter" }, 720{ "Edit Calendar Filters","Editiere Kalendar Filter" },
721{ "Enter filter name:","Neuer Filter Name:" }, 721{ "Enter filter name:","Neuer Filter Name:" },
722{ "Add Filter","Filter hinzufügen" }, 722{ "Add Filter","Filter hinzufügen" },
723{ "Question","Frage" }, 723{ "Question","Frage" },
724{ "Filter position: ","Filter Position: " }, 724{ "Filter position: ","Filter Position: " },
725{ "Month View","Monatsansicht" }, 725{ "Month View","Monatsansicht" },
726{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, 726{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" },
727{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 727{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
728{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 728{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
729{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, 729{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" },
730{ "Access: ","Zugriff: " }, 730{ "Access: ","Zugriff: " },
731{ "Needs Action","Aktion notwendig" }, 731{ "Needs Action","Aktion notwendig" },
732{ "Accepted","Akzeptiert" }, 732{ "Accepted","Akzeptiert" },
733{ "Declined","Abgelehnt" }, 733{ "Declined","Abgelehnt" },
734{ "Tentative","Vorläufig" }, 734{ "Tentative","Vorläufig" },
735{ "Delegated","Beauftragt" }, 735{ "Delegated","Beauftragt" },
736{ "Completed","Vollständig" }, 736{ "Completed","Vollständig" },
737{ "In Process","In Bearbeitung" }, 737{ "In Process","In Bearbeitung" },
738{ "Participant","Teilnehmer" }, 738{ "Participant","Teilnehmer" },
739{ "Optional Participant","Möglicher Teilnehmer" }, 739{ "Optional Participant","Möglicher Teilnehmer" },
740{ "Observer","Beobachter" }, 740{ "Observer","Beobachter" },
741{ "Chair","Vorsitzender" }, 741{ "Chair","Vorsitzender" },
742{ "Not supported \non desktop!\n","" }, 742{ "Not supported \non desktop!\n","" },
743{ "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) " }, 743{ "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) " },
744{ "Date range: ","Datums Zeitspanne: " }, 744{ "Date range: ","Datums Zeitspanne: " },
745{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, 745{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " },
746{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, 746{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." },
747{ "Add / remove events","Add./entferne Termine" }, 747{ "Add / remove events","Add./entferne Termine" },
748{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, 748{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." },
749{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, 749{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." },
750{ "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, 750{ "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" },
751{ "Overwrite","Überschreiben" }, 751{ "Overwrite","Überschreiben" },
752{ "Sync+save","Syncen+speichern" }, 752{ "Sync+save","Syncen+speichern" },
753{ "Default","Standard" }, 753{ "Default","Standard" },
754{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, 754{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " },
755{ " %d items?"," %d Einträge?" }, 755{ " %d items?"," %d Einträge?" },
756{ "\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?" }, 756{ "\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?" },
757{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, 757{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" },
758{ "Current","Aktuelle" }, 758{ "Current","Aktuelle" },
759{ "\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" }, 759{ "\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" },
760{ "All","Alle" }, 760{ "All","Alle" },
761{ "Data Loss Warning","Datenverlust Warnung" }, 761{ "Data Loss Warning","Datenverlust Warnung" },
762{ "Proceed","Weitermachen" }, 762{ "Proceed","Weitermachen" },
763{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, 763{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" },
764{ "Filter disabled ","Filter abgeschaltet" }, 764{ "Filter disabled ","Filter abgeschaltet" },
765{ "Filter selected: ","Gewählter Filter: " }, 765{ "Filter selected: ","Gewählter Filter: " },
766{ "Toggle Cancel","Gecancelt ändern" }, 766{ "Toggle Cancel","Gecancelt ändern" },
767{ "&Toggle Cancel","Gecancel&t ändern" }, 767{ "&Toggle Cancel","Gecancel&t ändern" },
768{ "Configure Toolbar","Konfiguriere Toolbar" }, 768{ "Configure Toolbar","Konfiguriere Toolbar" },
769{ "Stretched TB","Gedehnte TB" }, 769{ "Stretched TB","Gedehnte TB" },
770{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, 770{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" },
771{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, 771{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" },
772{ "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" }, 772{ "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" },
773{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, 773{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" },
774{ "Imported file successfully","Datei erfolgreich importiert" }, 774{ "Imported file successfully","Datei erfolgreich importiert" },
775{ "Error importing file","Fehler beim Importieren der Datei" }, 775{ "Error importing file","Fehler beim Importieren der Datei" },
776{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, 776{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" },
777{ "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" }, 777{ "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" },
778{ "Overwrite!","Überschreiben!" }, 778{ "Overwrite!","Überschreiben!" },
779{ "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" }, 779{ "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" },
780{ "Load backup filename","Lade Backup Dateiname" }, 780{ "Load backup filename","Lade Backup Dateiname" },
781{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, 781{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" },
782{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, 782{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" },
783{ "Save backup filename","Speichere Backup Dateiname" }, 783{ "Save backup filename","Speichere Backup Dateiname" },
784{ "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" }, 784{ "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" },
785{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 785{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
786{ "Details of attendee","Teilnehmerdetails" }, 786{ "Details of attendee","Teilnehmerdetails" },
787{ "Work phone:\n","Telefon Arbeit:\n" }, 787{ "Work phone:\n","Telefon Arbeit:\n" },
788{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, 788{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" },
789{ "Home phone:\n","Telefon privat:\n" }, 789{ "Home phone:\n","Telefon privat:\n" },
790{ "Mobile home phone:\n","Mobiltelefon privat:\n" }, 790{ "Mobile home phone:\n","Mobiltelefon privat:\n" },
791{ "Email:\n","Email:\n" }, 791{ "Email:\n","Email:\n" },
792{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, 792{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" },
793{ "Audio Al.: ","Audio Al.: " }, 793{ "Audio Al.: ","Audio Al.: " },
794{ "Proc.Al.: ","Proz.Al.: " }, 794{ "Proc.Al.: ","Proz.Al.: " },
795{ "No sound set","Kein Sound definiert" }, 795{ "No sound set","Kein Sound definiert" },
796{ "*.wav|Wav Files","*.wav|Wav Dateien" }, 796{ "*.wav|Wav Files","*.wav|Wav Dateien" },
797{ "No program set","Kein Programm definiert" }, 797{ "No program set","Kein Programm definiert" },
798{ "Running '%1'","Ausführen '%1'" }, 798{ "Running '%1'","Ausführen '%1'" },
799{ "Playing '%1'","Abspielen '%1'" }, 799{ "Playing '%1'","Abspielen '%1'" },
800{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, 800{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" },
801{ "Load!","Laden!" }, 801{ "Load!","Laden!" },
802{ "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" }, 802{ "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" },
803{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, 803{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" },
804{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, 804{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" },
805{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, 805{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" },
806{ "Features + hints...","Eigenschaften + Tipps..." }, 806{ "Features + hints...","Eigenschaften + Tipps..." },
807{ "User translation...","Benutzer Übersetzung..." }, 807{ "User translation...","Benutzer Übersetzung..." },
808{ "Sync HowTo...","Synchronisation HowTo..." }, 808{ "Sync HowTo...","Synchronisation HowTo..." },
809{ "Print calendar...","Drucke Kalender..." }, 809{ "Print calendar...","Drucke Kalender..." },
810{ "Anniversary","Jahrestag" }, 810{ "Anniversary","Jahrestag" },
811{ "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" }, 811{ "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" },
812{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, 812{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" },
813{ "Next recurrence is on: ","Nächste Wiederholung ist am:" }, 813{ "Next recurrence is on: ","Nächste Wiederholung ist am:" },
814{ "<b>Alarm on: </b>","<b>Alarm am: </b>" }, 814{ "<b>Alarm on: </b>","<b>Alarm am: </b>" },
815{ "<b>Access: </b>","<b>Zugriff: </b>" }, 815{ "<b>Access: </b>","<b>Zugriff: </b>" },
816{ "(%1 min before)","(%1 min vorher)" }, 816{ "(%1 min before)","(%1 min vorher)" },
817{ "<b>Categories: </b>","<b>Kategorien: </b>" }, 817{ "<b>Categories: </b>","<b>Kategorien: </b>" },
818{ "Save Journal/Description...","Speichere Journal/Details..." }, 818{ "Save Journal/Description...","Speichere Journal/Details..." },
819{ "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." }, 819{ "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." },
820{ "Continue","Weitermachen" }, 820{ "Continue","Weitermachen" },
821{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, 821{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" },
822{ "Attendee:","Teilnehmer:" }, 822{ "Attendee:","Teilnehmer:" },
823{ "Click OK to search ->","Klicke zum Suchen auf OK ->" }, 823{ "Click OK to search ->","Klicke zum Suchen auf OK ->" },
824{ "On day ","Am Tag " }, 824{ "On day ","Am Tag " },
825{ "%1 of ","%1 des Monats" }, 825{ "%1 of ","%1 des Monats" },
826{ "%1 of the year","%1 des Jahres" }, 826{ "%1 of the year","%1 des Jahres" },
827{ "Anonymous","Anonymo" }, 827{ "Anonymous","Anonymo" },
828{ "nobody@nowhere","niemand@nirgendwo" }, 828{ "nobody@nowhere","niemand@nirgendwo" },
829{ "calendar.html","calendar.html" }, 829{ "calendar.html","calendar.html" },
830{ " Local Time"," Locale Zeit" }, 830{ " Local Time"," Locale Zeit" },
831{ "Unknown Name","Unbekannter Name" }, 831{ "Unknown Name","Unbekannter Name" },
832{ "unknown@nowhere","unbekannt@nirgendwo" }, 832{ "unknown@nowhere","unbekannt@nirgendwo" },
833{ "Beam via IR!","Beam via IR!" }, 833{ "Beam via IR!","Beam via IR!" },
834{ "Next Month","Nächster Monat" }, 834{ "Next Month","Nächster Monat" },
835{ "Prio","Prio" }, 835{ "Prio","Prio" },
836{ "Reparent Todo","Mache Sub-Todo" }, 836{ "Reparent Todo","Mache Sub-Todo" },
837{ "tomorrow","morgen" }, 837{ "tomorrow","morgen" },
838{ "today","heute" }, 838{ "today","heute" },
839{ "yesterday","gestern" }, 839{ "yesterday","gestern" },
840{ "Ok","Ok" }, 840{ "Ok","Ok" },
841{ "Ok+Agenda","Ok+Agenda" }, 841{ "Ok+Agenda","Ok+Agenda" },
842{ "Email","Email" }, 842{ "Email","Email" },
843{ "RSVP","RSVP" }, 843{ "RSVP","RSVP" },
844{ "Email:","Email:" }, 844{ "Email:","Email:" },
845{ "Appointment Time ","Termin Zeit " }, 845{ "Appointment Time ","Termin Zeit " },
846{ "2","2" }, 846{ "2","2" },
847{ "3","3" }, 847{ "3","3" },
848{ "4","4" }, 848{ "4","4" },
849{ " 0 %"," 0 %" }, 849{ " 0 %"," 0 %" },
850{ " 20 %"," 20 %" }, 850{ " 20 %"," 20 %" },
851{ " 40 %"," 40 %" }, 851{ " 40 %"," 40 %" },
852{ " 60 %"," 60 %" }, 852{ " 60 %"," 60 %" },
853{ " 80 %"," 80 %" }, 853{ " 80 %"," 80 %" },
854{ "100 %","100 %" }, 854{ "100 %","100 %" },
855{ "Filter","Filter" }, 855{ "Filter","Filter" },
856{ "Configure","Konfiguriere" }, 856{ "Configure","Konfiguriere" },
857{ "What's Next","What's Next" }, 857{ "What's Next","What's Next" },
858{ "Complete calendar...","Kompletten Kalender..." }, 858{ "Complete calendar...","Kompletten Kalender..." },
859{ "Filtered calendar...","Gefilterten Kalender..." }, 859{ "Filtered calendar...","Gefilterten Kalender..." },
860{ "Export to phone","Exportiere zum Handy" }, 860{ "Export to phone","Exportiere zum Handy" },
861{ "Beam receive enabled","Beam Empfang an" }, 861{ "Beam receive enabled","Beam Empfang an" },
862{ "What's new?","Was ist neu?" }, 862{ "What's new?","Was ist neu?" },
863{ "FAQ...","FAQ..." }, 863{ "FAQ...","FAQ..." },
864{ "Licence...","Licence..." }, 864{ "Licence...","Licence..." },
865{ "What's This?","What's This?" }, 865{ "What's This?","What's This?" },
866{ "&Edit...","&Editiere..." }, 866{ "&Edit...","&Editiere..." },
867{ "Oktober","Oktober" }, 867{ "Oktober","Oktober" },
868{ "Title","Titel" }, 868{ "Title","Titel" },
869{ "%1 %","%1 %" }, 869{ "%1 %","%1 %" },
870{ "Enable Pi-Sync","Schalte Pi-Sync an" }, 870{ "Enable Pi-Sync","Schalte Pi-Sync an" },
871{ "Import!","Importiere!" }, 871{ "Import!","Importiere!" },
872{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, 872{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" },
873{ "Export to phone options","Export ans Handy Optionen" }, 873{ "Export to phone options","Export ans Handy Optionen" },
874{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 874{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
875{ "I/O device: ","I/O device: " }, 875{ "I/O device: ","I/O device: " },
876{ "Connection: ","Connection: " }, 876{ "Connection: ","Connection: " },
877{ "Model(opt.): ","Model(opt.): " }, 877{ "Model(opt.): ","Model(opt.): " },
878{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, 878{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" },
879{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, 879{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " },
880{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, 880{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" },
881{ "Export to mobile phone!","Exportiere auf das Handy!" }, 881{ "Export to mobile phone!","Exportiere auf das Handy!" },
882{ "Export complete calendar","Exportiere kompletten Kalender" }, 882{ "Export complete calendar","Exportiere kompletten Kalender" },
883{ "Writing to phone...","Sende Daten ans Handy..." }, 883{ "Writing to phone...","Sende Daten ans Handy..." },
884{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 884{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
885{ "Retry","Nochmal versuchen" }, 885{ "Retry","Nochmal versuchen" },
886{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 886{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
887{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 887{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
888{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 888{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
889{ "Export filtered calendar","Exportiere gefilterten Kalender" }, 889{ "Export filtered calendar","Exportiere gefilterten Kalender" },
890{ "Preferences","Vorlieben" }, 890{ "Preferences","Vorlieben" },
891{ "Global","Global" }, 891{ "Global","Global" },
892{ "Phone","Phone" }, 892{ "Phone","Phone" },
893{ "SMS","SMS" }, 893{ "SMS","SMS" },
894{ "Fax","Fax" }, 894{ "Fax","Fax" },
895{ "Pager","Pager" }, 895{ "Pager","Pager" },
896{ "SIP","SIP" }, 896{ "SIP","SIP" },
897{ "Italian","Italienisch" }, 897{ "Italian","Italienisch" },
898{ "24:00","24:00" }, 898{ "24:00","24:00" },
899{ "12:00am","12:00am" }, 899{ "12:00am","12:00am" },
900{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 900{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
901{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 901{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
902{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 902{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
903{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 903{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
904{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 904{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
905{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 905{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
906{ "Used Mail Client","Benutzter Mail Client" }, 906{ "Used Mail Client","Benutzter Mail Client" },
907{ "Channel:","Channel:" }, 907{ "Channel:","Channel:" },
908{ "Message:","Message:" }, 908{ "Message:","Message:" },
909{ "Parameters:","Parameter:" }, 909{ "Parameters:","Parameter:" },
910{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 910{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
911{ "extra Message:","extra Message:" }, 911{ "extra Message:","extra Message:" },
912{ "extra Parameters:","extra Parameter:" }, 912{ "extra Parameters:","extra Parameter:" },
913{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 913{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
914{ "External Apps.","Externe Appl." }, 914{ "External Apps.","Externe Appl." },
915{ "24 hours","24 Std." }, 915{ "24 hours","24 Std." },
916{ "3 hours","3 Std." }, 916{ "3 hours","3 Std." },
917{ "1 hour","1 Std." }, 917{ "1 hour","1 Std." },
918{ "15 minutes","15 Min." }, 918{ "15 minutes","15 Min." },
919{ "5 minutes","5 Min." }, 919{ "5 minutes","5 Min." },
920{ "1 minute","1 Min." }, 920{ "1 minute","1 Min." },
921{ "23","23" }, 921{ "23","23" },
922{ "Mon 15","Mon 15" }, 922{ "Mon 15","Mon 15" },
923{ "Configure KO","Konfiguriere KO" }, 923{ "Configure KO","Konfiguriere KO" },
924{ "Event text","Termin Text" }, 924{ "Event text","Termin Text" },
925{ "ToDo","Todo" }, 925{ "ToDo","Todo" },
926{ "Today","Heute" }, 926{ "Today","Heute" },
927{ "What's Next View","What's Next Ansicht" }, 927{ "What's Next View","What's Next Ansicht" },
928{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, 928{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" },
929{ "Alarm","Alarm" }, 929{ "Alarm","Alarm" },
930{ "Used %1 Client","Benutzter %1 Client" }, 930{ "Used %1 Client","Benutzter %1 Client" },
931{ "No email client installed","Kein Email Klient installiert" }, 931{ "No email client installed","Kein Email Klient installiert" },
932{ "Userdefined email client","Benutzerdef. Email Klient" }, 932{ "Userdefined email client","Benutzerdef. Email Klient" },
933{ "OM/Pi email client","OM/Pi Email Klient" }, 933{ "OM/Pi email client","OM/Pi Email Klient" },
934{ "Include in multiple ","Beziehe in multiple " }, 934{ "Include in multiple ","Beziehe in multiple " },
935{ "calendar ","Kalender " }, 935{ "calendar ","Kalender " },
936{ "addressbook ","Adressbuch " }, 936{ "addressbook ","Adressbuch " },
937{ "pwmanager","PWmanager" }, 937{ "pwmanager","PWmanager" },
938{ " sync"," Sync ein" }, 938{ " sync"," Sync ein" },
939{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 939{ "Write back synced data","Schreibe gesyncte Daten zurück" },
940{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 940{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
941{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 941{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
942{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 942{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
943{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 943{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
944{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 944{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
945{ "Help...","Hilfe..." }, 945{ "Help...","Hilfe..." },
946{ "Local file Cal:","Lokale Datei Kal:" }, 946{ "Local file Cal:","Lokale Datei Kal:" },
947{ "Local file ABook:","Lokale Datei ABuch:" }, 947{ "Local file ABook:","Lokale Datei ABuch:" },
948{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 948{ "Local file PWMgr:","Lokale Datei PWMgr:" },
949{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 949{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
950{ "Calendar:","Kalender:" }, 950{ "Calendar:","Kalender:" },
951{ "AddressBook:","AdressBuch:" }, 951{ "AddressBook:","AdressBuch:" },
952{ "PWManager:","PWManager:" }, 952{ "PWManager:","PWManager:" },
953{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 953{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
954{ "ssh/scp","ssh/scp" }, 954{ "ssh/scp","ssh/scp" },
955{ "ftp","ftp" }, 955{ "ftp","ftp" },
956{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 956{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
957{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 957{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
958{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 958{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
959{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 959{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
960{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 960{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
961{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 961{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
962{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 962{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
963{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 963{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
964{ "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" }, 964{ "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" },
965{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 965{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
966{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 966{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
967{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 967{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
968{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 968{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
969{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 969{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
970{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 970{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
971{ "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!" }, 971{ "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!" },
972{ "KDE-Pim Sync","KDE-Pim Sync" }, 972{ "KDE-Pim Sync","KDE-Pim Sync" },
973{ "Multiple profiles","Multi-Sync Profile" }, 973{ "Multiple profiles","Multi-Sync Profile" },
974{ "Device: ","Gerät: " }, 974{ "Device: ","Gerät: " },
975{ "Multiple sync started.","Multi-Sync gestartet." }, 975{ "Multiple sync started.","Multi-Sync gestartet." },
976{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 976{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
977{ "Turn filter on","Schalte Filter an" }, 977{ "Turn filter on","Schalte Filter an" },
978{ "Turn filter off","Schalte Filter aus" }, 978{ "Turn filter off","Schalte Filter aus" },
979{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, 979{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" },
980{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, 980{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" },
981{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, 981{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" },
982{ "<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" }, 982{ "<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" },
983{ "<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" }, 983{ "<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" },
984{ "<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" }, 984{ "<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" },
985{ "<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" }, 985{ "<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" },
986{ "<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" }, 986{ "<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" },
987{ "<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" }, 987{ "<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" },
988{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, 988{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" },
989{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, 989{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" },
990{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, 990{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" },
991{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, 991{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" },
992{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, 992{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" },
993{ "<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" }, 993{ "<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" },
994{ "<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" }, 994{ "<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" },
995{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, 995{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" },
996{ "<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" }, 996{ "<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" },
997{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, 997{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" },
998{ "<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" }, 998{ "<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" },
999{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, 999{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" },
1000{ "<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" }, 1000{ "<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" },
1001{ "<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" }, 1001{ "<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" },
1002{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, 1002{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" },
1003{ "<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" }, 1003{ "<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" },
1004{ "<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" }, 1004{ "<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" },
1005{ "<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" }, 1005{ "<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" },
1006{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, 1006{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" },
1007{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, 1007{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" },
1008{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, 1008{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" },
1009{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, 1009{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" },
1010{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, 1010{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" },
1011{ "<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" }, 1011{ "<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" },
1012{ "<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" }, 1012{ "<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" },
1013{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, 1013{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" },
1014{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, 1014{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" },
1015{ "<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" }, 1015{ "<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" },
1016{ "<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" }, 1016{ "<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" },
1017{ "<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" }, 1017{ "<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" },
1018{ "<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" }, 1018{ "<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" },
1019{ "<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" }, 1019{ "<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" },
1020{ "<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" }, 1020{ "<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" },
1021{ "<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" }, 1021{ "<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" },
1022{ "<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 " }, 1022{ "<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 " },
1023{ "<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" }, 1023{ "<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" },
1024{ "<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" }, 1024{ "<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" },
1025{ "<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" }, 1025{ "<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" },
1026{ "<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" }, 1026{ "<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" },
1027{ "<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" }, 1027{ "<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" },
1028{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, 1028{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" },
1029{ "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" }, 1029{ "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" },
1030{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, 1030{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" },
1031{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, 1031{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" },
1032{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, 1032{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" },
1033{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, 1033{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" },
1034{ "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" }, 1034{ "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" },
1035{ "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" }, 1035{ "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" },
1036{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, 1036{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" },
1037{ "KO/Pi FAQ","KO/Pi FAQ" }, 1037{ "KO/Pi FAQ","KO/Pi FAQ" },
1038{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, 1038{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" },
1039{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, 1039{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" },
1040{ "About KOrganizer/Pi","Über KOrganizer/Pi" }, 1040{ "About KOrganizer/Pi","Über KOrganizer/Pi" },
1041{ "From: ","Von: " }, 1041{ "From: ","Von: " },
1042{ "Remove sync info","Entferne Sync Info" }, 1042{ "Remove sync info","Entferne Sync Info" },
1043{ "For all profiles","Für alle Profile" }, 1043{ "For all profiles","Für alle Profile" },
1044{ "Hide not Running","Verstecke nicht Laufende" }, 1044{ "Hide not Running","Verstecke nicht Laufende" },
1045{ "ME","ME" }, 1045{ "ME","ME" },
1046{ "Toolbar","Toolbar" }, 1046{ "Toolbar","Toolbar" },
1047{ "Undo Delete...","Löschen rückgängig machen..." }, 1047{ "Undo Delete...","Löschen rückgängig machen..." },
1048{ "Undo Delete","Löschen rückgängig machen" }, 1048{ "Undo Delete","Löschen rückgängig machen" },
1049{ "KDE Sync HowTo...","KDE Sync HowTo..." }, 1049{ "KDE Sync HowTo...","KDE Sync HowTo..." },
1050{ "Multi Sync HowTo...","Multi Sync HowTo..." }, 1050{ "Multi Sync HowTo...","Multi Sync HowTo..." },
1051{ "Januar","Januar" }, 1051{ "Januar","Januar" },
1052{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, 1052{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" },
1053{ "No Filter","Kein Filter" }, 1053{ "No Filter","Kein Filter" },
1054{ "Multiple Sync options","Multi Sync Optionen" }, 1054{ "Multiple Sync options","Multi Sync Optionen" },
1055{ "Sync algo options","Sync Ablauf Optionen" }, 1055{ "Sync algo options","Sync Ablauf Optionen" },
1056{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 1056{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
1057{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 1057{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
1058{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 1058{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
1059{ "Write back options","Optionen zum Zurückschreiben" }, 1059{ "Write back options","Optionen zum Zurückschreiben" },
1060{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 1060{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
1061{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 1061{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
1062{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 1062{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
1063{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 1063{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
1064{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 1064{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
1065{ "Time period","Zeitspanne" }, 1065{ "Time period","Zeitspanne" },
1066{ "From ","Von " }, 1066{ "From ","Von " },
1067{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 1067{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
1068{ " weeks in the future "," Wochen in der Zukunft " }, 1068{ " weeks in the future "," Wochen in der Zukunft " },
1069{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 1069{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
1070{ "Local temp file:","Lokale temp Datei:" }, 1070{ "Local temp file:","Lokale temp Datei:" },
1071{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 1071{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
1072{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 1072{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
1073{ "Language","Sprache" }, 1073{ "Language","Sprache" },
1074{ "Time Format","Zeit Format" }, 1074{ "Time Format","Zeit Format" },
1075{ "Time Zone","Zeit Zone" }, 1075{ "Time Zone","Zeit Zone" },
1076{ "%1 groups subscribed","%1 Guppen abboniert" }, 1076{ "%1 groups subscribed","%1 Guppen abboniert" },
1077{ "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" }, 1077{ "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" },
1078{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 1078{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
1079{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 1079{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
1080{ "Save settings","Speichere Einstellungen" }, 1080{ "Save settings","Speichere Einstellungen" },
1081{ "Save standard","Speichere Standard" }, 1081{ "Save standard","Speichere Standard" },
1082{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 1082{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
1083{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1083{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1084{ "Data storage path","Daten Speicherpfad" }, 1084{ "Data storage path","Daten Speicherpfad" },
1085{ "Language","Sprache" }, 1085{ "Language","Sprache" },
1086{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1086{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1087{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1087{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1088{ "Show events that are done","Zeige abgelaufene Termine" }, 1088{ "Show events that are done","Zeige abgelaufene Termine" },
1089{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1089{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1090{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1090{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1091{ "KO/Pi","KO/Pi" }, 1091{ "KO/Pi","KO/Pi" },
1092{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1092{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1093{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1093{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1094{ "Sound.Al.: ","Sound.Al.: " }, 1094{ "Sound.Al.: ","Sound.Al.: " },
1095{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1095{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1096{ "Restore","Wiederherstellen" }, 1096{ "Restore","Wiederherstellen" },
1097{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, 1097{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" },
1098{ "% completed","% erledigt" }, 1098{ "% completed","% erledigt" },
1099{ "%d item(s) found.","%d Item(s) gefunden." }, 1099{ "%d item(s) found.","%d Item(s) gefunden." },
1100{ "Set complete","Setze auf erledigt" }, 1100{ "Set complete","Setze auf erledigt" },
1101{ "(cancelled)","(gecancelt)" }, 1101{ "(cancelled)","(gecancelt)" },
1102{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1102{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1103{ " Local time "," Locale Zeit " }, 1103{ " Local time "," Locale Zeit " },
1104{ "Form2","Form2" }, 1104{ "Form2","Form2" },
1105{ "Filter enabled","Filter angeschaltet" }, 1105{ "Filter enabled","Filter angeschaltet" },
1106{ "Edit Filters","Ändere Filter" }, 1106{ "Edit Filters","Ändere Filter" },
1107{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1107{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1108{ "Agenda","Agenda" }, 1108{ "Agenda","Agenda" },
1109{ " ("," (" }, 1109{ " ("," (" },
1110{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1110{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1111{ "Print","Print" }, 1111{ "Print","Print" },
1112{ "&Setup Printer...","Drucker &Setup..." }, 1112{ "&Setup Printer...","Drucker &Setup..." },
1113{ "View Type","Zeige Typ" }, 1113{ "View Type","Zeige Typ" },
1114{ "Page &orientation:","Seiten Ausrichtung:" }, 1114{ "Page &orientation:","Seiten Ausrichtung:" },
1115{ "Use Default of Selected Style","Default des selektierten Stils" }, 1115{ "Use Default of Selected Style","Default des selektierten Stils" },
1116{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1116{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1117{ "Portrait","Portrait" }, 1117{ "Portrait","Portrait" },
1118{ "Landscape","Landschaft" }, 1118{ "Landscape","Landschaft" },
1119{ "Print day","Drucke Tag" }, 1119{ "Print day","Drucke Tag" },
1120{ "CalPrintDay_Base","CalPrintDay_Base" }, 1120{ "CalPrintDay_Base","CalPrintDay_Base" },
1121{ "Date && Time Range","Datum && Zeitspanne" }, 1121{ "Date && Time Range","Datum && Zeitspanne" },
1122{ "&End date:","&Enddatum:" }, 1122{ "&End date:","&Enddatum:" },
1123{ "&Start date:","&Startdatum:" }, 1123{ "&Start date:","&Startdatum:" },
1124{ "Start &time:","Startzeit:" }, 1124{ "Start &time:","Startzeit:" },
1125{ "End ti&me:","Endzeit:" }, 1125{ "End ti&me:","Endzeit:" },
1126{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1126{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1127{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1127{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1128{ "Alt+D","Alt+D" }, 1128{ "Alt+D","Alt+D" },
1129{ "&Use colors","Nutze Farben" }, 1129{ "&Use colors","Nutze Farben" },
1130{ "Alt+U","Alt+U" }, 1130{ "Alt+U","Alt+U" },
1131{ "Print week","Drucke Woche" }, 1131{ "Print week","Drucke Woche" },
1132{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1132{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1133{ "Use &colors","Nutze Farben" }, 1133{ "Use &colors","Nutze Farben" },
1134{ "Type of View","Typ der Ansicht" }, 1134{ "Type of View","Typ der Ansicht" },
1135{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1135{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1136{ "Alt+F","Alt+F" }, 1136{ "Alt+F","Alt+F" },
1137{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1137{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1138{ "Alt+T","Alt+T" }, 1138{ "Alt+T","Alt+T" },
1139{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1139{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1140{ "Print month","Drucke Monat" }, 1140{ "Print month","Drucke Monat" },
1141{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1141{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1142{ "&Start month:","&Startmonat:" }, 1142{ "&Start month:","&Startmonat:" },
1143{ "&End month:","&Endmonat:" }, 1143{ "&End month:","&Endmonat:" },
1144{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1144{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1145{ "Print todos","Drucke Todos" }, 1145{ "Print todos","Drucke Todos" },
1146{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1146{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1147{ "Include &description of the item","Inclusive Itembeschreibung" }, 1147{ "Include &description of the item","Inclusive Itembeschreibung" },
1148{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1148{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1149{ "Include &priority of the item","Inclusive Priorität des Items" }, 1149{ "Include &priority of the item","Inclusive Priorität des Items" },
1150{ "Items to Print","Zu druckende Items" }, 1150{ "Items to Print","Zu druckende Items" },
1151{ "&From:","Von:" }, 1151{ "&From:","Von:" },
1152{ "&To:","Bis:" }, 1152{ "&To:","Bis:" },
1153{ "Print &all todo items","Drucke alle Todo Items" }, 1153{ "Print &all todo items","Drucke alle Todo Items" },
1154{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1154{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1155{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1155{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1156{ "Todo List","Todo Liste" }, 1156{ "Todo List","Todo Liste" },
1157{ "&Title:","&Titel:" }, 1157{ "&Title:","&Titel:" },
1158{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, 1158{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" },
1159{ "Todo list","Todo Liste" }, 1159{ "Todo list","Todo Liste" },
1160{ "&Print...","Drucke..." }, 1160{ "&Print...","Drucke..." },
1161{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1161{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1162{ "[Unconfigured]","[Unkonfiguriert]" }, 1162{ "[Unconfigured]","[Unkonfiguriert]" },
1163{ "OK","OK" }, 1163{ "OK","OK" },
1164{ "FilterEditor","FilterEditor" }, 1164{ "FilterEditor","FilterEditor" },
1165{ "Include","Inclusive" }, 1165{ "Include","Inclusive" },
1166{ "Exclude","Exclusive" }, 1166{ "Exclude","Exclusive" },
1167{ "Edit Selection...","Editiere Auswahl" }, 1167{ "Edit Selection...","Editiere Auswahl" },
1168{ "recurring events","wiederholende Termine" }, 1168{ "recurring events","wiederholende Termine" },
1169{ "recurr. events","wiederh.Termine" }, 1169{ "recurr. events","wiederh.Termine" },
1170{ "completed to-dos","erledigte Todos" }, 1170{ "completed to-dos","erledigte Todos" },
1171{ "events","Termine" }, 1171{ "events","Termine" },
1172{ "todos","Todos" }, 1172{ "todos","Todos" },
1173{ "journals","Journale" }, 1173{ "journals","Journale" },
1174{ "public","öffentl." }, 1174{ "public","öffentl." },
1175{ "private","privat" }, 1175{ "private","privat" },
1176{ "confidential","vertraul." }, 1176{ "confidential","vertraul." },
1177{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, 1177{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" },
1178{ "Yesterday","Gestern" }, 1178{ "Yesterday","Gestern" },
1179{ "Day after tomorrow","Übermorgen" }, 1179{ "Day after tomorrow","Übermorgen" },
1180{ "Tomorrow","Morgen" }, 1180{ "Tomorrow","Morgen" },
1181{ "Day before yesterday","Vorgestern" }, 1181{ "Day before yesterday","Vorgestern" },
1182{ "Size %1","Größe %1" }, 1182{ "Size %1","Größe %1" },
1183{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1183{ "New Agendasize: %1","Neue Agendagröße: %1" },
1184{ " (%1 y.)"," (%1 J.)" }, 1184{ " (%1 y.)"," (%1 J.)" },
1185{ "Allday:","Ganztägig:" }, 1185{ "Allday:","Ganztägig:" },
1186{ "compl.todos","erled.Todos" }, 1186{ "compl.todos","erled.Todos" },
1187{ "Day view","Tagesansicht" }, 1187{ "Day view","Tagesansicht" },
1188{ "Next days","Nächste Tage" }, 1188{ "Next days","Nächste Tage" },
1189{ "Next week","Nächste Woche" }, 1189{ "Next week","Nächste Woche" },
1190{ "Next two weeks","Nächste zwei Wochen" }, 1190{ "Next two weeks","Nächste zwei Wochen" },
1191{ "This month","Dieser Monat" }, 1191{ "This month","Dieser Monat" },
1192{ "Journal view","Journal" }, 1192{ "Journal view","Journal" },
1193{ "Display all opened","Zeige alle geöffnet" }, 1193{ "Display all opened","Zeige alle geöffnet" },
1194{ "Display all closed","Zeige alle geschlossen" }, 1194{ "Display all closed","Zeige alle geschlossen" },
1195{ "Display all flat","Zeige alle flach" }, 1195{ "Display all flat","Zeige alle flach" },
1196{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1196{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1197{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1197{ "Default todo done color:","Standard Todo erledigt Farbe" },
1198{ "Select week %1-%2","Wähle Woche %1-%2" }, 1198{ "Select week %1-%2","Wähle Woche %1-%2" },
1199{ "Select Week","Wähle Woche" }, 1199{ "Select Week","Wähle Woche" },
1200{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1200{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1201{ "Set Alarm!","Setze Alarm!" }, 1201{ "Set Alarm!","Setze Alarm!" },
1202{ "Changed alarm for %1 items","Alarm für %1 Items geändert" }, 1202{ "Changed alarm for %1 items","Alarm für %1 Items geändert" },
1203{ " and "," und " }, 1203{ " and "," und " },
1204{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1204{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1205{ "Mail to selected","Mail an Ausgewählte" }, 1205{ "Mail to selected","Mail an Ausgewählte" },
1206{ "Mail to all","Mail an Alle" }, 1206{ "Mail to all","Mail an Alle" },
1207{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1207{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1208{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1208{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1209{ " on"," am" }, 1209{ " on"," am" },
1210{ " completed on "," erledigt am " }, 1210{ " completed on "," erledigt am " },
1211{ "Save as Event template","Speichere als Vorlage" }, 1211{ "Save as Event template","Speichere als Vorlage" },
1212{ "Load Event template","Lade Termin Vorlage" }, 1212{ "Load Event template","Lade Termin Vorlage" },
1213{ "Save as Journal template","Speichere als Journal Vorlage" }, 1213{ "Save as Journal template","Speichere als Journal Vorlage" },
1214{ "Insert Journal template","Füge Journal Vorlage ein" }, 1214{ "Insert Journal template","Füge Journal Vorlage ein" },
1215{ "Sub todos:<br>","Unter Todos:<br>" }, 1215{ "Sub todos:<br>","Unter Todos:<br>" },
1216{ "Parent todo:<br>","Über Todo:<br>" }, 1216{ "Parent todo:<br>","Über Todo:<br>" },
1217{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1217{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1218{ " completed"," erledigt" }, 1218{ " completed"," erledigt" },
1219{ "(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!" }, 1219{ "(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!" },
1220{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1220{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1221{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1221{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1222{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1222{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1223{ "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?" }, 1223{ "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?" },
1224{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1224{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1225{ "Error","Fehler" }, 1225{ "Error","Fehler" },
1226{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1226{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1227{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1227{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1228{ "Warning","Warnung" }, 1228{ "Warning","Warnung" },
1229{ "Select week number","Wähle Wochen Nummer" }, 1229{ "Select week number","Wähle Wochen Nummer" },
1230{ "Februar","Februar" }, 1230{ "Februar","Februar" },
1231{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1231{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1232{ "W","W" }, 1232{ "W","W" },
1233{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1233{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1234{ "T: %1","T: %1" }, 1234{ "T: %1","T: %1" },
1235{ "Start: ","Start: " }, 1235{ "Start: ","Start: " },
1236{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1236{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1237{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1237{ "Password for remote access:","Passwort für fernen Zugriff:" },
1238{ "Remote IP address:","Ferne IP Adresse:" }, 1238{ "Remote IP address:","Ferne IP Adresse:" },
1239{ "Remote port number:","Ferne Port Nummer:" }, 1239{ "Remote port number:","Ferne Port Nummer:" },
1240{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1240{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1241{ "Remote from: ","Fern von: " }, 1241{ "Remote from: ","Fern von: " },
1242{ "Local from: ","Lokal von: " }, 1242{ "Local from: ","Lokal von: " },
1243{ "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" }, 1243{ "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" },
1244{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1244{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1245{ "Write back","Schreibe zurück" }, 1245{ "Write back","Schreibe zurück" },
1246{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1246{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1247{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1247{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1248{ "Received sync request","Sync Anfrage erhalten" }, 1248{ "Received sync request","Sync Anfrage erhalten" },
1249{ "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." }, 1249{ "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." },
1250{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1250{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1251{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1251{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1252{ "Sending file...","Sende Datei..." }, 1252{ "Sending file...","Sende Datei..." },
1253{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1253{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1254{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1254{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1255{ "Received %1 bytes","%1 Bytes erhalten" }, 1255{ "Received %1 bytes","%1 Bytes erhalten" },
1256{ "Writing file to disk...","Speichere Datei..." }, 1256{ "Writing file to disk...","Speichere Datei..." },
1257{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1257{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1258{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1258{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1259{ "Synchronize!","Synchronisiere!" }, 1259{ "Synchronize!","Synchronisiere!" },
1260{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1260{ "High clock skew!","Großer Uhrzeitunterschied!" },
1261{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1261{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1262{ "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!" }, 1262{ "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!" },
1263{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1263{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1264{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1264{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1265{ "List week view","Listenwochenansicht" }, 1265{ "List week view","Listenwochenansicht" },
1266{ "List week","Listenwochenansicht" }, 1266{ "List week","Listenwochenansicht" },
1267{ "Next Week","Nächste Woche" }, 1267{ "Next Week","Nächste Woche" },
1268{ "Previous Week","Vorherige Woche" }, 1268{ "Previous Week","Vorherige Woche" },
1269{ "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." }, 1269{ "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." },
1270{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1270{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1271{ "Details","Details" }, 1271{ "Details","Details" },
1272{ "Created time","Erstellt Zeit" }, 1272{ "Created time","Erstellt Zeit" },
1273{ "Last modified time","Geändert Zeit" }, 1273{ "Last modified time","Geändert Zeit" },
1274{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1274{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1275{ "View Options","Anzeige Optionen" }, 1275{ "View Options","Anzeige Optionen" },
1276{ "<b>Created: ","<b>Erstellt am: " }, 1276{ "<b>Created: ","<b>Erstellt am: " },
1277{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1277{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1278{ "Journal: ","Journal: " }, 1278{ "Journal: ","Journal: " },
1279{ "yearly","jährlich" }, 1279{ "yearly","jährlich" },
1280{ "(%1) ","%1-" }, 1280{ "(%1) ","%1-" },
1281{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1281{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1282{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1282{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1283{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1283{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1284{ "Summary/Loc.","Titel/Ort" }, 1284{ "Summary/Loc.","Titel/Ort" },
1285{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1285{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1286{ "Week Number","Wochennummer" }, 1286{ "Week Number","Wochennummer" },
1287{ "Import","Importiere" }, 1287{ "Import","Importiere" },
1288{ "Export","Exportiere" }, 1288{ "Export","Exportiere" },
1289{ "Beam","Beame" }, 1289{ "Beam","Beame" },
1290{ "Export selected","Exportiere Selektierte" }, 1290{ "Export selected","Exportiere Selektierte" },
1291{ "As iCal (ics) file...","Als iCal (ics) Datei..." }, 1291{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1292{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, 1292{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1293{ "Journal/Details...","Journale/Details..." }, 1293{ "Journal/Details...","Journale/Details..." },
1294{ "Agenda View","Agenda Ansicht" }, 1294{ "Agenda View","Agenda Ansicht" },
1295{ "Show current time","Zeige aktuelle Zeit" }, 1295{ "Show current time","Zeige aktuelle Zeit" },
1296{ "Edit new item","Bearbeite neuen Eintrag" }, 1296{ "Edit new item","Bearbeite neuen Eintrag" },
1297{ "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" }, 1297{ "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" },
1298{ "There is no next alarm.","Es gibt keinen nächsten Alarm." }, 1298{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1299{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, 1299{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1300{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, 1300{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
1301{ "%1 days\n","%1 Tagen\n" }, 1301{ "%1 days\n","%1 Tagen\n" },
1302{ "1 day\n","1 Tag\n" }, 1302{ "1 day\n","1 Tag\n" },
1303{ "%1 hours\n","%1 Stunden\n" }, 1303{ "%1 hours\n","%1 Stunden\n" },
1304{ "1 hour\n","1 Stunde\n" }, 1304{ "1 hour\n","1 Stunde\n" },
1305{ "%1 minutes\n","%1 Minuten\n" }, 1305{ "%1 minutes\n","%1 Minuten\n" },
1306{ "1 minute\n","1 Minute\n" }, 1306{ "1 minute\n","1 Minute\n" },
1307{ "Only one toolbar","Nur eine Toolbar" }, 1307{ "Only one toolbar","Nur eine Toolbar" },
1308{ "Print","Drucke" }, 1308{ "Print","Drucke" },
1309{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, 1309{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
1310{ "There is nothing selected!","Es ist nichts ausgewählt!" }, 1310{ "There is nothing selected!","Es ist nichts ausgewählt!" },
1311{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, 1311{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
1312{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, 1312{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
1313{ "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" }, 1313{ "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" },
1314{ "KO/Pi Printout","KO/Pi Ausdruck" }, 1314{ "KO/Pi Printout","KO/Pi Ausdruck" },
1315{ "Print unscaled","Drucke unskaliert" }, 1315{ "Print unscaled","Drucke unskaliert" },
1316{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, 1316{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
1317{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, 1317{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
1318{ "Printout Mode","Druck Modus" }, 1318{ "Printout Mode","Druck Modus" },
1319{ "Filter menu icon","Filtermenu Icon" }, 1319{ "Filter menu icon","Filtermenu Icon" },
1320{ "<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" }, 1320{ "<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" },
1321{ "<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" }, 1321{ "<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" },
1322{ "%1d","%1t" }, 1322{ "%1d","%1t" },
1323{ "%1h","%1std" }, 1323{ "%1h","%1std" },
1324{ "%1min","%1min" }, 1324{ "%1min","%1min" },
1325{ "( %1 before )","( %1 vorher )" }, 1325{ "( %1 before )","( %1 vorher )" },
1326{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1326{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1327{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1327{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1328{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1328{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1329{ "Show Sync Events","Zeige Sync-Ereignisse" }, 1329{ "Show Sync Events","Zeige Sync-Ereignisse" },
1330{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1330{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1331{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1331{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1332{ " on "," am " }, 1332{ " on "," am " },
1333{ "On: ","Am: " }, 1333{ "On: ","Am: " },
1334{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, 1334{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1335{ "Start/Stop todo...","Starte/Stoppe Todo..." }, 1335{ "Start/Stop todo...","Starte/Stoppe Todo..." },
1336{ "Color for running todos:","Farbe für laufende Todos:" }, 1336{ "Color for running todos:","Farbe für laufende Todos:" },
1337{ "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?" }, 1337{ "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?" },
1338{ "Todo is started","Todo ist gestartet" }, 1338{ "Todo is started","Todo ist gestartet" },
1339{ "Stop todo","Stoppe Todo" }, 1339{ "Stop todo","Stoppe Todo" },
1340{ "Todo is stopped","Todo ist gestoppt" }, 1340{ "Todo is stopped","Todo ist gestoppt" },
1341{ "Start todo","Starte Todo" }, 1341{ "Start todo","Starte Todo" },
1342{ "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?" }, 1342{ "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?" },
1343{ "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?" }, 1343{ "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?" },
1344{ "Todo has subtodos","Todo hat Untertodos" }, 1344{ "Todo has subtodos","Todo hat Untertodos" },
1345{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, 1345{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" },
1346{ "Colors","Farben" }, 1346{ "Colors","Farben" },
1347{ "Click on new parent item","Klicke auf neues Übertodo" }, 1347{ "Click on new parent item","Klicke auf neues Übertodo" },
1348{ "Reparenting aborted!","Übertodo setzen abgebrochen" }, 1348{ "Reparenting aborted!","Übertodo setzen abgebrochen" },
1349{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, 1349{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" },
1350{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, 1350{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" },
1351{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, 1351{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" },
1352{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 1352{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
1353{ "times","Zeiten" }, 1353{ "times","Zeiten" },
1354{ "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?" }, 1354{ "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?" },
1355{ "Backup enabled","Backup angeschaltet" }, 1355{ "Backup enabled","Backup angeschaltet" },
1356{ "Use standard backup dir","Standard Backupverzeichnis" }, 1356{ "Use standard backup dir","Standard Backupverzeichnis" },
1357{ "Number of Backups:","Anzahl der Backups" }, 1357{ "Number of Backups:","Anzahl der Backups" },
1358{ "Make backup every ","Mache ein Backup alle " }, 1358{ "Make backup every ","Mache ein Backup alle " },
1359{ " days"," Tage" }, 1359{ " days"," Tage" },
1360{ "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, 1360{ "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." },
1361{ "Backup Failed!","Backup Problem!" }, 1361{ "Backup Failed!","Backup Problem!" },
1362{ "Try again now","Versuche jetzt nochmal" }, 1362{ "Try again now","Versuche jetzt nochmal" },
1363{ "Try again later","Versuche später nochmal" }, 1363{ "Try again later","Versuche später nochmal" },
1364{ "Try again tomorrow","Versuche morgen nochmal" }, 1364{ "Try again tomorrow","Versuche morgen nochmal" },
1365{ "Disable backup","Schalte Backup ab" }, 1365{ "Disable backup","Schalte Backup ab" },
1366{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 1366{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
1367{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 1367{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
1368{ "Choose action","Wähle Aktion" }, 1368{ "Choose action","Wähle Aktion" },
1369{ "Comment for todo:","Kommentar zum Todo:" }, 1369{ "Comment for todo:","Kommentar zum Todo:" },
1370{ "Stop+note","Stop+Notiz" }, 1370{ "Stop+note","Stop+Notiz" },
1371{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, 1371{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" },
1372{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, 1372{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" },
1373{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, 1373{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" },
1374{ "Print complete list","Drucke komplette Liste" }, 1374{ "Print complete list","Drucke komplette Liste" },
1375{ "Hide all selected","Verstecke Selektierte" }, 1375{ "Hide all selected","Verstecke Selektierte" },
1376{ "Add items","hinzufügen" }, 1376{ "Add items","hinzufügen" },
1377{ "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?" }, 1377{ "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?" },
1378{ "Print List View...","Drucke Listenansicht..." }, 1378{ "Print List View...","Drucke Listenansicht..." },
1379{ "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." }, 1379{ "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." },
1380{ "Configure KO/Pi...","Konfiguriere KO/Pi..." }, 1380{ "Configure KO/Pi...","Konfiguriere KO/Pi..." },
1381{ "Global Settings...","Globale Einstellungen..." }, 1381{ "Global Settings...","Globale Einstellungen..." },
1382{ "<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" }, 1382{ "<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" },
1383{ "(disabled)","(abgeschaltet)" }, 1383{ "(disabled)","(abgeschaltet)" },
1384{ "New Calendar","Neuer Kalender" }, 1384{ "New Calendar","Neuer Kalender" },
1385{ "Calendar","Kalender" }, 1385{ "Calendar","Kalender" },
1386{ "Filter selector","Filterauswahl" }, 1386{ "Filter selector","Filterauswahl" },
1387{ "Filtermenu","Filtermenu" }, 1387{ "Filtermenu","Filtermenu" },
1388{ "Toggle Fullscreen","Vollbild umschalten" }, 1388{ "Toggle Fullscreen","Vollbild umschalten" },
1389{ "Toggle Resource View","Resourcenansicht umschalten" }, 1389{ "Toggle Resource View","Resourcenansicht umschalten" },
1390{ "Storage HowTo...","Speicherort HowTo..." }, 1390{ "Storage HowTo...","Speicherort HowTo..." },
1391{ "Timetracking HowTo...","Timetracking HowTo..." }, 1391{ "Timetracking HowTo...","Timetracking HowTo..." },
1392{ "Juni","Juni" }, 1392{ "Juni","Juni" },
1393{ "Juli","Juli" }, 1393{ "Juli","Juli" },
1394{ "ToDo:","ToDo:" }, 1394{ "ToDo:","ToDo:" },
1395{ "Set Calendar","Setze Kalender" }, 1395{ "Set Calendar","Setze Kalender" },
1396{ "Todo: %1","Todo: %1" }, 1396{ "Todo: %1","Todo: %1" },
1397{ ": (Prio ",": (Prio " }, 1397{ ": (Prio ",": (Prio " },
1398{ "Todos","Todos" }, 1398{ "Todos","Todos" },
1399{ "Todo Viewer","Todo Viewer" }, 1399{ "Todo Viewer","Todo Viewer" },
1400{ "Todo ","Todo " }, 1400{ "Todo ","Todo " },
1401{ " Calendar \n Resource "," Kalender \n Resource " }, 1401{ " Calendar \n Resource "," Kalender \n Resource " },
1402{ " Color "," Farbe " }, 1402{ " Color "," Farbe " },
1403{ "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!)" }, 1403{ "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!)" },
1404{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, 1404{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" },
1405{ "Add new Calendar","Füge Kalender hinzu" }, 1405{ "Add new Calendar","Füge Kalender hinzu" },
1406{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, 1406{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" },
1407{ "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, 1407{ "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" },
1408{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, 1408{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" },
1409{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, 1409{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" },
1410{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, 1410{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." },
1411{ "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>" }, 1411{ "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>" },
1412{ "Global application font for all apps:","Globale Schriftart:" }, 1412{ "Global application font for all apps:","Globale Schriftart:" },
1413{ "Application Font","Applikationsschriftart" }, 1413{ "Application Font","Applikationsschriftart" },
1414{ "Kx/Pi","Kx/Pi" }, 1414{ "Kx/Pi","Kx/Pi" },
1415{ "Backup","Backup" }, 1415{ "Backup","Backup" },
1416{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, 1416{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" },
1417{ "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!" }, 1417{ "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!" },
1418{ "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!" }, 1418{ "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!" },
1419{ "Choose Color","Wähle Farbe" }, 1419{ "Choose Color","Wähle Farbe" },
1420{ " OK "," OK " }, 1420{ " OK "," OK " },
1421{ " Cancel "," Abbrechen " }, 1421{ " Cancel "," Abbrechen " },
1422{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, 1422{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" },
1423{ "Matching items will be removed from list","Passende werden von der Liste entfernt" }, 1423{ "Matching items will be removed from list","Passende werden von der Liste entfernt" },
1424{ "Search on displayed list only","Suche auf der dargestellten Liste" }, 1424{ "Search on displayed list only","Suche auf der dargestellten Liste" },
1425{ "List will be cleared before search","Liste wird vor der Suche gelöscht" }, 1425{ "List will be cleared before search","Liste wird vor der Suche gelöscht" },
1426{ "<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>" }, 1426{ "<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>" },
1427{ "%1\nis running!","%1\nist am Laufen!" }, 1427{ "%1\nis running!","%1\nist am Laufen!" },
1428{ "Additional Comment:","Zusätzlicher Kommentar:" }, 1428{ "Additional Comment:","Zusätzlicher Kommentar:" },
1429{ "Stop and save","Stopp und Speichern" }, 1429{ "Stop and save","Stopp und Speichern" },
1430{ "Continue running","Weiter laufen lassen" }, 1430{ "Continue running","Weiter laufen lassen" },
1431{ "Stop - do not save","Stopp - nicht Speichern" }, 1431{ "Stop - do not save","Stopp - nicht Speichern" },
1432{ "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?" }, 1432{ "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?" },
1433{ "Time mismatch!","Zeiten stimmen nicht!" }, 1433{ "Time mismatch!","Zeiten stimmen nicht!" },
1434{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, 1434{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" },
1435{ "Yes, stop todo","Ja, stoppe Todo" }, 1435{ "Yes, stop todo","Ja, stoppe Todo" },
1436{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, 1436{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" },
1437{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, 1437{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" },
1438{ "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." }, 1438{ "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." },
1439{ "Spouse","Ehegatte" }, 1439{ "Spouse","Ehegatte" },
1440{ "Notes","Notizen" }, 1440{ "Notes","Notizen" },
1441{ "Messanger","Messanger" }, 1441{ "Messanger","Messanger" },
1442{ "Assistant","Assistent" }, 1442{ "Assistant","Assistent" },
1443{ "Manager","Manager" }, 1443{ "Manager","Manager" },
1444{ "Secrecy","Sichtbar" }, 1444{ "Secrecy","Sichtbar" },
1445{ "male","männlich" }, 1445{ "male","männlich" },
1446{ "female","weiblich" }, 1446{ "female","weiblich" },
1447{ "Hide!","Verbergen!" }, 1447{ "Hide!","Verbergen!" },
1448{ "Show!","Anzeigen!" }, 1448{ "Show!","Anzeigen!" },
1449{ "Details","Details" }, 1449{ "Details","Details" },
1450{ "Profession","Beruf" }, 1450{ "Profession","Beruf" },
1451{ "Children","Kinder" }, 1451{ "Children","Kinder" },
1452{ "Department","Abteilung" }, 1452{ "Department","Abteilung" },
1453{ "Backup cancelled","Backup abgebrochen" }, 1453{ "Backup cancelled","Backup abgebrochen" },
1454{ "Backup globally disabled","Backup global abgeschaltet" }, 1454{ "Backup globally disabled","Backup global abgeschaltet" },
1455{ "Backup succesfully finished","Backup erfolgreich beendet" }, 1455{ "Backup succesfully finished","Backup erfolgreich beendet" },
1456{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, 1456{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" },
1457{ "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" }, 1457{ "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" },
1458{ "","" }, 1458{ "Birthdays","Geburtstage" },
1459{ "","" }, 1459{ "KO/Pi import information!","KO/Pi Import Information!" },
1460{ "","" }, 1460{ "","" },
1461{ "","" }, 1461{ "","" },
1462{ "","" }, 1462{ "","" },
1463{ "","" }, 1463{ "","" },
1464{ "","" }, \ No newline at end of file 1464{ "","" }, \ No newline at end of file
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 08909ed..f179c58 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -74,3196 +74,3211 @@
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 119
120#include "calendarview.h" 120#include "calendarview.h"
121#ifndef DESKTOP_VERSION 121#ifndef DESKTOP_VERSION
122#include <qtopia/alarmserver.h> 122#include <qtopia/alarmserver.h>
123#endif 123#endif
124#ifndef _WIN32_ 124#ifndef _WIN32_
125#include <stdlib.h> 125#include <stdlib.h>
126#include <stdio.h> 126#include <stdio.h>
127#include <unistd.h> 127#include <unistd.h>
128#else 128#else
129#include <qprocess.h> 129#include <qprocess.h>
130#endif 130#endif
131 131
132#ifdef DESKTOP_VERSION 132#ifdef DESKTOP_VERSION
133#include <kabc/stdaddressbook.h> 133#include <kabc/stdaddressbook.h>
134#endif 134#endif
135using namespace KOrg; 135using namespace KOrg;
136using namespace KCal; 136using namespace KCal;
137extern int globalFlagBlockAgenda; 137extern int globalFlagBlockAgenda;
138extern int globalFlagBlockStartup; 138extern int globalFlagBlockStartup;
139 139
140 140
141MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent) 141MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent)
142 142
143{ 143{
144 mAlarms = alarms; 144 mAlarms = alarms;
145 viewport()->setBackgroundColor( QColor( 255, 255, 255 ) ); 145 viewport()->setBackgroundColor( QColor( 255, 255, 255 ) );
146 QString mText = "<table width=\"100%\">\n"; 146 QString mText = "<table width=\"100%\">\n";
147 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; 147 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>";
148#ifdef DESKTOP_VERSION 148#ifdef DESKTOP_VERSION
149 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>"; 149 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>";
150#else 150#else
151 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h3>"; 151 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h3>";
152#endif 152#endif
153 // mText += "<img src=\""; 153 // mText += "<img src=\"";
154 // mText += ipath; 154 // mText += ipath;
155 // mText += "\">"; 155 // mText += "\">";
156 //mEventDate = QDate::currentDate(); 156 //mEventDate = QDate::currentDate();
157#ifdef DESKTOP_VERSION 157#ifdef DESKTOP_VERSION
158 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h2>"; 158 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h2>";
159#else 159#else
160 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h3>"; 160 mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h3>";
161#endif 161#endif
162 //mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; 162 //mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>";
163 163
164 Incidence * inc = getNextInc( start ); 164 Incidence * inc = getNextInc( start );
165 int time = 0; 165 int time = 0;
166 //mText += "<table>"; 166 //mText += "<table>";
167 while ( inc ) { 167 while ( inc ) {
168 QDateTime dt ; 168 QDateTime dt ;
169 QString tempText = "<a "; 169 QString tempText = "<a ";
170 bool ok; 170 bool ok;
171 dt = inc->getNextOccurence( start, &ok ); 171 dt = inc->getNextOccurence( start, &ok );
172 if ( !ok ) continue; 172 if ( !ok ) continue;
173 if ( inc->typeID() == eventID ) { 173 if ( inc->typeID() == eventID ) {
174 tempText += "href=\"event:"; 174 tempText += "href=\"event:";
175 } else if ( inc->typeID() == todoID ) { 175 } else if ( inc->typeID() == todoID ) {
176 tempText += "href=\"todo:"; 176 tempText += "href=\"todo:";
177 } 177 }
178 tempText += inc->uid() + "\">"; 178 tempText += inc->uid() + "\">";
179 if ( inc->typeID() == todoID ) 179 if ( inc->typeID() == todoID )
180 tempText += i18n("Todo: "); 180 tempText += i18n("Todo: ");
181 if ( inc->summary().length() > 0 ) 181 if ( inc->summary().length() > 0 )
182 tempText += inc->summary(); 182 tempText += inc->summary();
183 else 183 else
184 tempText += i18n("-no summary-"); 184 tempText += i18n("-no summary-");
185 QString timestr; 185 QString timestr;
186 if (!inc->doesFloat()) 186 if (!inc->doesFloat())
187 timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": "; 187 timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": ";
188 else 188 else
189 timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": "; 189 timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": ";
190 if ( dt.date() < QDate::currentDate() && time == 0 ) { 190 if ( dt.date() < QDate::currentDate() && time == 0 ) {
191 mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; 191 mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>";
192 mText += "<table>"; 192 mText += "<table>";
193 time = 1; 193 time = 1;
194 } 194 }
195 if ( dt.date() == QDate::currentDate() && time <= 1 ) { 195 if ( dt.date() == QDate::currentDate() && time <= 1 ) {
196 if ( time > 0 ) 196 if ( time > 0 )
197 mText +="</table>"; 197 mText +="</table>";
198 mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>"; 198 mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>";
199 mText += "<table>"; 199 mText += "<table>";
200 time = 2; 200 time = 2;
201 201
202 } 202 }
203 if ( dt.date() > QDate::currentDate() && time <= 2 ) { 203 if ( dt.date() > QDate::currentDate() && time <= 2 ) {
204 if ( time > 0 ) 204 if ( time > 0 )
205 mText +="</table>"; 205 mText +="</table>";
206 mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>"; 206 mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>";
207 mText += "<table>"; 207 mText += "<table>";
208 time = 3; 208 time = 3;
209 } 209 }
210 mText +="<tr><td><b>"; 210 mText +="<tr><td><b>";
211 mText += timestr; 211 mText += timestr;
212 mText += "</b></td><td>"; 212 mText += "</b></td><td>";
213 mText += tempText; 213 mText += tempText;
214 mText += "</td></tr>\n"; 214 mText += "</td></tr>\n";
215 inc = getNextInc( start ); 215 inc = getNextInc( start );
216 } 216 }
217 mText +="</table>"; 217 mText +="</table>";
218 setText( mText ); 218 setText( mText );
219} 219}
220 220
221MissedAlarmTextBrowser::~MissedAlarmTextBrowser() 221MissedAlarmTextBrowser::~MissedAlarmTextBrowser()
222{ 222{
223 //qDebug("delete MissedAlarmTextBrowser::~MissedAlarmTextBrowser() "); 223 //qDebug("delete MissedAlarmTextBrowser::~MissedAlarmTextBrowser() ");
224} 224}
225Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start ) 225Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start )
226{ 226{
227 QDateTime dt ; 227 QDateTime dt ;
228 Incidence * retInc; 228 Incidence * retInc;
229 Incidence * inc = mAlarms.first(); 229 Incidence * inc = mAlarms.first();
230 if ( inc == 0 ) 230 if ( inc == 0 )
231 return 0; 231 return 0;
232 bool ok; 232 bool ok;
233 dt = inc->getNextOccurence( start, &ok ); 233 dt = inc->getNextOccurence( start, &ok );
234 if ( ! ok ) return 0; 234 if ( ! ok ) return 0;
235 QDateTime dtn ; 235 QDateTime dtn ;
236 retInc = inc; 236 retInc = inc;
237 inc = mAlarms.next(); 237 inc = mAlarms.next();
238 while ( inc ) { 238 while ( inc ) {
239 dtn = inc->getNextOccurence( start, &ok ); 239 dtn = inc->getNextOccurence( start, &ok );
240 if ( ! ok ) return 0; 240 if ( ! ok ) return 0;
241 if ( dtn < dt ) { 241 if ( dtn < dt ) {
242 dt = dtn; 242 dt = dtn;
243 retInc = inc; 243 retInc = inc;
244 } 244 }
245 inc = mAlarms.next(); 245 inc = mAlarms.next();
246 } 246 }
247 mAlarms.remove( retInc ); 247 mAlarms.remove( retInc );
248 return retInc; 248 return retInc;
249 249
250} 250}
251void MissedAlarmTextBrowser::setSource(const QString & n) 251void MissedAlarmTextBrowser::setSource(const QString & n)
252{ 252{
253 if (n.startsWith("event:")) { 253 if (n.startsWith("event:")) {
254#ifdef DESKTOP_VERSION 254#ifdef DESKTOP_VERSION
255 emit showIncidence(n.mid(8)); 255 emit showIncidence(n.mid(8));
256#else 256#else
257 emit showIncidence(n.mid(6)); 257 emit showIncidence(n.mid(6));
258#endif 258#endif
259 return; 259 return;
260 } else if (n.startsWith("todo:")) { 260 } else if (n.startsWith("todo:")) {
261#ifdef DESKTOP_VERSION 261#ifdef DESKTOP_VERSION
262 emit showIncidence(n.mid(7)); 262 emit showIncidence(n.mid(7));
263#else 263#else
264 emit showIncidence(n.mid(5)); 264 emit showIncidence(n.mid(5));
265#endif 265#endif
266 return; 266 return;
267 } 267 }
268} 268}
269 269
270 270
271class KOBeamPrefs : public QDialog 271class KOBeamPrefs : public QDialog
272{ 272{
273 public: 273 public:
274 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) : 274 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) :
275 QDialog( parent, name, true ) 275 QDialog( parent, name, true )
276 { 276 {
277 setCaption( i18n("Beam Options") ); 277 setCaption( i18n("Beam Options") );
278 QVBoxLayout* lay = new QVBoxLayout( this ); 278 QVBoxLayout* lay = new QVBoxLayout( this );
279 lay->setSpacing( 3 ); 279 lay->setSpacing( 3 );
280 lay->setMargin( 3 ); 280 lay->setMargin( 3 );
281 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); 281 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this );
282 lay->addWidget( format ); 282 lay->addWidget( format );
283 format->setExclusive ( true ) ; 283 format->setExclusive ( true ) ;
284 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); 284 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this );
285 lay->addWidget( time ); time->setExclusive ( true ) ; 285 lay->addWidget( time ); time->setExclusive ( true ) ;
286 vcal = new QRadioButton(" vCalendar ", format ); 286 vcal = new QRadioButton(" vCalendar ", format );
287 ical = new QRadioButton(" iCalendar ", format ); 287 ical = new QRadioButton(" iCalendar ", format );
288 vcal->setChecked( true ); 288 vcal->setChecked( true );
289 tz = new QRadioButton(i18n(" With timezone "), time ); 289 tz = new QRadioButton(i18n(" With timezone "), time );
290 local = new QRadioButton(i18n(" Local time "), time ); 290 local = new QRadioButton(i18n(" Local time "), time );
291 tz->setChecked( true ); 291 tz->setChecked( true );
292 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this ); 292 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this );
293 lay->addWidget( ok ); 293 lay->addWidget( ok );
294 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 294 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
295 lay->addWidget( cancel ); 295 lay->addWidget( cancel );
296 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 296 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
297 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 297 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
298 resize( 200, 200 ); 298 resize( 200, 200 );
299 } 299 }
300 300
301 bool beamVcal() { return vcal->isChecked(); } 301 bool beamVcal() { return vcal->isChecked(); }
302 bool beamLocal() { return local->isChecked(); } 302 bool beamLocal() { return local->isChecked(); }
303private: 303private:
304 QRadioButton* vcal, *ical, *local, *tz; 304 QRadioButton* vcal, *ical, *local, *tz;
305}; 305};
306class KOCatPrefs : public QDialog 306class KOCatPrefs : public QDialog
307{ 307{
308 public: 308 public:
309 KOCatPrefs( QWidget *parent=0, const char *name=0 ) : 309 KOCatPrefs( QWidget *parent=0, const char *name=0 ) :
310 QDialog( parent, name, true ) 310 QDialog( parent, name, true )
311 { 311 {
312 setCaption( i18n("Manage new Categories") ); 312 setCaption( i18n("Manage new Categories") );
313 QVBoxLayout* lay = new QVBoxLayout( this ); 313 QVBoxLayout* lay = new QVBoxLayout( this );
314 lay->setSpacing( 3 ); 314 lay->setSpacing( 3 );
315 lay->setMargin( 3 ); 315 lay->setMargin( 3 );
316 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 316 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
317 lay->addWidget( lab ); 317 lay->addWidget( lab );
318 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 318 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
319 lay->addWidget( format ); 319 lay->addWidget( format );
320 format->setExclusive ( true ) ; 320 format->setExclusive ( true ) ;
321 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 321 addCatBut = new QRadioButton(i18n("Add to category list"), format );
322 new QRadioButton(i18n("Remove from Events/Todos"), format ); 322 new QRadioButton(i18n("Remove from Events/Todos"), format );
323 addCatBut->setChecked( true ); 323 addCatBut->setChecked( true );
324 QPushButton * ok = new QPushButton( i18n("OK"), this ); 324 QPushButton * ok = new QPushButton( i18n("OK"), this );
325 lay->addWidget( ok ); 325 lay->addWidget( ok );
326 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 326 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
327 lay->addWidget( cancel ); 327 lay->addWidget( cancel );
328 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 328 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
329 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 329 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
330 resize( 200, 200 ); 330 resize( 200, 200 );
331 } 331 }
332 332
333 bool addCat() { return addCatBut->isChecked(); } 333 bool addCat() { return addCatBut->isChecked(); }
334private: 334private:
335 QRadioButton* addCatBut; 335 QRadioButton* addCatBut;
336}; 336};
337 337
338 338
339 339
340CalendarView::CalendarView( CalendarResources *calendar, 340CalendarView::CalendarView( CalendarResources *calendar,
341 QWidget *parent, const char *name ) 341 QWidget *parent, const char *name )
342 : CalendarViewBase( parent, name ), 342 : CalendarViewBase( parent, name ),
343 mCalendar( calendar ), 343 mCalendar( calendar ),
344 mResourceManager( calendar->resourceManager() ) 344 mResourceManager( calendar->resourceManager() )
345{ 345{
346 346
347 mEventEditor = 0; 347 mEventEditor = 0;
348 mTodoEditor = 0; 348 mTodoEditor = 0;
349 349
350 init(); 350 init();
351} 351}
352 352
353CalendarView::CalendarView( Calendar *calendar, 353CalendarView::CalendarView( Calendar *calendar,
354 QWidget *parent, const char *name ) 354 QWidget *parent, const char *name )
355 : CalendarViewBase( parent, name ), 355 : CalendarViewBase( parent, name ),
356 mCalendar( calendar ), 356 mCalendar( calendar ),
357 mResourceManager( 0 ) 357 mResourceManager( 0 )
358{ 358{
359 359
360 mEventEditor = 0; 360 mEventEditor = 0;
361 mTodoEditor = 0; 361 mTodoEditor = 0;
362 init(); 362 init();
363} 363}
364 364
365void CalendarView::init() 365void CalendarView::init()
366{ 366{
367 mNextAlarmDateTime = QDateTime::currentDateTime(); 367 mNextAlarmDateTime = QDateTime::currentDateTime();
368 setFocusPolicy ( NoFocus ); 368 setFocusPolicy ( NoFocus );
369 mViewerCallerIsSearchDialog = false; 369 mViewerCallerIsSearchDialog = false;
370 mBlockShowDates = false; 370 mBlockShowDates = false;
371 beamDialog = new KOBeamPrefs(); 371 beamDialog = new KOBeamPrefs();
372 mDatePickerMode = 0; 372 mDatePickerMode = 0;
373 mCurrentSyncDevice = ""; 373 mCurrentSyncDevice = "";
374 writeLocale(); 374 writeLocale();
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 //mainBoxLayout->addWidget (mLeftFrame); 449 //mainBoxLayout->addWidget (mLeftFrame);
450 mDateNavigator = new DateNavigatorContainer( mLeftFrame, 450 mDateNavigator = new DateNavigatorContainer( mLeftFrame,
451 "CalendarView::DateNavigator" ); 451 "CalendarView::DateNavigator" );
452#if 0 452#if 0
453 // FIXME 453 // FIXME
454 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, 454 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE,
455 "CalendarView::DateNavigator", QDate::currentDate()); 455 "CalendarView::DateNavigator", QDate::currentDate());
456#endif 456#endif
457 // mDateNavigator->blockSignals( true ); 457 // mDateNavigator->blockSignals( true );
458 //leftFrameLayout->addWidget( mDateNavigator ); 458 //leftFrameLayout->addWidget( mDateNavigator );
459 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); 459 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall");
460 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); 460 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView");
461 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); 461 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView");
462 connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); 462 connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) );
463 connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); 463 connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) );
464 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); 464 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) );
465 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); 465 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) );
466 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); 466 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) );
467 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); 467 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) );
468 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); 468 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) );
469 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); 469 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) );
470 mTodoList->setNavigator( mNavigator ); 470 mTodoList->setNavigator( mNavigator );
471#if 0 471#if 0
472 if ( QApplication::desktop()->width() < 480 ) { 472 if ( QApplication::desktop()->width() < 480 ) {
473 leftFrameLayout->addWidget(mFilterView); 473 leftFrameLayout->addWidget(mFilterView);
474 leftFrameLayout->addWidget(mTodoList, 2 ); 474 leftFrameLayout->addWidget(mTodoList, 2 );
475 475
476 } else { 476 } else {
477 leftFrameLayout->addWidget(mTodoList,2 ); 477 leftFrameLayout->addWidget(mTodoList,2 );
478 leftFrameLayout->addWidget(mFilterView ); 478 leftFrameLayout->addWidget(mFilterView );
479 } 479 }
480#endif 480#endif
481 mFilterView->hide(); 481 mFilterView->hide();
482 mCalEditView->hide(); 482 mCalEditView->hide();
483 QWidget *rightBox = new QWidget( mMainFrame ); 483 QWidget *rightBox = new QWidget( mMainFrame );
484 //mainBoxLayout->addWidget ( rightBox, 10 ); 484 //mainBoxLayout->addWidget ( rightBox, 10 );
485 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 485 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
486 mRightFrame = new QWidgetStack( rightBox ); 486 mRightFrame = new QWidgetStack( rightBox );
487 rightLayout->addWidget( mRightFrame, 10 ); 487 rightLayout->addWidget( mRightFrame, 10 );
488 488
489 //mLeftFrame = (QWidget *)leftFrame; 489 //mLeftFrame = (QWidget *)leftFrame;
490 if ( KOPrefs::instance()->mVerticalScreen ) { 490 if ( KOPrefs::instance()->mVerticalScreen ) {
491 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); 491 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() );
492 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); 492 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() );
493 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); 493 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() );
494 //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); 494 //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() );
495 } else { 495 } else {
496 //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); 496 //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() );
497 //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); 497 //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() );
498 //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); 498 //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() );
499 } 499 }
500 if ( !KOPrefs::instance()->mShowDateNavigator) 500 if ( !KOPrefs::instance()->mShowDateNavigator)
501 mDateNavigator->hide(); 501 mDateNavigator->hide();
502 //qDebug("Calendarview Size %d %d ", width(), height()); 502 //qDebug("Calendarview Size %d %d ", width(), height());
503#endif 503#endif
504 504
505 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 505 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
506 SLOT( showDates( const KCal::DateList & ) ) ); 506 SLOT( showDates( const KCal::DateList & ) ) );
507 507
508 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 508 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
509 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 509 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
510 510
511 511
512 512
513 connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), 513 connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ),
514 mViewManager, SLOT( showMonth( const QDate & ) ) ); 514 mViewManager, SLOT( showMonth( const QDate & ) ) );
515 515
516 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), 516 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ),
517 mNavigator, SLOT( selectWeek( const QDate & ) ) ); 517 mNavigator, SLOT( selectWeek( const QDate & ) ) );
518 518
519 connect( mDateNavigator, SIGNAL( goPrevYear() ), 519 connect( mDateNavigator, SIGNAL( goPrevYear() ),
520 mNavigator, SLOT( selectPreviousYear() ) ); 520 mNavigator, SLOT( selectPreviousYear() ) );
521 connect( mDateNavigator, SIGNAL( goNextYear() ), 521 connect( mDateNavigator, SIGNAL( goNextYear() ),
522 mNavigator, SLOT( selectNextYear() ) ); 522 mNavigator, SLOT( selectNextYear() ) );
523 connect( mDateNavigator, SIGNAL( goPrevMonth() ), 523 connect( mDateNavigator, SIGNAL( goPrevMonth() ),
524 mNavigator, SLOT( selectPreviousMonth() ) ); 524 mNavigator, SLOT( selectPreviousMonth() ) );
525 connect( mDateNavigator, SIGNAL( goNextMonth() ), 525 connect( mDateNavigator, SIGNAL( goNextMonth() ),
526 mNavigator, SLOT( selectNextMonth() ) ); 526 mNavigator, SLOT( selectNextMonth() ) );
527 527
528 connect( mDateNavigator, SIGNAL( goPrevious() ), 528 connect( mDateNavigator, SIGNAL( goPrevious() ),
529 mNavigator, SLOT( selectPrevious() ) ); 529 mNavigator, SLOT( selectPrevious() ) );
530 connect( mDateNavigator, SIGNAL( goNext() ), 530 connect( mDateNavigator, SIGNAL( goNext() ),
531 mNavigator, SLOT( selectNext() ) ); 531 mNavigator, SLOT( selectNext() ) );
532 connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), 532 connect( mDateNavigator, SIGNAL( monthSelected ( int ) ),
533 mNavigator, SLOT( slotMonthSelect( int ) ) ); 533 mNavigator, SLOT( slotMonthSelect( int ) ) );
534 534
535 connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 535 connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
536 mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 536 mNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
537#if 0 537#if 0
538 connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), 538 connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ),
539 SLOT( incidenceAdded( Incidence *) ) ); 539 SLOT( incidenceAdded( Incidence *) ) );
540#endif 540#endif
541 // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); 541 // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView()));
542 542
543 connect( this, SIGNAL( configChanged() ), 543 connect( this, SIGNAL( configChanged() ),
544 mDateNavigator, SLOT( updateConfig() ) ); 544 mDateNavigator, SLOT( updateConfig() ) );
545 545
546 connect( mTodoList, SIGNAL( newTodoSignal() ), 546 connect( mTodoList, SIGNAL( newTodoSignal() ),
547 SLOT( newTodo() ) ); 547 SLOT( newTodo() ) );
548 connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), 548 connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ),
549 SLOT( newSubTodo( Todo * ) ) ); 549 SLOT( newSubTodo( Todo * ) ) );
550 connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), 550 connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ),
551 SLOT( editTodo( Todo * ) ) ); 551 SLOT( editTodo( Todo * ) ) );
552 connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), 552 connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ),
553 SLOT( showTodo( Todo *) ) ); 553 SLOT( showTodo( Todo *) ) );
554 connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), 554 connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ),
555 SLOT( deleteTodo( Todo *) ) ); 555 SLOT( deleteTodo( Todo *) ) );
556 connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); 556 connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) );
557 connect( mTodoList, SIGNAL( purgeCompletedSignal() ), 557 connect( mTodoList, SIGNAL( purgeCompletedSignal() ),
558 SLOT( purgeCompleted() ) ); 558 SLOT( purgeCompleted() ) );
559 connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), 559 connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ),
560 SIGNAL( todoModified( Todo *, int ) ) ); 560 SIGNAL( todoModified( Todo *, int ) ) );
561 561
562 connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), 562 connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ),
563 this, SLOT ( cloneIncidence( Incidence * ) ) ); 563 this, SLOT ( cloneIncidence( Incidence * ) ) );
564 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), 564 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ),
565 this, SLOT (cancelIncidence( Incidence * ) ) ); 565 this, SLOT (cancelIncidence( Incidence * ) ) );
566 566
567 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), 567 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ),
568 this, SLOT ( moveIncidence( Incidence * ) ) ); 568 this, SLOT ( moveIncidence( Incidence * ) ) );
569 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), 569 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ),
570 this, SLOT ( beamIncidence( Incidence * ) ) ); 570 this, SLOT ( beamIncidence( Incidence * ) ) );
571 571
572 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), 572 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ),
573 this, SLOT ( todo_unsub( Todo * ) ) ); 573 this, SLOT ( todo_unsub( Todo * ) ) );
574 574
575 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), 575 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
576 this, SLOT ( todo_resub( Todo *,Todo * ) ) ); 576 this, SLOT ( todo_resub( Todo *,Todo * ) ) );
577 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, 577 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList,
578 SLOT( updateTodo( Todo *, int ) ) ); 578 SLOT( updateTodo( Todo *, int ) ) );
579 connect( this, SIGNAL( todoModified( Todo *, int )), this, 579 connect( this, SIGNAL( todoModified( Todo *, int )), this,
580 SLOT( changeTodoDisplay( Todo *, int ) ) ); 580 SLOT( changeTodoDisplay( Todo *, int ) ) );
581 581
582 582
583 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); 583 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) );
584 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); 584 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) );
585 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); 585 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) );
586 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); 586 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) );
587 587
588 588
589 589
590 590
591 591
592 connect(QApplication::clipboard(),SIGNAL(dataChanged()), 592 connect(QApplication::clipboard(),SIGNAL(dataChanged()),
593 SLOT(checkClipboard())); 593 SLOT(checkClipboard()));
594 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), 594 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ),
595 SLOT( processTodoListSelection( Incidence * ) ) ); 595 SLOT( processTodoListSelection( Incidence * ) ) );
596 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); 596 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool)));
597 597
598 // kdDebug() << "CalendarView::CalendarView() done" << endl; 598 // kdDebug() << "CalendarView::CalendarView() done" << endl;
599 599
600 mDateFrame = new QVBox(0,0,WType_Popup); 600 mDateFrame = new QVBox(0,0,WType_Popup);
601 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 601 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
602 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); 602 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
603 mDateFrame->setLineWidth(3); 603 mDateFrame->setLineWidth(3);
604 mDateFrame->hide(); 604 mDateFrame->hide();
605 mDateFrame->setCaption( i18n( "Pick a date to display")); 605 mDateFrame->setCaption( i18n( "Pick a date to display"));
606 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); 606 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() );
607 607
608 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); 608 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate)));
609 609
610 mEventEditor = mDialogManager->getEventEditor(); 610 mEventEditor = mDialogManager->getEventEditor();
611 mTodoEditor = mDialogManager->getTodoEditor(); 611 mTodoEditor = mDialogManager->getTodoEditor();
612 612
613 mFlagEditDescription = false; 613 mFlagEditDescription = false;
614 614
615 mSuspendTimer = new QTimer( this ); 615 mSuspendTimer = new QTimer( this );
616 mAlarmTimer = new QTimer( this ); 616 mAlarmTimer = new QTimer( this );
617 mRecheckAlarmTimer = new QTimer( this ); 617 mRecheckAlarmTimer = new QTimer( this );
618 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); 618 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) );
619 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); 619 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) );
620 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); 620 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) );
621 mAlarmDialog = new AlarmDialog( this ); 621 mAlarmDialog = new AlarmDialog( this );
622 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); 622 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) );
623 mAlarmDialog->setServerNotification( false ); 623 mAlarmDialog->setServerNotification( false );
624 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); 624 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime );
625 625
626 626
627#ifndef DESKTOP_VERSION 627#ifndef DESKTOP_VERSION
628//US listen for arriving address resultsets 628//US listen for arriving address resultsets
629 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), 629 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)),
630 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); 630 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
631#endif 631#endif
632 mDateNavigator->setCalendar( mCalendar ); 632 mDateNavigator->setCalendar( mCalendar );
633} 633}
634 634
635 635
636CalendarView::~CalendarView() 636CalendarView::~CalendarView()
637{ 637{
638 // kdDebug() << "~CalendarView()" << endl; 638 // kdDebug() << "~CalendarView()" << endl;
639 //qDebug("CalendarView::~CalendarView() "); 639 //qDebug("CalendarView::~CalendarView() ");
640 delete mDialogManager; 640 delete mDialogManager;
641 delete mViewManager; 641 delete mViewManager;
642 delete mStorage; 642 delete mStorage;
643 delete mDateFrame ; 643 delete mDateFrame ;
644 delete beamDialog; 644 delete beamDialog;
645 delete mEventViewerDialog; 645 delete mEventViewerDialog;
646 //kdDebug() << "~CalendarView() done" << endl; 646 //kdDebug() << "~CalendarView() done" << endl;
647} 647}
648void CalendarView::checkAlarms() 648void CalendarView::checkAlarms()
649{ 649{
650 KConfig *config = KOGlobals::config(); 650 KConfig *config = KOGlobals::config();
651 config->setGroup( "AppRun" ); 651 config->setGroup( "AppRun" );
652 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 652 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
653 int daysto = dt.daysTo( QDate::currentDate() ); 653 int daysto = dt.daysTo( QDate::currentDate() );
654 int days = config->readNumEntry( "LatestProgramStopDays" , daysto); 654 int days = config->readNumEntry( "LatestProgramStopDays" , daysto);
655 dt = dt.addDays( days ); 655 dt = dt.addDays( days );
656 int secto = dt.secsTo( QDateTime::currentDateTime() ); 656 int secto = dt.secsTo( QDateTime::currentDateTime() );
657 int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; 657 int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30;
658 //qDebug("KO: Reading program stop %d ", secs); 658 //qDebug("KO: Reading program stop %d ", secs);
659 //secs -= ( 3600 * 24*3 ); // debug only 659 //secs -= ( 3600 * 24*3 ); // debug only
660 QDateTime latest = dt.addSecs ( secs ); 660 QDateTime latest = dt.addSecs ( secs );
661 qDebug("KO: Last termination on %s ", latest.toString().latin1()); 661 qDebug("KO: Last termination on %s ", latest.toString().latin1());
662 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); 662 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
663 QPtrList<Incidence> el = mCalendar->rawIncidences(); 663 QPtrList<Incidence> el = mCalendar->rawIncidences();
664 QPtrList<Incidence> al; 664 QPtrList<Incidence> al;
665 Incidence* inL = el.first(); 665 Incidence* inL = el.first();
666 QDateTime cur = QDateTime::currentDateTime().addSecs(-59); 666 QDateTime cur = QDateTime::currentDateTime().addSecs(-59);
667 qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); 667 qDebug("KO: Checking alarm until %s ", cur.toString().latin1());
668 while ( inL ) { 668 while ( inL ) {
669 bool ok = false; 669 bool ok = false;
670 int offset = 0; 670 int offset = 0;
671 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; 671 QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ;
672 if ( ok ) { 672 if ( ok ) {
673 //qDebug("OK %s",next.toString().latin1()); 673 //qDebug("OK %s",next.toString().latin1());
674 if ( next < cur ) { 674 if ( next < cur ) {
675 al.append( inL ); 675 al.append( inL );
676 //qDebug("found missed alarm: %s ", inL->summary().latin1() ); 676 //qDebug("found missed alarm: %s ", inL->summary().latin1() );
677 } 677 }
678 } 678 }
679 inL = el.next(); 679 inL = el.next();
680 } 680 }
681 if ( al.count() ) { 681 if ( al.count() ) {
682 QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); 682 QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop );
683 dia->setCaption( i18n("KO/Pi: Missing alarms!") ); 683 dia->setCaption( i18n("KO/Pi: Missing alarms!") );
684 QVBoxLayout* lay = new QVBoxLayout( dia ); 684 QVBoxLayout* lay = new QVBoxLayout( dia );
685 lay->setSpacing( 0 ); 685 lay->setSpacing( 0 );
686 lay->setMargin( 0 ); 686 lay->setMargin( 0 );
687 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); 687 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest );
688 connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); 688 connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) ));
689 lay->addWidget( matb ); 689 lay->addWidget( matb );
690 if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) { 690 if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) {
691 int wid = 210; 691 int wid = 210;
692 int x = QApplication::desktop()->width() - wid - 7; 692 int x = QApplication::desktop()->width() - wid - 7;
693 int y = QApplication::desktop()->height() - wid - 70; 693 int y = QApplication::desktop()->height() - wid - 70;
694 dia->setGeometry ( x,y,wid,wid); 694 dia->setGeometry ( x,y,wid,wid);
695 } else { 695 } else {
696 int si = 220; 696 int si = 220;
697 if ( QApplication::desktop()->width() > 470 ) 697 if ( QApplication::desktop()->width() > 470 )
698 si = 400; 698 si = 400;
699 dia->resize(si,si/2); 699 dia->resize(si,si/2);
700 } 700 }
701 dia->setBackgroundColor( QColor( 255, 255, 255 ) ); 701 dia->setBackgroundColor( QColor( 255, 255, 255 ) );
702 dia->show(); 702 dia->show();
703 703
704 } 704 }
705} 705}
706void CalendarView::showDay( QDate d ) 706void CalendarView::showDay( QDate d )
707{ 707{
708 dateNavigator()->blockSignals( true ); 708 dateNavigator()->blockSignals( true );
709 dateNavigator()->selectDate( d ); 709 dateNavigator()->selectDate( d );
710 dateNavigator()->blockSignals( false ); 710 dateNavigator()->blockSignals( false );
711 mViewManager->showDayView(); 711 mViewManager->showDayView();
712 //dateNavigator()->selectDate( d ); 712 //dateNavigator()->selectDate( d );
713} 713}
714void CalendarView::timerAlarm() 714void CalendarView::timerAlarm()
715{ 715{
716 //qDebug("CalendarView::timerAlarm() "); 716 //qDebug("CalendarView::timerAlarm() ");
717 computeAlarm(mAlarmNotification ); 717 computeAlarm(mAlarmNotification );
718} 718}
719 719
720void CalendarView::suspendAlarm() 720void CalendarView::suspendAlarm()
721{ 721{
722 //qDebug(" CalendarView::suspendAlarm() "); 722 //qDebug(" CalendarView::suspendAlarm() ");
723 computeAlarm(mSuspendAlarmNotification ); 723 computeAlarm(mSuspendAlarmNotification );
724 724
725} 725}
726 726
727void CalendarView::startAlarm( QString mess , QString filename) 727void CalendarView::startAlarm( QString mess , QString filename)
728{ 728{
729 729
730 topLevelWidget()->showNormal(); 730 topLevelWidget()->showNormal();
731 topLevelWidget()->setActiveWindow(); 731 topLevelWidget()->setActiveWindow();
732 topLevelWidget()->raise(); 732 topLevelWidget()->raise();
733 733
734 mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); 734 mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount );
735 QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) ); 735 QTimer::singleShot( 3000, this, SLOT( checkNextTimerAlarm() ) );
736 736
737} 737}
738 738
739void CalendarView::checkNextTimerAlarm() 739void CalendarView::checkNextTimerAlarm()
740{ 740{
741 mCalendar->checkAlarmForIncidence( 0, true ); 741 mCalendar->checkAlarmForIncidence( 0, true );
742} 742}
743 743
744void CalendarView::computeAlarm( QString msg ) 744void CalendarView::computeAlarm( QString msg )
745{ 745{
746 746
747 QString mess = msg; 747 QString mess = msg;
748 QString mAlarmMessage = mess.mid( 9 ); 748 QString mAlarmMessage = mess.mid( 9 );
749 QString filename = MainWindow::resourcePath(); 749 QString filename = MainWindow::resourcePath();
750 filename += "koalarm.wav"; 750 filename += "koalarm.wav";
751 QString tempfilename; 751 QString tempfilename;
752 if ( mess.left( 13 ) == "suspend_alarm") { 752 if ( mess.left( 13 ) == "suspend_alarm") {
753 bool error = false; 753 bool error = false;
754 int len = mess.mid( 13 ).find("+++"); 754 int len = mess.mid( 13 ).find("+++");
755 if ( len < 2 ) 755 if ( len < 2 )
756 error = true; 756 error = true;
757 else { 757 else {
758 tempfilename = mess.mid( 13, len ); 758 tempfilename = mess.mid( 13, len );
759 if ( !QFile::exists( tempfilename ) ) 759 if ( !QFile::exists( tempfilename ) )
760 error = true; 760 error = true;
761 } 761 }
762 if ( ! error ) { 762 if ( ! error ) {
763 filename = tempfilename; 763 filename = tempfilename;
764 } 764 }
765 mAlarmMessage = mess.mid( 13+len+3 ); 765 mAlarmMessage = mess.mid( 13+len+3 );
766 //qDebug("suspend file %s ",tempfilename.latin1() ); 766 //qDebug("suspend file %s ",tempfilename.latin1() );
767 startAlarm( mAlarmMessage, filename); 767 startAlarm( mAlarmMessage, filename);
768 return; 768 return;
769 } 769 }
770 if ( mess.left( 11 ) == "timer_alarm") { 770 if ( mess.left( 11 ) == "timer_alarm") {
771 //mTimerTime = 0; 771 //mTimerTime = 0;
772 startAlarm( mess.mid( 11 ), filename ); 772 startAlarm( mess.mid( 11 ), filename );
773 return; 773 return;
774 } 774 }
775 if ( mess.left( 10 ) == "proc_alarm") { 775 if ( mess.left( 10 ) == "proc_alarm") {
776 bool error = false; 776 bool error = false;
777 int len = mess.mid( 10 ).find("+++"); 777 int len = mess.mid( 10 ).find("+++");
778 if ( len < 2 ) 778 if ( len < 2 )
779 error = true; 779 error = true;
780 else { 780 else {
781 tempfilename = mess.mid( 10, len ); 781 tempfilename = mess.mid( 10, len );
782 if ( !QFile::exists( tempfilename ) ) 782 if ( !QFile::exists( tempfilename ) )
783 error = true; 783 error = true;
784 } 784 }
785 if ( error ) { 785 if ( error ) {
786 mAlarmMessage = "Procedure Alarm\nError - File not found\n"; 786 mAlarmMessage = "Procedure Alarm\nError - File not found\n";
787 mAlarmMessage += mess.mid( 10+len+3+9 ); 787 mAlarmMessage += mess.mid( 10+len+3+9 );
788 } else { 788 } else {
789 //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); 789 //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
790 //qDebug("-----system command %s ",tempfilename.latin1() ); 790 //qDebug("-----system command %s ",tempfilename.latin1() );
791#ifndef _WIN32_ 791#ifndef _WIN32_
792 if ( vfork () == 0 ) { 792 if ( vfork () == 0 ) {
793 execl ( tempfilename.latin1(), 0 ); 793 execl ( tempfilename.latin1(), 0 );
794 return; 794 return;
795 } 795 }
796#else 796#else
797 QProcess* p = new QProcess(); 797 QProcess* p = new QProcess();
798 p->addArgument( tempfilename.latin1() ); 798 p->addArgument( tempfilename.latin1() );
799 p->start(); 799 p->start();
800 return; 800 return;
801#endif 801#endif
802 802
803 return; 803 return;
804 } 804 }
805 805
806 //qDebug("+++++++system command %s ",tempfilename.latin1() ); 806 //qDebug("+++++++system command %s ",tempfilename.latin1() );
807 } 807 }
808 if ( mess.left( 11 ) == "audio_alarm") { 808 if ( mess.left( 11 ) == "audio_alarm") {
809 bool error = false; 809 bool error = false;
810 int len = mess.mid( 11 ).find("+++"); 810 int len = mess.mid( 11 ).find("+++");
811 if ( len < 2 ) 811 if ( len < 2 )
812 error = true; 812 error = true;
813 else { 813 else {
814 tempfilename = mess.mid( 11, len ); 814 tempfilename = mess.mid( 11, len );
815 if ( !QFile::exists( tempfilename ) ) 815 if ( !QFile::exists( tempfilename ) )
816 error = true; 816 error = true;
817 } 817 }
818 if ( ! error ) { 818 if ( ! error ) {
819 filename = tempfilename; 819 filename = tempfilename;
820 } 820 }
821 mAlarmMessage = mess.mid( 11+len+3+9 ); 821 mAlarmMessage = mess.mid( 11+len+3+9 );
822 //qDebug("audio file command %s ",tempfilename.latin1() ); 822 //qDebug("audio file command %s ",tempfilename.latin1() );
823 } 823 }
824 if ( mess.left( 9 ) == "cal_alarm") { 824 if ( mess.left( 9 ) == "cal_alarm") {
825 mAlarmMessage = mess.mid( 9 ) ; 825 mAlarmMessage = mess.mid( 9 ) ;
826 } 826 }
827 827
828 startAlarm( mAlarmMessage, filename ); 828 startAlarm( mAlarmMessage, filename );
829 829
830 830
831} 831}
832 832
833void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti ) 833void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
834{ 834{
835 //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 835 //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
836 836
837 mSuspendAlarmNotification = noti; 837 mSuspendAlarmNotification = noti;
838 int ms = QDateTime::currentDateTime().secsTo( qdt )*1000; 838 int ms = QDateTime::currentDateTime().secsTo( qdt )*1000;
839 //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000); 839 //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000);
840 mSuspendTimer->start( ms , true ); 840 mSuspendTimer->start( ms , true );
841 841
842} 842}
843 843
844void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti ) 844void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
845{ 845{
846 mNextAlarmDateTime = qdt; 846 mNextAlarmDateTime = qdt;
847 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 847 //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
848 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 848 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
849#ifndef DESKTOP_VERSION 849#ifndef DESKTOP_VERSION
850 AlarmServer::addAlarm ( qdt,"koalarm", noti.utf8() ); 850 AlarmServer::addAlarm ( qdt,"koalarm", noti.utf8() );
851#endif 851#endif
852 return; 852 return;
853 } 853 }
854 int maxSec; 854 int maxSec;
855 //maxSec = 5; //testing only 855 //maxSec = 5; //testing only
856 maxSec = 86400+3600; // one day+1hour 856 maxSec = 86400+3600; // one day+1hour
857 mAlarmNotification = noti; 857 mAlarmNotification = noti;
858 int sec = QDateTime::currentDateTime().secsTo( qdt ); 858 int sec = QDateTime::currentDateTime().secsTo( qdt );
859 if ( sec > maxSec ) { 859 if ( sec > maxSec ) {
860 mRecheckAlarmTimer->start( maxSec * 1000 ); 860 mRecheckAlarmTimer->start( maxSec * 1000 );
861 // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec ); 861 // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec );
862 return; 862 return;
863 } else { 863 } else {
864 mRecheckAlarmTimer->stop(); 864 mRecheckAlarmTimer->stop();
865 } 865 }
866 //qDebug("Alarm timer started with secs: %d ", sec); 866 //qDebug("Alarm timer started with secs: %d ", sec);
867 mAlarmTimer->start( sec *1000 , true ); 867 mAlarmTimer->start( sec *1000 , true );
868 868
869} 869}
870// called by mRecheckAlarmTimer to get next alarm 870// called by mRecheckAlarmTimer to get next alarm
871// we need this, because a QTimer has only a max range of 25 days 871// we need this, because a QTimer has only a max range of 25 days
872void CalendarView::recheckTimerAlarm() 872void CalendarView::recheckTimerAlarm()
873{ 873{
874 mAlarmTimer->stop(); 874 mAlarmTimer->stop();
875 mRecheckAlarmTimer->stop(); 875 mRecheckAlarmTimer->stop();
876 mCalendar->checkAlarmForIncidence( 0, true ); 876 mCalendar->checkAlarmForIncidence( 0, true );
877} 877}
878void CalendarView::removeAlarm(const QDateTime &qdt, const QString &noti ) 878void CalendarView::removeAlarm(const QDateTime &qdt, const QString &noti )
879{ 879{
880 //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); 880 //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() );
881 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 881 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
882#ifndef DESKTOP_VERSION 882#ifndef DESKTOP_VERSION
883 AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() ); 883 AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.latin1() );
884#endif 884#endif
885 return; 885 return;
886 } 886 }
887 mAlarmTimer->stop(); 887 mAlarmTimer->stop();
888} 888}
889void CalendarView::selectWeekNum ( int num ) 889void CalendarView::selectWeekNum ( int num )
890{ 890{
891 dateNavigator()->blockSignals( true ); 891 dateNavigator()->blockSignals( true );
892 dateNavigator()->selectWeek( num ); 892 dateNavigator()->selectWeek( num );
893 dateNavigator()->blockSignals( false ); 893 dateNavigator()->blockSignals( false );
894 mViewManager->showWeekView(); 894 mViewManager->showWeekView();
895} 895}
896KOViewManager *CalendarView::viewManager() 896KOViewManager *CalendarView::viewManager()
897{ 897{
898 return mViewManager; 898 return mViewManager;
899} 899}
900 900
901KODialogManager *CalendarView::dialogManager() 901KODialogManager *CalendarView::dialogManager()
902{ 902{
903 return mDialogManager; 903 return mDialogManager;
904} 904}
905 905
906QDate CalendarView::startDate() 906QDate CalendarView::startDate()
907{ 907{
908 DateList dates = mNavigator->selectedDates(); 908 DateList dates = mNavigator->selectedDates();
909 909
910 return dates.first(); 910 return dates.first();
911} 911}
912 912
913QDate CalendarView::endDate() 913QDate CalendarView::endDate()
914{ 914{
915 DateList dates = mNavigator->selectedDates(); 915 DateList dates = mNavigator->selectedDates();
916 916
917 return dates.last(); 917 return dates.last();
918} 918}
919 919
920 920
921void CalendarView::createPrinter() 921void CalendarView::createPrinter()
922{ 922{
923#ifndef KORG_NOPRINTER 923#ifndef KORG_NOPRINTER
924 if (!mCalPrinter) { 924 if (!mCalPrinter) {
925 mCalPrinter = new CalPrinter(this, mCalendar); 925 mCalPrinter = new CalPrinter(this, mCalendar);
926 connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig())); 926 connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig()));
927 } 927 }
928#endif 928#endif
929} 929}
930 930
931 931
932//KOPrefs::instance()->mWriteBackFile 932//KOPrefs::instance()->mWriteBackFile
933//KOPrefs::instance()->mWriteBackExistingOnly 933//KOPrefs::instance()->mWriteBackExistingOnly
934 934
935// 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 935// 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
936// 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 936// 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
937// 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 937// 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
938// 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 938// 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
939// 4 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 939// 4 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
940// 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 940// 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
941 941
942int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full ) 942int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full )
943{ 943{
944 944
945 // 0 equal 945 // 0 equal
946 // 1 take local 946 // 1 take local
947 // 2 take remote 947 // 2 take remote
948 // 3 cancel 948 // 3 cancel
949 QDateTime lastSync = mLastCalendarSync; 949 QDateTime lastSync = mLastCalendarSync;
950 QDateTime localMod = local->lastModified(); 950 QDateTime localMod = local->lastModified();
951 QDateTime remoteMod = remote->lastModified(); 951 QDateTime remoteMod = remote->lastModified();
952 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 952 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
953 bool remCh, locCh; 953 bool remCh, locCh;
954 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 954 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
955 //if ( remCh ) 955 //if ( remCh )
956 //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); 956 //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
957 locCh = ( localMod > mLastCalendarSync ); 957 locCh = ( localMod > mLastCalendarSync );
958 if ( !remCh && ! locCh ) { 958 if ( !remCh && ! locCh ) {
959 //qDebug("both not changed "); 959 //qDebug("both not changed ");
960 lastSync = localMod.addDays(1); 960 lastSync = localMod.addDays(1);
961 if ( mode <= SYNC_PREF_ASK ) 961 if ( mode <= SYNC_PREF_ASK )
962 return 0; 962 return 0;
963 } else { 963 } else {
964 if ( locCh ) { 964 if ( locCh ) {
965 //qDebug("loc changed %d %s %s", local->revision() , localMod.toString().latin1(), mLastCalendarSync.toString().latin1()); 965 //qDebug("loc changed %d %s %s", local->revision() , localMod.toString().latin1(), mLastCalendarSync.toString().latin1());
966 lastSync = localMod.addDays( -1 ); 966 lastSync = localMod.addDays( -1 );
967 if ( !remCh ) 967 if ( !remCh )
968 remoteMod = ( lastSync.addDays( -1 ) ); 968 remoteMod = ( lastSync.addDays( -1 ) );
969 } else { 969 } else {
970 //qDebug(" not loc changed "); 970 //qDebug(" not loc changed ");
971 lastSync = localMod.addDays( 1 ); 971 lastSync = localMod.addDays( 1 );
972 if ( remCh ) 972 if ( remCh )
973 remoteMod =( lastSync.addDays( 1 ) ); 973 remoteMod =( lastSync.addDays( 1 ) );
974 974
975 } 975 }
976 } 976 }
977 full = true; 977 full = true;
978 if ( mode < SYNC_PREF_ASK ) 978 if ( mode < SYNC_PREF_ASK )
979 mode = SYNC_PREF_ASK; 979 mode = SYNC_PREF_ASK;
980 } else { 980 } else {
981 if ( localMod == remoteMod ) 981 if ( localMod == remoteMod )
982 // if ( local->revision() == remote->revision() ) 982 // if ( local->revision() == remote->revision() )
983 return 0; 983 return 0;
984 984
985 } 985 }
986 // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); 986 // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() );
987 987
988 //qDebug("%s %d %s %d", localMod.toString().latin1() , local->revision(), remoteMod.toString().latin1(), remote->revision()); 988 //qDebug("%s %d %s %d", localMod.toString().latin1() , local->revision(), remoteMod.toString().latin1(), remote->revision());
989 //qDebug("%d %d %d %d ", localMod.time().second(), localMod.time().msec(), remoteMod.time().second(), remoteMod.time().msec() ); 989 //qDebug("%d %d %d %d ", localMod.time().second(), localMod.time().msec(), remoteMod.time().second(), remoteMod.time().msec() );
990 //full = true; //debug only 990 //full = true; //debug only
991 if ( full ) { 991 if ( full ) {
992 bool equ = false; 992 bool equ = false;
993 if ( local->typeID() == eventID ) { 993 if ( local->typeID() == eventID ) {
994 equ = (*((Event*) local) == *((Event*) remote)); 994 equ = (*((Event*) local) == *((Event*) remote));
995 } 995 }
996 else if ( local->typeID() == todoID ) 996 else if ( local->typeID() == todoID )
997 equ = (*((Todo*) local) == (*(Todo*) remote)); 997 equ = (*((Todo*) local) == (*(Todo*) remote));
998 else if ( local->typeID() == journalID ) 998 else if ( local->typeID() == journalID )
999 equ = (*((Journal*) local) == *((Journal*) remote)); 999 equ = (*((Journal*) local) == *((Journal*) remote));
1000 if ( equ ) { 1000 if ( equ ) {
1001 //qDebug("equal "); 1001 //qDebug("equal ");
1002 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1002 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1003 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); 1003 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) );
1004 } 1004 }
1005 if ( mode < SYNC_PREF_FORCE_LOCAL ) 1005 if ( mode < SYNC_PREF_FORCE_LOCAL )
1006 return 0; 1006 return 0;
1007 1007
1008 }//else //debug only 1008 }//else //debug only
1009 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); 1009 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1());
1010 } 1010 }
1011 int result; 1011 int result;
1012 bool localIsNew; 1012 bool localIsNew;
1013 //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() ); 1013 //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() );
1014 1014
1015 1015
1016 // ************************************************ 1016 // ************************************************
1017 // ************************************************ 1017 // ************************************************
1018 // ************************************************ 1018 // ************************************************
1019 // We may have that lastSync > remoteMod AND lastSync > localMod 1019 // We may have that lastSync > remoteMod AND lastSync > localMod
1020 // BUT remoteMod != localMod 1020 // BUT remoteMod != localMod
1021 1021
1022 1022
1023 if ( full && mode < SYNC_PREF_NEWEST ) 1023 if ( full && mode < SYNC_PREF_NEWEST )
1024 mode = SYNC_PREF_ASK; 1024 mode = SYNC_PREF_ASK;
1025 1025
1026 switch( mode ) { 1026 switch( mode ) {
1027 case SYNC_PREF_LOCAL: 1027 case SYNC_PREF_LOCAL:
1028 if ( lastSync > remoteMod ) 1028 if ( lastSync > remoteMod )
1029 return 1; 1029 return 1;
1030 if ( lastSync > localMod ) 1030 if ( lastSync > localMod )
1031 return 2; 1031 return 2;
1032 return 1; 1032 return 1;
1033 break; 1033 break;
1034 case SYNC_PREF_REMOTE: 1034 case SYNC_PREF_REMOTE:
1035 if ( lastSync > localMod ) 1035 if ( lastSync > localMod )
1036 return 2; 1036 return 2;
1037 if ( lastSync > remoteMod ) 1037 if ( lastSync > remoteMod )
1038 return 1; 1038 return 1;
1039 return 2; 1039 return 2;
1040 break; 1040 break;
1041 case SYNC_PREF_NEWEST: 1041 case SYNC_PREF_NEWEST:
1042 if ( localMod >= remoteMod ) 1042 if ( localMod >= remoteMod )
1043 return 1; 1043 return 1;
1044 else 1044 else
1045 return 2; 1045 return 2;
1046 break; 1046 break;
1047 case SYNC_PREF_ASK: 1047 case SYNC_PREF_ASK:
1048 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 1048 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
1049 if ( lastSync > remoteMod && lastSync > localMod) 1049 if ( lastSync > remoteMod && lastSync > localMod)
1050 return 0; 1050 return 0;
1051 if ( lastSync > remoteMod ) 1051 if ( lastSync > remoteMod )
1052 return 1; 1052 return 1;
1053 if ( lastSync > localMod ) 1053 if ( lastSync > localMod )
1054 return 2; 1054 return 2;
1055 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 1055 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
1056 localIsNew = localMod >= remoteMod; 1056 localIsNew = localMod >= remoteMod;
1057 if ( localIsNew ) 1057 if ( localIsNew )
1058 getEventViewerDialog()->setColorMode( 1 ); 1058 getEventViewerDialog()->setColorMode( 1 );
1059 else 1059 else
1060 getEventViewerDialog()->setColorMode( 2 ); 1060 getEventViewerDialog()->setColorMode( 2 );
1061 getEventViewerDialog()->setIncidence(local); 1061 getEventViewerDialog()->setIncidence(local);
1062 if ( localIsNew ) 1062 if ( localIsNew )
1063 getEventViewerDialog()->setColorMode( 2 ); 1063 getEventViewerDialog()->setColorMode( 2 );
1064 else 1064 else
1065 getEventViewerDialog()->setColorMode( 1 ); 1065 getEventViewerDialog()->setColorMode( 1 );
1066 getEventViewerDialog()->addIncidence(remote); 1066 getEventViewerDialog()->addIncidence(remote);
1067 getEventViewerDialog()->setColorMode( 0 ); 1067 getEventViewerDialog()->setColorMode( 0 );
1068 //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() ); 1068 //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() );
1069 getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!")); 1069 getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!"));
1070 getEventViewerDialog()->showMe(); 1070 getEventViewerDialog()->showMe();
1071 result = getEventViewerDialog()->executeS( localIsNew ); 1071 result = getEventViewerDialog()->executeS( localIsNew );
1072 return result; 1072 return result;
1073 1073
1074 break; 1074 break;
1075 case SYNC_PREF_FORCE_LOCAL: 1075 case SYNC_PREF_FORCE_LOCAL:
1076 return 1; 1076 return 1;
1077 break; 1077 break;
1078 case SYNC_PREF_FORCE_REMOTE: 1078 case SYNC_PREF_FORCE_REMOTE:
1079 return 2; 1079 return 2;
1080 break; 1080 break;
1081 1081
1082 default: 1082 default:
1083 // SYNC_PREF_TAKE_BOTH not implemented 1083 // SYNC_PREF_TAKE_BOTH not implemented
1084 break; 1084 break;
1085 } 1085 }
1086 return 0; 1086 return 0;
1087} 1087}
1088Event* CalendarView::getLastSyncEvent() 1088Event* CalendarView::getLastSyncEvent()
1089{ 1089{
1090 Event* lse; 1090 Event* lse;
1091 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); 1091 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
1092 lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); 1092 lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice );
1093 if (!lse) { 1093 if (!lse) {
1094 lse = new Event(); 1094 lse = new Event();
1095 lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); 1095 lse->setUid( "last-syncEvent-"+mCurrentSyncDevice );
1096 QString sum = ""; 1096 QString sum = "";
1097 if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) 1097 if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) )
1098 sum = "E: "; 1098 sum = "E: ";
1099 lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); 1099 lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event"));
1100 lse->setDtStart( mLastCalendarSync ); 1100 lse->setDtStart( mLastCalendarSync );
1101 lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); 1101 lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) );
1102 lse->setCategories( i18n("SyncEvent") ); 1102 lse->setCategories( i18n("SyncEvent") );
1103 lse->setReadOnly( true ); 1103 lse->setReadOnly( true );
1104 mCalendar->addEvent( lse ); 1104 mCalendar->addEvent( lse );
1105 } 1105 }
1106 1106
1107 return lse; 1107 return lse;
1108 1108
1109} 1109}
1110 1110
1111// we check, if the to delete event has a id for a profile 1111// we check, if the to delete event has a id for a profile
1112// if yes, we set this id in the profile to delete 1112// if yes, we set this id in the profile to delete
1113void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) 1113void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete )
1114{ 1114{
1115 if ( lastSync.count() == 0 ) { 1115 if ( lastSync.count() == 0 ) {
1116 //qDebug(" lastSync.count() == 0"); 1116 //qDebug(" lastSync.count() == 0");
1117 return; 1117 return;
1118 } 1118 }
1119 if ( toDelete->typeID() == journalID ) 1119 if ( toDelete->typeID() == journalID )
1120 return; 1120 return;
1121 1121
1122 Event* eve = lastSync.first(); 1122 Event* eve = lastSync.first();
1123 1123
1124 while ( eve ) { 1124 while ( eve ) {
1125 QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name 1125 QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name
1126 if ( !id.isEmpty() ) { 1126 if ( !id.isEmpty() ) {
1127 QString des = eve->description(); 1127 QString des = eve->description();
1128 QString pref = "e"; 1128 QString pref = "e";
1129 if ( toDelete->typeID() == todoID ) 1129 if ( toDelete->typeID() == todoID )
1130 pref = "t"; 1130 pref = "t";
1131 des += pref+ id + ","; 1131 des += pref+ id + ",";
1132 eve->setReadOnly( false ); 1132 eve->setReadOnly( false );
1133 eve->setDescription( des ); 1133 eve->setDescription( des );
1134 //qDebug("setdes %s ", des.latin1()); 1134 //qDebug("setdes %s ", des.latin1());
1135 eve->setReadOnly( true ); 1135 eve->setReadOnly( true );
1136 } 1136 }
1137 eve = lastSync.next(); 1137 eve = lastSync.next();
1138 } 1138 }
1139 1139
1140} 1140}
1141void CalendarView::checkExternalId( Incidence * inc ) 1141void CalendarView::checkExternalId( Incidence * inc )
1142{ 1142{
1143 QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; 1143 QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ;
1144 checkExternSyncEvent( lastSync, inc ); 1144 checkExternSyncEvent( lastSync, inc );
1145 1145
1146} 1146}
1147bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) 1147bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode )
1148{ 1148{
1149 bool syncOK = true; 1149 bool syncOK = true;
1150 int addedEvent = 0; 1150 int addedEvent = 0;
1151 int addedEventR = 0; 1151 int addedEventR = 0;
1152 int deletedEventR = 0; 1152 int deletedEventR = 0;
1153 int deletedEventL = 0; 1153 int deletedEventL = 0;
1154 int changedLocal = 0; 1154 int changedLocal = 0;
1155 int changedRemote = 0; 1155 int changedRemote = 0;
1156 int filteredIN = 0; 1156 int filteredIN = 0;
1157 int filteredOUT = 0; 1157 int filteredOUT = 0;
1158 //QPtrList<Event> el = local->rawEvents(); 1158 //QPtrList<Event> el = local->rawEvents();
1159 Event* eventR; 1159 Event* eventR;
1160 QString uid; 1160 QString uid;
1161 int take; 1161 int take;
1162 Event* eventL; 1162 Event* eventL;
1163 Event* eventRSync; 1163 Event* eventRSync;
1164 Event* eventLSync; 1164 Event* eventLSync;
1165 clearAllViews(); 1165 clearAllViews();
1166 QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); 1166 QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents();
1167 QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); 1167 QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents();
1168 bool fullDateRange = false; 1168 bool fullDateRange = false;
1169 local->resetTempSyncStat(); 1169 local->resetTempSyncStat();
1170 mLastCalendarSync = QDateTime::currentDateTime(); 1170 mLastCalendarSync = QDateTime::currentDateTime();
1171 if ( mSyncManager->syncWithDesktop() ) { 1171 if ( mSyncManager->syncWithDesktop() ) {
1172 remote->resetPilotStat(1); 1172 remote->resetPilotStat(1);
1173 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 1173 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
1174 mLastCalendarSync = KSyncManager::mRequestedSyncEvent; 1174 mLastCalendarSync = KSyncManager::mRequestedSyncEvent;
1175 qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); 1175 qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() );
1176 } else { 1176 } else {
1177 qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); 1177 qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime ");
1178 } 1178 }
1179 } 1179 }
1180 QDateTime modifiedCalendar = mLastCalendarSync; 1180 QDateTime modifiedCalendar = mLastCalendarSync;
1181 eventLSync = getLastSyncEvent(); 1181 eventLSync = getLastSyncEvent();
1182 eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); 1182 eventR = remote->event("last-syncEvent-"+mCurrentSyncName );
1183 if ( eventR ) { 1183 if ( eventR ) {
1184 eventRSync = (Event*) eventR->clone(); 1184 eventRSync = (Event*) eventR->clone();
1185 remote->deleteEvent(eventR ); 1185 remote->deleteEvent(eventR );
1186 1186
1187 } else { 1187 } else {
1188 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { 1188 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) {
1189 eventRSync = (Event*)eventLSync->clone(); 1189 eventRSync = (Event*)eventLSync->clone();
1190 } else { 1190 } else {
1191 fullDateRange = true; 1191 fullDateRange = true;
1192 eventRSync = new Event(); 1192 eventRSync = new Event();
1193 eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); 1193 eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event"));
1194 eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); 1194 eventRSync->setUid("last-syncEvent-"+mCurrentSyncName );
1195 eventRSync->setDtStart( mLastCalendarSync ); 1195 eventRSync->setDtStart( mLastCalendarSync );
1196 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); 1196 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) );
1197 eventRSync->setCategories( i18n("SyncEvent") ); 1197 eventRSync->setCategories( i18n("SyncEvent") );
1198 } 1198 }
1199 } 1199 }
1200 if ( eventLSync->dtStart() == mLastCalendarSync ) 1200 if ( eventLSync->dtStart() == mLastCalendarSync )
1201 fullDateRange = true; 1201 fullDateRange = true;
1202 1202
1203 if ( ! fullDateRange ) { 1203 if ( ! fullDateRange ) {
1204 if ( eventLSync->dtStart() != eventRSync->dtStart() ) { 1204 if ( eventLSync->dtStart() != eventRSync->dtStart() ) {
1205 1205
1206 // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); 1206 // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() );
1207 //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); 1207 //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec());
1208 fullDateRange = true; 1208 fullDateRange = true;
1209 } 1209 }
1210 } 1210 }
1211 if ( mSyncManager->syncWithDesktop() ) { 1211 if ( mSyncManager->syncWithDesktop() ) {
1212 fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); 1212 fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync );
1213 } 1213 }
1214 if ( fullDateRange ) 1214 if ( fullDateRange )
1215 mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); 1215 mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365);
1216 else 1216 else
1217 mLastCalendarSync = eventLSync->dtStart(); 1217 mLastCalendarSync = eventLSync->dtStart();
1218 // for resyncing if own file has changed 1218 // for resyncing if own file has changed
1219 if ( mCurrentSyncDevice == "deleteaftersync" ) { 1219 if ( mCurrentSyncDevice == "deleteaftersync" ) {
1220 mLastCalendarSync = loadedFileVersion; 1220 mLastCalendarSync = loadedFileVersion;
1221 //qDebug("setting mLastCalendarSync "); 1221 //qDebug("setting mLastCalendarSync ");
1222 } 1222 }
1223 //qDebug("*************************** "); 1223 //qDebug("*************************** ");
1224 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); 1224 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange);
1225 QPtrList<Incidence> er = remote->rawIncidences(); 1225 QPtrList<Incidence> er = remote->rawIncidences();
1226 Incidence* inR = er.first(); 1226 Incidence* inR = er.first();
1227 Incidence* inL; 1227 Incidence* inL;
1228 QProgressBar bar( er.count(),0 ); 1228 QProgressBar bar( er.count(),0 );
1229 bar.setCaption (i18n("Syncing - close to abort!") ); 1229 bar.setCaption (i18n("Syncing - close to abort!") );
1230 1230
1231 // ************** setting up filter ************* 1231 // ************** setting up filter *************
1232 CalFilter *filterIN = 0; 1232 CalFilter *filterIN = 0;
1233 CalFilter *filterOUT = 0; 1233 CalFilter *filterOUT = 0;
1234 CalFilter *filter = mFilters.first(); 1234 CalFilter *filter = mFilters.first();
1235 while(filter) { 1235 while(filter) {
1236 if ( filter->name() == mSyncManager->mFilterInCal ) 1236 if ( filter->name() == mSyncManager->mFilterInCal )
1237 filterIN = filter; 1237 filterIN = filter;
1238 if ( filter->name() == mSyncManager->mFilterOutCal ) 1238 if ( filter->name() == mSyncManager->mFilterOutCal )
1239 filterOUT = filter; 1239 filterOUT = filter;
1240 filter = mFilters.next(); 1240 filter = mFilters.next();
1241 } 1241 }
1242 int w = 300; 1242 int w = 300;
1243 if ( QApplication::desktop()->width() < 320 ) 1243 if ( QApplication::desktop()->width() < 320 )
1244 w = 220; 1244 w = 220;
1245 int h = bar.sizeHint().height() ; 1245 int h = bar.sizeHint().height() ;
1246 int dw = QApplication::desktop()->width(); 1246 int dw = QApplication::desktop()->width();
1247 int dh = QApplication::desktop()->height(); 1247 int dh = QApplication::desktop()->height();
1248 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 1248 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
1249 bar.show(); 1249 bar.show();
1250 int modulo = (er.count()/10)+1; 1250 int modulo = (er.count()/10)+1;
1251 int incCounter = 0; 1251 int incCounter = 0;
1252 while ( inR ) { 1252 while ( inR ) {
1253 if ( ! bar.isVisible() ) 1253 if ( ! bar.isVisible() )
1254 return false; 1254 return false;
1255 if ( incCounter % modulo == 0 ) 1255 if ( incCounter % modulo == 0 )
1256 bar.setProgress( incCounter ); 1256 bar.setProgress( incCounter );
1257 ++incCounter; 1257 ++incCounter;
1258 uid = inR->uid(); 1258 uid = inR->uid();
1259 bool skipIncidence = false; 1259 bool skipIncidence = false;
1260 if ( uid.left(15) == QString("last-syncEvent-") ) 1260 if ( uid.left(15) == QString("last-syncEvent-") )
1261 skipIncidence = true; 1261 skipIncidence = true;
1262 QString idS; 1262 QString idS;
1263 qApp->processEvents(); 1263 qApp->processEvents();
1264 if ( !skipIncidence ) { 1264 if ( !skipIncidence ) {
1265 inL = local->incidence( uid ); 1265 inL = local->incidence( uid );
1266 if ( inL ) { // maybe conflict - same uid in both calendars 1266 if ( inL ) { // maybe conflict - same uid in both calendars
1267 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { 1267 if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) {
1268 //qDebug("take %d %s ", take, inL->summary().latin1()); 1268 //qDebug("take %d %s ", take, inL->summary().latin1());
1269 if ( take == 3 ) 1269 if ( take == 3 )
1270 return false; 1270 return false;
1271 if ( take == 1 ) {// take local ********************** 1271 if ( take == 1 ) {// take local **********************
1272 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) 1272 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
1273 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1273 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1274 else 1274 else
1275 idS = inR->IDStr(); 1275 idS = inR->IDStr();
1276 remote->deleteIncidence( inR ); 1276 remote->deleteIncidence( inR );
1277 inR = inL->clone(); 1277 inR = inL->clone();
1278 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1278 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1279 if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) 1279 if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL )
1280 inR->setIDStr( idS ); 1280 inR->setIDStr( idS );
1281 remote->addIncidence( inR ); 1281 remote->addIncidence( inR );
1282 if ( mSyncManager->syncWithDesktop() ) 1282 if ( mSyncManager->syncWithDesktop() )
1283 inR->setPilotId( 2 ); 1283 inR->setPilotId( 2 );
1284 ++changedRemote; 1284 ++changedRemote;
1285 } else {// take remote ********************** 1285 } else {// take remote **********************
1286 idS = inL->IDStr(); 1286 idS = inL->IDStr();
1287 int pid = inL->pilotId(); 1287 int pid = inL->pilotId();
1288 local->deleteIncidence( inL ); 1288 local->deleteIncidence( inL );
1289 inL = inR->clone(); 1289 inL = inR->clone();
1290 if ( mSyncManager->syncWithDesktop() ) 1290 if ( mSyncManager->syncWithDesktop() )
1291 inL->setPilotId( pid ); 1291 inL->setPilotId( pid );
1292 inL->setIDStr( idS ); 1292 inL->setIDStr( idS );
1293 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1293 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1294 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1294 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1295 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); 1295 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
1296 } 1296 }
1297 local->addIncidence( inL ); 1297 local->addIncidence( inL );
1298 ++changedLocal; 1298 ++changedLocal;
1299 } 1299 }
1300 } 1300 }
1301 } else { // no conflict ********** add or delete remote 1301 } else { // no conflict ********** add or delete remote
1302 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ 1302 if ( !filterIN || filterIN->filterCalendarItem( inR ) ){
1303 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1303 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1304 QString des = eventLSync->description(); 1304 QString des = eventLSync->description();
1305 QString pref = "e"; 1305 QString pref = "e";
1306 if ( inR->typeID() == todoID ) 1306 if ( inR->typeID() == todoID )
1307 pref = "t"; 1307 pref = "t";
1308 if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it 1308 if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
1309 inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); 1309 inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE );
1310 //remote->deleteIncidence( inR ); 1310 //remote->deleteIncidence( inR );
1311 ++deletedEventR; 1311 ++deletedEventR;
1312 } else { 1312 } else {
1313 inR->setLastModified( modifiedCalendar ); 1313 inR->setLastModified( modifiedCalendar );
1314 inL = inR->clone(); 1314 inL = inR->clone();
1315 inL->setIDStr( ":" ); 1315 inL->setIDStr( ":" );
1316 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); 1316 inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
1317 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); 1317 inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
1318 local->addIncidence( inL ); 1318 local->addIncidence( inL );
1319 ++addedEvent; 1319 ++addedEvent;
1320 1320
1321 } 1321 }
1322 } else { 1322 } else {
1323 if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { 1323 if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) {
1324 inR->setLastModified( modifiedCalendar ); 1324 inR->setLastModified( modifiedCalendar );
1325 inL = inR->clone(); 1325 inL = inR->clone();
1326 inL->setIDStr( ":" ); 1326 inL->setIDStr( ":" );
1327 local->addIncidence( inL ); 1327 local->addIncidence( inL );
1328 ++addedEvent; 1328 ++addedEvent;
1329 1329
1330 } else { 1330 } else {
1331 checkExternSyncEvent(eventRSyncSharp, inR); 1331 checkExternSyncEvent(eventRSyncSharp, inR);
1332 remote->deleteIncidence( inR ); 1332 remote->deleteIncidence( inR );
1333 ++deletedEventR; 1333 ++deletedEventR;
1334 } 1334 }
1335 } 1335 }
1336 } else { 1336 } else {
1337 ++filteredIN; 1337 ++filteredIN;
1338 } 1338 }
1339 } 1339 }
1340 } 1340 }
1341 inR = er.next(); 1341 inR = er.next();
1342 } 1342 }
1343 QPtrList<Incidence> el = local->rawIncidences(); 1343 QPtrList<Incidence> el = local->rawIncidences();
1344 inL = el.first(); 1344 inL = el.first();
1345 modulo = (el.count()/10)+1; 1345 modulo = (el.count()/10)+1;
1346 bar.setCaption (i18n("Add / remove events") ); 1346 bar.setCaption (i18n("Add / remove events") );
1347 bar.setTotalSteps ( el.count() ) ; 1347 bar.setTotalSteps ( el.count() ) ;
1348 bar.show(); 1348 bar.show();
1349 incCounter = 0; 1349 incCounter = 0;
1350 1350
1351 while ( inL ) { 1351 while ( inL ) {
1352 1352
1353 qApp->processEvents(); 1353 qApp->processEvents();
1354 if ( ! bar.isVisible() ) 1354 if ( ! bar.isVisible() )
1355 return false; 1355 return false;
1356 if ( incCounter % modulo == 0 ) 1356 if ( incCounter % modulo == 0 )
1357 bar.setProgress( incCounter ); 1357 bar.setProgress( incCounter );
1358 ++incCounter; 1358 ++incCounter;
1359 uid = inL->uid(); 1359 uid = inL->uid();
1360 bool skipIncidence = false; 1360 bool skipIncidence = false;
1361 if ( uid.left(15) == QString("last-syncEvent-") ) 1361 if ( uid.left(15) == QString("last-syncEvent-") )
1362 skipIncidence = true; 1362 skipIncidence = true;
1363 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID ) 1363 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID )
1364 skipIncidence = true; 1364 skipIncidence = true;
1365 if ( !skipIncidence ) { 1365 if ( !skipIncidence ) {
1366 inR = remote->incidence( uid ); 1366 inR = remote->incidence( uid );
1367 if ( ! inR ) { 1367 if ( ! inR ) {
1368 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ 1368 if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
1369 // no conflict ********** add or delete local 1369 // no conflict ********** add or delete local
1370 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 1370 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
1371 if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { 1371 if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {
1372 checkExternSyncEvent(eventLSyncSharp, inL); 1372 checkExternSyncEvent(eventLSyncSharp, inL);
1373 local->deleteIncidence( inL ); 1373 local->deleteIncidence( inL );
1374 ++deletedEventL; 1374 ++deletedEventL;
1375 } else { 1375 } else {
1376 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1376 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1377 inL->removeID(mCurrentSyncDevice ); 1377 inL->removeID(mCurrentSyncDevice );
1378 ++addedEventR; 1378 ++addedEventR;
1379 //qDebug("remote added Incidence %s ", inL->summary().latin1()); 1379 //qDebug("remote added Incidence %s ", inL->summary().latin1());
1380 inL->setLastModified( modifiedCalendar ); 1380 inL->setLastModified( modifiedCalendar );
1381 inR = inL->clone(); 1381 inR = inL->clone();
1382 inR->setIDStr( ":" ); 1382 inR->setIDStr( ":" );
1383 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 1383 inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
1384 remote->addIncidence( inR ); 1384 remote->addIncidence( inR );
1385 } 1385 }
1386 } 1386 }
1387 } else { 1387 } else {
1388 if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { 1388 if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) {
1389 checkExternSyncEvent(eventLSyncSharp, inL); 1389 checkExternSyncEvent(eventLSyncSharp, inL);
1390 local->deleteIncidence( inL ); 1390 local->deleteIncidence( inL );
1391 ++deletedEventL; 1391 ++deletedEventL;
1392 } else { 1392 } else {
1393 if ( ! mSyncManager->mWriteBackExistingOnly ) { 1393 if ( ! mSyncManager->mWriteBackExistingOnly ) {
1394 ++addedEventR; 1394 ++addedEventR;
1395 inL->setLastModified( modifiedCalendar ); 1395 inL->setLastModified( modifiedCalendar );
1396 inR = inL->clone(); 1396 inR = inL->clone();
1397 inR->setIDStr( ":" ); 1397 inR->setIDStr( ":" );
1398 remote->addIncidence( inR ); 1398 remote->addIncidence( inR );
1399 } 1399 }
1400 } 1400 }
1401 } 1401 }
1402 } else { 1402 } else {
1403 ++filteredOUT; 1403 ++filteredOUT;
1404 } 1404 }
1405 } 1405 }
1406 } 1406 }
1407 inL = el.next(); 1407 inL = el.next();
1408 } 1408 }
1409 int delFut = 0; 1409 int delFut = 0;
1410 int remRem = 0; 1410 int remRem = 0;
1411 if ( mSyncManager->mWriteBackInFuture ) { 1411 if ( mSyncManager->mWriteBackInFuture ) {
1412 er = remote->rawIncidences(); 1412 er = remote->rawIncidences();
1413 remRem = er.count(); 1413 remRem = er.count();
1414 inR = er.first(); 1414 inR = er.first();
1415 QDateTime dt; 1415 QDateTime dt;
1416 QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); 1416 QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) );
1417 QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); 1417 QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 );
1418 while ( inR ) { 1418 while ( inR ) {
1419 if ( inR->typeID() == todoID ) { 1419 if ( inR->typeID() == todoID ) {
1420 Todo * t = (Todo*)inR; 1420 Todo * t = (Todo*)inR;
1421 if ( t->hasDueDate() ) 1421 if ( t->hasDueDate() )
1422 dt = t->dtDue(); 1422 dt = t->dtDue();
1423 else 1423 else
1424 dt = cur.addSecs( 62 ); 1424 dt = cur.addSecs( 62 );
1425 } 1425 }
1426 else if (inR->typeID() == eventID ) { 1426 else if (inR->typeID() == eventID ) {
1427 bool ok; 1427 bool ok;
1428 dt = inR->getNextOccurence( cur, &ok ); 1428 dt = inR->getNextOccurence( cur, &ok );
1429 if ( !ok ) 1429 if ( !ok )
1430 dt = cur.addSecs( -62 ); 1430 dt = cur.addSecs( -62 );
1431 } 1431 }
1432 else 1432 else
1433 dt = inR->dtStart(); 1433 dt = inR->dtStart();
1434 if ( dt < cur || dt > end ) { 1434 if ( dt < cur || dt > end ) {
1435 remote->deleteIncidence( inR ); 1435 remote->deleteIncidence( inR );
1436 ++delFut; 1436 ++delFut;
1437 } 1437 }
1438 inR = er.next(); 1438 inR = er.next();
1439 } 1439 }
1440 } 1440 }
1441 bar.hide(); 1441 bar.hide();
1442 mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); 1442 mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 );
1443 eventLSync->setReadOnly( false ); 1443 eventLSync->setReadOnly( false );
1444 eventLSync->setDtStart( mLastCalendarSync ); 1444 eventLSync->setDtStart( mLastCalendarSync );
1445 eventRSync->setDtStart( mLastCalendarSync ); 1445 eventRSync->setDtStart( mLastCalendarSync );
1446 eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); 1446 eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
1447 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); 1447 eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
1448 eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; 1448 eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ;
1449 eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); 1449 eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName );
1450 eventLSync->setReadOnly( true ); 1450 eventLSync->setReadOnly( true );
1451 qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); 1451 qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL );
1452 if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... 1452 if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal...
1453 remote->addEvent( eventRSync ); 1453 remote->addEvent( eventRSync );
1454 else 1454 else
1455 delete eventRSync; 1455 delete eventRSync;
1456 qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); 1456 qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() );
1457 QString mes; 1457 QString mes;
1458 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 ); 1458 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 );
1459 QString delmess; 1459 QString delmess;
1460 if ( delFut ) { 1460 if ( delFut ) {
1461 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); 1461 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);
1462 mes += delmess; 1462 mes += delmess;
1463 } 1463 }
1464 mes = i18n("Local calendar changed!\n") +mes; 1464 mes = i18n("Local calendar changed!\n") +mes;
1465 mCalendar->checkAlarmForIncidence( 0, true ); 1465 mCalendar->checkAlarmForIncidence( 0, true );
1466 qDebug( mes ); 1466 qDebug( mes );
1467 if ( mSyncManager->mShowSyncSummary ) { 1467 if ( mSyncManager->mShowSyncSummary ) {
1468 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, 1468 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
1469 i18n("KO/Pi Synchronization"),i18n("Write back"))) { 1469 i18n("KO/Pi Synchronization"),i18n("Write back"))) {
1470 qDebug("KO: WB cancelled "); 1470 qDebug("KO: WB cancelled ");
1471 mSyncManager->mWriteBackFile = false; 1471 mSyncManager->mWriteBackFile = false;
1472 return syncOK; 1472 return syncOK;
1473 } 1473 }
1474 } 1474 }
1475 return syncOK; 1475 return syncOK;
1476} 1476}
1477 1477
1478void CalendarView::setSyncDevice( QString s ) 1478void CalendarView::setSyncDevice( QString s )
1479{ 1479{
1480 mCurrentSyncDevice= s; 1480 mCurrentSyncDevice= s;
1481} 1481}
1482void CalendarView::setSyncName( QString s ) 1482void CalendarView::setSyncName( QString s )
1483{ 1483{
1484 mCurrentSyncName= s; 1484 mCurrentSyncName= s;
1485} 1485}
1486bool CalendarView::syncCalendar(QString filename, int mode) 1486bool CalendarView::syncCalendar(QString filename, int mode)
1487{ 1487{
1488 //qDebug("syncCalendar %s ", filename.latin1()); 1488 //qDebug("syncCalendar %s ", filename.latin1());
1489 mGlobalSyncMode = SYNC_MODE_NORMAL; 1489 mGlobalSyncMode = SYNC_MODE_NORMAL;
1490 CalendarLocal* calendar = new CalendarLocal(); 1490 CalendarLocal* calendar = new CalendarLocal();
1491 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 1491 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1492 FileStorage* storage = new FileStorage( calendar ); 1492 FileStorage* storage = new FileStorage( calendar );
1493 bool syncOK = false; 1493 bool syncOK = false;
1494 storage->setFileName( filename ); 1494 storage->setFileName( filename );
1495 // qDebug("loading ... "); 1495 // qDebug("loading ... ");
1496 if ( storage->load() ) { 1496 if ( storage->load() ) {
1497 getEventViewerDialog()->setSyncMode( true ); 1497 getEventViewerDialog()->setSyncMode( true );
1498 syncOK = synchronizeCalendar( mCalendar, calendar, mode ); 1498 syncOK = synchronizeCalendar( mCalendar, calendar, mode );
1499 getEventViewerDialog()->setSyncMode( false ); 1499 getEventViewerDialog()->setSyncMode( false );
1500 if ( syncOK ) { 1500 if ( syncOK ) {
1501 if ( mSyncManager->mWriteBackFile ) 1501 if ( mSyncManager->mWriteBackFile )
1502 { 1502 {
1503 storage->setSaveFormat( new ICalFormat() ); 1503 storage->setSaveFormat( new ICalFormat() );
1504 storage->save(); 1504 storage->save();
1505 } 1505 }
1506 } 1506 }
1507 setModified( true ); 1507 setModified( true );
1508 } 1508 }
1509 delete storage; 1509 delete storage;
1510 delete calendar; 1510 delete calendar;
1511 if ( syncOK ) 1511 if ( syncOK )
1512 updateView(); 1512 updateView();
1513 return syncOK; 1513 return syncOK;
1514} 1514}
1515 1515
1516void CalendarView::syncExternal( int mode ) 1516void CalendarView::syncExternal( int mode )
1517{ 1517{
1518 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 1518 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
1519 1519
1520 qApp->processEvents(); 1520 qApp->processEvents();
1521 CalendarLocal* calendar = new CalendarLocal(); 1521 CalendarLocal* calendar = new CalendarLocal();
1522 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 1522 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1523 bool syncOK = false; 1523 bool syncOK = false;
1524 bool loadSuccess = false; 1524 bool loadSuccess = false;
1525 PhoneFormat* phoneFormat = 0; 1525 PhoneFormat* phoneFormat = 0;
1526 emit tempDisableBR(true); 1526 emit tempDisableBR(true);
1527#ifndef DESKTOP_VERSION 1527#ifndef DESKTOP_VERSION
1528 SharpFormat* sharpFormat = 0; 1528 SharpFormat* sharpFormat = 0;
1529 if ( mode == 0 ) { // sharp 1529 if ( mode == 0 ) { // sharp
1530 sharpFormat = new SharpFormat () ; 1530 sharpFormat = new SharpFormat () ;
1531 loadSuccess = sharpFormat->load( calendar, mCalendar ); 1531 loadSuccess = sharpFormat->load( calendar, mCalendar );
1532 1532
1533 } else 1533 } else
1534#endif 1534#endif
1535 if ( mode == 1 ) { // phone 1535 if ( mode == 1 ) { // phone
1536 phoneFormat = new PhoneFormat (mCurrentSyncDevice, 1536 phoneFormat = new PhoneFormat (mCurrentSyncDevice,
1537 mSyncManager->mPhoneDevice, 1537 mSyncManager->mPhoneDevice,
1538 mSyncManager->mPhoneConnection, 1538 mSyncManager->mPhoneConnection,
1539 mSyncManager->mPhoneModel); 1539 mSyncManager->mPhoneModel);
1540 loadSuccess = phoneFormat->load( calendar,mCalendar); 1540 loadSuccess = phoneFormat->load( calendar,mCalendar);
1541 1541
1542 } else { 1542 } else {
1543 emit tempDisableBR(false); 1543 emit tempDisableBR(false);
1544 return; 1544 return;
1545 } 1545 }
1546 if ( loadSuccess ) { 1546 if ( loadSuccess ) {
1547 getEventViewerDialog()->setSyncMode( true ); 1547 getEventViewerDialog()->setSyncMode( true );
1548 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); 1548 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs );
1549 getEventViewerDialog()->setSyncMode( false ); 1549 getEventViewerDialog()->setSyncMode( false );
1550 qApp->processEvents(); 1550 qApp->processEvents();
1551 if ( syncOK ) { 1551 if ( syncOK ) {
1552 if ( mSyncManager->mWriteBackFile ) 1552 if ( mSyncManager->mWriteBackFile )
1553 { 1553 {
1554 QPtrList<Incidence> iL = mCalendar->rawIncidences(); 1554 QPtrList<Incidence> iL = mCalendar->rawIncidences();
1555 Incidence* inc = iL.first(); 1555 Incidence* inc = iL.first();
1556 if ( phoneFormat ) { 1556 if ( phoneFormat ) {
1557 while ( inc ) { 1557 while ( inc ) {
1558 inc->removeID(mCurrentSyncDevice); 1558 inc->removeID(mCurrentSyncDevice);
1559 inc = iL.next(); 1559 inc = iL.next();
1560 } 1560 }
1561 } 1561 }
1562#ifndef DESKTOP_VERSION 1562#ifndef DESKTOP_VERSION
1563 if ( sharpFormat ) 1563 if ( sharpFormat )
1564 sharpFormat->save(calendar); 1564 sharpFormat->save(calendar);
1565#endif 1565#endif
1566 if ( phoneFormat ) 1566 if ( phoneFormat )
1567 phoneFormat->save(calendar); 1567 phoneFormat->save(calendar);
1568 iL = calendar->rawIncidences(); 1568 iL = calendar->rawIncidences();
1569 inc = iL.first(); 1569 inc = iL.first();
1570 Incidence* loc; 1570 Incidence* loc;
1571 while ( inc ) { 1571 while ( inc ) {
1572 if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { 1572 if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) {
1573 loc = mCalendar->incidence(inc->uid() ); 1573 loc = mCalendar->incidence(inc->uid() );
1574 if ( loc ) { 1574 if ( loc ) {
1575 loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); 1575 loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) );
1576 loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); 1576 loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) );
1577 } 1577 }
1578 } 1578 }
1579 inc = iL.next(); 1579 inc = iL.next();
1580 } 1580 }
1581 Incidence* lse = getLastSyncEvent(); 1581 Incidence* lse = getLastSyncEvent();
1582 if ( lse ) { 1582 if ( lse ) {
1583 lse->setReadOnly( false ); 1583 lse->setReadOnly( false );
1584 lse->setDescription( "" ); 1584 lse->setDescription( "" );
1585 lse->setReadOnly( true ); 1585 lse->setReadOnly( true );
1586 } 1586 }
1587 } 1587 }
1588 } else { 1588 } else {
1589 topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); 1589 topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") );
1590 } 1590 }
1591 setModified( true ); 1591 setModified( true );
1592 } else { 1592 } else {
1593 QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; 1593 QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ;
1594 QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), 1594 QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"),
1595 question, i18n("Ok")) ; 1595 question, i18n("Ok")) ;
1596 1596
1597 } 1597 }
1598 delete calendar; 1598 delete calendar;
1599 updateView(); 1599 updateView();
1600 emit tempDisableBR(false); 1600 emit tempDisableBR(false);
1601 return ;//syncOK; 1601 return ;//syncOK;
1602 1602
1603} 1603}
1604 1604
1605bool CalendarView::importBday() 1605bool CalendarView::importBday()
1606{ 1606{
1607#ifndef KORG_NOKABC 1607#ifndef KORG_NOKABC
1608 1608
1609#ifdef DESKTOP_VERSION 1609#ifdef DESKTOP_VERSION
1610 int curCal = mCalendar->defaultCalendar();
1611 int bd = mCalEditView->getBirtdayID();
1612 if ( bd == 0 )
1613 return;
1614 mCalendar->setDefaultCalendar( bd );
1610 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); 1615 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
1611 KABC::AddressBook::Iterator it; 1616 KABC::AddressBook::Iterator it;
1612 int count = 0; 1617 int count = 0;
1613 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 1618 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
1614 ++count; 1619 ++count;
1615 } 1620 }
1616 QProgressBar bar(count,0 ); 1621 QProgressBar bar(count,0 );
1617 int w = 300; 1622 int w = 300;
1618 if ( QApplication::desktop()->width() < 320 ) 1623 if ( QApplication::desktop()->width() < 320 )
1619 w = 220; 1624 w = 220;
1620 int h = bar.sizeHint().height() ; 1625 int h = bar.sizeHint().height() ;
1621 int dw = QApplication::desktop()->width(); 1626 int dw = QApplication::desktop()->width();
1622 int dh = QApplication::desktop()->height(); 1627 int dh = QApplication::desktop()->height();
1623 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 1628 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
1624 bar.show(); 1629 bar.show();
1625 bar.setCaption (i18n("Reading addressbook - close to abort!") ); 1630 bar.setCaption (i18n("Reading addressbook - close to abort!") );
1626 qApp->processEvents(); 1631 qApp->processEvents();
1627 count = 0; 1632 count = 0;
1628 int addCount = 0; 1633 int addCount = 0;
1629 KCal::Attendee* a = 0; 1634 KCal::Attendee* a = 0;
1630 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 1635 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
1631 if ( ! bar.isVisible() ) 1636 if ( ! bar.isVisible() )
1632 return false; 1637 return false;
1633 bar.setProgress( count++ ); 1638 bar.setProgress( count++ );
1634 qApp->processEvents(); 1639 qApp->processEvents();
1635 //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); 1640 //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() );
1636 if ( (*it).birthday().date().isValid() ){ 1641 if ( (*it).birthday().date().isValid() ){
1637 a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; 1642 a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ;
1638 if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) 1643 if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) )
1639 ++addCount; 1644 ++addCount;
1640 } 1645 }
1641 QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); 1646 QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d");
1642 if ( anni.isValid() ){ 1647 if ( anni.isValid() ){
1643 a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; 1648 a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ;
1644 if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) 1649 if ( addAnniversary( anni, (*it).assembledName(), a, false ) )
1645 ++addCount; 1650 ++addCount;
1646 } 1651 }
1647 } 1652 }
1653 mCalendar->setDefaultCalendar( curCal );
1648 updateView(); 1654 updateView();
1649 topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); 1655 topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!"));
1650#else //DESKTOP_VERSION 1656#else //DESKTOP_VERSION
1651 1657
1652 ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); 1658 ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
1653 // the result should now arrive through method insertBirthdays 1659 // the result should now arrive through method insertBirthdays
1654 1660
1655#endif //DESKTOP_VERSION 1661#endif //DESKTOP_VERSION
1656 1662
1657#endif //KORG_NOKABC 1663#endif //KORG_NOKABC
1658 1664
1659 1665
1660 return true; 1666 return true;
1661} 1667}
1662 1668
1663// This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI 1669// This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI
1664void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, 1670void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList,
1665 const QStringList& anniversaryList, const QStringList& realNameList, 1671 const QStringList& anniversaryList, const QStringList& realNameList,
1666 const QStringList& emailList, const QStringList& assembledNameList, 1672 const QStringList& emailList, const QStringList& assembledNameList,
1667 const QStringList& uidList) 1673 const QStringList& uidList)
1668{ 1674{
1675
1669 //qDebug("KO::CalendarView::insertBirthdays"); 1676 //qDebug("KO::CalendarView::insertBirthdays");
1670 if (uid == this->name()) 1677 if (uid == this->name())
1671 { 1678 {
1679 int curCal = mCalendar->defaultCalendar();
1680 int bd = mCalEditView->getBirtdayID();
1681 if ( bd == 0 )
1682 return;
1683 mCalendar->setDefaultCalendar( bd );
1684
1685
1672 int count = birthdayList.count(); 1686 int count = birthdayList.count();
1673 int addCount = 0; 1687 int addCount = 0;
1674 KCal::Attendee* a = 0; 1688 KCal::Attendee* a = 0;
1675 1689
1676 //qDebug("CalView 1 %i", count); 1690 //qDebug("CalView 1 %i", count);
1677 1691
1678 QProgressBar bar(count,0 ); 1692 QProgressBar bar(count,0 );
1679 int w = 300; 1693 int w = 300;
1680 if ( QApplication::desktop()->width() < 320 ) 1694 if ( QApplication::desktop()->width() < 320 )
1681 w = 220; 1695 w = 220;
1682 int h = bar.sizeHint().height() ; 1696 int h = bar.sizeHint().height() ;
1683 int dw = QApplication::desktop()->width(); 1697 int dw = QApplication::desktop()->width();
1684 int dh = QApplication::desktop()->height(); 1698 int dh = QApplication::desktop()->height();
1685 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 1699 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
1686 bar.show(); 1700 bar.show();
1687 bar.setCaption (i18n("inserting birthdays - close to abort!") ); 1701 bar.setCaption (i18n("inserting birthdays - close to abort!") );
1688 qApp->processEvents(); 1702 qApp->processEvents();
1689 1703
1690 QDate birthday; 1704 QDate birthday;
1691 QDate anniversary; 1705 QDate anniversary;
1692 QString realName; 1706 QString realName;
1693 QString email; 1707 QString email;
1694 QString assembledName; 1708 QString assembledName;
1695 QString uid; 1709 QString uid;
1696 bool ok = true; 1710 bool ok = true;
1697 for ( int i = 0; i < count; i++) 1711 for ( int i = 0; i < count; i++)
1698 { 1712 {
1699 if ( ! bar.isVisible() ) 1713 if ( ! bar.isVisible() )
1700 return; 1714 return;
1701 bar.setProgress( i ); 1715 bar.setProgress( i );
1702 qApp->processEvents(); 1716 qApp->processEvents();
1703 1717
1704 birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); 1718 birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok);
1705 if (!ok) { 1719 if (!ok) {
1706 ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); 1720 ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1());
1707 } 1721 }
1708 1722
1709 anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); 1723 anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok);
1710 if (!ok) { 1724 if (!ok) {
1711 ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); 1725 ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1());
1712 } 1726 }
1713 realName = realNameList[i]; 1727 realName = realNameList[i];
1714 email = emailList[i]; 1728 email = emailList[i];
1715 assembledName = assembledNameList[i]; 1729 assembledName = assembledNameList[i];
1716 uid = uidList[i]; 1730 uid = uidList[i];
1717 //qDebug("insert birthday in KO/Pi: %s,%s,%s,%s: %s, %s", realName.latin1(), email.latin1(), assembledName.latin1(), uid.latin1(), birthdayList[i].latin1(), anniversaryList[i].latin1() ); 1731 //qDebug("insert birthday in KO/Pi: %s,%s,%s,%s: %s, %s", realName.latin1(), email.latin1(), assembledName.latin1(), uid.latin1(), birthdayList[i].latin1(), anniversaryList[i].latin1() );
1718 1732
1719 if ( birthday.isValid() ){ 1733 if ( birthday.isValid() ){
1720 a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, 1734 a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction,
1721 KCal::Attendee::ReqParticipant,uid) ; 1735 KCal::Attendee::ReqParticipant,uid) ;
1722 if ( addAnniversary( birthday, assembledName, a, true ) ) 1736 if ( addAnniversary( birthday, assembledName, a, true ) )
1723 ++addCount; 1737 ++addCount;
1724 } 1738 }
1725 1739
1726 if ( anniversary.isValid() ){ 1740 if ( anniversary.isValid() ){
1727 a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, 1741 a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction,
1728 KCal::Attendee::ReqParticipant,uid) ; 1742 KCal::Attendee::ReqParticipant,uid) ;
1729 if ( addAnniversary( anniversary, assembledName, a, false ) ) 1743 if ( addAnniversary( anniversary, assembledName, a, false ) )
1730 ++addCount; 1744 ++addCount;
1731 } 1745 }
1732 } 1746 }
1733 1747
1748 mCalendar->setDefaultCalendar( curCal );
1734 updateView(); 1749 updateView();
1735 topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); 1750 topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!"));
1736 1751
1737 } 1752 }
1738 1753
1739} 1754}
1740 1755
1741 1756
1742 1757
1743bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) 1758bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday)
1744{ 1759{
1745 //qDebug("addAnni "); 1760 //qDebug("addAnni ");
1746 Event * ev = new Event(); 1761 Event * ev = new Event();
1747 ev->setOrganizer(KOPrefs::instance()->email()); 1762 ev->setOrganizer(KOPrefs::instance()->email());
1748 if ( a ) { 1763 if ( a ) {
1749 ev->addAttendee( a ); 1764 ev->addAttendee( a );
1750 } 1765 }
1751 QString kind; 1766 QString kind;
1752 if ( birthday ) { 1767 if ( birthday ) {
1753 kind = i18n( "Birthday" ); 1768 kind = i18n( "Birthday" );
1754 ev->setSummary( name + " (" + QString::number(date.year()) +")"); 1769 ev->setSummary( name + " (" + QString::number(date.year()) +")");
1755 } 1770 }
1756 else { 1771 else {
1757 kind = i18n( "Anniversary" ); 1772 kind = i18n( "Anniversary" );
1758 ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); 1773 ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind );
1759 } 1774 }
1760 ev->setCategories( kind ); 1775 ev->setCategories( kind );
1761 ev->setDtStart( QDateTime(date) ); 1776 ev->setDtStart( QDateTime(date) );
1762 ev->setDtEnd( QDateTime(date) ); 1777 ev->setDtEnd( QDateTime(date) );
1763 ev->setFloats( true ); 1778 ev->setFloats( true );
1764 Recurrence * rec = ev->recurrence(); 1779 Recurrence * rec = ev->recurrence();
1765 rec->setYearly(Recurrence::rYearlyMonth,1,-1); 1780 rec->setYearly(Recurrence::rYearlyMonth,1,-1);
1766 rec->addYearlyNum( date.month() ); 1781 rec->addYearlyNum( date.month() );
1767 if ( !mCalendar->addAnniversaryNoDup( ev ) ) { 1782 if ( !mCalendar->addAnniversaryNoDup( ev ) ) {
1768 delete ev; 1783 delete ev;
1769 return false; 1784 return false;
1770 } 1785 }
1771 return true; 1786 return true;
1772 1787
1773} 1788}
1774bool CalendarView::importQtopia( const QString &categories, 1789bool CalendarView::importQtopia( const QString &categories,
1775 const QString &datebook, 1790 const QString &datebook,
1776 const QString &todolist ) 1791 const QString &todolist )
1777{ 1792{
1778 1793
1779 QtopiaFormat qtopiaFormat; 1794 QtopiaFormat qtopiaFormat;
1780 qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); 1795 qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories));
1781 if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); 1796 if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories );
1782 if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); 1797 if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook );
1783 if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); 1798 if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist );
1784 1799
1785 updateView(); 1800 updateView();
1786 return true; 1801 return true;
1787 1802
1788#if 0 1803#if 0
1789 mGlobalSyncMode = SYNC_MODE_QTOPIA; 1804 mGlobalSyncMode = SYNC_MODE_QTOPIA;
1790 mCurrentSyncDevice = "qtopia-XML"; 1805 mCurrentSyncDevice = "qtopia-XML";
1791 if ( mSyncManager->mAskForPreferences ) 1806 if ( mSyncManager->mAskForPreferences )
1792 edit_sync_options(); 1807 edit_sync_options();
1793 qApp->processEvents(); 1808 qApp->processEvents();
1794 CalendarLocal* calendar = new CalendarLocal(); 1809 CalendarLocal* calendar = new CalendarLocal();
1795 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 1810 calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
1796 bool syncOK = false; 1811 bool syncOK = false;
1797 QtopiaFormat qtopiaFormat; 1812 QtopiaFormat qtopiaFormat;
1798 qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); 1813 qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories));
1799 bool loadOk = true; 1814 bool loadOk = true;
1800 if ( !categories.isEmpty() ) 1815 if ( !categories.isEmpty() )
1801 loadOk = qtopiaFormat.load( calendar, categories ); 1816 loadOk = qtopiaFormat.load( calendar, categories );
1802 if ( loadOk && !datebook.isEmpty() ) 1817 if ( loadOk && !datebook.isEmpty() )
1803 loadOk = qtopiaFormat.load( calendar, datebook ); 1818 loadOk = qtopiaFormat.load( calendar, datebook );
1804 if ( loadOk && !todolist.isEmpty() ) 1819 if ( loadOk && !todolist.isEmpty() )
1805 loadOk = qtopiaFormat.load( calendar, todolist ); 1820 loadOk = qtopiaFormat.load( calendar, todolist );
1806 1821
1807 if ( loadOk ) { 1822 if ( loadOk ) {
1808 getEventViewerDialog()->setSyncMode( true ); 1823 getEventViewerDialog()->setSyncMode( true );
1809 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); 1824 syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs );
1810 getEventViewerDialog()->setSyncMode( false ); 1825 getEventViewerDialog()->setSyncMode( false );
1811 qApp->processEvents(); 1826 qApp->processEvents();
1812 if ( syncOK ) { 1827 if ( syncOK ) {
1813 if ( mSyncManager->mWriteBackFile ) 1828 if ( mSyncManager->mWriteBackFile )
1814 { 1829 {
1815 // write back XML file 1830 // write back XML file
1816 1831
1817 } 1832 }
1818 setModified( true ); 1833 setModified( true );
1819 } 1834 }
1820 } else { 1835 } else {
1821 QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; 1836 QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ;
1822 QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), 1837 QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"),
1823 question, i18n("Ok")) ; 1838 question, i18n("Ok")) ;
1824 } 1839 }
1825 delete calendar; 1840 delete calendar;
1826 updateView(); 1841 updateView();
1827 return syncOK; 1842 return syncOK;
1828 1843
1829 1844
1830#endif 1845#endif
1831 1846
1832} 1847}
1833 1848
1834void CalendarView::setSyncEventsReadOnly() 1849void CalendarView::setSyncEventsReadOnly()
1835{ 1850{
1836 mCalendar->setSyncEventsReadOnly(); 1851 mCalendar->setSyncEventsReadOnly();
1837} 1852}
1838 1853
1839bool CalendarView::loadCalendars() 1854bool CalendarView::loadCalendars()
1840{ 1855{
1841 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 1856 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
1842 KopiCalendarFile * cal = calendars.first(); 1857 KopiCalendarFile * cal = calendars.first();
1843 mCalendar->setDefaultCalendar( 1 ); 1858 mCalendar->setDefaultCalendar( 1 );
1844 openCalendar( MainWindow::defaultFileName(), false ); 1859 openCalendar( MainWindow::defaultFileName(), false );
1845 cal = calendars.next(); 1860 cal = calendars.next();
1846 while ( cal ) { 1861 while ( cal ) {
1847 addCalendar( cal ); 1862 addCalendar( cal );
1848 cal = calendars.next(); 1863 cal = calendars.next();
1849 } 1864 }
1850 restoreCalendarSettings(); 1865 restoreCalendarSettings();
1851 return true; 1866 return true;
1852} 1867}
1853bool CalendarView::restoreCalendarSettings() 1868bool CalendarView::restoreCalendarSettings()
1854{ 1869{
1855 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 1870 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
1856 KopiCalendarFile * cal = calendars.first(); 1871 KopiCalendarFile * cal = calendars.first();
1857 while ( cal ) { 1872 while ( cal ) {
1858 mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); 1873 mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled );
1859 mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled ); 1874 mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled );
1860 mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly ); 1875 mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly );
1861 if ( cal->isStandard ) 1876 if ( cal->isStandard )
1862 mCalendar->setDefaultCalendar( cal->mCalNumber ); 1877 mCalendar->setDefaultCalendar( cal->mCalNumber );
1863 cal = calendars.next(); 1878 cal = calendars.next();
1864 } 1879 }
1865 setSyncEventsReadOnly(); 1880 setSyncEventsReadOnly();
1866 mCalendar->reInitAlarmSettings(); 1881 mCalendar->reInitAlarmSettings();
1867 updateUnmanagedViews(); 1882 updateUnmanagedViews();
1868 updateView(); 1883 updateView();
1869 return true; 1884 return true;
1870} 1885}
1871void CalendarView::addCalendarId( int id ) 1886void CalendarView::addCalendarId( int id )
1872{ 1887{
1873 KopiCalendarFile * cal = KOPrefs::instance()->getCalendar( id ); 1888 KopiCalendarFile * cal = KOPrefs::instance()->getCalendar( id );
1874 addCalendar( cal ); 1889 addCalendar( cal );
1875} 1890}
1876bool CalendarView::addCalendar( KopiCalendarFile * cal ) 1891bool CalendarView::addCalendar( KopiCalendarFile * cal )
1877{ 1892{
1878 cal->mErrorOnLoad = false; 1893 cal->mErrorOnLoad = false;
1879 if ( mCalendar->addCalendarFile( cal->mFileName, cal->mCalNumber )) { 1894 if ( mCalendar->addCalendarFile( cal->mFileName, cal->mCalNumber )) {
1880 cal->mLoadDt = QDateTime::currentDateTime(); 1895 cal->mLoadDt = QDateTime::currentDateTime();
1881 return true; 1896 return true;
1882 } 1897 }
1883 qDebug("KO: Error adding calendar file %1 ",cal->mFileName.latin1() ); 1898 qDebug("KO: Error adding calendar file %1 ",cal->mFileName.latin1() );
1884 KMessageBox::error(this,i18n("Error loading calendar file\n%1.").arg(cal->mFileName)); 1899 KMessageBox::error(this,i18n("Error loading calendar file\n%1.").arg(cal->mFileName));
1885 cal->mErrorOnLoad = true; 1900 cal->mErrorOnLoad = true;
1886 return false; 1901 return false;
1887} 1902}
1888bool CalendarView::openCalendar(QString filename, bool merge) 1903bool CalendarView::openCalendar(QString filename, bool merge)
1889{ 1904{
1890 1905
1891 if (filename.isEmpty()) { 1906 if (filename.isEmpty()) {
1892 return false; 1907 return false;
1893 } 1908 }
1894 1909
1895 if (!QFile::exists(filename)) { 1910 if (!QFile::exists(filename)) {
1896 KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); 1911 KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename));
1897 return false; 1912 return false;
1898 } 1913 }
1899 1914
1900 globalFlagBlockAgenda = 1; 1915 globalFlagBlockAgenda = 1;
1901 clearAllViews(); 1916 clearAllViews();
1902 if (!merge) { 1917 if (!merge) {
1903 mViewManager->setDocumentId( filename ); 1918 mViewManager->setDocumentId( filename );
1904 mCalendar->close(); 1919 mCalendar->close();
1905 } 1920 }
1906 mStorage->setFileName( filename ); 1921 mStorage->setFileName( filename );
1907 1922
1908 if ( mStorage->load() ) { 1923 if ( mStorage->load() ) {
1909 if ( merge ) ;//setModified( true ); 1924 if ( merge ) ;//setModified( true );
1910 else { 1925 else {
1911 //setModified( true ); 1926 //setModified( true );
1912 mViewManager->setDocumentId( filename ); 1927 mViewManager->setDocumentId( filename );
1913 mDialogManager->setDocumentId( filename ); 1928 mDialogManager->setDocumentId( filename );
1914 mTodoList->setDocumentId( filename ); 1929 mTodoList->setDocumentId( filename );
1915 } 1930 }
1916 globalFlagBlockAgenda = 2; 1931 globalFlagBlockAgenda = 2;
1917 // if ( getLastSyncEvent() ) 1932 // if ( getLastSyncEvent() )
1918 // getLastSyncEvent()->setReadOnly( true ); 1933 // getLastSyncEvent()->setReadOnly( true );
1919 mCalendar->reInitAlarmSettings(); 1934 mCalendar->reInitAlarmSettings();
1920 setSyncEventsReadOnly(); 1935 setSyncEventsReadOnly();
1921 updateUnmanagedViews(); 1936 updateUnmanagedViews();
1922 updateView(); 1937 updateView();
1923 if ( filename != MainWindow::defaultFileName() ) { 1938 if ( filename != MainWindow::defaultFileName() ) {
1924 saveCalendar( MainWindow::defaultFileName() ); 1939 saveCalendar( MainWindow::defaultFileName() );
1925 } else { 1940 } else {
1926 QFileInfo finf ( MainWindow::defaultFileName()); 1941 QFileInfo finf ( MainWindow::defaultFileName());
1927 if ( finf.exists() ) { 1942 if ( finf.exists() ) {
1928 setLoadedFileVersion( finf.lastModified () ); 1943 setLoadedFileVersion( finf.lastModified () );
1929 } 1944 }
1930 } 1945 }
1931 return true; 1946 return true;
1932 } else { 1947 } else {
1933 // while failing to load, the calendar object could 1948 // while failing to load, the calendar object could
1934 // have become partially populated. Clear it out. 1949 // have become partially populated. Clear it out.
1935 if ( !merge ) { 1950 if ( !merge ) {
1936 mCalendar->close(); 1951 mCalendar->close();
1937 mViewManager->setDocumentId( filename ); 1952 mViewManager->setDocumentId( filename );
1938 mDialogManager->setDocumentId( filename ); 1953 mDialogManager->setDocumentId( filename );
1939 mTodoList->setDocumentId( filename ); 1954 mTodoList->setDocumentId( filename );
1940 } 1955 }
1941 1956
1942 //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); 1957 //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename));
1943 1958
1944 QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); 1959 QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) );
1945 globalFlagBlockAgenda = 2; 1960 globalFlagBlockAgenda = 2;
1946 mCalendar->reInitAlarmSettings(); 1961 mCalendar->reInitAlarmSettings();
1947 setSyncEventsReadOnly(); 1962 setSyncEventsReadOnly();
1948 updateUnmanagedViews(); 1963 updateUnmanagedViews();
1949 updateView(); 1964 updateView();
1950 } 1965 }
1951 return false; 1966 return false;
1952} 1967}
1953void CalendarView::showOpenError() 1968void CalendarView::showOpenError()
1954{ 1969{
1955 KMessageBox::error(this,i18n("Couldn't load calendar\n.")); 1970 KMessageBox::error(this,i18n("Couldn't load calendar\n."));
1956} 1971}
1957void CalendarView::setLoadedFileVersion(QDateTime dt) 1972void CalendarView::setLoadedFileVersion(QDateTime dt)
1958{ 1973{
1959 loadedFileVersion = dt; 1974 loadedFileVersion = dt;
1960} 1975}
1961bool CalendarView::checkFileChanged(QString fn) 1976bool CalendarView::checkFileChanged(QString fn)
1962{ 1977{
1963 QFileInfo finf ( fn ); 1978 QFileInfo finf ( fn );
1964 if ( !finf.exists() ) 1979 if ( !finf.exists() )
1965 return true; 1980 return true;
1966 QDateTime dt = finf.lastModified (); 1981 QDateTime dt = finf.lastModified ();
1967 if ( dt <= loadedFileVersion ) 1982 if ( dt <= loadedFileVersion )
1968 return false; 1983 return false;
1969 return true; 1984 return true;
1970 1985
1971} 1986}
1972void CalendarView::watchSavedFile() 1987void CalendarView::watchSavedFile()
1973{ 1988{
1974 QFileInfo finf ( MainWindow::defaultFileName()); 1989 QFileInfo finf ( MainWindow::defaultFileName());
1975 if ( !finf.exists() ) 1990 if ( !finf.exists() )
1976 return; 1991 return;
1977 QDateTime dt = finf.lastModified (); 1992 QDateTime dt = finf.lastModified ();
1978 if ( dt < loadedFileVersion ) { 1993 if ( dt < loadedFileVersion ) {
1979 //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); 1994 //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1());
1980 QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); 1995 QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) );
1981 return; 1996 return;
1982 } 1997 }
1983 loadedFileVersion = dt; 1998 loadedFileVersion = dt;
1984} 1999}
1985bool CalendarView::checkAllFileVersions() 2000bool CalendarView::checkAllFileVersions()
1986{ 2001{
1987 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2002 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
1988 KopiCalendarFile * cal = calendars.first(); 2003 KopiCalendarFile * cal = calendars.first();
1989 mCalendar->setDefaultCalendar( 1 ); 2004 mCalendar->setDefaultCalendar( 1 );
1990 mCalendar->setDefaultCalendarEnabledOnly(); 2005 mCalendar->setDefaultCalendarEnabledOnly();
1991 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { 2006 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) {
1992 if ( !checkFileVersion(MainWindow::defaultFileName())) { 2007 if ( !checkFileVersion(MainWindow::defaultFileName())) {
1993 restoreCalendarSettings(); 2008 restoreCalendarSettings();
1994 return false; 2009 return false;
1995 } 2010 }
1996 } 2011 }
1997 cal = calendars.next(); 2012 cal = calendars.next();
1998 QDateTime storeTemp = loadedFileVersion; 2013 QDateTime storeTemp = loadedFileVersion;
1999 while ( cal ) { 2014 while ( cal ) {
2000 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { 2015 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) {
2001 mCalendar->setDefaultCalendar( cal->mCalNumber ); 2016 mCalendar->setDefaultCalendar( cal->mCalNumber );
2002 mCalendar->setDefaultCalendarEnabledOnly(); 2017 mCalendar->setDefaultCalendarEnabledOnly();
2003 loadedFileVersion = cal->mLoadDt.addSecs( 15 ); 2018 loadedFileVersion = cal->mLoadDt.addSecs( 15 );
2004 if ( !checkFileVersion(cal->mFileName )) { 2019 if ( !checkFileVersion(cal->mFileName )) {
2005 loadedFileVersion = storeTemp; 2020 loadedFileVersion = storeTemp;
2006 restoreCalendarSettings(); 2021 restoreCalendarSettings();
2007 return false; 2022 return false;
2008 } 2023 }
2009 } 2024 }
2010 cal = calendars.next(); 2025 cal = calendars.next();
2011 } 2026 }
2012 loadedFileVersion = storeTemp; 2027 loadedFileVersion = storeTemp;
2013 return true; 2028 return true;
2014} 2029}
2015bool CalendarView::checkFileVersion(QString fn) 2030bool CalendarView::checkFileVersion(QString fn)
2016{ 2031{
2017 QFileInfo finf ( fn ); 2032 QFileInfo finf ( fn );
2018 if ( !finf.exists() ) 2033 if ( !finf.exists() )
2019 return true; 2034 return true;
2020 QDateTime dt = finf.lastModified (); 2035 QDateTime dt = finf.lastModified ();
2021 qDebug("loaded file version %s %s", fn.latin1(), loadedFileVersion.toString().latin1()); 2036 qDebug("loaded file version %s %s", fn.latin1(), loadedFileVersion.toString().latin1());
2022 qDebug("file on disk version %s %s", fn.latin1(),dt.toString().latin1()); 2037 qDebug("file on disk version %s %s", fn.latin1(),dt.toString().latin1());
2023 if ( dt <= loadedFileVersion ) 2038 if ( dt <= loadedFileVersion )
2024 return true; 2039 return true;
2025 int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file\n%1\n on 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").arg(fn).arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , 2040 int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file\n%1\n on 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").arg(fn).arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) ,
2026 i18n("KO/Pi Warning"),i18n("Overwrite"), 2041 i18n("KO/Pi Warning"),i18n("Overwrite"),
2027 i18n("Sync+save")); 2042 i18n("Sync+save"));
2028 2043
2029 if ( km == KMessageBox::Cancel ) 2044 if ( km == KMessageBox::Cancel )
2030 return false; 2045 return false;
2031 if ( km == KMessageBox::Yes ) 2046 if ( km == KMessageBox::Yes )
2032 return true; 2047 return true;
2033 2048
2034 setSyncDevice("deleteaftersync" ); 2049 setSyncDevice("deleteaftersync" );
2035 mSyncManager->mAskForPreferences = true; 2050 mSyncManager->mAskForPreferences = true;
2036 mSyncManager->mSyncAlgoPrefs = 3; 2051 mSyncManager->mSyncAlgoPrefs = 3;
2037 mSyncManager->mWriteBackFile = false; 2052 mSyncManager->mWriteBackFile = false;
2038 mSyncManager->mWriteBackExistingOnly = false; 2053 mSyncManager->mWriteBackExistingOnly = false;
2039 mSyncManager->mShowSyncSummary = false; 2054 mSyncManager->mShowSyncSummary = false;
2040 syncCalendar( fn, 3 ); 2055 syncCalendar( fn, 3 );
2041 Event * e = getLastSyncEvent(); 2056 Event * e = getLastSyncEvent();
2042 if ( e ) 2057 if ( e )
2043 mCalendar->deleteEvent( e ); 2058 mCalendar->deleteEvent( e );
2044 return true; 2059 return true;
2045} 2060}
2046bool CalendarView::saveCalendars() 2061bool CalendarView::saveCalendars()
2047{ 2062{
2048 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2063 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2049 KopiCalendarFile * cal = calendars.first(); 2064 KopiCalendarFile * cal = calendars.first();
2050 mCalendar->setDefaultCalendar( 1 ); 2065 mCalendar->setDefaultCalendar( 1 );
2051 mCalendar->setDefaultCalendarEnabledOnly(); 2066 mCalendar->setDefaultCalendarEnabledOnly();
2052 saveCalendar( MainWindow::defaultFileName() ); 2067 saveCalendar( MainWindow::defaultFileName() );
2053 cal = calendars.next(); 2068 cal = calendars.next();
2054 while ( cal ) { 2069 while ( cal ) {
2055 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { 2070 if ( !cal->isReadOnly && !cal->mErrorOnLoad ) {
2056 mCalendar->setDefaultCalendar( cal->mCalNumber ); 2071 mCalendar->setDefaultCalendar( cal->mCalNumber );
2057 mCalendar->setDefaultCalendarEnabledOnly(); 2072 mCalendar->setDefaultCalendarEnabledOnly();
2058 if ( saveCalendar( cal->mFileName ) ) 2073 if ( saveCalendar( cal->mFileName ) )
2059 cal->mLoadDt = QDateTime::currentDateTime(); 2074 cal->mLoadDt = QDateTime::currentDateTime();
2060 } 2075 }
2061 cal = calendars.next(); 2076 cal = calendars.next();
2062 } 2077 }
2063 restoreCalendarSettings(); 2078 restoreCalendarSettings();
2064 return true; 2079 return true;
2065} 2080}
2066bool CalendarView::saveCalendar( QString filename ) 2081bool CalendarView::saveCalendar( QString filename )
2067{ 2082{
2068 2083
2069 // Store back all unsaved data into calendar object 2084 // Store back all unsaved data into calendar object
2070 // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); 2085 // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() );
2071 if ( mViewManager->currentView() ) 2086 if ( mViewManager->currentView() )
2072 mViewManager->currentView()->flushView(); 2087 mViewManager->currentView()->flushView();
2073 2088
2074 2089
2075 QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); 2090 QDateTime lfv = QDateTime::currentDateTime().addSecs( -2);
2076 mStorage->setSaveFormat( new ICalFormat() ); 2091 mStorage->setSaveFormat( new ICalFormat() );
2077 mStorage->setFileName( filename ); 2092 mStorage->setFileName( filename );
2078 bool success; 2093 bool success;
2079 success = mStorage->save(); 2094 success = mStorage->save();
2080 if ( !success ) { 2095 if ( !success ) {
2081 return false; 2096 return false;
2082 } 2097 }
2083 if ( filename == MainWindow::defaultFileName() ) { 2098 if ( filename == MainWindow::defaultFileName() ) {
2084 setLoadedFileVersion( lfv ); 2099 setLoadedFileVersion( lfv );
2085 watchSavedFile(); 2100 watchSavedFile();
2086 } 2101 }
2087 return true; 2102 return true;
2088} 2103}
2089 2104
2090void CalendarView::closeCalendar() 2105void CalendarView::closeCalendar()
2091{ 2106{
2092 2107
2093 // child windows no longer valid 2108 // child windows no longer valid
2094 clearAllViews(); 2109 clearAllViews();
2095 emit closingDown(); 2110 emit closingDown();
2096 2111
2097 mCalendar->close(); 2112 mCalendar->close();
2098 setModified(false); 2113 setModified(false);
2099 updateView(); 2114 updateView();
2100} 2115}
2101 2116
2102void CalendarView::archiveCalendar() 2117void CalendarView::archiveCalendar()
2103{ 2118{
2104 mDialogManager->showArchiveDialog(); 2119 mDialogManager->showArchiveDialog();
2105} 2120}
2106 2121
2107 2122
2108void CalendarView::readSettings() 2123void CalendarView::readSettings()
2109{ 2124{
2110 2125
2111 2126
2112 // mViewManager->showAgendaView(); 2127 // mViewManager->showAgendaView();
2113 QString str; 2128 QString str;
2114 //qDebug("CalendarView::readSettings() "); 2129 //qDebug("CalendarView::readSettings() ");
2115 // read settings from the KConfig, supplying reasonable 2130 // read settings from the KConfig, supplying reasonable
2116 // defaults where none are to be found 2131 // defaults where none are to be found
2117 KConfig *config = KOGlobals::config(); 2132 KConfig *config = KOGlobals::config();
2118#ifndef KORG_NOSPLITTER 2133#ifndef KORG_NOSPLITTER
2119 config->setGroup("KOrganizer Geometry"); 2134 config->setGroup("KOrganizer Geometry");
2120 2135
2121 QValueList<int> sizes = config->readIntListEntry("Separator1"); 2136 QValueList<int> sizes = config->readIntListEntry("Separator1");
2122 if (sizes.count() != 2) { 2137 if (sizes.count() != 2) {
2123 sizes << mDateNavigator->minimumSizeHint().width(); 2138 sizes << mDateNavigator->minimumSizeHint().width();
2124 sizes << 300; 2139 sizes << 300;
2125 } 2140 }
2126 mPanner->setSizes(sizes); 2141 mPanner->setSizes(sizes);
2127 2142
2128 sizes = config->readIntListEntry("Separator2"); 2143 sizes = config->readIntListEntry("Separator2");
2129 if ( ( mResourceView && sizes.count() == 4 ) || 2144 if ( ( mResourceView && sizes.count() == 4 ) ||
2130 ( !mResourceView && sizes.count() == 3 ) ) { 2145 ( !mResourceView && sizes.count() == 3 ) ) {
2131 mLeftSplitter->setSizes(sizes); 2146 mLeftSplitter->setSizes(sizes);
2132 } 2147 }
2133#endif 2148#endif
2134 globalFlagBlockAgenda = 1; 2149 globalFlagBlockAgenda = 1;
2135 mViewManager->showAgendaView(); 2150 mViewManager->showAgendaView();
2136 //mViewManager->readSettings( config ); 2151 //mViewManager->readSettings( config );
2137 mTodoList->restoreLayout(config,QString("Todo Layout")); 2152 mTodoList->restoreLayout(config,QString("Todo Layout"));
2138 readFilterSettings(config); 2153 readFilterSettings(config);
2139 2154
2140#ifdef DESKTOP_VERSION 2155#ifdef DESKTOP_VERSION
2141 config->setGroup("WidgetLayout"); 2156 config->setGroup("WidgetLayout");
2142 QStringList list; 2157 QStringList list;
2143 list = config->readListEntry("MainLayout"); 2158 list = config->readListEntry("MainLayout");
2144 int x,y,w,h; 2159 int x,y,w,h;
2145 if ( ! list.isEmpty() ) { 2160 if ( ! list.isEmpty() ) {
2146 x = list[0].toInt(); 2161 x = list[0].toInt();
2147 y = list[1].toInt(); 2162 y = list[1].toInt();
2148 w = list[2].toInt(); 2163 w = list[2].toInt();
2149 h = list[3].toInt(); 2164 h = list[3].toInt();
2150 KApplication::testCoords( &x,&y,&w,&h ); 2165 KApplication::testCoords( &x,&y,&w,&h );
2151 topLevelWidget()->setGeometry(x,y,w,h); 2166 topLevelWidget()->setGeometry(x,y,w,h);
2152 2167
2153 } else { 2168 } else {
2154 topLevelWidget()->setGeometry( 40 ,40 , 640, 440); 2169 topLevelWidget()->setGeometry( 40 ,40 , 640, 440);
2155 } 2170 }
2156 list = config->readListEntry("EditEventLayout"); 2171 list = config->readListEntry("EditEventLayout");
2157 if ( ! list.isEmpty() ) { 2172 if ( ! list.isEmpty() ) {
2158 x = list[0].toInt(); 2173 x = list[0].toInt();
2159 y = list[1].toInt(); 2174 y = list[1].toInt();
2160 w = list[2].toInt(); 2175 w = list[2].toInt();
2161 h = list[3].toInt(); 2176 h = list[3].toInt();
2162 KApplication::testCoords( &x,&y,&w,&h ); 2177 KApplication::testCoords( &x,&y,&w,&h );
2163 mEventEditor->setGeometry(x,y,w,h); 2178 mEventEditor->setGeometry(x,y,w,h);
2164 2179
2165 } 2180 }
2166 list = config->readListEntry("EditTodoLayout"); 2181 list = config->readListEntry("EditTodoLayout");
2167 if ( ! list.isEmpty() ) { 2182 if ( ! list.isEmpty() ) {
2168 x = list[0].toInt(); 2183 x = list[0].toInt();
2169 y = list[1].toInt(); 2184 y = list[1].toInt();
2170 w = list[2].toInt(); 2185 w = list[2].toInt();
2171 h = list[3].toInt(); 2186 h = list[3].toInt();
2172 KApplication::testCoords( &x,&y,&w,&h ); 2187 KApplication::testCoords( &x,&y,&w,&h );
2173 mTodoEditor->setGeometry(x,y,w,h); 2188 mTodoEditor->setGeometry(x,y,w,h);
2174 2189
2175 } 2190 }
2176 list = config->readListEntry("ViewerLayout"); 2191 list = config->readListEntry("ViewerLayout");
2177 if ( ! list.isEmpty() ) { 2192 if ( ! list.isEmpty() ) {
2178 x = list[0].toInt(); 2193 x = list[0].toInt();
2179 y = list[1].toInt(); 2194 y = list[1].toInt();
2180 w = list[2].toInt(); 2195 w = list[2].toInt();
2181 h = list[3].toInt(); 2196 h = list[3].toInt();
2182 KApplication::testCoords( &x,&y,&w,&h ); 2197 KApplication::testCoords( &x,&y,&w,&h );
2183 getEventViewerDialog()->setGeometry(x,y,w,h); 2198 getEventViewerDialog()->setGeometry(x,y,w,h);
2184 } 2199 }
2185#endif 2200#endif
2186 config->setGroup( "Views" ); 2201 config->setGroup( "Views" );
2187 int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); 2202 int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
2188 2203
2189 QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); 2204 QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame");
2190 2205
2191 int resetval = 0; 2206 int resetval = 0;
2192 int maxVal = 0; 2207 int maxVal = 0;
2193 if (sizes.count() != 3) { 2208 if (sizes.count() != 3) {
2194 if ( KOPrefs::instance()->mVerticalScreen ) { 2209 if ( KOPrefs::instance()->mVerticalScreen ) {
2195 resetval = mDateNavigator->sizeHint().width()+2; 2210 resetval = mDateNavigator->sizeHint().width()+2;
2196 } else { 2211 } else {
2197 resetval = mDateNavigator->sizeHint().height()+2; 2212 resetval = mDateNavigator->sizeHint().height()+2;
2198 } 2213 }
2199 } 2214 }
2200 if ( resetval ) { 2215 if ( resetval ) {
2201 sizes.clear(); 2216 sizes.clear();
2202 if ( KOPrefs::instance()->mVerticalScreen ) { 2217 if ( KOPrefs::instance()->mVerticalScreen ) {
2203 maxVal = QApplication::desktop()->width() -10; 2218 maxVal = QApplication::desktop()->width() -10;
2204 } else { 2219 } else {
2205 maxVal = QApplication::desktop()->height()-10; 2220 maxVal = QApplication::desktop()->height()-10;
2206 } 2221 }
2207 sizes << resetval; 2222 sizes << resetval;
2208 if ( maxVal < resetval + resetval) 2223 if ( maxVal < resetval + resetval)
2209 resetval = maxVal - resetval; 2224 resetval = maxVal - resetval;
2210 sizes << resetval; 2225 sizes << resetval;
2211 sizes << 100; 2226 sizes << 100;
2212 } 2227 }
2213 mLeftFrame->setSizes(sizes); 2228 mLeftFrame->setSizes(sizes);
2214 sizes = config->readIntListEntry("Main Splitter Frame"); 2229 sizes = config->readIntListEntry("Main Splitter Frame");
2215 resetval = 0; 2230 resetval = 0;
2216 maxVal = 0; 2231 maxVal = 0;
2217 if (sizes.count() != 2) { 2232 if (sizes.count() != 2) {
2218 if ( !KOPrefs::instance()->mVerticalScreen ) { 2233 if ( !KOPrefs::instance()->mVerticalScreen ) {
2219 resetval = mDateNavigator->sizeHint().width()+2; 2234 resetval = mDateNavigator->sizeHint().width()+2;
2220 } else { 2235 } else {
2221 resetval = mDateNavigator->sizeHint().height()+2; 2236 resetval = mDateNavigator->sizeHint().height()+2;
2222 } 2237 }
2223 } 2238 }
2224 if ( resetval ) { 2239 if ( resetval ) {
2225 sizes.clear(); 2240 sizes.clear();
2226 if ( !KOPrefs::instance()->mVerticalScreen ) { 2241 if ( !KOPrefs::instance()->mVerticalScreen ) {
2227 maxVal = QApplication::desktop()->width() -10; 2242 maxVal = QApplication::desktop()->width() -10;
2228 } else { 2243 } else {
2229 maxVal = QApplication::desktop()->height()-10; 2244 maxVal = QApplication::desktop()->height()-10;
2230 } 2245 }
2231 sizes << resetval; 2246 sizes << resetval;
2232 if ( maxVal < resetval + resetval) 2247 if ( maxVal < resetval + resetval)
2233 resetval = maxVal - resetval; 2248 resetval = maxVal - resetval;
2234 sizes << resetval; 2249 sizes << resetval;
2235 } 2250 }
2236 mMainFrame->setSizes(sizes); 2251 mMainFrame->setSizes(sizes);
2237 if ( dateCount == 5 ) mNavigator->selectWorkWeek(); 2252 if ( dateCount == 5 ) mNavigator->selectWorkWeek();
2238 else if ( dateCount == 7 ) mNavigator->selectWeek(); 2253 else if ( dateCount == 7 ) mNavigator->selectWeek();
2239 else mNavigator->selectDates( dateCount ); 2254 else mNavigator->selectDates( dateCount );
2240 // mViewManager->readSettings( config ); 2255 // mViewManager->readSettings( config );
2241 updateConfig(); 2256 updateConfig();
2242 globalFlagBlockAgenda = 2; 2257 globalFlagBlockAgenda = 2;
2243 mViewManager->readSettings( config ); 2258 mViewManager->readSettings( config );
2244 QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); 2259 QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) );
2245} 2260}
2246 2261
2247 2262
2248void CalendarView::writeSettings() 2263void CalendarView::writeSettings()
2249{ 2264{
2250 // kdDebug() << "CalendarView::writeSettings" << endl; 2265 // kdDebug() << "CalendarView::writeSettings" << endl;
2251 2266
2252 KConfig *config = KOGlobals::config(); 2267 KConfig *config = KOGlobals::config();
2253 2268
2254 mViewManager->writeSettings( config ); 2269 mViewManager->writeSettings( config );
2255 mTodoList->saveLayout(config,QString("Todo Layout")); 2270 mTodoList->saveLayout(config,QString("Todo Layout"));
2256 mDialogManager->writeSettings( config ); 2271 mDialogManager->writeSettings( config );
2257 //KOPrefs::instance()->usrWriteConfig(); 2272 //KOPrefs::instance()->usrWriteConfig();
2258 KOPrefs::instance()->writeConfig(); 2273 KOPrefs::instance()->writeConfig();
2259 2274
2260 writeFilterSettings(config); 2275 writeFilterSettings(config);
2261 config->setGroup( "AppRun" ); 2276 config->setGroup( "AppRun" );
2262 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 2277 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
2263 int days = dt.daysTo( QDate::currentDate() ); 2278 int days = dt.daysTo( QDate::currentDate() );
2264 dt = dt.addDays( days ); 2279 dt = dt.addDays( days );
2265 int secs = dt.secsTo( QDateTime::currentDateTime() ); 2280 int secs = dt.secsTo( QDateTime::currentDateTime() );
2266 config->writeEntry( "LatestProgramStopDays", days ); 2281 config->writeEntry( "LatestProgramStopDays", days );
2267 config->writeEntry( "LatestProgramStopSecs", secs ); 2282 config->writeEntry( "LatestProgramStopSecs", secs );
2268 //qDebug("KO: Writing stop time: %d ", secs); 2283 //qDebug("KO: Writing stop time: %d ", secs);
2269 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); 2284 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
2270 //QDateTime latest = dt.addSecs ( secs ); 2285 //QDateTime latest = dt.addSecs ( secs );
2271 //qDebug("KO: Termination on %s ", latest.toString().latin1()); 2286 //qDebug("KO: Termination on %s ", latest.toString().latin1());
2272 config->setGroup( "Views" ); 2287 config->setGroup( "Views" );
2273 config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); 2288 config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() );
2274 2289
2275#if 0 2290#if 0
2276 qDebug("********************* "); 2291 qDebug("********************* ");
2277 qDebug("Testcode secsto "); 2292 qDebug("Testcode secsto ");
2278 QDateTime dt_nodaylight ( QDate (2005,3,26), QTime( 0,0,0 ) ); 2293 QDateTime dt_nodaylight ( QDate (2005,3,26), QTime( 0,0,0 ) );
2279 QDateTime dt_daylight ( QDate (2005,3,29), QTime( 0,0,0 ) ); 2294 QDateTime dt_daylight ( QDate (2005,3,29), QTime( 0,0,0 ) );
2280 int secsto = dt_nodaylight.secsTo( dt_daylight ); 2295 int secsto = dt_nodaylight.secsTo( dt_daylight );
2281 QDateTime dt_daylight_wrong = dt_nodaylight.addSecs( secsto ); 2296 QDateTime dt_daylight_wrong = dt_nodaylight.addSecs( secsto );
2282 qDebug("dt nodaylight %s ",dt_nodaylight.toString().latin1() ); 2297 qDebug("dt nodaylight %s ",dt_nodaylight.toString().latin1() );
2283 qDebug("dt daylight %s ",dt_daylight.toString().latin1() ); 2298 qDebug("dt daylight %s ",dt_daylight.toString().latin1() );
2284 qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() ); 2299 qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() );
2285 qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600); 2300 qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600);
2286 qDebug("********************* testcode end"); 2301 qDebug("********************* testcode end");
2287 2302
2288#endif 2303#endif
2289 2304
2290 QValueList<int> listINT = mLeftFrame->sizes(); 2305 QValueList<int> listINT = mLeftFrame->sizes();
2291 config->writeEntry("Left Splitter Frame",listINT); 2306 config->writeEntry("Left Splitter Frame",listINT);
2292 QValueList<int> listINT2 = mMainFrame->sizes(); 2307 QValueList<int> listINT2 = mMainFrame->sizes();
2293 config->writeEntry("Main Splitter Frame",listINT2); 2308 config->writeEntry("Main Splitter Frame",listINT2);
2294#ifdef DESKTOP_VERSION 2309#ifdef DESKTOP_VERSION
2295 config->setGroup("WidgetLayout"); 2310 config->setGroup("WidgetLayout");
2296 QStringList list ;//= config->readListEntry("MainLayout"); 2311 QStringList list ;//= config->readListEntry("MainLayout");
2297 int x,y,w,h; 2312 int x,y,w,h;
2298 QWidget* wid; 2313 QWidget* wid;
2299 wid = topLevelWidget(); 2314 wid = topLevelWidget();
2300 x = wid->geometry().x(); 2315 x = wid->geometry().x();
2301 y = wid->geometry().y(); 2316 y = wid->geometry().y();
2302 w = wid->width(); 2317 w = wid->width();
2303 h = wid->height(); 2318 h = wid->height();
2304 list.clear(); 2319 list.clear();
2305 list << QString::number( x ); 2320 list << QString::number( x );
2306 list << QString::number( y ); 2321 list << QString::number( y );
2307 list << QString::number( w ); 2322 list << QString::number( w );
2308 list << QString::number( h ); 2323 list << QString::number( h );
2309 config->writeEntry("MainLayout",list ); 2324 config->writeEntry("MainLayout",list );
2310 2325
2311 wid = mEventEditor; 2326 wid = mEventEditor;
2312 x = wid->geometry().x(); 2327 x = wid->geometry().x();
2313 y = wid->geometry().y(); 2328 y = wid->geometry().y();
2314 w = wid->width(); 2329 w = wid->width();
2315 h = wid->height(); 2330 h = wid->height();
2316 list.clear(); 2331 list.clear();
2317 list << QString::number( x ); 2332 list << QString::number( x );
2318 list << QString::number( y ); 2333 list << QString::number( y );
2319 list << QString::number( w ); 2334 list << QString::number( w );
2320 list << QString::number( h ); 2335 list << QString::number( h );
2321 config->writeEntry("EditEventLayout",list ); 2336 config->writeEntry("EditEventLayout",list );
2322 2337
2323 wid = mTodoEditor; 2338 wid = mTodoEditor;
2324 x = wid->geometry().x(); 2339 x = wid->geometry().x();
2325 y = wid->geometry().y(); 2340 y = wid->geometry().y();
2326 w = wid->width(); 2341 w = wid->width();
2327 h = wid->height(); 2342 h = wid->height();
2328 list.clear(); 2343 list.clear();
2329 list << QString::number( x ); 2344 list << QString::number( x );
2330 list << QString::number( y ); 2345 list << QString::number( y );
2331 list << QString::number( w ); 2346 list << QString::number( w );
2332 list << QString::number( h ); 2347 list << QString::number( h );
2333 config->writeEntry("EditTodoLayout",list ); 2348 config->writeEntry("EditTodoLayout",list );
2334 wid = getEventViewerDialog(); 2349 wid = getEventViewerDialog();
2335 x = wid->geometry().x(); 2350 x = wid->geometry().x();
2336 y = wid->geometry().y(); 2351 y = wid->geometry().y();
2337 w = wid->width(); 2352 w = wid->width();
2338 h = wid->height(); 2353 h = wid->height();
2339 list.clear(); 2354 list.clear();
2340 list << QString::number( x ); 2355 list << QString::number( x );
2341 list << QString::number( y ); 2356 list << QString::number( y );
2342 list << QString::number( w ); 2357 list << QString::number( w );
2343 list << QString::number( h ); 2358 list << QString::number( h );
2344 config->writeEntry("ViewerLayout",list ); 2359 config->writeEntry("ViewerLayout",list );
2345 wid = mDialogManager->getSearchDialog(); 2360 wid = mDialogManager->getSearchDialog();
2346 if ( wid ) { 2361 if ( wid ) {
2347 x = wid->geometry().x(); 2362 x = wid->geometry().x();
2348 y = wid->geometry().y(); 2363 y = wid->geometry().y();
2349 w = wid->width(); 2364 w = wid->width();
2350 h = wid->height(); 2365 h = wid->height();
2351 list.clear(); 2366 list.clear();
2352 list << QString::number( x ); 2367 list << QString::number( x );
2353 list << QString::number( y ); 2368 list << QString::number( y );
2354 list << QString::number( w ); 2369 list << QString::number( w );
2355 list << QString::number( h ); 2370 list << QString::number( h );
2356 config->writeEntry("SearchLayout",list ); 2371 config->writeEntry("SearchLayout",list );
2357 } 2372 }
2358#endif 2373#endif
2359 2374
2360 2375
2361 config->sync(); 2376 config->sync();
2362} 2377}
2363 2378
2364void CalendarView::readFilterSettings(KConfig *config) 2379void CalendarView::readFilterSettings(KConfig *config)
2365{ 2380{
2366 // kdDebug() << "CalendarView::readFilterSettings()" << endl; 2381 // kdDebug() << "CalendarView::readFilterSettings()" << endl;
2367 2382
2368 mFilters.clear(); 2383 mFilters.clear();
2369 2384
2370 config->setGroup("General"); 2385 config->setGroup("General");
2371 QStringList filterList = config->readListEntry("CalendarFilters"); 2386 QStringList filterList = config->readListEntry("CalendarFilters");
2372 2387
2373 QStringList::ConstIterator it = filterList.begin(); 2388 QStringList::ConstIterator it = filterList.begin();
2374 QStringList::ConstIterator end = filterList.end(); 2389 QStringList::ConstIterator end = filterList.end();
2375 while(it != end) { 2390 while(it != end) {
2376 // kdDebug() << " filter: " << (*it) << endl; 2391 // kdDebug() << " filter: " << (*it) << endl;
2377 2392
2378 CalFilter *filter; 2393 CalFilter *filter;
2379 filter = new CalFilter(*it); 2394 filter = new CalFilter(*it);
2380 config->setGroup("Filter_" + (*it).utf8()); 2395 config->setGroup("Filter_" + (*it).utf8());
2381 //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); 2396 //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) );
2382 filter->setCriteria(config->readNumEntry("Criteria",0)); 2397 filter->setCriteria(config->readNumEntry("Criteria",0));
2383 filter->setCategoryList(config->readListEntry("CategoryList")); 2398 filter->setCategoryList(config->readListEntry("CategoryList"));
2384 mFilters.append(filter); 2399 mFilters.append(filter);
2385 2400
2386 ++it; 2401 ++it;
2387 } 2402 }
2388 2403
2389 if (mFilters.count() == 0) { 2404 if (mFilters.count() == 0) {
2390 CalFilter *filter = new CalFilter(i18n("Default")); 2405 CalFilter *filter = new CalFilter(i18n("Default"));
2391 mFilters.append(filter); 2406 mFilters.append(filter);
2392 } 2407 }
2393 mFilterView->updateFilters(); 2408 mFilterView->updateFilters();
2394 config->setGroup("FilterView"); 2409 config->setGroup("FilterView");
2395 2410
2396 mFilterView->blockSignals(true); 2411 mFilterView->blockSignals(true);
2397 mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled")); 2412 mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled"));
2398 mFilterView->setSelectedFilter(config->readEntry("Current Filter")); 2413 mFilterView->setSelectedFilter(config->readEntry("Current Filter"));
2399 mFilterView->blockSignals(false); 2414 mFilterView->blockSignals(false);
2400 // We do it manually to avoid it being done twice by the above calls 2415 // We do it manually to avoid it being done twice by the above calls
2401 updateFilter(); 2416 updateFilter();
2402} 2417}
2403 2418
2404void CalendarView::writeFilterSettings(KConfig *config) 2419void CalendarView::writeFilterSettings(KConfig *config)
2405{ 2420{
2406 // kdDebug() << "CalendarView::writeFilterSettings()" << endl; 2421 // kdDebug() << "CalendarView::writeFilterSettings()" << endl;
2407 2422
2408 QStringList filterList; 2423 QStringList filterList;
2409 2424
2410 CalFilter *filter = mFilters.first(); 2425 CalFilter *filter = mFilters.first();
2411 while(filter) { 2426 while(filter) {
2412 // kdDebug() << " fn: " << filter->name() << endl; 2427 // kdDebug() << " fn: " << filter->name() << endl;
2413 filterList << filter->name(); 2428 filterList << filter->name();
2414 config->setGroup("Filter_" + filter->name().utf8()); 2429 config->setGroup("Filter_" + filter->name().utf8());
2415 config->writeEntry("Criteria",filter->criteria()); 2430 config->writeEntry("Criteria",filter->criteria());
2416 config->writeEntry("CategoryList",filter->categoryList()); 2431 config->writeEntry("CategoryList",filter->categoryList());
2417 filter = mFilters.next(); 2432 filter = mFilters.next();
2418 } 2433 }
2419 config->setGroup("General"); 2434 config->setGroup("General");
2420 config->writeEntry("CalendarFilters",filterList); 2435 config->writeEntry("CalendarFilters",filterList);
2421 2436
2422 config->setGroup("FilterView"); 2437 config->setGroup("FilterView");
2423 config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); 2438 config->writeEntry("FilterEnabled",mFilterView->filtersEnabled());
2424 config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); 2439 config->writeEntry("Current Filter",mFilterView->selectedFilter()->name());
2425} 2440}
2426 2441
2427 2442
2428void CalendarView::goToday() 2443void CalendarView::goToday()
2429{ 2444{
2430 if ( mViewManager->currentView()->isMonthView() ) 2445 if ( mViewManager->currentView()->isMonthView() )
2431 mNavigator->selectTodayMonth(); 2446 mNavigator->selectTodayMonth();
2432 else 2447 else
2433 mNavigator->selectToday(); 2448 mNavigator->selectToday();
2434} 2449}
2435 2450
2436void CalendarView::goNext() 2451void CalendarView::goNext()
2437{ 2452{
2438 mNavigator->selectNext(); 2453 mNavigator->selectNext();
2439} 2454}
2440 2455
2441void CalendarView::goPrevious() 2456void CalendarView::goPrevious()
2442{ 2457{
2443 mNavigator->selectPrevious(); 2458 mNavigator->selectPrevious();
2444} 2459}
2445void CalendarView::goNextMonth() 2460void CalendarView::goNextMonth()
2446{ 2461{
2447 mNavigator->selectNextMonth(); 2462 mNavigator->selectNextMonth();
2448} 2463}
2449 2464
2450void CalendarView::goPreviousMonth() 2465void CalendarView::goPreviousMonth()
2451{ 2466{
2452 mNavigator->selectPreviousMonth(); 2467 mNavigator->selectPreviousMonth();
2453} 2468}
2454void CalendarView::writeLocale() 2469void CalendarView::writeLocale()
2455{ 2470{
2456 //KPimGlobalPrefs::instance()->setGlobalConfig(); 2471 //KPimGlobalPrefs::instance()->setGlobalConfig();
2457#if 0 2472#if 0
2458 KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); 2473 KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime );
2459 KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday ); 2474 KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday );
2460 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate ); 2475 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate );
2461 KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); 2476 KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage );
2462 QString dummy = KOPrefs::instance()->mUserDateFormatLong; 2477 QString dummy = KOPrefs::instance()->mUserDateFormatLong;
2463 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); 2478 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
2464 dummy = KOPrefs::instance()->mUserDateFormatShort; 2479 dummy = KOPrefs::instance()->mUserDateFormatShort;
2465 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); 2480 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
2466 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, 2481 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving,
2467 KOPrefs::instance()->mDaylightsavingStart, 2482 KOPrefs::instance()->mDaylightsavingStart,
2468 KOPrefs::instance()->mDaylightsavingEnd ); 2483 KOPrefs::instance()->mDaylightsavingEnd );
2469 KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId ); 2484 KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId );
2470#endif 2485#endif
2471} 2486}
2472void CalendarView::updateConfig() 2487void CalendarView::updateConfig()
2473{ 2488{
2474 writeLocale(); 2489 writeLocale();
2475 if ( KOPrefs::instance()->mUseAppColors ) 2490 if ( KOPrefs::instance()->mUseAppColors )
2476 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 2491 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
2477 emit configChanged(); 2492 emit configChanged();
2478 mTodoList->updateConfig(); 2493 mTodoList->updateConfig();
2479 // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); 2494 // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont);
2480 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 2495 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2481 // To make the "fill window" configurations work 2496 // To make the "fill window" configurations work
2482 //mViewManager->raiseCurrentView(); 2497 //mViewManager->raiseCurrentView();
2483} 2498}
2484 2499
2485 2500
2486void CalendarView::eventChanged(Event *event) 2501void CalendarView::eventChanged(Event *event)
2487{ 2502{
2488 changeEventDisplay(event,KOGlobals::EVENTEDITED); 2503 changeEventDisplay(event,KOGlobals::EVENTEDITED);
2489 //updateUnmanagedViews(); 2504 //updateUnmanagedViews();
2490} 2505}
2491 2506
2492void CalendarView::eventAdded(Event *event) 2507void CalendarView::eventAdded(Event *event)
2493{ 2508{
2494 changeEventDisplay(event,KOGlobals::EVENTADDED); 2509 changeEventDisplay(event,KOGlobals::EVENTADDED);
2495} 2510}
2496 2511
2497void CalendarView::eventToBeDeleted(Event *) 2512void CalendarView::eventToBeDeleted(Event *)
2498{ 2513{
2499 kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; 2514 kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl;
2500} 2515}
2501 2516
2502void CalendarView::eventDeleted() 2517void CalendarView::eventDeleted()
2503{ 2518{
2504 changeEventDisplay(0,KOGlobals::EVENTDELETED); 2519 changeEventDisplay(0,KOGlobals::EVENTDELETED);
2505} 2520}
2506void CalendarView::changeTodoDisplay(Todo *which, int action) 2521void CalendarView::changeTodoDisplay(Todo *which, int action)
2507{ 2522{
2508 changeIncidenceDisplay((Incidence *)which, action); 2523 changeIncidenceDisplay((Incidence *)which, action);
2509 mDateNavigator->updateView(); //LR 2524 mDateNavigator->updateView(); //LR
2510 //mDialogManager->updateSearchDialog(); 2525 //mDialogManager->updateSearchDialog();
2511 2526
2512 if (which) { 2527 if (which) {
2513 mViewManager->updateWNview(); 2528 mViewManager->updateWNview();
2514 //mTodoList->updateView(); 2529 //mTodoList->updateView();
2515 } 2530 }
2516 2531
2517} 2532}
2518 2533
2519void CalendarView::changeIncidenceDisplay(Incidence *which, int action) 2534void CalendarView::changeIncidenceDisplay(Incidence *which, int action)
2520{ 2535{
2521 updateUnmanagedViews(); 2536 updateUnmanagedViews();
2522 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); 2537 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action );
2523 if ( action == KOGlobals::EVENTDELETED ) { //delete 2538 if ( action == KOGlobals::EVENTDELETED ) { //delete
2524 mCalendar->checkAlarmForIncidence( 0, true ); 2539 mCalendar->checkAlarmForIncidence( 0, true );
2525 if ( mEventViewerDialog ) 2540 if ( mEventViewerDialog )
2526 mEventViewerDialog->hide(); 2541 mEventViewerDialog->hide();
2527 } 2542 }
2528 else 2543 else
2529 mCalendar->checkAlarmForIncidence( which , false ); 2544 mCalendar->checkAlarmForIncidence( which , false );
2530} 2545}
2531 2546
2532// most of the changeEventDisplays() right now just call the view's 2547// most of the changeEventDisplays() right now just call the view's
2533// total update mode, but they SHOULD be recoded to be more refresh-efficient. 2548// total update mode, but they SHOULD be recoded to be more refresh-efficient.
2534void CalendarView::changeEventDisplay(Event *which, int action) 2549void CalendarView::changeEventDisplay(Event *which, int action)
2535{ 2550{
2536 // kdDebug() << "CalendarView::changeEventDisplay" << endl; 2551 // kdDebug() << "CalendarView::changeEventDisplay" << endl;
2537 changeIncidenceDisplay((Incidence *)which, action); 2552 changeIncidenceDisplay((Incidence *)which, action);
2538 mDateNavigator->updateView(); 2553 mDateNavigator->updateView();
2539 //mDialogManager->updateSearchDialog(); 2554 //mDialogManager->updateSearchDialog();
2540 2555
2541 if (which) { 2556 if (which) {
2542 // If there is an event view visible update the display 2557 // If there is an event view visible update the display
2543 mViewManager->currentView()->changeEventDisplay(which,action); 2558 mViewManager->currentView()->changeEventDisplay(which,action);
2544 // TODO: check, if update needed 2559 // TODO: check, if update needed
2545 // if (which->getTodoStatus()) { 2560 // if (which->getTodoStatus()) {
2546 mTodoList->updateView(); 2561 mTodoList->updateView();
2547 // } 2562 // }
2548 } else { 2563 } else {
2549 mViewManager->currentView()->updateView(); 2564 mViewManager->currentView()->updateView();
2550 } 2565 }
2551} 2566}
2552 2567
2553 2568
2554void CalendarView::updateTodoViews() 2569void CalendarView::updateTodoViews()
2555{ 2570{
2556 mTodoList->updateView(); 2571 mTodoList->updateView();
2557 mViewManager->currentView()->updateView(); 2572 mViewManager->currentView()->updateView();
2558 2573
2559} 2574}
2560 2575
2561 2576
2562void CalendarView::updateView(const QDate &start, const QDate &end) 2577void CalendarView::updateView(const QDate &start, const QDate &end)
2563{ 2578{
2564 mTodoList->updateView(); 2579 mTodoList->updateView();
2565 mViewManager->updateView(start, end); 2580 mViewManager->updateView(start, end);
2566 //mDateNavigator->updateView(); 2581 //mDateNavigator->updateView();
2567} 2582}
2568 2583
2569void CalendarView::clearAllViews() 2584void CalendarView::clearAllViews()
2570{ 2585{
2571 mTodoList->clearList(); 2586 mTodoList->clearList();
2572 mViewManager->clearAllViews(); 2587 mViewManager->clearAllViews();
2573 SearchDialog * sd = mDialogManager->getSearchDialog(); 2588 SearchDialog * sd = mDialogManager->getSearchDialog();
2574 if ( sd ) { 2589 if ( sd ) {
2575 KOListView* kol = sd->listview(); 2590 KOListView* kol = sd->listview();
2576 if ( kol ) 2591 if ( kol )
2577 kol->clearList(); 2592 kol->clearList();
2578 } 2593 }
2579} 2594}
2580void CalendarView::updateView() 2595void CalendarView::updateView()
2581{ 2596{
2582 DateList tmpList = mNavigator->selectedDates(); 2597 DateList tmpList = mNavigator->selectedDates();
2583 2598
2584 if ( KOPrefs::instance()->mHideNonStartedTodos ) 2599 if ( KOPrefs::instance()->mHideNonStartedTodos )
2585 mTodoList->updateView(); 2600 mTodoList->updateView();
2586 // We assume that the navigator only selects consecutive days. 2601 // We assume that the navigator only selects consecutive days.
2587 updateView( tmpList.first(), tmpList.last() ); 2602 updateView( tmpList.first(), tmpList.last() );
2588} 2603}
2589 2604
2590void CalendarView::updateUnmanagedViews() 2605void CalendarView::updateUnmanagedViews()
2591{ 2606{
2592 mDateNavigator->updateDayMatrix(); 2607 mDateNavigator->updateDayMatrix();
2593} 2608}
2594 2609
2595int CalendarView::msgItemDelete(const QString name) 2610int CalendarView::msgItemDelete(const QString name)
2596{ 2611{
2597 return KMessageBox::warningContinueCancel(this,name +"\n\n"+ 2612 return KMessageBox::warningContinueCancel(this,name +"\n\n"+
2598 i18n("This item will be\npermanently deleted."), 2613 i18n("This item will be\npermanently deleted."),
2599 i18n("KO/Pi Confirmation"),i18n("Delete")); 2614 i18n("KO/Pi Confirmation"),i18n("Delete"));
2600} 2615}
2601 2616
2602 2617
2603void CalendarView::edit_cut() 2618void CalendarView::edit_cut()
2604{ 2619{
2605 Event *anEvent=0; 2620 Event *anEvent=0;
2606 2621
2607 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2622 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2608 2623
2609 if (mViewManager->currentView()->isEventView()) { 2624 if (mViewManager->currentView()->isEventView()) {
2610 if ( incidence && incidence->typeID() == eventID ) { 2625 if ( incidence && incidence->typeID() == eventID ) {
2611 anEvent = static_cast<Event *>(incidence); 2626 anEvent = static_cast<Event *>(incidence);
2612 } 2627 }
2613 } 2628 }
2614 2629
2615 if (!anEvent) { 2630 if (!anEvent) {
2616 KNotifyClient::beep(); 2631 KNotifyClient::beep();
2617 return; 2632 return;
2618 } 2633 }
2619 DndFactory factory( mCalendar ); 2634 DndFactory factory( mCalendar );
2620 factory.cutIncidence(anEvent); 2635 factory.cutIncidence(anEvent);
2621 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 2636 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
2622} 2637}
2623 2638
2624void CalendarView::edit_copy() 2639void CalendarView::edit_copy()
2625{ 2640{
2626 Event *anEvent=0; 2641 Event *anEvent=0;
2627 2642
2628 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2643 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2629 2644
2630 if (mViewManager->currentView()->isEventView()) { 2645 if (mViewManager->currentView()->isEventView()) {
2631 if ( incidence && incidence->typeID() == eventID ) { 2646 if ( incidence && incidence->typeID() == eventID ) {
2632 anEvent = static_cast<Event *>(incidence); 2647 anEvent = static_cast<Event *>(incidence);
2633 } 2648 }
2634 } 2649 }
2635 2650
2636 if (!anEvent) { 2651 if (!anEvent) {
2637 KNotifyClient::beep(); 2652 KNotifyClient::beep();
2638 return; 2653 return;
2639 } 2654 }
2640 DndFactory factory( mCalendar ); 2655 DndFactory factory( mCalendar );
2641 factory.copyIncidence(anEvent); 2656 factory.copyIncidence(anEvent);
2642} 2657}
2643 2658
2644void CalendarView::edit_paste() 2659void CalendarView::edit_paste()
2645{ 2660{
2646 QDate date = mNavigator->selectedDates().first(); 2661 QDate date = mNavigator->selectedDates().first();
2647 2662
2648 DndFactory factory( mCalendar ); 2663 DndFactory factory( mCalendar );
2649 Event *pastedEvent = (Event *)factory.pasteIncidence( date ); 2664 Event *pastedEvent = (Event *)factory.pasteIncidence( date );
2650 2665
2651 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); 2666 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED );
2652} 2667}
2653void CalendarView::edit_global_options() 2668void CalendarView::edit_global_options()
2654{ 2669{
2655 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; 2670 QString tz = KPimGlobalPrefs::instance()->mTimeZoneId;
2656 emit save(); 2671 emit save();
2657 emit saveStopTimer(); 2672 emit saveStopTimer();
2658 mDialogManager->showGlobalOptionsDialog(); 2673 mDialogManager->showGlobalOptionsDialog();
2659 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { 2674 if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) {
2660 emit saveStopTimer(); 2675 emit saveStopTimer();
2661 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), 2676 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"),
2662 i18n("Timezone settings"),i18n("Reload"))) { 2677 i18n("Timezone settings"),i18n("Reload"))) {
2663 qDebug("KO: TZ reload cancelled "); 2678 qDebug("KO: TZ reload cancelled ");
2664 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 2679 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2665 return; 2680 return;
2666 } 2681 }
2667 qDebug("KO: Timezone change "); 2682 qDebug("KO: Timezone change ");
2668 openCalendar( MainWindow::defaultFileName() ); 2683 openCalendar( MainWindow::defaultFileName() );
2669 setModified(true); 2684 setModified(true);
2670 } 2685 }
2671 else 2686 else
2672 qDebug("KO: No tz change "); 2687 qDebug("KO: No tz change ");
2673} 2688}
2674void CalendarView::edit_options() 2689void CalendarView::edit_options()
2675{ 2690{
2676 mDialogManager->showOptionsDialog(); 2691 mDialogManager->showOptionsDialog();
2677} 2692}
2678 2693
2679 2694
2680void CalendarView::slotSelectPickerDate( QDate d) 2695void CalendarView::slotSelectPickerDate( QDate d)
2681{ 2696{
2682 mDateFrame->hide(); 2697 mDateFrame->hide();
2683 if ( mDatePickerMode == 1 ) { 2698 if ( mDatePickerMode == 1 ) {
2684 mNavigator->slotDaySelect( d ); 2699 mNavigator->slotDaySelect( d );
2685 } else if ( mDatePickerMode == 2 ) { 2700 } else if ( mDatePickerMode == 2 ) {
2686 if ( mMoveIncidence->typeID() == todoID ) { 2701 if ( mMoveIncidence->typeID() == todoID ) {
2687 Todo * to = (Todo *) mMoveIncidence; 2702 Todo * to = (Todo *) mMoveIncidence;
2688 QTime tim; 2703 QTime tim;
2689 int len = 0; 2704 int len = 0;
2690 if ( to->hasStartDate() && to->hasDueDate() ) 2705 if ( to->hasStartDate() && to->hasDueDate() )
2691 len = to->dtStart().secsTo( to->dtDue()); 2706 len = to->dtStart().secsTo( to->dtDue());
2692 if ( to->hasDueDate() ) 2707 if ( to->hasDueDate() )
2693 tim = to->dtDue().time(); 2708 tim = to->dtDue().time();
2694 else { 2709 else {
2695 tim = QTime ( 0,0,0 ); 2710 tim = QTime ( 0,0,0 );
2696 to->setFloats( true ); 2711 to->setFloats( true );
2697 to->setHasDueDate( true ); 2712 to->setHasDueDate( true );
2698 } 2713 }
2699 QDateTime dt ( d,tim ); 2714 QDateTime dt ( d,tim );
2700 to->setDtDue( dt ); 2715 to->setDtDue( dt );
2701 2716
2702 if ( to->hasStartDate() ) { 2717 if ( to->hasStartDate() ) {
2703 if ( len>0 ) 2718 if ( len>0 )
2704 to->setDtStart(to->dtDue().addSecs( -len )); 2719 to->setDtStart(to->dtDue().addSecs( -len ));
2705 else 2720 else
2706 if (to->dtStart() > to->dtDue() ) 2721 if (to->dtStart() > to->dtDue() )
2707 to->setDtStart(to->dtDue().addDays( -3 )); 2722 to->setDtStart(to->dtDue().addDays( -3 ));
2708 } 2723 }
2709 2724
2710 todoChanged( to ); 2725 todoChanged( to );
2711 } else { 2726 } else {
2712 if ( mMoveIncidence->doesRecur() ) { 2727 if ( mMoveIncidence->doesRecur() ) {
2713#if 0 2728#if 0
2714 // PENDING implement this 2729 // PENDING implement this
2715 Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); 2730 Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate );
2716 mCalendar()->addIncidence( newInc ); 2731 mCalendar()->addIncidence( newInc );
2717 if ( mMoveIncidence->typeID() == todoID ) 2732 if ( mMoveIncidence->typeID() == todoID )
2718 emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); 2733 emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED );
2719 else 2734 else
2720 emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); 2735 emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED);
2721 mMoveIncidence = newInc; 2736 mMoveIncidence = newInc;
2722 2737
2723#endif 2738#endif
2724 } 2739 }
2725 QTime tim = mMoveIncidence->dtStart().time(); 2740 QTime tim = mMoveIncidence->dtStart().time();
2726 int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); 2741 int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd());
2727 QDateTime dt ( d,tim ); 2742 QDateTime dt ( d,tim );
2728 mMoveIncidence->setDtStart( dt ); 2743 mMoveIncidence->setDtStart( dt );
2729 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); 2744 ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) );
2730 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); 2745 changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED);
2731 } 2746 }
2732 2747
2733 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); 2748 mMoveIncidence->setRevision( mMoveIncidence->revision()+1 );
2734 } 2749 }
2735} 2750}
2736 2751
2737void CalendarView::removeCategories() 2752void CalendarView::removeCategories()
2738{ 2753{
2739 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 2754 QPtrList<Incidence> incList = mCalendar->rawIncidences();
2740 QStringList catList = KOPrefs::instance()->mCustomCategories; 2755 QStringList catList = KOPrefs::instance()->mCustomCategories;
2741 QStringList catIncList; 2756 QStringList catIncList;
2742 QStringList newCatList; 2757 QStringList newCatList;
2743 Incidence* inc = incList.first(); 2758 Incidence* inc = incList.first();
2744 int i; 2759 int i;
2745 int count = 0; 2760 int count = 0;
2746 while ( inc ) { 2761 while ( inc ) {
2747 newCatList.clear(); 2762 newCatList.clear();
2748 catIncList = inc->categories() ; 2763 catIncList = inc->categories() ;
2749 for( i = 0; i< catIncList.count(); ++i ) { 2764 for( i = 0; i< catIncList.count(); ++i ) {
2750 if ( catList.contains (catIncList[i])) 2765 if ( catList.contains (catIncList[i]))
2751 newCatList.append( catIncList[i] ); 2766 newCatList.append( catIncList[i] );
2752 } 2767 }
2753 newCatList.sort(); 2768 newCatList.sort();
2754 inc->setCategories( newCatList.join(",") ); 2769 inc->setCategories( newCatList.join(",") );
2755 inc = incList.next(); 2770 inc = incList.next();
2756 } 2771 }
2757} 2772}
2758 2773
2759int CalendarView::addCategories() 2774int CalendarView::addCategories()
2760{ 2775{
2761 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 2776 QPtrList<Incidence> incList = mCalendar->rawIncidences();
2762 QStringList catList = KOPrefs::instance()->mCustomCategories; 2777 QStringList catList = KOPrefs::instance()->mCustomCategories;
2763 QStringList catIncList; 2778 QStringList catIncList;
2764 Incidence* inc = incList.first(); 2779 Incidence* inc = incList.first();
2765 int i; 2780 int i;
2766 int count = 0; 2781 int count = 0;
2767 while ( inc ) { 2782 while ( inc ) {
2768 catIncList = inc->categories() ; 2783 catIncList = inc->categories() ;
2769 for( i = 0; i< catIncList.count(); ++i ) { 2784 for( i = 0; i< catIncList.count(); ++i ) {
2770 if ( !catList.contains (catIncList[i])) { 2785 if ( !catList.contains (catIncList[i])) {
2771 catList.append( catIncList[i] ); 2786 catList.append( catIncList[i] );
2772 //qDebug("add cat %s ", catIncList[i].latin1()); 2787 //qDebug("add cat %s ", catIncList[i].latin1());
2773 ++count; 2788 ++count;
2774 } 2789 }
2775 } 2790 }
2776 inc = incList.next(); 2791 inc = incList.next();
2777 } 2792 }
2778 catList.sort(); 2793 catList.sort();
2779 KOPrefs::instance()->mCustomCategories = catList; 2794 KOPrefs::instance()->mCustomCategories = catList;
2780 return count; 2795 return count;
2781} 2796}
2782 2797
2783void CalendarView::manageCategories() 2798void CalendarView::manageCategories()
2784{ 2799{
2785 KOCatPrefs* cp = new KOCatPrefs(); 2800 KOCatPrefs* cp = new KOCatPrefs();
2786 cp->show(); 2801 cp->show();
2787 int w =cp->sizeHint().width() ; 2802 int w =cp->sizeHint().width() ;
2788 int h = cp->sizeHint().height() ; 2803 int h = cp->sizeHint().height() ;
2789 int dw = QApplication::desktop()->width(); 2804 int dw = QApplication::desktop()->width();
2790 int dh = QApplication::desktop()->height(); 2805 int dh = QApplication::desktop()->height();
2791 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2806 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2792 if ( !cp->exec() ) { 2807 if ( !cp->exec() ) {
2793 delete cp; 2808 delete cp;
2794 return; 2809 return;
2795 } 2810 }
2796 int count = 0; 2811 int count = 0;
2797 if ( cp->addCat() ) { 2812 if ( cp->addCat() ) {
2798 count = addCategories(); 2813 count = addCategories();
2799 if ( count ) { 2814 if ( count ) {
2800 topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); 2815 topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! "));
2801 writeSettings(); 2816 writeSettings();
2802 } else 2817 } else
2803 topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); 2818 topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! "));
2804 } else { 2819 } else {
2805 removeCategories(); 2820 removeCategories();
2806 updateView(); 2821 updateView();
2807 } 2822 }
2808 delete cp; 2823 delete cp;
2809} 2824}
2810 2825
2811void CalendarView::beamIncidence(Incidence * Inc) 2826void CalendarView::beamIncidence(Incidence * Inc)
2812{ 2827{
2813 QPtrList<Incidence> delSel ; 2828 QPtrList<Incidence> delSel ;
2814 delSel.append(Inc); 2829 delSel.append(Inc);
2815 beamIncidenceList( delSel ); 2830 beamIncidenceList( delSel );
2816} 2831}
2817void CalendarView::beamCalendar() 2832void CalendarView::beamCalendar()
2818{ 2833{
2819 QPtrList<Incidence> delSel = mCalendar->rawIncidences(); 2834 QPtrList<Incidence> delSel = mCalendar->rawIncidences();
2820 //qDebug("beamCalendar() "); 2835 //qDebug("beamCalendar() ");
2821 beamIncidenceList( delSel ); 2836 beamIncidenceList( delSel );
2822} 2837}
2823void CalendarView::beamFilteredCalendar() 2838void CalendarView::beamFilteredCalendar()
2824{ 2839{
2825 QPtrList<Incidence> delSel = mCalendar->incidences(); 2840 QPtrList<Incidence> delSel = mCalendar->incidences();
2826 //qDebug("beamFilteredCalendar() "); 2841 //qDebug("beamFilteredCalendar() ");
2827 beamIncidenceList( delSel ); 2842 beamIncidenceList( delSel );
2828} 2843}
2829void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) 2844void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2830{ 2845{
2831 if ( beamDialog->exec () == QDialog::Rejected ) 2846 if ( beamDialog->exec () == QDialog::Rejected )
2832 return; 2847 return;
2833#ifdef DESKTOP_VERSION 2848#ifdef DESKTOP_VERSION
2834 QString fn = locateLocal( "tmp", "kopibeamfile" ); 2849 QString fn = locateLocal( "tmp", "kopibeamfile" );
2835#else 2850#else
2836 QString fn = "/tmp/kopibeamfile"; 2851 QString fn = "/tmp/kopibeamfile";
2837#endif 2852#endif
2838 QString mes; 2853 QString mes;
2839 bool createbup = true; 2854 bool createbup = true;
2840 if ( createbup ) { 2855 if ( createbup ) {
2841 QString description = "\n"; 2856 QString description = "\n";
2842 CalendarLocal* cal = new CalendarLocal(); 2857 CalendarLocal* cal = new CalendarLocal();
2843 if ( beamDialog->beamLocal() ) 2858 if ( beamDialog->beamLocal() )
2844 cal->setLocalTime(); 2859 cal->setLocalTime();
2845 else 2860 else
2846 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 2861 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2847 Incidence *incidence = delSel.first(); 2862 Incidence *incidence = delSel.first();
2848 bool addText = false; 2863 bool addText = false;
2849 if ( delSel.count() < 10 ) 2864 if ( delSel.count() < 10 )
2850 addText = true; 2865 addText = true;
2851 else { 2866 else {
2852 description.sprintf(i18n(" %d items?"),delSel.count() ); 2867 description.sprintf(i18n(" %d items?"),delSel.count() );
2853 } 2868 }
2854 while ( incidence ) { 2869 while ( incidence ) {
2855 Incidence *in = incidence->clone(); 2870 Incidence *in = incidence->clone();
2856 if ( ! in->summary().isEmpty() ) { 2871 if ( ! in->summary().isEmpty() ) {
2857 in->setDescription(""); 2872 in->setDescription("");
2858 } else { 2873 } else {
2859 in->setSummary( in->description().left(20)); 2874 in->setSummary( in->description().left(20));
2860 in->setDescription(""); 2875 in->setDescription("");
2861 } 2876 }
2862 if ( addText ) 2877 if ( addText )
2863 description += in->summary() + "\n"; 2878 description += in->summary() + "\n";
2864 cal->addIncidence( in ); 2879 cal->addIncidence( in );
2865 incidence = delSel.next(); 2880 incidence = delSel.next();
2866 } 2881 }
2867 if ( beamDialog->beamVcal() ) { 2882 if ( beamDialog->beamVcal() ) {
2868 fn += ".vcs"; 2883 fn += ".vcs";
2869 FileStorage storage( cal, fn, new VCalFormat ); 2884 FileStorage storage( cal, fn, new VCalFormat );
2870 storage.save(); 2885 storage.save();
2871 } else { 2886 } else {
2872 fn += ".ics"; 2887 fn += ".ics";
2873 FileStorage storage( cal, fn, new ICalFormat( ) ); 2888 FileStorage storage( cal, fn, new ICalFormat( ) );
2874 storage.save(); 2889 storage.save();
2875 } 2890 }
2876 delete cal; 2891 delete cal;
2877 mes = i18n("KO/Pi: Ready for beaming"); 2892 mes = i18n("KO/Pi: Ready for beaming");
2878 topLevelWidget()->setCaption(mes); 2893 topLevelWidget()->setCaption(mes);
2879 KApplication::convert2latin1( fn ); 2894 KApplication::convert2latin1( fn );
2880#ifndef DESKTOP_VERSION 2895#ifndef DESKTOP_VERSION
2881 Ir *ir = new Ir( this ); 2896 Ir *ir = new Ir( this );
2882 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 2897 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
2883 ir->send( fn, description, "text/x-vCalendar" ); 2898 ir->send( fn, description, "text/x-vCalendar" );
2884#endif 2899#endif
2885 } 2900 }
2886} 2901}
2887void CalendarView::beamDone( Ir *ir ) 2902void CalendarView::beamDone( Ir *ir )
2888{ 2903{
2889#ifndef DESKTOP_VERSION 2904#ifndef DESKTOP_VERSION
2890 delete ir; 2905 delete ir;
2891#endif 2906#endif
2892 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); 2907 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") );
2893 topLevelWidget()->raise(); 2908 topLevelWidget()->raise();
2894} 2909}
2895 2910
2896void CalendarView::moveIncidence(Incidence * inc ) 2911void CalendarView::moveIncidence(Incidence * inc )
2897{ 2912{
2898 if ( !inc ) return; 2913 if ( !inc ) return;
2899 showDatePickerPopup(); 2914 showDatePickerPopup();
2900 mDatePickerMode = 2; 2915 mDatePickerMode = 2;
2901 mMoveIncidence = inc ; 2916 mMoveIncidence = inc ;
2902 QDate da; 2917 QDate da;
2903 if ( mMoveIncidence->typeID() == todoID ) { 2918 if ( mMoveIncidence->typeID() == todoID ) {
2904 Todo * to = (Todo *) mMoveIncidence; 2919 Todo * to = (Todo *) mMoveIncidence;
2905 if ( to->hasDueDate() ) 2920 if ( to->hasDueDate() )
2906 da = to->dtDue().date(); 2921 da = to->dtDue().date();
2907 else 2922 else
2908 da = QDate::currentDate(); 2923 da = QDate::currentDate();
2909 } else { 2924 } else {
2910 da = mMoveIncidence->dtStart().date(); 2925 da = mMoveIncidence->dtStart().date();
2911 } 2926 }
2912 //PENDING set date for recurring incidence to date of recurrence 2927 //PENDING set date for recurring incidence to date of recurrence
2913 //mMoveIncidenceOldDate; 2928 //mMoveIncidenceOldDate;
2914 mDatePicker->setDate( da ); 2929 mDatePicker->setDate( da );
2915} 2930}
2916void CalendarView::showDatePickerPopup() 2931void CalendarView::showDatePickerPopup()
2917{ 2932{
2918 if ( mDateFrame->isVisible() ) 2933 if ( mDateFrame->isVisible() )
2919 mDateFrame->hide(); 2934 mDateFrame->hide();
2920 else { 2935 else {
2921 int offX = 0, offY = 0; 2936 int offX = 0, offY = 0;
2922#ifdef DESKTOP_VERSION 2937#ifdef DESKTOP_VERSION
2923 int w =mDatePicker->sizeHint().width() ; 2938 int w =mDatePicker->sizeHint().width() ;
2924 int h = mDatePicker->sizeHint().height() ; 2939 int h = mDatePicker->sizeHint().height() ;
2925 int dw = topLevelWidget()->width(); 2940 int dw = topLevelWidget()->width();
2926 int dh = topLevelWidget()->height(); 2941 int dh = topLevelWidget()->height();
2927 offX = topLevelWidget()->x(); 2942 offX = topLevelWidget()->x();
2928 offY = topLevelWidget()->y(); 2943 offY = topLevelWidget()->y();
2929#else 2944#else
2930 int w =mDatePicker->sizeHint().width() ; 2945 int w =mDatePicker->sizeHint().width() ;
2931 int h = mDatePicker->sizeHint().height() ; 2946 int h = mDatePicker->sizeHint().height() ;
2932 int dw = QApplication::desktop()->width(); 2947 int dw = QApplication::desktop()->width();
2933 int dh = QApplication::desktop()->height(); 2948 int dh = QApplication::desktop()->height();
2934#endif 2949#endif
2935 mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); 2950 mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h );
2936 mDateFrame->show(); 2951 mDateFrame->show();
2937 } 2952 }
2938} 2953}
2939void CalendarView::showDatePicker( ) 2954void CalendarView::showDatePicker( )
2940{ 2955{
2941 showDatePickerPopup(); 2956 showDatePickerPopup();
2942 mDatePickerMode = 1; 2957 mDatePickerMode = 1;
2943 mDatePicker->setDate( mNavigator->selectedDates().first() ); 2958 mDatePicker->setDate( mNavigator->selectedDates().first() );
2944} 2959}
2945 2960
2946void CalendarView::showEventEditor() 2961void CalendarView::showEventEditor()
2947{ 2962{
2948#ifdef DESKTOP_VERSION 2963#ifdef DESKTOP_VERSION
2949 int x,y,w,h; 2964 int x,y,w,h;
2950 x = mEventEditor->geometry().x(); 2965 x = mEventEditor->geometry().x();
2951 y = mEventEditor->geometry().y(); 2966 y = mEventEditor->geometry().y();
2952 w = mEventEditor->width(); 2967 w = mEventEditor->width();
2953 h = mEventEditor->height(); 2968 h = mEventEditor->height();
2954 mEventEditor->show(); 2969 mEventEditor->show();
2955 mEventEditor->setGeometry(x,y,w,h); 2970 mEventEditor->setGeometry(x,y,w,h);
2956#else 2971#else
2957 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { 2972 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
2958 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2973 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2959 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); 2974 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
2960 qApp->processEvents(); 2975 qApp->processEvents();
2961 delete mEventEditor; 2976 delete mEventEditor;
2962 mEventEditor = mDialogManager->getEventEditor(); 2977 mEventEditor = mDialogManager->getEventEditor();
2963 topLevelWidget()->setCaption( i18n("") ); 2978 topLevelWidget()->setCaption( i18n("") );
2964 } 2979 }
2965 mEventEditor->showMaximized(); 2980 mEventEditor->showMaximized();
2966#endif 2981#endif
2967} 2982}
2968void CalendarView::showTodoEditor() 2983void CalendarView::showTodoEditor()
2969{ 2984{
2970#ifdef DESKTOP_VERSION 2985#ifdef DESKTOP_VERSION
2971 int x,y,w,h; 2986 int x,y,w,h;
2972 x = mTodoEditor->geometry().x(); 2987 x = mTodoEditor->geometry().x();
2973 y = mTodoEditor->geometry().y(); 2988 y = mTodoEditor->geometry().y();
2974 w = mTodoEditor->width(); 2989 w = mTodoEditor->width();
2975 h = mTodoEditor->height(); 2990 h = mTodoEditor->height();
2976 mTodoEditor->show(); 2991 mTodoEditor->show();
2977 mTodoEditor->setGeometry(x,y,w,h); 2992 mTodoEditor->setGeometry(x,y,w,h);
2978#else 2993#else
2979 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { 2994 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
2980 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2995 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2981 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); 2996 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
2982 qApp->processEvents(); 2997 qApp->processEvents();
2983 delete mTodoEditor; 2998 delete mTodoEditor;
2984 mTodoEditor = mDialogManager->getTodoEditor(); 2999 mTodoEditor = mDialogManager->getTodoEditor();
2985 topLevelWidget()->setCaption( i18n("") ); 3000 topLevelWidget()->setCaption( i18n("") );
2986 } 3001 }
2987 mTodoEditor->showMaximized(); 3002 mTodoEditor->showMaximized();
2988#endif 3003#endif
2989} 3004}
2990 3005
2991void CalendarView::cloneIncidence() 3006void CalendarView::cloneIncidence()
2992{ 3007{
2993 Incidence *incidence = currentSelection(); 3008 Incidence *incidence = currentSelection();
2994 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3009 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2995 if ( incidence ) { 3010 if ( incidence ) {
2996 cloneIncidence(incidence); 3011 cloneIncidence(incidence);
2997 } 3012 }
2998} 3013}
2999void CalendarView::moveIncidence() 3014void CalendarView::moveIncidence()
3000{ 3015{
3001 Incidence *incidence = currentSelection(); 3016 Incidence *incidence = currentSelection();
3002 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3017 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3003 if ( incidence ) { 3018 if ( incidence ) {
3004 moveIncidence(incidence); 3019 moveIncidence(incidence);
3005 } 3020 }
3006} 3021}
3007void CalendarView::beamIncidence() 3022void CalendarView::beamIncidence()
3008{ 3023{
3009 Incidence *incidence = currentSelection(); 3024 Incidence *incidence = currentSelection();
3010 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3025 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3011 if ( incidence ) { 3026 if ( incidence ) {
3012 beamIncidence(incidence); 3027 beamIncidence(incidence);
3013 } 3028 }
3014} 3029}
3015void CalendarView::toggleCancelIncidence() 3030void CalendarView::toggleCancelIncidence()
3016{ 3031{
3017 Incidence *incidence = currentSelection(); 3032 Incidence *incidence = currentSelection();
3018 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3033 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3019 if ( incidence ) { 3034 if ( incidence ) {
3020 cancelIncidence(incidence); 3035 cancelIncidence(incidence);
3021 } 3036 }
3022} 3037}
3023 3038
3024 3039
3025void CalendarView::cancelIncidence(Incidence * inc ) 3040void CalendarView::cancelIncidence(Incidence * inc )
3026{ 3041{
3027 inc->setCancelled( ! inc->cancelled() ); 3042 inc->setCancelled( ! inc->cancelled() );
3028 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); 3043 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED );
3029 updateView(); 3044 updateView();
3030} 3045}
3031void CalendarView::cloneIncidence(Incidence * orgInc ) 3046void CalendarView::cloneIncidence(Incidence * orgInc )
3032{ 3047{
3033 Incidence * newInc = orgInc->clone(); 3048 Incidence * newInc = orgInc->clone();
3034 newInc->recreate(); 3049 newInc->recreate();
3035 3050
3036 if ( newInc->typeID() == todoID ) { 3051 if ( newInc->typeID() == todoID ) {
3037 Todo* t = (Todo*) newInc; 3052 Todo* t = (Todo*) newInc;
3038 bool cloneSub = false; 3053 bool cloneSub = false;
3039 if ( orgInc->relations().count() ) { 3054 if ( orgInc->relations().count() ) {
3040 int result = KMessageBox::warningYesNoCancel(this, 3055 int result = KMessageBox::warningYesNoCancel(this,
3041 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 ) ), 3056 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 ) ),
3042 i18n("Todo has subtodos"), 3057 i18n("Todo has subtodos"),
3043 i18n("Yes"), 3058 i18n("Yes"),
3044 i18n("No")); 3059 i18n("No"));
3045 3060
3046 if ( result == KMessageBox::Cancel ) { 3061 if ( result == KMessageBox::Cancel ) {
3047 delete t; 3062 delete t;
3048 return; 3063 return;
3049 } 3064 }
3050 if (result == KMessageBox::Yes) cloneSub = true; 3065 if (result == KMessageBox::Yes) cloneSub = true;
3051 } 3066 }
3052 showTodoEditor(); 3067 showTodoEditor();
3053 mTodoEditor->editTodo( t ); 3068 mTodoEditor->editTodo( t );
3054 if ( mTodoEditor->exec() ) { 3069 if ( mTodoEditor->exec() ) {
3055 if ( cloneSub ) { 3070 if ( cloneSub ) {
3056 orgInc->cloneRelations( t ); 3071 orgInc->cloneRelations( t );
3057 mCalendar->addIncidenceBranch( t ); 3072 mCalendar->addIncidenceBranch( t );
3058 updateView(); 3073 updateView();
3059 3074
3060 } else { 3075 } else {
3061 mCalendar->addTodo( t ); 3076 mCalendar->addTodo( t );
3062 updateView(); 3077 updateView();
3063 } 3078 }
3064 } else { 3079 } else {
3065 delete t; 3080 delete t;
3066 } 3081 }
3067 } 3082 }
3068 else { 3083 else {
3069 Event* e = (Event*) newInc; 3084 Event* e = (Event*) newInc;
3070 showEventEditor(); 3085 showEventEditor();
3071 mEventEditor->editEvent( e ); 3086 mEventEditor->editEvent( e );
3072 if ( mEventEditor->exec() ) { 3087 if ( mEventEditor->exec() ) {
3073 mCalendar->addEvent( e ); 3088 mCalendar->addEvent( e );
3074 updateView(); 3089 updateView();
3075 } else { 3090 } else {
3076 delete e; 3091 delete e;
3077 } 3092 }
3078 } 3093 }
3079 setActiveWindow(); 3094 setActiveWindow();
3080} 3095}
3081 3096
3082void CalendarView::newEvent() 3097void CalendarView::newEvent()
3083{ 3098{
3084 // TODO: Replace this code by a common eventDurationHint of KOBaseView. 3099 // TODO: Replace this code by a common eventDurationHint of KOBaseView.
3085 KOAgendaView *aView = mViewManager->agendaView(); 3100 KOAgendaView *aView = mViewManager->agendaView();
3086 if (aView) { 3101 if (aView) {
3087 if (aView->selectionStart().isValid()) { 3102 if (aView->selectionStart().isValid()) {
3088 if (aView->selectedIsAllDay()) { 3103 if (aView->selectedIsAllDay()) {
3089 newEvent(aView->selectionStart(),aView->selectionEnd(),true); 3104 newEvent(aView->selectionStart(),aView->selectionEnd(),true);
3090 } else { 3105 } else {
3091 newEvent(aView->selectionStart(),aView->selectionEnd()); 3106 newEvent(aView->selectionStart(),aView->selectionEnd());
3092 } 3107 }
3093 return; 3108 return;
3094 } 3109 }
3095 } 3110 }
3096 3111
3097 QDate date = mNavigator->selectedDates().first(); 3112 QDate date = mNavigator->selectedDates().first();
3098 QDateTime current = QDateTime::currentDateTime(); 3113 QDateTime current = QDateTime::currentDateTime();
3099 if ( date <= current.date() ) { 3114 if ( date <= current.date() ) {
3100 int hour = current.time().hour() +1; 3115 int hour = current.time().hour() +1;
3101 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), 3116 newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ),
3102 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 3117 QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
3103 } else 3118 } else
3104 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), 3119 newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ),
3105 QDateTime( date, QTime( KOPrefs::instance()->mStartTime + 3120 QDateTime( date, QTime( KOPrefs::instance()->mStartTime +
3106 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); 3121 KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) );
3107} 3122}
3108 3123
3109void CalendarView::newEvent(QDateTime fh) 3124void CalendarView::newEvent(QDateTime fh)
3110{ 3125{
3111 newEvent(fh, 3126 newEvent(fh,
3112 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); 3127 QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration)));
3113} 3128}
3114 3129
3115void CalendarView::newEvent(QDate dt) 3130void CalendarView::newEvent(QDate dt)
3116{ 3131{
3117 newEvent(QDateTime(dt, QTime(0,0,0)), 3132 newEvent(QDateTime(dt, QTime(0,0,0)),
3118 QDateTime(dt, QTime(0,0,0)), true); 3133 QDateTime(dt, QTime(0,0,0)), true);
3119} 3134}
3120void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) 3135void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint)
3121{ 3136{
3122 newEvent(fromHint, toHint, false); 3137 newEvent(fromHint, toHint, false);
3123} 3138}
3124void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) 3139void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
3125{ 3140{
3126 3141
3127 showEventEditor(); 3142 showEventEditor();
3128 mEventEditor->newEvent(fromHint,toHint,allDay); 3143 mEventEditor->newEvent(fromHint,toHint,allDay);
3129 if ( mFilterView->filtersEnabled() ) { 3144 if ( mFilterView->filtersEnabled() ) {
3130 CalFilter *filter = mFilterView->selectedFilter(); 3145 CalFilter *filter = mFilterView->selectedFilter();
3131 if (filter && filter->showCategories()) { 3146 if (filter && filter->showCategories()) {
3132 mEventEditor->setCategories(filter->categoryList().join(",") ); 3147 mEventEditor->setCategories(filter->categoryList().join(",") );
3133 } 3148 }
3134 if ( filter ) 3149 if ( filter )
3135 mEventEditor->setSecrecy( filter->getSecrecy() ); 3150 mEventEditor->setSecrecy( filter->getSecrecy() );
3136 } 3151 }
3137 mEventEditor->exec(); 3152 mEventEditor->exec();
3138 setActiveWindow(); 3153 setActiveWindow();
3139} 3154}
3140void CalendarView::todoAdded(Todo * t) 3155void CalendarView::todoAdded(Todo * t)
3141{ 3156{
3142 3157
3143 changeTodoDisplay ( t ,KOGlobals::EVENTADDED); 3158 changeTodoDisplay ( t ,KOGlobals::EVENTADDED);
3144 updateTodoViews(); 3159 updateTodoViews();
3145} 3160}
3146void CalendarView::todoChanged(Todo * t) 3161void CalendarView::todoChanged(Todo * t)
3147{ 3162{
3148 emit todoModified( t, 4 ); 3163 emit todoModified( t, 4 );
3149 // updateTodoViews(); 3164 // updateTodoViews();
3150} 3165}
3151void CalendarView::todoToBeDeleted(Todo *) 3166void CalendarView::todoToBeDeleted(Todo *)
3152{ 3167{
3153 //qDebug("todoToBeDeleted(Todo *) "); 3168 //qDebug("todoToBeDeleted(Todo *) ");
3154 updateTodoViews(); 3169 updateTodoViews();
3155} 3170}
3156void CalendarView::todoDeleted() 3171void CalendarView::todoDeleted()
3157{ 3172{
3158 //qDebug(" todoDeleted()"); 3173 //qDebug(" todoDeleted()");
3159 updateTodoViews(); 3174 updateTodoViews();
3160} 3175}
3161 3176
3162 3177
3163void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) 3178void CalendarView::newTodoDateTime( QDateTime dt, bool allday )
3164{ 3179{
3165 showTodoEditor(); 3180 showTodoEditor();
3166 mTodoEditor->newTodo(dt,0,allday); 3181 mTodoEditor->newTodo(dt,0,allday);
3167 if ( mFilterView->filtersEnabled() ) { 3182 if ( mFilterView->filtersEnabled() ) {
3168 CalFilter *filter = mFilterView->selectedFilter(); 3183 CalFilter *filter = mFilterView->selectedFilter();
3169 if (filter && filter->showCategories()) { 3184 if (filter && filter->showCategories()) {
3170 mTodoEditor->setCategories(filter->categoryList().join(",") ); 3185 mTodoEditor->setCategories(filter->categoryList().join(",") );
3171 } 3186 }
3172 if ( filter ) 3187 if ( filter )
3173 mTodoEditor->setSecrecy( filter->getSecrecy() ); 3188 mTodoEditor->setSecrecy( filter->getSecrecy() );
3174 } 3189 }
3175 mTodoEditor->exec(); 3190 mTodoEditor->exec();
3176 setActiveWindow(); 3191 setActiveWindow();
3177} 3192}
3178 3193
3179void CalendarView::newTodo() 3194void CalendarView::newTodo()
3180{ 3195{
3181 newTodoDateTime( QDateTime(),true ); 3196 newTodoDateTime( QDateTime(),true );
3182} 3197}
3183 3198
3184void CalendarView::newSubTodo() 3199void CalendarView::newSubTodo()
3185{ 3200{
3186 Todo *todo = selectedTodo(); 3201 Todo *todo = selectedTodo();
3187 if ( todo ) newSubTodo( todo ); 3202 if ( todo ) newSubTodo( todo );
3188} 3203}
3189 3204
3190void CalendarView::newSubTodo(Todo *parentEvent) 3205void CalendarView::newSubTodo(Todo *parentEvent)
3191{ 3206{
3192 3207
3193 showTodoEditor(); 3208 showTodoEditor();
3194 mTodoEditor->newTodo(QDateTime(),parentEvent,true); 3209 mTodoEditor->newTodo(QDateTime(),parentEvent,true);
3195 mTodoEditor->exec(); 3210 mTodoEditor->exec();
3196 setActiveWindow(); 3211 setActiveWindow();
3197} 3212}
3198 3213
3199void CalendarView::newFloatingEvent() 3214void CalendarView::newFloatingEvent()
3200{ 3215{
3201 DateList tmpList = mNavigator->selectedDates(); 3216 DateList tmpList = mNavigator->selectedDates();
3202 QDate date = tmpList.first(); 3217 QDate date = tmpList.first();
3203 3218
3204 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), 3219 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ),
3205 QDateTime( date, QTime( 12, 0, 0 ) ), true ); 3220 QDateTime( date, QTime( 12, 0, 0 ) ), true );
3206} 3221}
3207 3222
3208 3223
3209void CalendarView::editEvent( Event *event ) 3224void CalendarView::editEvent( Event *event )
3210{ 3225{
3211 3226
3212 if ( !event ) return; 3227 if ( !event ) return;
3213 if ( event->isReadOnly() ) { 3228 if ( event->isReadOnly() ) {
3214 showEvent( event ); 3229 showEvent( event );
3215 return; 3230 return;
3216 } 3231 }
3217 showEventEditor(); 3232 showEventEditor();
3218 mEventEditor->editEvent( event , mFlagEditDescription); 3233 mEventEditor->editEvent( event , mFlagEditDescription);
3219 mEventEditor->exec(); 3234 mEventEditor->exec();
3220 setActiveWindow(); 3235 setActiveWindow();
3221 3236
3222} 3237}
3223void CalendarView::editJournal( Journal *jour ) 3238void CalendarView::editJournal( Journal *jour )
3224{ 3239{
3225 if ( !jour ) return; 3240 if ( !jour ) return;
3226 mDialogManager->hideSearchDialog(); 3241 mDialogManager->hideSearchDialog();
3227 mViewManager->showJournalView(); 3242 mViewManager->showJournalView();
3228 mNavigator->slotDaySelect( jour->dtStart().date() ); 3243 mNavigator->slotDaySelect( jour->dtStart().date() );
3229} 3244}
3230void CalendarView::editTodo( Todo *todo ) 3245void CalendarView::editTodo( Todo *todo )
3231{ 3246{
3232 if ( !todo ) return; 3247 if ( !todo ) return;
3233 3248
3234 if ( todo->isReadOnly() ) { 3249 if ( todo->isReadOnly() ) {
3235 showTodo( todo ); 3250 showTodo( todo );
3236 return; 3251 return;
3237 } 3252 }
3238 showTodoEditor(); 3253 showTodoEditor();
3239 mTodoEditor->editTodo( todo ,mFlagEditDescription); 3254 mTodoEditor->editTodo( todo ,mFlagEditDescription);
3240 mTodoEditor->exec(); 3255 mTodoEditor->exec();
3241 setActiveWindow(); 3256 setActiveWindow();
3242 3257
3243} 3258}
3244 3259
3245KOEventViewerDialog* CalendarView::getEventViewerDialog() 3260KOEventViewerDialog* CalendarView::getEventViewerDialog()
3246{ 3261{
3247 if ( !mEventViewerDialog ) { 3262 if ( !mEventViewerDialog ) {
3248 mEventViewerDialog = new KOEventViewerDialog(0); 3263 mEventViewerDialog = new KOEventViewerDialog(0);
3249 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); 3264 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
3250 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); 3265 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
3251 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), 3266 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
3252 dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); 3267 dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
3253 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), 3268 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
3254 viewManager(), SLOT( showAgendaView( bool ) ) ); 3269 viewManager(), SLOT( showAgendaView( bool ) ) );
3255 connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), 3270 connect( mEventViewerDialog, SIGNAL(signalViewerClosed()),
3256 this, SLOT( slotViewerClosed() ) ); 3271 this, SLOT( slotViewerClosed() ) );
3257 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), 3272 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ),
3258 this, SLOT( todoChanged(Todo *) ) ); 3273 this, SLOT( todoChanged(Todo *) ) );
3259 mEventViewerDialog->resize( 640, 480 ); 3274 mEventViewerDialog->resize( 640, 480 );
3260 3275
3261 } 3276 }
3262 return mEventViewerDialog; 3277 return mEventViewerDialog;
3263} 3278}
3264void CalendarView::showEvent(Event *event) 3279void CalendarView::showEvent(Event *event)
3265{ 3280{
3266 getEventViewerDialog()->setEvent(event); 3281 getEventViewerDialog()->setEvent(event);
3267 getEventViewerDialog()->showMe(); 3282 getEventViewerDialog()->showMe();
3268} 3283}
3269 3284
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index a8a3052..3cde103 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -1,434 +1,454 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qcheckbox.h> 24#include <qcheckbox.h>
25#include <qcombobox.h> 25#include <qcombobox.h>
26#include <qpushbutton.h> 26#include <qpushbutton.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qdialog.h> 29#include <qdialog.h>
30#include <qtextstream.h> 30#include <qtextstream.h>
31#include <qtextcodec.h> 31#include <qtextcodec.h>
32 32
33 33
34#include <libkcal/calfilter.h> 34#include <libkcal/calfilter.h>
35 35
36#include "kofilterview.h" 36#include "kofilterview.h"
37#include "koprefs.h" 37#include "koprefs.h"
38#include <kiconloader.h> 38#include <kiconloader.h>
39#include <kglobal.h> 39#include <kglobal.h>
40#include <kcolorbutton.h> 40#include <kcolorbutton.h>
41#include <kmessagebox.h> 41#include <kmessagebox.h>
42 42
43 43
44 44
45 45
46 46
47KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, 47KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent,
48 const char* name,WFlags fl ) 48 const char* name,WFlags fl )
49 : KOFilterView_base(parent,name,fl) 49 : KOFilterView_base(parent,name,fl)
50{ 50{
51 mFilters = filterList; 51 mFilters = filterList;
52 52
53 connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); 53 connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged()));
54 connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); 54 connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged()));
55 connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); 55 connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters()));
56} 56}
57 57
58KOFilterView::~KOFilterView() 58KOFilterView::~KOFilterView()
59{ 59{
60 // no need to delete child widgets, Qt does it all for us 60 // no need to delete child widgets, Qt does it all for us
61} 61}
62 62
63bool KOFilterView::filtersEnabled() 63bool KOFilterView::filtersEnabled()
64{ 64{
65 return mEnabledCheck->isChecked(); 65 return mEnabledCheck->isChecked();
66} 66}
67 67
68void KOFilterView::setFiltersEnabled(bool set) 68void KOFilterView::setFiltersEnabled(bool set)
69{ 69{
70 mEnabledCheck->setChecked(set); 70 mEnabledCheck->setChecked(set);
71 emit filterChanged(); 71 emit filterChanged();
72} 72}
73 73
74 74
75void KOFilterView::updateFilters() 75void KOFilterView::updateFilters()
76{ 76{
77 mSelectionCombo->clear(); 77 mSelectionCombo->clear();
78 78
79 CalFilter *filter = mFilters->first(); 79 CalFilter *filter = mFilters->first();
80 while(filter) { 80 while(filter) {
81 mSelectionCombo->insertItem(filter->name()); 81 mSelectionCombo->insertItem(filter->name());
82 filter = mFilters->next(); 82 filter = mFilters->next();
83 } 83 }
84} 84}
85 85
86CalFilter *KOFilterView::selectedFilter() 86CalFilter *KOFilterView::selectedFilter()
87{ 87{
88 CalFilter *f = mFilters->at(mSelectionCombo->currentItem()); 88 CalFilter *f = mFilters->at(mSelectionCombo->currentItem());
89 return f; 89 return f;
90} 90}
91 91
92void KOFilterView::setSelectedFilter(QString filterName) 92void KOFilterView::setSelectedFilter(QString filterName)
93{ 93{
94 int filter_num = mSelectionCombo->count(); 94 int filter_num = mSelectionCombo->count();
95 int i; 95 int i;
96 for (i=0;i<filter_num;i++) { 96 for (i=0;i<filter_num;i++) {
97 if (mSelectionCombo->text(i)==filterName) 97 if (mSelectionCombo->text(i)==filterName)
98 mSelectionCombo->setCurrentItem(i); 98 mSelectionCombo->setCurrentItem(i);
99 } 99 }
100 emit filterChanged(); 100 emit filterChanged();
101} 101}
102void KOFilterView::setSelectedFilter( int fil ) 102void KOFilterView::setSelectedFilter( int fil )
103{ 103{
104 if ( fil >= mSelectionCombo->count() ) 104 if ( fil >= mSelectionCombo->count() )
105 return; 105 return;
106 mSelectionCombo->setCurrentItem( fil ); 106 mSelectionCombo->setCurrentItem( fil );
107 emit filterChanged(); 107 emit filterChanged();
108} 108}
109 109
110 110
111 111
112KOCalEditView::KOCalEditView(QWidget* parent, 112KOCalEditView::KOCalEditView(QWidget* parent,
113 const char* name ) 113 const char* name )
114 : QScrollView(parent,name) 114 : QScrollView(parent,name)
115{ 115{
116 mw = 0; 116 mw = 0;
117 setResizePolicy( AutoOneFit ); 117 setResizePolicy( AutoOneFit );
118 setFrameStyle ( QFrame::Panel | QFrame::Plain ); 118 setFrameStyle ( QFrame::Panel | QFrame::Plain );
119 setLineWidth ( 1 ); 119 setLineWidth ( 1 );
120 setMidLineWidth ( 1 ); 120 setMidLineWidth ( 1 );
121 setFocusPolicy(NoFocus); 121 setFocusPolicy(NoFocus);
122} 122}
123 123
124KOCalEditView::~KOCalEditView() 124KOCalEditView::~KOCalEditView()
125{ 125{
126 // no need to delete child widgets, Qt does it all for us 126 // no need to delete child widgets, Qt does it all for us
127} 127}
128void KOCalEditView::selectCal(int id ,bool b) 128void KOCalEditView::selectCal(int id ,bool b)
129{ 129{
130 KOPrefs::instance()->getCalendar( id )->isEnabled = b; 130 KOPrefs::instance()->getCalendar( id )->isEnabled = b;
131 emit calendarEnabled ( id, b ); 131 emit calendarEnabled ( id, b );
132 emit needsUpdate(); 132 emit needsUpdate();
133 133
134} 134}
135void KOCalEditView::selectStdCal( int id, bool b ) 135void KOCalEditView::selectStdCal( int id, bool b )
136{ 136{
137 137
138 if ( !b ) { 138 if ( !b ) {
139 KOCalCheckButton* it = (KOCalCheckButton*) sender(); 139 KOCalCheckButton* it = (KOCalCheckButton*) sender();
140 if ( it ) { 140 if ( it ) {
141 it->blockSignals( true ); 141 it->blockSignals( true );
142 it->setChecked( true ); 142 it->setChecked( true );
143 it->blockSignals( false ); 143 it->blockSignals( false );
144 return; 144 return;
145 } 145 }
146 return; 146 return;
147 } 147 }
148 KOCalRadioButton* sen = (KOCalRadioButton*) sender(); 148 KOCalRadioButton* sen = (KOCalRadioButton*) sender();
149 KOCalRadioButton* it = mStdandardB.first(); 149 KOCalRadioButton* it = mStdandardB.first();
150 while ( it ) { 150 while ( it ) {
151 if ( it->isChecked() ) { 151 if ( it->isChecked() ) {
152 if ( it != sen ) { 152 if ( it != sen ) {
153 it->blockSignals( true ); 153 it->blockSignals( true );
154 it->setChecked( false ); 154 it->setChecked( false );
155 it->blockSignals( false ); 155 it->blockSignals( false );
156 break; 156 break;
157 } 157 }
158 } 158 }
159 it = mStdandardB.next(); 159 it = mStdandardB.next();
160 } 160 }
161 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 161 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
162 while ( kkf ) { 162 while ( kkf ) {
163 kkf->isStandard = false; 163 kkf->isStandard = false;
164 kkf = KOPrefs::instance()->mCalendars.next(); 164 kkf = KOPrefs::instance()->mCalendars.next();
165 } 165 }
166 KOPrefs::instance()->getCalendar( id )->isStandard = true; 166 KOPrefs::instance()->getCalendar( id )->isStandard = true;
167 emit setCalendarDefault ( id ); 167 emit setCalendarDefault ( id );
168} 168}
169 169
170void KOCalEditView::selectCalAlarm(int id ,bool b ) 170void KOCalEditView::selectCalAlarm(int id ,bool b )
171{ 171{
172 KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; 172 KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b;
173 emit alarmEnabled ( id , b ); 173 emit alarmEnabled ( id , b );
174 emit needsUpdate(); 174 emit needsUpdate();
175} 175}
176void KOCalEditView::selectReadOnly(int id ,bool b ) 176void KOCalEditView::selectReadOnly(int id ,bool b )
177{ 177{
178 KOPrefs::instance()->getCalendar( id )->isReadOnly = b; 178 KOPrefs::instance()->getCalendar( id )->isReadOnly = b;
179 emit calendarReadonly ( id , b ); 179 emit calendarReadonly ( id , b );
180 if ( KOPrefs::instance()->getCalendar( id )->isStandard && b && id > 1 ) { 180 if ( KOPrefs::instance()->getCalendar( id )->isStandard && b && id > 1 ) {
181 KOPrefs::instance()->getCalendar( id )->isStandard = false; 181 KOPrefs::instance()->getCalendar( id )->isStandard = false;
182 KOPrefs::instance()->getCalendar( 1 )->isStandard = true; 182 KOPrefs::instance()->getCalendar( 1 )->isStandard = true;
183 mStdandardB.at(0)->setChecked( true ); 183 mStdandardB.at(0)->setChecked( true );
184 mStdandardB.at(id-1)->setChecked( false ); 184 mStdandardB.at(id-1)->setChecked( false );
185 emit setCalendarDefault ( 1 ); 185 emit setCalendarDefault ( 1 );
186 } 186 }
187 mStdandardB.at(id-1)->setEnabled( !b ); 187 mStdandardB.at(id-1)->setEnabled( !b );
188 emit needsUpdate(); 188 emit needsUpdate();
189 189
190} 190}
191void KOCalEditView::setColor( const QColor& c, int id ) 191void KOCalEditView::setColor( const QColor& c, int id )
192{ 192{
193 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; 193 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c;
194 emit needsUpdate(); 194 emit needsUpdate();
195} 195}
196void KOCalEditView::deleteCal( int id ) 196void KOCalEditView::deleteCal( int id )
197{ 197{
198 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); 198 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id );
199 QString name = kkf->mName; 199 QString name = kkf->mName;
200 QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); 200 QString file = KGlobal::formatMessage ( kkf->mFileName ,0 );
201 if ( KMessageBox::warningContinueCancel( this, i18n("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!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; 201 if ( KMessageBox::warningContinueCancel( this, i18n("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!)").arg(name).arg(file) ) != KMessageBox::Continue ) return;
202 if ( kkf->isStandard ) 202 if ( kkf->isStandard )
203 selectStdCal( 1, true ); 203 selectStdCal( 1, true );
204 emit removeCalendar ( id ); 204 emit removeCalendar ( id );
205 KOPrefs::instance()->mCalendars.remove ( kkf ); 205 KOPrefs::instance()->mCalendars.remove ( kkf );
206 emit needsUpdate(); 206 emit needsUpdate();
207 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 207 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
208} 208}
209void KOCalEditView::infoCal( int id ) 209void KOCalEditView::infoCal( int id )
210{ 210{
211 QString name = KOPrefs::instance()->getCalendar( id )->mName; 211 QString name = KOPrefs::instance()->getCalendar( id )->mName;
212 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); 212 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 );
213 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { 213 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) {
214 if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { 214 if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) {
215 emit calendarAdded( id ); 215 emit calendarAdded( id );
216 emit needsUpdate(); 216 emit needsUpdate();
217 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 217 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
218 } 218 }
219 } 219 }
220 else 220 else
221 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); 221 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) );
222} 222}
223void KOCalEditView::readConfig() 223void KOCalEditView::readConfig()
224{ 224{
225 225
226 mStdandardB.clear(); 226 mStdandardB.clear();
227 mEnabledB.clear(); 227 mEnabledB.clear();
228 mAlarmB.clear(); 228 mAlarmB.clear();
229 mROB.clear(); 229 mROB.clear();
230 230
231 if ( mw ) delete mw; 231 if ( mw ) delete mw;
232 mw = new QWidget ( viewport() ); 232 mw = new QWidget ( viewport() );
233 addChild(mw); 233 addChild(mw);
234 int ii = 0; 234 int ii = 0;
235 mainLayout = new QGridLayout ( mw , 2, 8 ); 235 mainLayout = new QGridLayout ( mw , 2, 8 );
236 mainLayout->setMargin( 2 ); 236 mainLayout->setMargin( 2 );
237 mainLayout->setSpacing( 2 ); 237 mainLayout->setSpacing( 2 );
238 QPushButton * addBut = new QPushButton ( mw ); 238 QPushButton * addBut = new QPushButton ( mw );
239 addBut->setFocusPolicy(NoFocus); 239 addBut->setFocusPolicy(NoFocus);
240 mainLayout->addWidget( addBut,0,0 ); 240 mainLayout->addWidget( addBut,0,0 );
241 addBut->setText( "D"); 241 addBut->setText( "D");
242 connect(addBut,SIGNAL(clicked()),SLOT(defaultInfo())); 242 connect(addBut,SIGNAL(clicked()),SLOT(defaultInfo()));
243 //addBut->setPixmap ( SmallIcon("greenhook16")); 243 //addBut->setPixmap ( SmallIcon("greenhook16"));
244 addBut->setMaximumWidth( addBut->sizeHint().height() ); 244 addBut->setMaximumWidth( addBut->sizeHint().height() );
245 int max = addBut->sizeHint().height(); 245 int max = addBut->sizeHint().height();
246 addBut = new QPushButton ( mw ); 246 addBut = new QPushButton ( mw );
247 addBut->setFocusPolicy(NoFocus); 247 addBut->setFocusPolicy(NoFocus);
248 mainLayout->addWidget( addBut,0,++ii ); 248 mainLayout->addWidget( addBut,0,++ii );
249 addBut->setPixmap ( SmallIcon("eye")); 249 addBut->setPixmap ( SmallIcon("eye"));
250 connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); 250 connect(addBut,SIGNAL(clicked()),SLOT(enableAll()));
251 addBut->setMaximumWidth( addBut->sizeHint().height() ); 251 addBut->setMaximumWidth( addBut->sizeHint().height() );
252 252
253 QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); 253 QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw );
254 mainLayout->addWidget( lab,0,++ii ); 254 mainLayout->addWidget( lab,0,++ii );
255 //lab = new QLabel ( i18n(" "), mw ); 255 //lab = new QLabel ( i18n(" "), mw );
256 //mainLayout->addWidget( lab,0,++ii ); 256 //mainLayout->addWidget( lab,0,++ii );
257 //lab->setFixedWidth( 1 ); 257 //lab->setFixedWidth( 1 );
258 addBut = new QPushButton ( mw ); 258 addBut = new QPushButton ( mw );
259 addBut->setFocusPolicy(NoFocus); 259 addBut->setFocusPolicy(NoFocus);
260 mainLayout->addWidget( addBut,0,++ii ); 260 mainLayout->addWidget( addBut,0,++ii );
261 addBut->setPixmap ( SmallIcon("bell")); 261 addBut->setPixmap ( SmallIcon("bell"));
262 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); 262 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm()));
263 addBut->setMaximumWidth( addBut->sizeHint().height() ); 263 addBut->setMaximumWidth( addBut->sizeHint().height() );
264 264
265 addBut = new QPushButton ( mw ); 265 addBut = new QPushButton ( mw );
266 addBut->setFocusPolicy(NoFocus); 266 addBut->setFocusPolicy(NoFocus);
267 mainLayout->addWidget( addBut,0,++ii ); 267 mainLayout->addWidget( addBut,0,++ii );
268 addBut->setPixmap ( SmallIcon("pencil")); 268 addBut->setPixmap ( SmallIcon("pencil"));
269 connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); 269 connect(addBut,SIGNAL(clicked()),SLOT(disableRO()));
270 addBut->setMaximumWidth( addBut->sizeHint().height() ); 270 addBut->setMaximumWidth( addBut->sizeHint().height() );
271 lab = new QLabel ( "", mw ); 271 lab = new QLabel ( "", mw );
272 mainLayout->addWidget( lab,0,++ii ); 272 mainLayout->addWidget( lab,0,++ii );
273 273
274 addBut = new QPushButton ( mw ); 274 addBut = new QPushButton ( mw );
275 addBut->setFocusPolicy(NoFocus); 275 addBut->setFocusPolicy(NoFocus);
276 mainLayout->addWidget( addBut,0,++ii ); 276 mainLayout->addWidget( addBut,0,++ii );
277 addBut->setPixmap ( SmallIcon("plus")); 277 addBut->setPixmap ( SmallIcon("plus"));
278 connect(addBut,SIGNAL(clicked()),SLOT(addCal())); 278 connect(addBut,SIGNAL(clicked()),SLOT(addCal()));
279 279
280 lab = new QLabel ( " ", mw ); 280 lab = new QLabel ( " ", mw );
281 mainLayout->addWidget( lab,0,++ii ); 281 mainLayout->addWidget( lab,0,++ii );
282 282
283 283
284 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 284 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
285 int row = 1; 285 int row = 1;
286 while ( kkf ) { 286 while ( kkf ) {
287 int iii = 0; 287 int iii = 0;
288 KOCalRadioButton* rb = new KOCalRadioButton( mw ); 288 KOCalRadioButton* rb = new KOCalRadioButton( mw );
289 mainLayout->addWidget( rb,row,0 );mStdandardB.append( rb ); 289 mainLayout->addWidget( rb,row,0 );mStdandardB.append( rb );
290 rb->setChecked( kkf->isStandard ); 290 rb->setChecked( kkf->isStandard );
291 rb->setNum( kkf->mCalNumber ); 291 rb->setNum( kkf->mCalNumber );
292 connect (rb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) ); 292 connect (rb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) );
293 if ( kkf->mErrorOnLoad || kkf->isReadOnly ) 293 if ( kkf->mErrorOnLoad || kkf->isReadOnly )
294 rb->setEnabled( false ); 294 rb->setEnabled( false );
295 KOCalCheckButton* cb = new KOCalCheckButton( mw ); 295 KOCalCheckButton* cb = new KOCalCheckButton( mw );
296 mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); 296 mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb );
297 cb->setChecked( kkf->isEnabled ); 297 cb->setChecked( kkf->isEnabled );
298 cb->setNum( kkf->mCalNumber ); 298 cb->setNum( kkf->mCalNumber );
299 if ( kkf->mErrorOnLoad ) 299 if ( kkf->mErrorOnLoad )
300 cb->setEnabled( false ); 300 cb->setEnabled( false );
301 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); 301 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) );
302 KOCalButton* name = new KOCalButton( mw ); 302 KOCalButton* name = new KOCalButton( mw );
303 name->setNum( kkf->mCalNumber ); 303 name->setNum( kkf->mCalNumber );
304 name->setText( kkf->mName ); 304 name->setText( kkf->mName );
305 mainLayout->addWidget( name,row,++iii ); 305 mainLayout->addWidget( name,row,++iii );
306 connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); 306 connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) );
307 //lab = new QLabel (" ", mw ); 307 //lab = new QLabel (" ", mw );
308 //mainLayout->addWidget( lab,row,++iii ); 308 //mainLayout->addWidget( lab,row,++iii );
309 cb = new KOCalCheckButton( mw ); 309 cb = new KOCalCheckButton( mw );
310 mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); 310 mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb );
311 cb->setChecked( kkf->isAlarmEnabled ); 311 cb->setChecked( kkf->isAlarmEnabled );
312 cb->setNum( kkf->mCalNumber ); 312 cb->setNum( kkf->mCalNumber );
313 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) ); 313 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) );
314 if ( kkf->mErrorOnLoad ) 314 if ( kkf->mErrorOnLoad )
315 cb->setEnabled( false ); 315 cb->setEnabled( false );
316 cb = new KOCalCheckButton( mw ); 316 cb = new KOCalCheckButton( mw );
317 mainLayout->addWidget( cb,row,++iii );mROB.append( cb ); 317 mainLayout->addWidget( cb,row,++iii );mROB.append( cb );
318 cb->setChecked( kkf->isReadOnly ); 318 cb->setChecked( kkf->isReadOnly );
319 cb->setNum( kkf->mCalNumber ); 319 cb->setNum( kkf->mCalNumber );
320 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) ); 320 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) );
321 if ( kkf->mErrorOnLoad ) 321 if ( kkf->mErrorOnLoad )
322 cb->setEnabled( false ); 322 cb->setEnabled( false );
323 if ( row > 1) { 323 if ( row > 1) {
324 KColorButton *colb = new KColorButton( mw ); 324 KColorButton *colb = new KColorButton( mw );
325 mainLayout->addWidget( colb,row,++iii ); 325 mainLayout->addWidget( colb,row,++iii );
326 colb->setID( kkf->mCalNumber ); 326 colb->setID( kkf->mCalNumber );
327 colb->setColor( kkf->mDefaultColor ); 327 colb->setColor( kkf->mDefaultColor );
328 connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) ); 328 connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) );
329 KOCalButton* calb = new KOCalButton( mw ); 329 KOCalButton* calb = new KOCalButton( mw );
330 mainLayout->addWidget( calb,row,++iii ); 330 mainLayout->addWidget( calb,row,++iii );
331 calb->setNum( kkf->mCalNumber ); 331 calb->setNum( kkf->mCalNumber );
332 calb->setPixmap ( SmallIcon("minus")); 332 calb->setPixmap ( SmallIcon("minus"));
333 connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) ); 333 connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) );
334 int hei = calb->sizeHint().height(); 334 int hei = calb->sizeHint().height();
335 //calb->setMaximumSize( hei*9/10, hei*9/10 ); 335 //calb->setMaximumSize( hei*9/10, hei*9/10 );
336 } 336 }
337 ++row; 337 ++row;
338 kkf = KOPrefs::instance()->mCalendars.next(); 338 kkf = KOPrefs::instance()->mCalendars.next();
339 } 339 }
340 lab = new QLabel ( "", mw ); 340 lab = new QLabel ( "", mw );
341 mainLayout->addWidget( lab,row,0 ); 341 mainLayout->addWidget( lab,row,0 );
342 mw->show(); 342 mw->show();
343 343
344} 344}
345 345
346 346
347void KOCalEditView::defaultInfo() 347void KOCalEditView::defaultInfo()
348{ 348{
349 KMessageBox::information( this, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") ); 349 KMessageBox::information( this, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") );
350} 350}
351void KOCalEditView::addCal() 351void KOCalEditView::addCal()
352{ 352{
353 bool tryagain = true; 353 bool tryagain = true;
354 QString name, file; 354 QString name, file;
355 while ( tryagain ) { 355 while ( tryagain ) {
356 KONewCalPrefs prefs ( this ); 356 KONewCalPrefs prefs ( this );
357 prefs.nameE->setText( name ); 357 prefs.nameE->setText( name );
358 prefs.url->setURL( file ); 358 prefs.url->setURL( file );
359 if ( ! prefs.exec() ) 359 if ( ! prefs.exec() )
360 return; 360 return;
361 name = prefs.calName(); 361 name = prefs.calName();
362 file = prefs.calFileName(); 362 file = prefs.calFileName();
363 tryagain = false; 363 tryagain = false;
364 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 364 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
365 while ( kkf ) { 365 while ( kkf ) {
366 if ( kkf->mName == name ) { 366 if ( kkf->mName == name ) {
367 KMessageBox::information( this, i18n("Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!").arg( name ) ); 367 KMessageBox::information( this, i18n("Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!").arg( name ) );
368 name = ""; 368 name = "";
369 tryagain = true; 369 tryagain = true;
370 break; 370 break;
371 } 371 }
372 if ( kkf->mFileName == file ) { 372 if ( kkf->mFileName == file ) {
373 KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( KGlobal::formatMessage (file, 0 )) ); 373 KMessageBox::information( this, i18n("Sorry, the file \n%1\nis already loaded!\nPlease choose another file!").arg( KGlobal::formatMessage (file, 0 )) );
374 tryagain = true; 374 tryagain = true;
375 file = ""; 375 file = "";
376 break; 376 break;
377 } 377 }
378 kkf = KOPrefs::instance()->mCalendars.next(); 378 kkf = KOPrefs::instance()->mCalendars.next();
379 } 379 }
380 } 380 }
381 addCalendar ( name, file );
382}
383int KOCalEditView::addCalendar( QString name, QString file, bool ask )
384{
385
381 QFileInfo fi ( file ); 386 QFileInfo fi ( file );
382 if (!fi.exists() ) { 387 if (!fi.exists() ) {
383 if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( file ) )== KMessageBox::No ) 388 if ( ask )
384 return; 389 if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( file ) )== KMessageBox::No )
390 return 0;
385 QFile fileIn( file ); 391 QFile fileIn( file );
386 if (!fileIn.open( IO_WriteOnly ) ) { 392 if (!fileIn.open( IO_WriteOnly ) ) {
387 KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) ); 393 KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) );
388 return; 394 return 0;
389 } 395 }
390 QTextStream tsIn( &fileIn ); 396 QTextStream tsIn( &fileIn );
391 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 397 tsIn.setCodec( QTextCodec::codecForName("utf8") );
392 tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n"; 398 tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n";
393 fileIn.close(); 399 fileIn.close();
394 } 400 }
395 KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); 401 KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar();
396 kkf->mName = name; 402 kkf->mName = name;
397 kkf->mFileName = file; 403 kkf->mFileName = file;
398 emit calendarAdded( kkf->mCalNumber ); 404 emit calendarAdded( kkf->mCalNumber );
399 emit needsUpdate(); 405 if ( ask )
400 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 406 emit needsUpdate();
407 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
408 return kkf->mCalNumber;
401} 409}
410int KOCalEditView::getBirtdayID()
411{
412 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
413 while ( kkf ) {
414 if ( kkf->mName == i18n("Birthdays") )
415 return kkf->mCalNumber;
416 kkf = KOPrefs::instance()->mCalendars.next();
417 }
418 QString file = locateLocal( "data", "korganizer/birthdays.ics" );
419 return addCalendar( i18n("Birthdays"), file, false );
420}
421
402void KOCalEditView::enableAll() 422void KOCalEditView::enableAll()
403{ 423{
404 toggleList( mEnabledB ); 424 toggleList( mEnabledB );
405} 425}
406void KOCalEditView::enableAlarm() 426void KOCalEditView::enableAlarm()
407{ 427{
408 toggleList( mAlarmB ); 428 toggleList( mAlarmB );
409} 429}
410void KOCalEditView::disableRO() 430void KOCalEditView::disableRO()
411{ 431{
412 toggleList( mROB ); 432 toggleList( mROB );
413} 433}
414void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list ) 434void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list )
415{ 435{
416 bool dis = false; 436 bool dis = false;
417 KOCalCheckButton* it = list.first(); 437 KOCalCheckButton* it = list.first();
418 while ( it ) { 438 while ( it ) {
419 if ( !it->isChecked() ) { 439 if ( !it->isChecked() ) {
420 dis = true; 440 dis = true;
421 break; 441 break;
422 } 442 }
423 it = list.next(); 443 it = list.next();
424 } 444 }
425 it = list.first(); 445 it = list.first();
426 while ( it ) { 446 while ( it ) {
427 it->setChecked(dis); 447 it->setChecked(dis);
428 it = list.next(); 448 it = list.next();
429 } 449 }
430} 450}
431void KOCalEditView::deleteAll() 451void KOCalEditView::deleteAll()
432{ 452{
433 qDebug("delteAll"); 453 qDebug("delteAll");
434} 454}
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index b57a6e9..54fe2c5 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -1,248 +1,249 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef KOFILTERVIEW_H 23#ifndef KOFILTERVIEW_H
24#define KOFILTERVIEW_H 24#define KOFILTERVIEW_H
25 25
26#include <qstring.h> 26#include <qstring.h>
27#include <qcheckbox.h> 27#include <qcheckbox.h>
28#include <qradiobutton.h> 28#include <qradiobutton.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qlabel.h> 30#include <qlabel.h>
31#include <qdialog.h> 31#include <qdialog.h>
32#include <qscrollview.h> 32#include <qscrollview.h>
33#include <qpushbutton.h> 33#include <qpushbutton.h>
34#include <kconfig.h> 34#include <kconfig.h>
35#include "kofilterview_base.h" 35#include "kofilterview_base.h"
36 36
37#include <libkcal/calfilter.h> 37#include <libkcal/calfilter.h>
38 38
39#include <kurlrequester.h> 39#include <kurlrequester.h>
40#include <klineedit.h> 40#include <klineedit.h>
41#include <kglobal.h> 41#include <kglobal.h>
42#include <kmessagebox.h> 42#include <kmessagebox.h>
43 43
44class QGridLayout; 44class QGridLayout;
45 45
46using namespace KCal; 46using namespace KCal;
47 47
48class KONewCalPrefs : public QDialog 48class KONewCalPrefs : public QDialog
49{ 49{
50 Q_OBJECT 50 Q_OBJECT
51 public: 51 public:
52 KONewCalPrefs( QWidget *parent=0, const char *name=0 ) : 52 KONewCalPrefs( QWidget *parent=0, const char *name=0 ) :
53 QDialog( parent, name, true ) 53 QDialog( parent, name, true )
54 { 54 {
55 setCaption( i18n("Add new Calendar") ); 55 setCaption( i18n("Add new Calendar") );
56 QVBoxLayout* lay = new QVBoxLayout( this ); 56 QVBoxLayout* lay = new QVBoxLayout( this );
57 lay->setSpacing( 3 ); 57 lay->setSpacing( 3 );
58 lay->setMargin( 3 ); 58 lay->setMargin( 3 );
59 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this ); 59 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this );
60 lay->addWidget( lab ); 60 lay->addWidget( lab );
61 nameE = new KLineEdit( this ); 61 nameE = new KLineEdit( this );
62 lay->addWidget( nameE ); 62 lay->addWidget( nameE );
63 lab = new QLabel( i18n("<b>Local ical (*.ics) file:</b>"), this ); 63 lab = new QLabel( i18n("<b>Local ical (*.ics) file:</b>"), this );
64 lay->addWidget( lab ); 64 lay->addWidget( lab );
65 url = new KURLRequester ( this ); 65 url = new KURLRequester ( this );
66 lay->addWidget( url ); 66 lay->addWidget( url );
67 QPushButton * ok = new QPushButton( i18n("OK"), this ); 67 QPushButton * ok = new QPushButton( i18n("OK"), this );
68 lay->addWidget( ok ); 68 lay->addWidget( ok );
69 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 69 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
70 lay->addWidget( cancel ); 70 lay->addWidget( cancel );
71 connect ( ok,SIGNAL(clicked() ),this , SLOT ( checkValid() ) ); 71 connect ( ok,SIGNAL(clicked() ),this , SLOT ( checkValid() ) );
72 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 72 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
73 setMinimumWidth( 220 ); 73 setMinimumWidth( 220 );
74 resize(sizeHint() ); 74 resize(sizeHint() );
75 } 75 }
76 76
77 QString calName() { return nameE->text(); } 77 QString calName() { return nameE->text(); }
78 QString calFileName() { return url->url(); } 78 QString calFileName() { return url->url(); }
79 79
80public slots: 80public slots:
81void checkValid() { 81void checkValid() {
82 if ( nameE->text().isEmpty() ) { 82 if ( nameE->text().isEmpty() ) {
83 KMessageBox::information( this, i18n("Sorry, the calendar name is empty!") ); 83 KMessageBox::information( this, i18n("Sorry, the calendar name is empty!") );
84 nameE->setText( "LPQJ_"+ QString::number( QTime::currentTime().msec () )); 84 nameE->setText( "LPQJ_"+ QString::number( QTime::currentTime().msec () ));
85 return; 85 return;
86 } 86 }
87 if ( url->url().isEmpty() ) { 87 if ( url->url().isEmpty() ) {
88 KMessageBox::information( this, i18n("Sorry, the file name is empty!") ); 88 KMessageBox::information( this, i18n("Sorry, the file name is empty!") );
89 return; 89 return;
90 } 90 }
91 accept(); 91 accept();
92} 92}
93 93
94public: 94public:
95 KLineEdit* nameE; 95 KLineEdit* nameE;
96 KURLRequester *url; 96 KURLRequester *url;
97}; 97};
98 98
99class KOCalButton : public QPushButton 99class KOCalButton : public QPushButton
100{ 100{
101 Q_OBJECT 101 Q_OBJECT
102 public: 102 public:
103 KOCalButton( QWidget *parent=0, const char *name=0 ) : 103 KOCalButton( QWidget *parent=0, const char *name=0 ) :
104 QPushButton( parent, name) 104 QPushButton( parent, name)
105 { 105 {
106 connect( this, SIGNAL( clicked() ), 106 connect( this, SIGNAL( clicked() ),
107 SLOT( bottonClicked() )); 107 SLOT( bottonClicked() ));
108 mNumber = -1; 108 mNumber = -1;
109 setFocusPolicy(NoFocus); 109 setFocusPolicy(NoFocus);
110 } 110 }
111 void setNum ( int num ) {mNumber = num; } 111 void setNum ( int num ) {mNumber = num; }
112 signals: 112 signals:
113 void selectNum ( int ); 113 void selectNum ( int );
114private: 114private:
115 int mNumber; 115 int mNumber;
116 void keyPressEvent ( QKeyEvent * e ) 116 void keyPressEvent ( QKeyEvent * e )
117 { 117 {
118 e->ignore(); 118 e->ignore();
119 } 119 }
120 120
121private slots : 121private slots :
122 void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); } 122 void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); }
123}; 123};
124class KOCalCheckButton : public QCheckBox 124class KOCalCheckButton : public QCheckBox
125{ 125{
126 Q_OBJECT 126 Q_OBJECT
127 public: 127 public:
128 KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : 128 KOCalCheckButton( QWidget *parent=0, const char *name=0 ) :
129 QCheckBox( parent, name) 129 QCheckBox( parent, name)
130 { 130 {
131 connect( this, SIGNAL( toggled ( bool ) ), 131 connect( this, SIGNAL( toggled ( bool ) ),
132 SLOT( bottonClicked( bool ) )); 132 SLOT( bottonClicked( bool ) ));
133 mNumber = -1; 133 mNumber = -1;
134 setFocusPolicy(NoFocus); 134 setFocusPolicy(NoFocus);
135 //setMaximumWidth( 10 ); 135 //setMaximumWidth( 10 );
136 136
137 } 137 }
138 void setNum ( int num ) {mNumber = num; } 138 void setNum ( int num ) {mNumber = num; }
139 signals: 139 signals:
140 void selectNum ( int, bool ); 140 void selectNum ( int, bool );
141private: 141private:
142 int mNumber; 142 int mNumber;
143 void keyPressEvent ( QKeyEvent * e ) 143 void keyPressEvent ( QKeyEvent * e )
144 { 144 {
145 e->ignore(); 145 e->ignore();
146 } 146 }
147 147
148private slots : 148private slots :
149 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } 149 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); }
150}; 150};
151 151
152class KOCalRadioButton : public QRadioButton 152class KOCalRadioButton : public QRadioButton
153{ 153{
154 Q_OBJECT 154 Q_OBJECT
155 public: 155 public:
156 KOCalRadioButton( QWidget *parent=0, const char *name=0 ) : 156 KOCalRadioButton( QWidget *parent=0, const char *name=0 ) :
157 QRadioButton( parent, name) 157 QRadioButton( parent, name)
158 { 158 {
159 connect( this, SIGNAL( toggled ( bool ) ), 159 connect( this, SIGNAL( toggled ( bool ) ),
160 SLOT( bottonClicked( bool ) )); 160 SLOT( bottonClicked( bool ) ));
161 mNumber = -1; 161 mNumber = -1;
162 setFocusPolicy(NoFocus); 162 setFocusPolicy(NoFocus);
163 //setMaximumWidth( 10 ); 163 //setMaximumWidth( 10 );
164 164
165 } 165 }
166 void setNum ( int num ) {mNumber = num; } 166 void setNum ( int num ) {mNumber = num; }
167 signals: 167 signals:
168 void selectNum ( int, bool ); 168 void selectNum ( int, bool );
169private: 169private:
170 int mNumber; 170 int mNumber;
171 void keyPressEvent ( QKeyEvent * e ) 171 void keyPressEvent ( QKeyEvent * e )
172 { 172 {
173 e->ignore(); 173 e->ignore();
174 } 174 }
175 175
176private slots : 176private slots :
177 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } 177 void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); }
178}; 178};
179 179
180 180
181 181
182class KOFilterView : public KOFilterView_base 182class KOFilterView : public KOFilterView_base
183{ 183{
184 Q_OBJECT 184 Q_OBJECT
185 public: 185 public:
186 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); 186 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0);
187 ~KOFilterView(); 187 ~KOFilterView();
188 188
189 void updateFilters(); 189 void updateFilters();
190 190
191 bool filtersEnabled(); 191 bool filtersEnabled();
192 void setFiltersEnabled(bool); 192 void setFiltersEnabled(bool);
193 CalFilter *selectedFilter(); 193 CalFilter *selectedFilter();
194 void setSelectedFilter(QString); 194 void setSelectedFilter(QString);
195 void setSelectedFilter( int ); 195 void setSelectedFilter( int );
196 196
197 signals: 197 signals:
198 void filterChanged(); 198 void filterChanged();
199 void editFilters(); 199 void editFilters();
200 200
201 private: 201 private:
202 QPtrList<CalFilter> *mFilters; 202 QPtrList<CalFilter> *mFilters;
203}; 203};
204 204
205class KOCalEditView : public QScrollView 205class KOCalEditView : public QScrollView
206{ 206{
207 Q_OBJECT 207 Q_OBJECT
208 public: 208 public:
209 KOCalEditView( QWidget* parent=0,const char* name=0); 209 KOCalEditView( QWidget* parent=0,const char* name=0);
210 ~KOCalEditView(); 210 ~KOCalEditView();
211 211 int addCalendar( QString calName, QString fileName, bool ask = true );
212 int getBirtdayID();
212 public slots: 213 public slots:
213 void addCal(); 214 void addCal();
214 void enableAll(); 215 void enableAll();
215 void enableAlarm(); 216 void enableAlarm();
216 void disableRO(); 217 void disableRO();
217 void deleteAll(); 218 void deleteAll();
218 void selectStdCal(int,bool ); 219 void selectStdCal(int,bool );
219 void selectCal(int,bool ); 220 void selectCal(int,bool );
220 void selectCalAlarm(int,bool ); 221 void selectCalAlarm(int,bool );
221 void selectReadOnly(int,bool ); 222 void selectReadOnly(int,bool );
222 void setColor(const QColor &,int) ; 223 void setColor(const QColor &,int) ;
223 void deleteCal(int) ; 224 void deleteCal(int) ;
224 void infoCal(int) ; 225 void infoCal(int) ;
225 void readConfig(); 226 void readConfig();
226 void defaultInfo(); 227 void defaultInfo();
227 signals: 228 signals:
228 void alarmEnabled ( int cal, bool enable ); 229 void alarmEnabled ( int cal, bool enable );
229 void calendarEnabled ( int cal, bool enable ); 230 void calendarEnabled ( int cal, bool enable );
230 void calendarReadonly ( int cal, bool readonly ); 231 void calendarReadonly ( int cal, bool readonly );
231 void setCalendarDefault ( int cal ); 232 void setCalendarDefault ( int cal );
232 void removeCalendar ( int cal ); 233 void removeCalendar ( int cal );
233 void calendarAdded( int ); 234 void calendarAdded( int );
234 void needsUpdate(); 235 void needsUpdate();
235 236
236 private: 237 private:
237 QWidget *mw; 238 QWidget *mw;
238 void toggleList ( QPtrList<KOCalCheckButton> ); 239 void toggleList ( QPtrList<KOCalCheckButton> );
239 QPtrList<KOCalRadioButton> mStdandardB; 240 QPtrList<KOCalRadioButton> mStdandardB;
240 QPtrList<KOCalCheckButton> mEnabledB; 241 QPtrList<KOCalCheckButton> mEnabledB;
241 QPtrList<KOCalCheckButton> mAlarmB; 242 QPtrList<KOCalCheckButton> mAlarmB;
242 QPtrList<KOCalCheckButton> mROB; 243 QPtrList<KOCalCheckButton> mROB;
243 QGridLayout* mainLayout; 244 QGridLayout* mainLayout;
244}; 245};
245 246
246 247
247 248
248#endif // KOFILTERVIEW_H 249#endif // KOFILTERVIEW_H
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index a4ea3d3..7ba7269 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -1,599 +1,603 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <time.h> 24#include <time.h>
25#ifndef _WIN32_ 25#ifndef _WIN32_
26#include <unistd.h> 26#include <unistd.h>
27#endif 27#endif
28#include <qdir.h> 28#include <qdir.h>
29#include <qtextstream.h> 29#include <qtextstream.h>
30#include <qtextcodec.h> 30#include <qtextcodec.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qregexp.h> 32#include <qregexp.h>
33#include <qfont.h> 33#include <qfont.h>
34#include <qcolor.h> 34#include <qcolor.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <stdlib.h> 36#include <stdlib.h>
37 37
38#include <kglobal.h> 38#include <kglobal.h>
39#include <kglobalsettings.h> 39#include <kglobalsettings.h>
40#include <kconfig.h> 40#include <kconfig.h>
41#include <klocale.h> 41#include <klocale.h>
42#include <kdebug.h> 42#include <kdebug.h>
43#include <kemailsettings.h> 43#include <kemailsettings.h>
44#include <kstaticdeleter.h> 44#include <kstaticdeleter.h>
45#include <libkdepim/kpimglobalprefs.h> 45#include <libkdepim/kpimglobalprefs.h>
46 46
47#include "koprefs.h" 47#include "koprefs.h"
48#include "mainwindow.h" 48#include "mainwindow.h"
49 49
50KOPrefs *KOPrefs::mInstance = 0; 50KOPrefs *KOPrefs::mInstance = 0;
51static KStaticDeleter<KOPrefs> insd; 51static KStaticDeleter<KOPrefs> insd;
52 52
53KOPrefs::KOPrefs() : 53KOPrefs::KOPrefs() :
54 KPimPrefs("korganizerrc") 54 KPimPrefs("korganizerrc")
55{ 55{
56 mCategoryColors.setAutoDelete(true); 56 mCategoryColors.setAutoDelete(true);
57 fillMailDefaults(); 57 fillMailDefaults();
58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196); 58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196);
59 QColor defaultHolidayColor = QColor(255,0,0); 59 QColor defaultHolidayColor = QColor(255,0,0);
60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); 60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255);
61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); 61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128);
62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); 62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160);
63 QColor defaultTodoDueTodayColor = QColor(255,220,100); 63 QColor defaultTodoDueTodayColor = QColor(255,220,100);
64 QColor defaultTodoOverdueColor = QColor(255,153,125); 64 QColor defaultTodoOverdueColor = QColor(255,153,125);
65 QColor defaultTodoRunColor = QColor(99,194,30); 65 QColor defaultTodoRunColor = QColor(99,194,30);
66 KPrefs::setCurrentGroup("General"); 66 KPrefs::setCurrentGroup("General");
67 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 67 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
68 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); 68 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true);
69 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); 69 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true);
70 addItemBool("ShowIconSearch",&mShowIconSearch,true); 70 addItemBool("ShowIconSearch",&mShowIconSearch,true);
71 addItemBool("ShowIconList",&mShowIconList,true); 71 addItemBool("ShowIconList",&mShowIconList,true);
72 addItemBool("ShowIconDay1",&mShowIconDay1,true); 72 addItemBool("ShowIconDay1",&mShowIconDay1,true);
73 addItemBool("ShowIconDay5",&mShowIconDay5,true); 73 addItemBool("ShowIconDay5",&mShowIconDay5,true);
74 addItemBool("ShowIconDay6",&mShowIconDay6,true); 74 addItemBool("ShowIconDay6",&mShowIconDay6,true);
75 addItemBool("ShowIconDay7",&mShowIconDay7,true); 75 addItemBool("ShowIconDay7",&mShowIconDay7,true);
76 addItemBool("ShowIconMonth",&mShowIconMonth,true); 76 addItemBool("ShowIconMonth",&mShowIconMonth,true);
77 addItemBool("ShowIconTodoview",&mShowIconTodoview,true); 77 addItemBool("ShowIconTodoview",&mShowIconTodoview,true);
78 addItemBool("ShowIconBackFast",&mShowIconBackFast,true); 78 addItemBool("ShowIconBackFast",&mShowIconBackFast,true);
79 addItemBool("ShowIconBack",&mShowIconBack,true); 79 addItemBool("ShowIconBack",&mShowIconBack,true);
80 addItemBool("ShowIconToday",&mShowIconToday,true); 80 addItemBool("ShowIconToday",&mShowIconToday,true);
81 addItemBool("ShowIconForward",&mShowIconForward,true); 81 addItemBool("ShowIconForward",&mShowIconForward,true);
82 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); 82 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true);
83 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); 83 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true);
84 addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); 84 addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true);
85 addItemBool("ShowIconNextDays",&mShowIconNextDays,true); 85 addItemBool("ShowIconNextDays",&mShowIconNextDays,true);
86 addItemBool("ShowIconNext",&mShowIconNext,true); 86 addItemBool("ShowIconNext",&mShowIconNext,true);
87 addItemBool("ShowIconJournal",&mShowIconJournal,true); 87 addItemBool("ShowIconJournal",&mShowIconJournal,true);
88 addItemBool("ShowIconStretch",&mShowIconStretch,true); 88 addItemBool("ShowIconStretch",&mShowIconStretch,true);
89 addItemBool("ShowIconFilter",&mShowIconFilter,false); 89 addItemBool("ShowIconFilter",&mShowIconFilter,false);
90 addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); 90 addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true);
91 91
92 bool addIcons = false; 92 bool addIcons = false;
93#ifdef DESKTOP_VERSION 93#ifdef DESKTOP_VERSION
94 addIcons = true; 94 addIcons = true;
95#endif 95#endif
96 addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); 96 addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons);
97 addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); 97 addItemBool("ShowIconAllday",&mShowIconAllday,addIcons);
98 addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); 98 addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons);
99 addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); 99 addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons);
100 100
101 addItemInt("LastLoadedLanguage",&mOldLanguage,0); 101 addItemInt("LastLoadedLanguage",&mOldLanguage,0);
102 102
103 addItemBool("AskForQuit",&mAskForQuit,false); 103 addItemBool("AskForQuit",&mAskForQuit,false);
104 104
105#ifndef DESKTOP_VERSION 105#ifndef DESKTOP_VERSION
106 addItemBool("ShowFullMenu",&mShowFullMenu,false); 106 addItemBool("ShowFullMenu",&mShowFullMenu,false);
107#else 107#else
108 addItemBool("ShowFullMenu",&mShowFullMenu,true); 108 addItemBool("ShowFullMenu",&mShowFullMenu,true);
109#endif 109#endif
110 addItemBool("ToolBarHor",&mToolBarHor, true ); 110 addItemBool("ToolBarHor",&mToolBarHor, true );
111 addItemBool("ToolBarUp",&mToolBarUp, false ); 111 addItemBool("ToolBarUp",&mToolBarUp, false );
112 addItemBool("ToolBarHorV",&mToolBarHorV, true ); 112 addItemBool("ToolBarHorV",&mToolBarHorV, true );
113 addItemBool("ToolBarUpV",&mToolBarUpV, false ); 113 addItemBool("ToolBarUpV",&mToolBarUpV, false );
114 addItemBool("ToolBarHorN",&mToolBarHorN, true ); 114 addItemBool("ToolBarHorN",&mToolBarHorN, true );
115 addItemBool("ToolBarUpN",&mToolBarUpN, false ); 115 addItemBool("ToolBarUpN",&mToolBarUpN, false );
116 addItemBool("ToolBarHorF",&mToolBarHorF, true ); 116 addItemBool("ToolBarHorF",&mToolBarHorF, true );
117 addItemBool("ToolBarUpF",&mToolBarUpF, false ); 117 addItemBool("ToolBarUpF",&mToolBarUpF, false );
118 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); 118 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false );
119 addItemInt("Whats Next Days",&mWhatsNextDays,3); 119 addItemInt("Whats Next Days",&mWhatsNextDays,3);
120 addItemInt("Whats Next Prios",&mWhatsNextPrios,1); 120 addItemInt("Whats Next Prios",&mWhatsNextPrios,1);
121 121
122 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); 122 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true);
123 addItemBool("ShowCompletedTodoInAgenda",&mShowCompletedTodoInAgenda,true); 123 addItemBool("ShowCompletedTodoInAgenda",&mShowCompletedTodoInAgenda,true);
124 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); 124 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true);
125 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); 125 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false);
126 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); 126 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true);
127 addItemInt("AllDay Size",&mAllDaySize,28); 127 addItemInt("AllDay Size",&mAllDaySize,28);
128 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; 128 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav";
129 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); 129 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm );
130 130
131 addItemStringList("LocationDefaults",&mLocationDefaults ); 131 addItemStringList("LocationDefaults",&mLocationDefaults );
132 addItemStringList("EventSummary User",&mEventSummaryUser); 132 addItemStringList("EventSummary User",&mEventSummaryUser);
133 addItemStringList("TodoSummary User",&mTodoSummaryUser); 133 addItemStringList("TodoSummary User",&mTodoSummaryUser);
134 134
135 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 135 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
136 addItemBool("Enable Project View",&mEnableProjectView,false); 136 addItemBool("Enable Project View",&mEnableProjectView,false);
137 addItemBool("Auto Save",&mAutoSave,false); 137 addItemBool("Auto Save",&mAutoSave,false);
138 addItemInt("Auto Save Interval",&mAutoSaveInterval,3); 138 addItemInt("Auto Save Interval",&mAutoSaveInterval,3);
139 addItemBool("Confirm Deletes",&mConfirm,true); 139 addItemBool("Confirm Deletes",&mConfirm,true);
140 addItemString("Archive File",&mArchiveFile); 140 addItemString("Archive File",&mArchiveFile);
141 addItemString("Html Export File",&mHtmlExportFile, 141 addItemString("Html Export File",&mHtmlExportFile,
142 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); 142 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html"));
143 addItemBool("Html With Save",&mHtmlWithSave,false); 143 addItemBool("Html With Save",&mHtmlWithSave,false);
144 144
145 KPrefs::setCurrentGroup("Personal Settings"); 145 KPrefs::setCurrentGroup("Personal Settings");
146 146
147 addItemInt("Mail Client",&mMailClient,MailClientKMail); 147 addItemInt("Mail Client",&mMailClient,MailClientKMail);
148 addItemBool("Use Control Center Email",&mEmailControlCenter,false); 148 addItemBool("Use Control Center Email",&mEmailControlCenter,false);
149 addItemBool("Bcc",&mBcc,false); 149 addItemBool("Bcc",&mBcc,false);
150 150
151 KPrefs::setCurrentGroup("Time & Date"); 151 KPrefs::setCurrentGroup("Time & Date");
152 152
153 153
154 addItemInt("Default Start Time",&mStartTime,10); 154 addItemInt("Default Start Time",&mStartTime,10);
155 addItemInt("Default Duration",&mDefaultDuration,2); 155 addItemInt("Default Duration",&mDefaultDuration,2);
156 addItemInt("Default Alarm Time",&mAlarmTime,3); 156 addItemInt("Default Alarm Time",&mAlarmTime,3);
157 KPrefs::setCurrentGroup("AlarmSettings"); 157 KPrefs::setCurrentGroup("AlarmSettings");
158 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); 158 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20);
159 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); 159 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7);
160 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); 160 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5);
161 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); 161 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3);
162 162
163 163
164 KPrefs::setCurrentGroup("Calendar"); 164 KPrefs::setCurrentGroup("Calendar");
165 165
166 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); 166 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar);
167 167
168 KPrefs::setCurrentGroup("Fonts"); 168 KPrefs::setCurrentGroup("Fonts");
169 // qDebug(" KPrefs::setCurrentGroup(Fonts); "); 169 // qDebug(" KPrefs::setCurrentGroup(Fonts); ");
170 QFont fon = KGlobalSettings::generalFont(); 170 QFont fon = KGlobalSettings::generalFont();
171 addItemFont("TimeBar Font",&mTimeBarFont,fon ); 171 addItemFont("TimeBar Font",&mTimeBarFont,fon );
172 addItemFont("MonthView Font",&mMonthViewFont,fon); 172 addItemFont("MonthView Font",&mMonthViewFont,fon);
173 addItemFont("AgendaView Font",&mAgendaViewFont,fon); 173 addItemFont("AgendaView Font",&mAgendaViewFont,fon);
174 addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); 174 addItemFont("MarcusBains Font",&mMarcusBainsFont,fon);
175 addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); 175 addItemFont("TimeLabels Font",&mTimeLabelsFont,fon);
176 addItemFont("TodoView Font",&mTodoViewFont,fon); 176 addItemFont("TodoView Font",&mTodoViewFont,fon);
177 addItemFont("ListView Font",&mListViewFont,fon); 177 addItemFont("ListView Font",&mListViewFont,fon);
178 addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); 178 addItemFont("DateNavigator Font",&mDateNavigatorFont,fon);
179 addItemFont("EditBox Font",&mEditBoxFont,fon); 179 addItemFont("EditBox Font",&mEditBoxFont,fon);
180 addItemFont("JournalView Font",&mJornalViewFont,fon); 180 addItemFont("JournalView Font",&mJornalViewFont,fon);
181 addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); 181 addItemFont("WhatsNextView Font",&mWhatsNextFont,fon);
182 addItemFont("EventView Font",&mEventViewFont,fon); 182 addItemFont("EventView Font",&mEventViewFont,fon);
183 183
184 KPrefs::setCurrentGroup("RemoteSyncing"); 184 KPrefs::setCurrentGroup("RemoteSyncing");
185 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 185 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
186 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 186 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
187 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 187 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
188 addItemInt("LastSyncTime",&mLastSyncTime,0); 188 addItemInt("LastSyncTime",&mLastSyncTime,0);
189 189
190#ifdef _WIN32_ 190#ifdef _WIN32_
191 QString hdp= locateLocal("data","korganizer")+"\\\\"; 191 QString hdp= locateLocal("data","korganizer")+"\\\\";
192#else 192#else
193 QString hdp= locateLocal("data","korganizer")+"/"; 193 QString hdp= locateLocal("data","korganizer")+"/";
194#endif 194#endif
195 195
196 KPrefs::setCurrentGroup("LoadSaveFileNames"); 196 KPrefs::setCurrentGroup("LoadSaveFileNames");
197 197
198 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); 198 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" );
199 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); 199 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" );
200 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); 200 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" );
201 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); 201 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" );
202 202
203 203
204 KPrefs::setCurrentGroup("Locale"); 204 KPrefs::setCurrentGroup("Locale");
205 addItemBool("ShortDateInViewer",&mShortDateInViewer,false); 205 addItemBool("ShortDateInViewer",&mShortDateInViewer,false);
206 206
207 207
208 KPrefs::setCurrentGroup("Colors"); 208 KPrefs::setCurrentGroup("Colors");
209 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); 209 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor);
210 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); 210 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor);
211 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); 211 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor);
212 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); 212 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) );
213 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); 213 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
214 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); 214 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor);
215 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); 215 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor);
216 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); 216 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor);
217 addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); 217 addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor);
218 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); 218 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 ));
219 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); 219 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 ));
220 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); 220 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 ));
221 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); 221 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true);
222 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); 222 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true);
223 addItemBool("MonthViewWeek",&mMonthViewWeek,false); 223 addItemBool("MonthViewWeek",&mMonthViewWeek,false);
224 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); 224 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false);
225 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); 225 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 ));
226 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); 226 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 ));
227 addItemBool("UseAppColors",&mUseAppColors,false); 227 addItemBool("UseAppColors",&mUseAppColors,false);
228 228
229 229
230 230
231 KPrefs::setCurrentGroup("Views"); 231 KPrefs::setCurrentGroup("Views");
232 addItemBool("Block Popup Menu",&mBlockPopupMenu,true); 232 addItemBool("Block Popup Menu",&mBlockPopupMenu,true);
233 addItemBool("Show Date Navigator",&mShowDateNavigator,true); 233 addItemBool("Show Date Navigator",&mShowDateNavigator,true);
234 addItemInt("Hour Size",&mHourSize,8); 234 addItemInt("Hour Size",&mHourSize,8);
235 addItemBool("Show Daily Recurrences",&mDailyRecur,true); 235 addItemBool("Show Daily Recurrences",&mDailyRecur,true);
236 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); 236 addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true);
237 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); 237 addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true);
238 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); 238 addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true);
239 addItemBool("ShowShortMonthName",&mMonthShowShort,false); 239 addItemBool("ShowShortMonthName",&mMonthShowShort,false);
240 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); 240 addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true);
241 addItemBool("ShowTimesInMonthCell",&mMonthShowTimes,true); 241 addItemBool("ShowTimesInMonthCell",&mMonthShowTimes,true);
242#ifdef DESKTOP_VERION 242#ifdef DESKTOP_VERION
243 addItemBool("Enable ToolTips",&mEnableToolTips,true); 243 addItemBool("Enable ToolTips",&mEnableToolTips,true);
244#else 244#else
245 addItemBool("Enable ToolTips",&mEnableToolTips,false); 245 addItemBool("Enable ToolTips",&mEnableToolTips,false);
246#endif 246#endif
247 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); 247 addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false);
248 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); 248 addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false);
249 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); 249 addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true);
250 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); 250 addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true);
251 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); 251 addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true);
252 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); 252 addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false);
253 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); 253 addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false);
254 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); 254 addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true);
255 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); 255 addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true);
256 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; 256 addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);;
257 addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); 257 addItemBool("WNViewShowsPast",&mWNViewShowsPast,true);
258 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); 258 addItemBool("WNViewShowLocation",&mWNViewShowLocation,false);
259 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); 259 addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false);
260 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); 260 addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true);
261 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); 261 addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false);
262 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); 262 addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false);
263 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); 263 addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true);
264 addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); 264 addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true);
265 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); 265 addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false);
266 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); 266 addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false);
267#ifdef DESKTOP_VERSION 267#ifdef DESKTOP_VERSION
268 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); 268 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true);
269#else 269#else
270 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); 270 addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false);
271#endif 271#endif
272 addItemInt("Day Begins",&mDayBegins,7); 272 addItemInt("Day Begins",&mDayBegins,7);
273 addItemInt("Working Hours Start",&mWorkingHoursStart,8); 273 addItemInt("Working Hours Start",&mWorkingHoursStart,8);
274 addItemInt("Working Hours End",&mWorkingHoursEnd,17); 274 addItemInt("Working Hours End",&mWorkingHoursEnd,17);
275 addItemBool("Exclude Holidays",&mExcludeHolidays,true); 275 addItemBool("Exclude Holidays",&mExcludeHolidays,true);
276 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); 276 addItemBool("Exclude Saturdays",&mExcludeSaturdays,true);
277 277
278 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); 278 addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false);
279 addItemBool("Full View Month",&mFullViewMonth,true); 279 addItemBool("Full View Month",&mFullViewMonth,true);
280 addItemBool("Full View Todo",&mFullViewTodo,true); 280 addItemBool("Full View Todo",&mFullViewTodo,true);
281 addItemBool("Quick Todo",&mEnableQuickTodo,false); 281 addItemBool("Quick Todo",&mEnableQuickTodo,false);
282 282
283 addItemInt("Next X Days",&mNextXDays,3); 283 addItemInt("Next X Days",&mNextXDays,3);
284 284
285 KPrefs::setCurrentGroup("Printer"); 285 KPrefs::setCurrentGroup("Printer");
286 286
287 KPrefs::setCurrentGroup("Layout"); 287 KPrefs::setCurrentGroup("Layout");
288 288
289 addItemBool("CompactDialogs",&mCompactDialogs,false); 289 addItemBool("CompactDialogs",&mCompactDialogs,false);
290 addItemBool("VerticalScreen",&mVerticalScreen,true); 290 addItemBool("VerticalScreen",&mVerticalScreen,true);
291 291
292 KPrefs::setCurrentGroup("KOrganizer Plugins"); 292 KPrefs::setCurrentGroup("KOrganizer Plugins");
293 293
294 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); 294 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays");
295 295
296 KPrefs::setCurrentGroup("Group Scheduling"); 296 KPrefs::setCurrentGroup("Group Scheduling");
297 297
298 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); 298 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail);
299 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); 299 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend);
300 addItemStringList("AdditionalMails",&mAdditionalMails,""); 300 addItemStringList("AdditionalMails",&mAdditionalMails,"");
301 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); 301 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto);
302 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); 302 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto);
303 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); 303 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto);
304 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); 304 addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto);
305 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); 305 addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto);
306 306
307 KPrefs::setCurrentGroup( "Editors" ); 307 KPrefs::setCurrentGroup( "Editors" );
308 308
309 addItemStringList( "EventTemplates", &mEventTemplates ); 309 addItemStringList( "EventTemplates", &mEventTemplates );
310 addItemStringList( "TodoTemplates", &mTodoTemplates ); 310 addItemStringList( "TodoTemplates", &mTodoTemplates );
311 311
312 addItemInt("DestinationPolicy",&mDestination,standardDestination); 312 addItemInt("DestinationPolicy",&mDestination,standardDestination);
313 313
314 KPrefs::setCurrentGroup( "ViewOptions" ); 314 KPrefs::setCurrentGroup( "ViewOptions" );
315 addItemBool("EVshowDetails",&mEVshowDetails,true); 315 addItemBool("EVshowDetails",&mEVshowDetails,true);
316 addItemBool("EVshowCreated",&mEVshowCreated,true); 316 addItemBool("EVshowCreated",&mEVshowCreated,true);
317 addItemBool("EVshowChanged",&mEVshowChanged,true); 317 addItemBool("EVshowChanged",&mEVshowChanged,true);
318 addItemBool("WTshowDetails",&mWTshowDetails,false); 318 addItemBool("WTshowDetails",&mWTshowDetails,false);
319 addItemBool("WTshowCreated",&mWTshowCreated,false); 319 addItemBool("WTshowCreated",&mWTshowCreated,false);
320 addItemBool("WTshowChanged",&mWTshowChanged,false); 320 addItemBool("WTshowChanged",&mWTshowChanged,false);
321 mCalendars.setAutoDelete( true ); 321 mCalendars.setAutoDelete( true );
322} 322}
323 323
324 324
325KOPrefs::~KOPrefs() 325KOPrefs::~KOPrefs()
326{ 326{
327 if (mInstance == this) 327 if (mInstance == this)
328 mInstance = insd.setObject(0); 328 mInstance = insd.setObject(0);
329 mCalendars.setAutoDelete( true ); 329 mCalendars.setAutoDelete( true );
330 mCalendars.clear(); 330 mCalendars.clear();
331 //qDebug("KOPrefs::~KOPrefs() "); 331 //qDebug("KOPrefs::~KOPrefs() ");
332} 332}
333 333
334 334
335KOPrefs *KOPrefs::instance() 335KOPrefs *KOPrefs::instance()
336{ 336{
337 if (!mInstance) { 337 if (!mInstance) {
338 mInstance = insd.setObject(new KOPrefs()); 338 mInstance = insd.setObject(new KOPrefs());
339 mInstance->readConfig(); 339 mInstance->readConfig();
340 } 340 }
341 341
342 return mInstance; 342 return mInstance;
343} 343}
344 344
345void KOPrefs::usrSetDefaults() 345void KOPrefs::usrSetDefaults()
346{ 346{
347 347
348} 348}
349 349
350void KOPrefs::fillMailDefaults() 350void KOPrefs::fillMailDefaults()
351{ 351{
352 if (mName.isEmpty()) mName = i18n("Anonymous"); 352 if (mName.isEmpty()) mName = i18n("Anonymous");
353 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); 353 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere");
354} 354}
355 355
356void KOPrefs::setTimeZoneIdDefault() 356void KOPrefs::setTimeZoneIdDefault()
357{ 357{
358 ; 358 ;
359} 359}
360 360
361void KOPrefs::setAllDefaults() 361void KOPrefs::setAllDefaults()
362{ 362{
363 setCategoryDefaults(); 363 setCategoryDefaults();
364 mEventSummaryUser = getDefaultList() ; 364 mEventSummaryUser = getDefaultList() ;
365 mTodoSummaryUser = getDefaultList() ; 365 mTodoSummaryUser = getDefaultList() ;
366 mLocationDefaults = getLocationDefaultList(); 366 mLocationDefaults = getLocationDefaultList();
367} 367}
368 368
369void KOPrefs::setCategoryDefaults() 369void KOPrefs::setCategoryDefaults()
370{ 370{
371 mCustomCategories.clear(); 371 mCustomCategories.clear();
372 mCustomCategories = getDefaultList(); 372 mCustomCategories = getDefaultList();
373 373
374 QStringList::Iterator it; 374 QStringList::Iterator it;
375 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 375 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
376 setCategoryColor(*it,mDefaultCategoryColor); 376 setCategoryColor(*it,mDefaultCategoryColor);
377 } 377 }
378} 378}
379QStringList KOPrefs::getLocationDefaultList() 379QStringList KOPrefs::getLocationDefaultList()
380{ 380{
381 QStringList retval ; 381 QStringList retval ;
382 retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") 382 retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach")
383 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") 383 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room")
384 << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") 384 << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten")
385 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; 385 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ;
386 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") 386 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("")
387 387
388 retval.sort(); 388 retval.sort();
389 return retval; 389 return retval;
390} 390}
391QStringList KOPrefs::getDefaultList() 391QStringList KOPrefs::getDefaultList()
392{ 392{
393 QStringList retval ; 393 QStringList retval ;
394 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") 394 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer")
395 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") 395 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner")
396 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") 396 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts")
397 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") 397 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids")
398 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") 398 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel")
399 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") 399 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping")
400 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") 400 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University")
401 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; 401 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ;
402 retval.sort(); 402 retval.sort();
403 //qDebug("cat %s ", retval.join("-").latin1()); 403 //qDebug("cat %s ", retval.join("-").latin1());
404 return retval; 404 return retval;
405} 405}
406 406
407void KOPrefs::usrReadConfig() 407void KOPrefs::usrReadConfig()
408{ 408{
409 config()->setGroup("General"); 409 config()->setGroup("General");
410 410
411 //qDebug("KOPrefs::usrReadConfig() "); 411 //qDebug("KOPrefs::usrReadConfig() ");
412 mCustomCategories = config()->readListEntry("Custom Categories"); 412 mCustomCategories = config()->readListEntry("Custom Categories");
413 mOldLoadedLanguage = mOldLanguage ; 413 mOldLoadedLanguage = mOldLanguage ;
414 mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; 414 mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage;
415 if (mLocationDefaults.isEmpty()) { 415 if (mLocationDefaults.isEmpty()) {
416 mLocationDefaults = getLocationDefaultList(); 416 mLocationDefaults = getLocationDefaultList();
417 } 417 }
418 418
419 if (mEventSummaryUser.isEmpty()) { 419 if (mEventSummaryUser.isEmpty()) {
420 mEventSummaryUser = getDefaultList() ; 420 mEventSummaryUser = getDefaultList() ;
421 } 421 }
422 if (mTodoSummaryUser.isEmpty()) { 422 if (mTodoSummaryUser.isEmpty()) {
423 mTodoSummaryUser = getDefaultList() ; 423 mTodoSummaryUser = getDefaultList() ;
424 } 424 }
425 425
426 if (mCustomCategories.isEmpty()) setCategoryDefaults(); 426 if (mCustomCategories.isEmpty()) setCategoryDefaults();
427 427
428 config()->setGroup("Personal Settings"); 428 config()->setGroup("Personal Settings");
429 mName = config()->readEntry("user_name",""); 429 mName = config()->readEntry("user_name","");
430 mEmail = config()->readEntry("user_email",""); 430 mEmail = config()->readEntry("user_email","");
431 fillMailDefaults(); 431 fillMailDefaults();
432 432
433 config()->setGroup("Category Colors"); 433 config()->setGroup("Category Colors");
434 QStringList::Iterator it; 434 QStringList::Iterator it;
435 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 435 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
436 setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); 436 setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor));
437 437
438 } 438 }
439 KConfig fc (locateLocal("config","kopicalendarrc")); 439 KConfig fc (locateLocal("config","kopicalendarrc"));
440 fc.setGroup("CC"); 440 fc.setGroup("CC");
441 int numCals = fc.readNumEntry("NumberCalendars",0 ); 441 int numCals = fc.readNumEntry("NumberCalendars",0 );
442 mNextAvailableCalendar = 1; 442 mNextAvailableCalendar = 1;
443 if ( numCals == 0 ) { 443 if ( numCals == 0 ) {
444 KopiCalendarFile *kkf = getNewCalendar(); 444 KopiCalendarFile *kkf = getNewCalendar();
445 kkf->isStandard = true; 445 kkf->isStandard = true;
446 kkf->mName = i18n("Standard"); 446 kkf->mName = i18n("Standard");
447 kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); 447 kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" );
448 } 448 }
449 while ( mNextAvailableCalendar <= numCals ) { 449 while ( mNextAvailableCalendar <= numCals ) {
450 //qDebug("Read cal #%d ", mNextAvailableCalendar ); 450 //qDebug("Read cal #%d ", mNextAvailableCalendar );
451 QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); 451 QString prefix = "Cal_" +QString::number( mNextAvailableCalendar );
452 KopiCalendarFile *kkf = getNewCalendar(); 452 KopiCalendarFile *kkf = getNewCalendar();
453 kkf->isStandard = fc.readBoolEntry( prefix+"_isStandard", false ); 453 kkf->isStandard = fc.readBoolEntry( prefix+"_isStandard", false );
454 kkf->isEnabled = fc.readBoolEntry( prefix+"_isEnabled", true); 454 kkf->isEnabled = fc.readBoolEntry( prefix+"_isEnabled", true);
455 kkf->isAlarmEnabled = fc.readBoolEntry( prefix+"_isAlarmEnabled", true); 455 kkf->isAlarmEnabled = fc.readBoolEntry( prefix+"_isAlarmEnabled", true);
456 kkf->isReadOnly = fc.readBoolEntry( prefix+"_isReadOnly", false); 456 kkf->isReadOnly = fc.readBoolEntry( prefix+"_isReadOnly", false);
457 kkf->mName = fc.readEntry( prefix+"_Name", "Calendar"); 457 kkf->mName = fc.readEntry( prefix+"_Name", "Calendar");
458 kkf->mFileName = fc.readEntry( prefix+"_FileName", kkf->mFileName); 458 kkf->mFileName = fc.readEntry( prefix+"_FileName", kkf->mFileName);
459 kkf->mDefaultColor = fc.readColorEntry( prefix+"_Color",&mEventColor); 459 kkf->mDefaultColor = fc.readColorEntry( prefix+"_Color",&mEventColor);
460 if ( kkf->mCalNumber == 1 ) { 460 if ( kkf->mCalNumber == 1 ) {
461 kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); 461 kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" );
462 } 462 }
463 //qDebug("NAME %s %s", kkf->mName.latin1(), i18n("Birthdays").latin1() );
464 if ( kkf->mName == i18n("Birthdays") ) {
465 kkf->mFileName = locateLocal( "data", "korganizer/birthdays.ics" );
466 }
463 } 467 }
464 468
465 KPimPrefs::usrReadConfig(); 469 KPimPrefs::usrReadConfig();
466} 470}
467 471
468KopiCalendarFile * KOPrefs::getCalendar( int num ) 472KopiCalendarFile * KOPrefs::getCalendar( int num )
469{ 473{
470 return mDefCalColors[num-1]; 474 return mDefCalColors[num-1];
471} 475}
472 476
473KopiCalendarFile * KOPrefs::getNewCalendar() 477KopiCalendarFile * KOPrefs::getNewCalendar()
474{ 478{
475 KopiCalendarFile * kkf = new KopiCalendarFile(); 479 KopiCalendarFile * kkf = new KopiCalendarFile();
476 kkf->mCalNumber = mNextAvailableCalendar; 480 kkf->mCalNumber = mNextAvailableCalendar;
477 mDefCalColors.resize( mNextAvailableCalendar ); 481 mDefCalColors.resize( mNextAvailableCalendar );
478 mDefCalColors[mNextAvailableCalendar-1] = kkf; 482 mDefCalColors[mNextAvailableCalendar-1] = kkf;
479 ++mNextAvailableCalendar; 483 ++mNextAvailableCalendar;
480 kkf->mDefaultColor = mEventColor; 484 kkf->mDefaultColor = mEventColor;
481 kkf->mName = i18n("New Calendar"); 485 kkf->mName = i18n("New Calendar");
482 mCalendars.append( kkf ); 486 mCalendars.append( kkf );
483 return kkf; 487 return kkf;
484} 488}
485void KOPrefs::deleteCalendar( int num ) 489void KOPrefs::deleteCalendar( int num )
486{ 490{
487 KopiCalendarFile * kkf = mCalendars.first(); 491 KopiCalendarFile * kkf = mCalendars.first();
488 while ( kkf ) { 492 while ( kkf ) {
489 if ( kkf->mCalNumber == num ) { 493 if ( kkf->mCalNumber == num ) {
490 qDebug("KOPrefs::deleteCalendar %d ", num ); 494 qDebug("KOPrefs::deleteCalendar %d ", num );
491 mCalendars.remove( kkf ); 495 mCalendars.remove( kkf );
492 delete kkf; 496 delete kkf;
493 return; 497 return;
494 } 498 }
495 kkf = mCalendars.next(); 499 kkf = mCalendars.next();
496 } 500 }
497} 501}
498QString KOPrefs::calName( int calNum) const 502QString KOPrefs::calName( int calNum) const
499{ 503{
500 return (mDefCalColors[calNum-1])->mName; 504 return (mDefCalColors[calNum-1])->mName;
501} 505}
502QColor KOPrefs::defaultColor( int calNum ) const 506QColor KOPrefs::defaultColor( int calNum ) const
503{ 507{
504 if ( calNum == 1 ) return mEventColor; 508 if ( calNum == 1 ) return mEventColor;
505 return (mDefCalColors[calNum-1])->mDefaultColor; 509 return (mDefCalColors[calNum-1])->mDefaultColor;
506} 510}
507void KOPrefs::usrWriteConfig() 511void KOPrefs::usrWriteConfig()
508{ 512{
509 config()->setGroup("General"); 513 config()->setGroup("General");
510 config()->writeEntry("Custom Categories",mCustomCategories); 514 config()->writeEntry("Custom Categories",mCustomCategories);
511 515
512 config()->setGroup("Personal Settings"); 516 config()->setGroup("Personal Settings");
513 config()->writeEntry("user_name",mName); 517 config()->writeEntry("user_name",mName);
514 config()->writeEntry("user_email",mEmail); 518 config()->writeEntry("user_email",mEmail);
515 519
516 config()->setGroup("Category Colors"); 520 config()->setGroup("Category Colors");
517 QDictIterator<QColor> it(mCategoryColors); 521 QDictIterator<QColor> it(mCategoryColors);
518 while (it.current()) { 522 while (it.current()) {
519 config()->writeEntry(it.currentKey(),*(it.current())); 523 config()->writeEntry(it.currentKey(),*(it.current()));
520 ++it; 524 ++it;
521 } 525 }
522 KConfig fc (locateLocal("config","kopicalendarrc")); 526 KConfig fc (locateLocal("config","kopicalendarrc"));
523 fc.setGroup("CC"); 527 fc.setGroup("CC");
524 fc.writeEntry("NumberCalendars",mCalendars.count()); 528 fc.writeEntry("NumberCalendars",mCalendars.count());
525 int numCal = 1; 529 int numCal = 1;
526 int writeCal = 0; 530 int writeCal = 0;
527 while ( numCal < mNextAvailableCalendar ) { 531 while ( numCal < mNextAvailableCalendar ) {
528 KopiCalendarFile * kkf = mCalendars.first(); 532 KopiCalendarFile * kkf = mCalendars.first();
529 while ( kkf ) { 533 while ( kkf ) {
530 //qDebug("cal num %d %d ", kkf->mCalNumber, numCal); 534 //qDebug("cal num %d %d ", kkf->mCalNumber, numCal);
531 if ( kkf->mCalNumber == numCal ) { 535 if ( kkf->mCalNumber == numCal ) {
532 ++writeCal; 536 ++writeCal;
533 //qDebug("Write calendar %d %d ", numCal , writeCal); 537 //qDebug("Write calendar %d %d ", numCal , writeCal);
534 QString prefix = "Cal_" + QString::number( writeCal ); 538 QString prefix = "Cal_" + QString::number( writeCal );
535 fc.writeEntry( prefix+"_isStandard", kkf->isStandard ); 539 fc.writeEntry( prefix+"_isStandard", kkf->isStandard );
536 fc.writeEntry( prefix+"_isEnabled", kkf->isEnabled ); 540 fc.writeEntry( prefix+"_isEnabled", kkf->isEnabled );
537 fc.writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled ); 541 fc.writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled );
538 fc.writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); 542 fc.writeEntry( prefix+"_isReadOnly", kkf->isReadOnly );
539 fc.writeEntry( prefix+"_Name", kkf->mName); 543 fc.writeEntry( prefix+"_Name", kkf->mName);
540 fc.writeEntry( prefix+"_FileName", kkf->mFileName); 544 fc.writeEntry( prefix+"_FileName", kkf->mFileName);
541 fc.writeEntry( prefix+"_Color",kkf->mDefaultColor); 545 fc.writeEntry( prefix+"_Color",kkf->mDefaultColor);
542 } 546 }
543 kkf = mCalendars.next(); 547 kkf = mCalendars.next();
544 } 548 }
545 ++numCal; 549 ++numCal;
546 } 550 }
547 fc.sync(); 551 fc.sync();
548 KPimPrefs::usrWriteConfig(); 552 KPimPrefs::usrWriteConfig();
549} 553}
550 554
551void KOPrefs::setCategoryColor(QString cat,const QColor & color) 555void KOPrefs::setCategoryColor(QString cat,const QColor & color)
552{ 556{
553 mCategoryColors.replace(cat,new QColor(color)); 557 mCategoryColors.replace(cat,new QColor(color));
554} 558}
555 559
556QColor *KOPrefs::categoryColor(QString cat) 560QColor *KOPrefs::categoryColor(QString cat)
557{ 561{
558 QColor *color = 0; 562 QColor *color = 0;
559 563
560 if (!cat.isEmpty()) color = mCategoryColors[cat]; 564 if (!cat.isEmpty()) color = mCategoryColors[cat];
561 565
562 if (color) return color; 566 if (color) return color;
563 else return &mDefaultCategoryColor; 567 else return &mDefaultCategoryColor;
564} 568}
565 569
566void KOPrefs::setFullName(const QString &name) 570void KOPrefs::setFullName(const QString &name)
567{ 571{
568 mName = name; 572 mName = name;
569} 573}
570 574
571void KOPrefs::setEmail(const QString &email) 575void KOPrefs::setEmail(const QString &email)
572{ 576{
573 //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); 577 //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() );
574 mEmail = email; 578 mEmail = email;
575} 579}
576 580
577QString KOPrefs::fullName() 581QString KOPrefs::fullName()
578{ 582{
579 if (mEmailControlCenter) { 583 if (mEmailControlCenter) {
580 KEMailSettings settings; 584 KEMailSettings settings;
581 return settings.getSetting(KEMailSettings::RealName); 585 return settings.getSetting(KEMailSettings::RealName);
582 } else { 586 } else {
583 return mName; 587 return mName;
584 } 588 }
585} 589}
586 590
587QString KOPrefs::email() 591QString KOPrefs::email()
588{ 592{
589 if (mEmailControlCenter) { 593 if (mEmailControlCenter) {
590 KEMailSettings settings; 594 KEMailSettings settings;
591 return settings.getSetting(KEMailSettings::EmailAddress); 595 return settings.getSetting(KEMailSettings::EmailAddress);
592 } else { 596 } else {
593 return mEmail; 597 return mEmail;
594 } 598 }
595} 599}
596KConfig* KOPrefs::getConfig() 600KConfig* KOPrefs::getConfig()
597{ 601{
598 return config(); 602 return config();
599} 603}
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 2bf46b9..c9d1345 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -1,114 +1,115 @@
1 1
2 2
3#ifndef DESKTOP_VERSION 3#ifndef DESKTOP_VERSION
4#include <qpe/qpeapplication.h> 4#include <qpe/qpeapplication.h>
5#include <qcopchannel_qws.h> 5#include <qcopchannel_qws.h>
6#include <qpe/global.h> 6#include <qpe/global.h>
7#include <stdlib.h> 7#include <stdlib.h>
8#else 8#else
9#include <qapplication.h> 9#include <qapplication.h>
10#include <qstring.h> 10#include <qstring.h>
11#include <qwindowsstyle.h> 11#include <qwindowsstyle.h>
12#include <qplatinumstyle.h> 12#include <qplatinumstyle.h>
13#include <qsgistyle.h> 13#include <qsgistyle.h>
14#include <stdlib.h> 14#include <stdlib.h>
15#endif 15#endif
16#include <qtextcodec.h> 16#include <qtextcodec.h>
17 17
18#include <qdir.h> 18#include <qdir.h>
19#include <kstandarddirs.h> 19#include <kstandarddirs.h>
20#include <kglobal.h> 20#include <kglobal.h>
21#include <stdio.h> 21#include <stdio.h>
22#include "mainwindow.h" 22#include "mainwindow.h"
23#include <libkdepim/kpimglobalprefs.h> 23#include <libkdepim/kpimglobalprefs.h>
24void dumpMissing(); 24void dumpMissing();
25 25
26 26
27int main( int argc, char **argv ) 27int main( int argc, char **argv )
28{ 28{
29#ifndef DESKTOP_VERSION 29#ifndef DESKTOP_VERSION
30 QPEApplication a( argc, argv ); 30 QPEApplication a( argc, argv );
31 a.setKeepRunning (); 31 a.setKeepRunning ();
32#else 32#else
33 QApplication a( argc, argv ); 33 QApplication a( argc, argv );
34 QApplication::setStyle( new QPlatinumStyle ()); 34 QApplication::setStyle( new QPlatinumStyle ());
35#ifdef _WIN32_ 35#ifdef _WIN32_
36 QString hdir ( getenv( "HOME") ); 36 QString hdir ( getenv( "HOME") );
37 if ( hdir.isEmpty() ) { 37 if ( hdir.isEmpty() ) {
38 QString hd ("C:/" ); 38 QString hd ("C:/" );
39 //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd ); 39 //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd );
40 if ( QDir::homeDirPath().lower() == hd.lower() ) { 40 if ( QDir::homeDirPath().lower() == hd.lower() ) {
41 _putenv( "HOME=C:"); 41 _putenv( "HOME=C:");
42 //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) ); 42 //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) );
43 } 43 }
44 } else { 44 } else {
45 QDir app_dir; 45 QDir app_dir;
46 if ( !app_dir.exists(hdir) ) 46 if ( !app_dir.exists(hdir) )
47 app_dir.mkdir (hdir); 47 app_dir.mkdir (hdir);
48 } 48 }
49#endif 49#endif
50#endif 50#endif
51 bool exitHelp = false; 51 bool exitHelp = false;
52 if ( argc > 1 ) { 52 if ( argc > 1 ) {
53 QString command = argv[1]; 53 QString command = argv[1];
54 if ( command == "-help" ){ 54 if ( command == "-help" ){
55 printf("KO/Pi command line commands:\n"); 55 printf("KO/Pi command line commands:\n");
56 printf(" no command: Start KO/Pi in usual way\n"); 56 printf(" no command: Start KO/Pi in usual way\n");
57 printf(" -help: This output\n"); 57 printf(" -help: This output\n");
58 printf("Next Option: Open or Show after start:\n"); 58 printf("Next Option: Open or Show after start:\n");
59 printf(" -newTodo: New Todo dialog\n"); 59 printf(" -newTodo: New Todo dialog\n");
60 printf(" -newEvent: New Event dialog\n"); 60 printf(" -newEvent: New Event dialog\n");
61 printf(" -showList: List view\n"); 61 printf(" -showList: List view\n");
62 printf(" -showDay: Day view\n"); 62 printf(" -showDay: Day view\n");
63 printf(" -showWWeek: Work Week view\n"); 63 printf(" -showWWeek: Work Week view\n");
64 printf(" -showWeek: Week view\n"); 64 printf(" -showWeek: Week view\n");
65 printf(" -showTodo: Todo view\n"); 65 printf(" -showTodo: Todo view\n");
66 printf(" -showJournal: Journal view\n"); 66 printf(" -showJournal: Journal view\n");
67 printf(" -showKO: Next Days view\n"); 67 printf(" -showKO: Next Days view\n");
68 printf(" -showWNext: What's Next view\n"); 68 printf(" -showWNext: What's Next view\n");
69 printf(" -showNextXView: Next X View\n"); 69 printf(" -showNextXView: Next X View\n");
70 printf(" -new[Y] and -show[X] may be used togehther\n"); 70 printf(" -new[Y] and -show[X] may be used togehther\n");
71 printf(" KO/Pi is exiting now. Bye!\n"); 71 printf(" KO/Pi is exiting now. Bye!\n");
72 exitHelp = true; 72 exitHelp = true;
73 } 73 }
74 } 74 }
75 if ( ! exitHelp ) { 75 if ( ! exitHelp ) {
76 KGlobal::setAppName( "korganizer" ); 76 KGlobal::setAppName( "korganizer" );
77 QString fileName ; 77 QString fileName ;
78#ifndef DESKTOP_VERSION 78#ifndef DESKTOP_VERSION
79 fileName = getenv("QPEDIR"); 79 fileName = getenv("QPEDIR");
80 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/"); 80 KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/korganizer/");
81#else 81#else
82 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; 82 fileName = qApp->applicationDirPath () + "/kdepim/korganizer/";
83 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 83 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
84#endif 84#endif
85 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); 85 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer")));
86 86
87 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); 87 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
88 KPimGlobalPrefs::instance()->setGlobalConfig();
88 MainWindow m; 89 MainWindow m;
89#ifndef DESKTOP_VERSION 90#ifndef DESKTOP_VERSION
90 91
91 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); 92 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& )));
92 a.showMainWidget(&m ); 93 a.showMainWidget(&m );
93#else 94#else
94 a.setMainWidget(&m ); 95 a.setMainWidget(&m );
95 m.show(); 96 m.show();
96 //m.resize( 800, 600 ); 97 //m.resize( 800, 600 );
97 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 98 QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
98#endif 99#endif
99 if ( argc > 1 ) { 100 if ( argc > 1 ) {
100 QCString command = argv[1]; 101 QCString command = argv[1];
101 if ( argc > 2 ) 102 if ( argc > 2 )
102 command += argv[2]; 103 command += argv[2];
103 qApp->processEvents(); 104 qApp->processEvents();
104 m.recieve(command, QByteArray() ); 105 m.recieve(command, QByteArray() );
105 106
106 } 107 }
107 108
108 a.exec(); 109 a.exec();
109 dumpMissing(); 110 dumpMissing();
110 111
111 KPimGlobalPrefs::instance()->writeConfig(); 112 KPimGlobalPrefs::instance()->writeConfig();
112 } 113 }
113 qDebug("KO: Bye! "); 114 qDebug("KO: Bye! ");
114} 115}
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index b9d8742..68233e8 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1,2555 +1,2558 @@
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 "koagenda.h" 50#include "koagenda.h"
51#include "kodialogmanager.h" 51#include "kodialogmanager.h"
52#include "kdialogbase.h" 52#include "kdialogbase.h"
53#include "kapplication.h" 53#include "kapplication.h"
54#include "kofilterview.h" 54#include "kofilterview.h"
55#include "kstandarddirs.h" 55#include "kstandarddirs.h"
56#include "koprefs.h" 56#include "koprefs.h"
57#include "kfiledialog.h" 57#include "kfiledialog.h"
58#include "koglobals.h" 58#include "koglobals.h"
59#include "kglobal.h" 59#include "kglobal.h"
60#include "ktoolbar.h" 60#include "ktoolbar.h"
61#include "klocale.h" 61#include "klocale.h"
62#include "kconfig.h" 62#include "kconfig.h"
63#include "externalapphandler.h" 63#include "externalapphandler.h"
64#include <kglobalsettings.h> 64#include <kglobalsettings.h>
65 65
66using namespace KCal; 66using namespace KCal;
67#ifndef _WIN32_ 67#ifndef _WIN32_
68#include <unistd.h> 68#include <unistd.h>
69#else 69#else
70#ifdef _OL_IMPORT_ 70#ifdef _OL_IMPORT_
71#include "koimportoldialog.h" 71#include "koimportoldialog.h"
72#endif 72#endif
73#endif 73#endif
74#include "mainwindow.h" 74#include "mainwindow.h"
75 75
76 76
77class KOex2phonePrefs : public QDialog 77class KOex2phonePrefs : public QDialog
78{ 78{
79 public: 79 public:
80 KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : 80 KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
81 QDialog( parent, name, true ) 81 QDialog( parent, name, true )
82 { 82 {
83 setCaption( i18n("Export to phone options") ); 83 setCaption( i18n("Export to phone options") );
84 QVBoxLayout* lay = new QVBoxLayout( this ); 84 QVBoxLayout* lay = new QVBoxLayout( this );
85 lay->setSpacing( 3 ); 85 lay->setSpacing( 3 );
86 lay->setMargin( 3 ); 86 lay->setMargin( 3 );
87 QLabel *lab; 87 QLabel *lab;
88 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 88 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
89 lab->setAlignment (AlignHCenter ); 89 lab->setAlignment (AlignHCenter );
90 QHBox* temphb; 90 QHBox* temphb;
91 temphb = new QHBox( this ); 91 temphb = new QHBox( this );
92 new QLabel( i18n("I/O device: "), temphb ); 92 new QLabel( i18n("I/O device: "), temphb );
93 mPhoneDevice = new QLineEdit( temphb); 93 mPhoneDevice = new QLineEdit( temphb);
94 lay->addWidget( temphb ); 94 lay->addWidget( temphb );
95 temphb = new QHBox( this ); 95 temphb = new QHBox( this );
96 new QLabel( i18n("Connection: "), temphb ); 96 new QLabel( i18n("Connection: "), temphb );
97 mPhoneConnection = new QLineEdit( temphb); 97 mPhoneConnection = new QLineEdit( temphb);
98 lay->addWidget( temphb ); 98 lay->addWidget( temphb );
99 temphb = new QHBox( this ); 99 temphb = new QHBox( this );
100 new QLabel( i18n("Model(opt.): "), temphb ); 100 new QLabel( i18n("Model(opt.): "), temphb );
101 mPhoneModel = new QLineEdit( temphb); 101 mPhoneModel = new QLineEdit( temphb);
102 lay->addWidget( temphb ); 102 lay->addWidget( temphb );
103 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); 103 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this );
104 mWriteBackFuture->setChecked( true ); 104 mWriteBackFuture->setChecked( true );
105 lay->addWidget( mWriteBackFuture ); 105 lay->addWidget( mWriteBackFuture );
106 temphb = new QHBox( this ); 106 temphb = new QHBox( this );
107 new QLabel( i18n("Max. weeks in future: ") , temphb ); 107 new QLabel( i18n("Max. weeks in future: ") , temphb );
108 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); 108 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb);
109 mWriteBackFutureWeeks->setValue( 8 ); 109 mWriteBackFutureWeeks->setValue( 8 );
110 lay->addWidget( temphb ); 110 lay->addWidget( temphb );
111 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); 111 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) );
112 lab->setAlignment (AlignHCenter ); 112 lab->setAlignment (AlignHCenter );
113 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 113 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
114 lay->addWidget( ok ); 114 lay->addWidget( ok );
115 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 115 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
116 lay->addWidget( cancel ); 116 lay->addWidget( cancel );
117 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 117 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
118 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 118 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
119 resize( 220, 240 ); 119 resize( 220, 240 );
120 qApp->processEvents(); 120 qApp->processEvents();
121 int dw = QApplication::desktop()->width(); 121 int dw = QApplication::desktop()->width();
122 int dh = QApplication::desktop()->height(); 122 int dh = QApplication::desktop()->height();
123 move( (dw-width())/2, (dh - height() )/2 ); 123 move( (dw-width())/2, (dh - height() )/2 );
124 } 124 }
125 125
126public: 126public:
127 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 127 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
128 QCheckBox* mWriteBackFuture; 128 QCheckBox* mWriteBackFuture;
129 QSpinBox* mWriteBackFutureWeeks; 129 QSpinBox* mWriteBackFutureWeeks;
130}; 130};
131 131
132QPixmap* sgListViewCompletedPix[6]; 132QPixmap* sgListViewCompletedPix[6];
133 133
134 134
135int globalFlagBlockStartup; 135int globalFlagBlockStartup;
136MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : 136MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
137 QMainWindow( parent, name ) 137 QMainWindow( parent, name )
138{ 138{
139 sgListViewCompletedPix[5] = &listviewPix; 139 sgListViewCompletedPix[5] = &listviewPix;
140 sgListViewCompletedPix[0] = &listviewPix0; 140 sgListViewCompletedPix[0] = &listviewPix0;
141 sgListViewCompletedPix[1] = &listviewPix20; 141 sgListViewCompletedPix[1] = &listviewPix20;
142 sgListViewCompletedPix[2] = &listviewPix40; 142 sgListViewCompletedPix[2] = &listviewPix40;
143 sgListViewCompletedPix[3] = &listviewPix60; 143 sgListViewCompletedPix[3] = &listviewPix60;
144 sgListViewCompletedPix[4] = &listviewPix80; 144 sgListViewCompletedPix[4] = &listviewPix80;
145 if ( sgListViewCompletedPix[5]->height() < 5 ) { 145 if ( sgListViewCompletedPix[5]->height() < 5 ) {
146 int size = 12; 146 int size = 12;
147 sgListViewCompletedPix[5]->resize( 11, 11 ); 147 sgListViewCompletedPix[5]->resize( 11, 11 );
148 sgListViewCompletedPix[5]->fill( Qt::white ); 148 sgListViewCompletedPix[5]->fill( Qt::white );
149 QPainter p ( sgListViewCompletedPix[5] ); 149 QPainter p ( sgListViewCompletedPix[5] );
150 p.drawRect( 0,0,11,11); 150 p.drawRect( 0,0,11,11);
151 int half = size/2; 151 int half = size/2;
152 int heihei = size/2; 152 int heihei = size/2;
153 int x = 1; 153 int x = 1;
154 p.drawLine ( 2, 5, 4 , 7 ) ; 154 p.drawLine ( 2, 5, 4 , 7 ) ;
155 p.drawLine ( 4 , 7 , 8, 3) ; 155 p.drawLine ( 4 , 7 , 8, 3) ;
156 int iii = 0; 156 int iii = 0;
157 for ( iii = 0; iii < 5; ++iii ) { 157 for ( iii = 0; iii < 5; ++iii ) {
158 sgListViewCompletedPix[iii]->resize( 11, 11 ); 158 sgListViewCompletedPix[iii]->resize( 11, 11 );
159 sgListViewCompletedPix[iii]->fill( Qt::white ); 159 sgListViewCompletedPix[iii]->fill( Qt::white );
160 QPainter p ( sgListViewCompletedPix[iii] ); 160 QPainter p ( sgListViewCompletedPix[iii] );
161 p.drawRect( 0,0,11,11); 161 p.drawRect( 0,0,11,11);
162 if ( iii ) 162 if ( iii )
163 p.fillRect( 1,1,iii*2,9,Qt::gray ); 163 p.fillRect( 1,1,iii*2,9,Qt::gray );
164 } 164 }
165 } 165 }
166 mClosed = false; 166 mClosed = false;
167 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 167 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
168 QString confFile = locateLocal("config","korganizerrc"); 168 QString confFile = locateLocal("config","korganizerrc");
169 QFileInfo finf ( confFile ); 169 QFileInfo finf ( confFile );
170 bool showWarning = !finf.exists(); 170 bool showWarning = !finf.exists();
171 setIcon(SmallIcon( "ko24" ) ); 171 setIcon(SmallIcon( "ko24" ) );
172 mBlockAtStartup = true; 172 mBlockAtStartup = true;
173 mFlagKeyPressed = false; 173 mFlagKeyPressed = false;
174 setCaption("KO/Pi"); 174 setCaption("KO/Pi");
175 KOPrefs *p = KOPrefs::instance(); 175 KOPrefs *p = KOPrefs::instance();
176 KPimGlobalPrefs::instance()->setGlobalConfig(); 176 //KPimGlobalPrefs::instance()->setGlobalConfig();
177 p->mCurrentDisplayedView = 0; 177 p->mCurrentDisplayedView = 0;
178 if ( p->mHourSize > 22 ) 178 if ( p->mHourSize > 22 )
179 p->mHourSize = 22; 179 p->mHourSize = 22;
180 QMainWindow::ToolBarDock tbd; 180 QMainWindow::ToolBarDock tbd;
181 if ( p->mToolBarHor ) { 181 if ( p->mToolBarHor ) {
182 if ( p->mToolBarUp ) 182 if ( p->mToolBarUp )
183 tbd = Bottom; 183 tbd = Bottom;
184 else 184 else
185 tbd = Top; 185 tbd = Top;
186 } 186 }
187 else { 187 else {
188 if ( p->mToolBarUp ) 188 if ( p->mToolBarUp )
189 tbd = Right; 189 tbd = Right;
190 else 190 else
191 tbd = Left; 191 tbd = Left;
192 } 192 }
193 if ( KOPrefs::instance()->mUseAppColors ) 193 if ( KOPrefs::instance()->mUseAppColors )
194 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 194 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
195 globalFlagBlockStartup = 1; 195 globalFlagBlockStartup = 1;
196 iconToolBar = new QPEToolBar( this ); 196 iconToolBar = new QPEToolBar( this );
197 addToolBar (iconToolBar , tbd ); 197 addToolBar (iconToolBar , tbd );
198 198
199#ifdef DESKTOP_VERSION 199#ifdef DESKTOP_VERSION
200 if ( KOPrefs::instance()->mShowIconFilter ) 200 if ( KOPrefs::instance()->mShowIconFilter )
201#else 201#else
202 if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) 202 if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar )
203#endif 203#endif
204 204
205{ 205{
206 if ( p->mToolBarHorF ) { 206 if ( p->mToolBarHorF ) {
207 if ( p->mToolBarUpF ) 207 if ( p->mToolBarUpF )
208 tbd = Bottom; 208 tbd = Bottom;
209 else 209 else
210 tbd = Top; 210 tbd = Top;
211 } 211 }
212 else { 212 else {
213 if ( p->mToolBarUpF ) 213 if ( p->mToolBarUpF )
214 tbd = Right; 214 tbd = Right;
215 else 215 else
216 tbd = Left; 216 tbd = Left;
217 } 217 }
218 filterToolBar = new QPEToolBar ( this ); 218 filterToolBar = new QPEToolBar ( this );
219 filterMenubar = new QMenuBar( 0 ); 219 filterMenubar = new QMenuBar( 0 );
220 QFontMetrics fm ( filterMenubar->font() ); 220 QFontMetrics fm ( filterMenubar->font() );
221 221
222 filterPopupMenu = new QPopupMenu( this ); 222 filterPopupMenu = new QPopupMenu( this );
223 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); 223 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
224 QString addTest = "A"; 224 QString addTest = "A";
225 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); 225 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
226#ifdef DESKTOP_VERSION 226#ifdef DESKTOP_VERSION
227 addTest = "AAABBBCCCx"; 227 addTest = "AAABBBCCCx";
228#else 228#else
229 addTest = "AAx"; 229 addTest = "AAx";
230#endif 230#endif
231 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); 231 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) );
232 addToolBar (filterToolBar , tbd ); 232 addToolBar (filterToolBar , tbd );
233 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); 233 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) );
234 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); 234 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) );
235 if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) 235 if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar )
236 filterToolBar->hide(); 236 filterToolBar->hide();
237 } else { 237 } else {
238 filterToolBar = 0; 238 filterToolBar = 0;
239 filterMenubar = 0; 239 filterMenubar = 0;
240 filterPopupMenu = 0; 240 filterPopupMenu = 0;
241 } 241 }
242 if ( p->mShowIconOnetoolbar ) { 242 if ( p->mShowIconOnetoolbar ) {
243 viewToolBar = iconToolBar ; 243 viewToolBar = iconToolBar ;
244 navigatorToolBar = iconToolBar ; 244 navigatorToolBar = iconToolBar ;
245 } else { 245 } else {
246#ifndef DESKTOP_VERSION 246#ifndef DESKTOP_VERSION
247 setToolBarsMovable( false ); 247 setToolBarsMovable( false );
248#endif 248#endif
249 if ( p->mToolBarHorV ) { 249 if ( p->mToolBarHorV ) {
250 if ( p->mToolBarUpV ) 250 if ( p->mToolBarUpV )
251 tbd = Bottom; 251 tbd = Bottom;
252 else 252 else
253 tbd = Top; 253 tbd = Top;
254 } 254 }
255 else { 255 else {
256 if ( p->mToolBarUpV ) 256 if ( p->mToolBarUpV )
257 tbd = Right; 257 tbd = Right;
258 else 258 else
259 tbd = Left; 259 tbd = Left;
260 } 260 }
261 viewToolBar = new QPEToolBar( this ); 261 viewToolBar = new QPEToolBar( this );
262 addToolBar (viewToolBar , tbd ); 262 addToolBar (viewToolBar , tbd );
263 if ( p->mToolBarHorN ) { 263 if ( p->mToolBarHorN ) {
264 if ( p->mToolBarUpN ) 264 if ( p->mToolBarUpN )
265 tbd = Bottom; 265 tbd = Bottom;
266 else 266 else
267 tbd = Top; 267 tbd = Top;
268 } 268 }
269 else { 269 else {
270 if ( p->mToolBarUpN ) 270 if ( p->mToolBarUpN )
271 tbd = Right; 271 tbd = Right;
272 else 272 else
273 tbd = Left; 273 tbd = Left;
274 } 274 }
275 navigatorToolBar = new QPEToolBar( this ); 275 navigatorToolBar = new QPEToolBar( this );
276 addToolBar (navigatorToolBar , tbd ); 276 addToolBar (navigatorToolBar , tbd );
277 } 277 }
278 278
279 279
280 280
281 mCalendarModifiedFlag = false; 281 mCalendarModifiedFlag = false;
282 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); 282 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this );
283 splash->setAlignment ( AlignCenter ); 283 splash->setAlignment ( AlignCenter );
284 setCentralWidget( splash ); 284 setCentralWidget( splash );
285#ifndef DESKTOP_VERSION 285#ifndef DESKTOP_VERSION
286 showMaximized(); 286 showMaximized();
287#endif 287#endif
288 288
289 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); 289 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ());
290 setDefaultPreferences(); 290 setDefaultPreferences();
291 mCalendar = new CalendarLocal(); 291 mCalendar = new CalendarLocal();
292 mView = new CalendarView( mCalendar, this,"mCalendar " ); 292 mView = new CalendarView( mCalendar, this,"mCalendar " );
293 mView->hide(); 293 mView->hide();
294 //mView->resize(splash->size() ); 294 //mView->resize(splash->size() );
295 initActions(); 295 initActions();
296 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); 296 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu);
297 mSyncManager->setBlockSave(false); 297 mSyncManager->setBlockSave(false);
298 mView->setSyncManager(mSyncManager); 298 mView->setSyncManager(mSyncManager);
299#ifndef DESKTOP_VERSION 299#ifndef DESKTOP_VERSION
300 iconToolBar->show(); 300 iconToolBar->show();
301 qApp->processEvents(); 301 qApp->processEvents();
302#endif 302#endif
303 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); 303 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ());
304 int vh = height() ; 304 int vh = height() ;
305 int vw = width(); 305 int vw = width();
306 //qDebug("Toolbar hei %d ",iconToolBar->height() ); 306 //qDebug("Toolbar hei %d ",iconToolBar->height() );
307 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 307 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
308 vh -= iconToolBar->height(); 308 vh -= iconToolBar->height();
309 } else { 309 } else {
310 vw -= iconToolBar->height(); 310 vw -= iconToolBar->height();
311 } 311 }
312 //mView->setMaximumSize( splash->size() ); 312 //mView->setMaximumSize( splash->size() );
313 //mView->resize( splash->size() ); 313 //mView->resize( splash->size() );
314 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 314 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
315 mView->readSettings(); 315 mView->readSettings();
316 bool newFile = false; 316 bool newFile = false;
317 if( !QFile::exists( defaultFileName() ) ) { 317 if( !QFile::exists( defaultFileName() ) ) {
318 QFileInfo finfo ( defaultFileName() ); 318 QFileInfo finfo ( defaultFileName() );
319 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); 319 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics");
320 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"; 320 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";
321 finfo.setFile( oldFile ); 321 finfo.setFile( oldFile );
322 if (finfo.exists() ) { 322 if (finfo.exists() ) {
323 KMessageBox::information( this, message); 323 KMessageBox::information( this, message);
324 mView->openCalendar( oldFile ); 324 mView->openCalendar( oldFile );
325 qApp->processEvents(); 325 qApp->processEvents();
326 } else { 326 } else {
327 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); 327 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics");
328 finfo.setFile( oldFile ); 328 finfo.setFile( oldFile );
329 if (finfo.exists() ) { 329 if (finfo.exists() ) {
330 KMessageBox::information( this, message); 330 KMessageBox::information( this, message);
331 mView->openCalendar( oldFile ); 331 mView->openCalendar( oldFile );
332 qApp->processEvents(); 332 qApp->processEvents();
333 } 333 }
334 } 334 }
335 mView->saveCalendar( defaultFileName() ); 335 mView->saveCalendar( defaultFileName() );
336 newFile = true; 336 newFile = true;
337 } 337 }
338 338
339 QTime neededSaveTime = QDateTime::currentDateTime().time(); 339 QTime neededSaveTime = QDateTime::currentDateTime().time();
340 mView->loadCalendars(); 340 mView->loadCalendars();
341 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 341 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
342 qDebug("KO: Calendar loading time: %d ms",msNeeded ); 342 qDebug("KO: Calendar loading time: %d ms",msNeeded );
343 343
344 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { 344 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) {
345 KOPrefs::instance()->setAllDefaults(); 345 KOPrefs::instance()->setAllDefaults();
346 int count = mView->addCategories(); 346 int count = mView->addCategories();
347 } 347 }
348 processIncidenceSelection( 0 ); 348 processIncidenceSelection( 0 );
349 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), 349 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
350 SLOT( processIncidenceSelection( Incidence * ) ) ); 350 SLOT( processIncidenceSelection( Incidence * ) ) );
351 connect( mView, SIGNAL( modifiedChanged( bool ) ), 351 connect( mView, SIGNAL( modifiedChanged( bool ) ),
352 SLOT( slotModifiedChanged( bool ) ) ); 352 SLOT( slotModifiedChanged( bool ) ) );
353 353
354 354
355 connect( mView, SIGNAL( tempDisableBR(bool) ), 355 connect( mView, SIGNAL( tempDisableBR(bool) ),
356 SLOT( disableBR(bool) ) ); 356 SLOT( disableBR(bool) ) );
357 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); 357 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
358 mView->setModified( false ); 358 mView->setModified( false );
359 mBlockAtStartup = false; 359 mBlockAtStartup = false;
360 mView->setModified( false ); 360 mView->setModified( false );
361 setCentralWidget( mView ); 361 setCentralWidget( mView );
362 globalFlagBlockStartup = 0; 362 globalFlagBlockStartup = 0;
363 mView->show(); 363 mView->show();
364 delete splash; 364 delete splash;
365 if ( newFile ) 365 if ( newFile )
366 mView->updateConfig(); 366 mView->updateConfig();
367 // qApp->processEvents(); 367 // qApp->processEvents();
368 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 368 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
369 //fillSyncMenu(); 369 //fillSyncMenu();
370 370
371 371
372 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 372 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
373 connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); 373 connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
374 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); 374 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
375 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 375 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
376 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 376 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
377 mSyncManager->setDefaultFileName( sentSyncFile()); 377 mSyncManager->setDefaultFileName( sentSyncFile());
378 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); 378 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
379 mSyncManager->fillSyncMenu(); 379 mSyncManager->fillSyncMenu();
380 380
381 381
382 382
383 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); 383 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
384 if ( showWarning ) { 384 if ( showWarning ) {
385 KMessageBox::information( this, 385 KMessageBox::information( this,
386 "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"); 386 "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");
387 qApp->processEvents(); 387 qApp->processEvents();
388 mView->dialogManager()->showSyncOptions(); 388 mView->dialogManager()->showSyncOptions();
389 } 389 }
390 390
391 //US listen for result adressed from Ka/Pi 391 //US listen for result adressed from Ka/Pi
392#ifndef DESKTOP_VERSION 392#ifndef DESKTOP_VERSION
393 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 393 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
394#endif 394#endif
395#ifndef DESKTOP_VERSION 395#ifndef DESKTOP_VERSION
396 infrared = 0; 396 infrared = 0;
397#endif 397#endif
398 updateFilterToolbar(); 398 updateFilterToolbar();
399 updateWeek( mView->startDate() ); 399 updateWeek( mView->startDate() );
400 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 400 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
401 SLOT( updateWeekNum( const KCal::DateList & ) ) ); 401 SLOT( updateWeekNum( const KCal::DateList & ) ) );
402 mBRdisabled = false; 402 mBRdisabled = false;
403 //toggleBeamReceive(); 403 //toggleBeamReceive();
404 int tiint= 3000; 404 int tiint= 3000;
405#ifndef DESKTOP_VERSION 405#ifndef DESKTOP_VERSION
406 tiint = 5000; 406 tiint = 5000;
407#endif 407#endif
408 QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() )); 408 QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() ));
409} 409}
410MainWindow::~MainWindow() 410MainWindow::~MainWindow()
411{ 411{
412 //qDebug("MainWindow::~MainWindow() "); 412 //qDebug("MainWindow::~MainWindow() ");
413 //save toolbar location 413 //save toolbar location
414 delete mCalendar; 414 delete mCalendar;
415 delete mSyncManager; 415 delete mSyncManager;
416#ifndef DESKTOP_VERSION 416#ifndef DESKTOP_VERSION
417 if ( infrared ) 417 if ( infrared )
418 delete infrared; 418 delete infrared;
419#endif 419#endif
420 420
421 421
422} 422}
423 423
424void MainWindow::disableBR(bool b) 424void MainWindow::disableBR(bool b)
425{ 425{
426#ifndef DESKTOP_VERSION 426#ifndef DESKTOP_VERSION
427 if ( b ) { 427 if ( b ) {
428 if ( infrared ) { 428 if ( infrared ) {
429 toggleBeamReceive(); 429 toggleBeamReceive();
430 mBRdisabled = true; 430 mBRdisabled = true;
431 } 431 }
432 mBRdisabled = true; 432 mBRdisabled = true;
433 } else { 433 } else {
434 if ( mBRdisabled ) { 434 if ( mBRdisabled ) {
435 mBRdisabled = false; 435 mBRdisabled = false;
436 //makes no sense,because other cal ap is probably running 436 //makes no sense,because other cal ap is probably running
437 // toggleBeamReceive(); 437 // toggleBeamReceive();
438 } 438 }
439 } 439 }
440#endif 440#endif
441 441
442} 442}
443bool MainWindow::beamReceiveEnabled() 443bool MainWindow::beamReceiveEnabled()
444{ 444{
445#ifndef DESKTOP_VERSION 445#ifndef DESKTOP_VERSION
446 return ( infrared != 0 ); 446 return ( infrared != 0 );
447#endif 447#endif
448 return false; 448 return false;
449} 449}
450 450
451void MainWindow::toggleBeamReceive() 451void MainWindow::toggleBeamReceive()
452{ 452{
453 if ( mBRdisabled ) 453 if ( mBRdisabled )
454 return; 454 return;
455#ifndef DESKTOP_VERSION 455#ifndef DESKTOP_VERSION
456 if ( infrared ) { 456 if ( infrared ) {
457 qDebug("KO: Disable BeamReceive "); 457 qDebug("KO: Disable BeamReceive ");
458 delete infrared; 458 delete infrared;
459 infrared = 0; 459 infrared = 0;
460 brAction->setOn(false); 460 brAction->setOn(false);
461 return; 461 return;
462 } 462 }
463 qDebug("KO: Enable BeamReceive "); 463 qDebug("KO: Enable BeamReceive ");
464 brAction->setOn(true); 464 brAction->setOn(true);
465 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 465 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
466 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 466 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
467#endif 467#endif
468} 468}
469void MainWindow::showMaximized () 469void MainWindow::showMaximized ()
470{ 470{
471#ifndef DESKTOP_VERSION 471#ifndef DESKTOP_VERSION
472 if ( ! globalFlagBlockStartup ) 472 if ( ! globalFlagBlockStartup )
473 if ( mClosed ) 473 if ( mClosed )
474 mView->goToday(); 474 mView->goToday();
475#endif 475#endif
476 QWidget::showMaximized () ; 476 QWidget::showMaximized () ;
477 mClosed = false; 477 mClosed = false;
478} 478}
479void MainWindow::closeEvent( QCloseEvent* ce ) 479void MainWindow::closeEvent( QCloseEvent* ce )
480{ 480{
481 481
482 482
483 483
484 if ( ! KOPrefs::instance()->mAskForQuit ) { 484 if ( ! KOPrefs::instance()->mAskForQuit ) {
485 saveOnClose(); 485 saveOnClose();
486 mClosed = true; 486 mClosed = true;
487 ce->accept(); 487 ce->accept();
488 return; 488 return;
489 489
490 } 490 }
491 491
492 switch( QMessageBox::information( this, "KO/Pi", 492 switch( QMessageBox::information( this, "KO/Pi",
493 i18n("Do you really want\nto close KO/Pi?"), 493 i18n("Do you really want\nto close KO/Pi?"),
494 i18n("Close"), i18n("No"), 494 i18n("Close"), i18n("No"),
495 0, 0 ) ) { 495 0, 0 ) ) {
496 case 0: 496 case 0:
497 saveOnClose(); 497 saveOnClose();
498 mClosed = true; 498 mClosed = true;
499 ce->accept(); 499 ce->accept();
500 break; 500 break;
501 case 1: 501 case 1:
502 ce->ignore(); 502 ce->ignore();
503 break; 503 break;
504 case 2: 504 case 2:
505 505
506 default: 506 default:
507 break; 507 break;
508 } 508 }
509 509
510 510
511} 511}
512 512
513void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 513void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
514{ 514{
515 QDataStream stream( data, IO_ReadOnly ); 515 QDataStream stream( data, IO_ReadOnly );
516 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); 516 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
517 //QString datamess; 517 //QString datamess;
518 //qDebug("message "); 518 //qDebug("message ");
519 qDebug("KO: QCOP message received: %s ", cmsg.data() ); 519 qDebug("KO: QCOP message received: %s ", cmsg.data() );
520 520
521 if ( cmsg == "setDocument(QString)" ) { 521 if ( cmsg == "setDocument(QString)" ) {
522 QDataStream stream( data, IO_ReadOnly ); 522 QDataStream stream( data, IO_ReadOnly );
523 QString fileName; 523 QString fileName;
524 stream >> fileName; 524 stream >> fileName;
525 //qDebug("filename %s ", fileName.latin1()); 525 //qDebug("filename %s ", fileName.latin1());
526 showMaximized(); 526 showMaximized();
527 raise(); 527 raise();
528 KOPrefs::instance()->mLastSyncedLocalFile = fileName ; 528 KOPrefs::instance()->mLastSyncedLocalFile = fileName ;
529 mSyncManager->slotSyncMenu( 1002 ); 529 mSyncManager->slotSyncMenu( 1002 );
530 return; 530 return;
531 } 531 }
532 532
533 if ( cmsg == "-writeFile" ) { 533 if ( cmsg == "-writeFile" ) {
534 // I made from the "-writeFile" an "-writeAlarm" 534 // I made from the "-writeFile" an "-writeAlarm"
535 mView->viewManager()->showWhatsNextView(); 535 mView->viewManager()->showWhatsNextView();
536 mCalendar->checkAlarmForIncidence( 0, true); 536 mCalendar->checkAlarmForIncidence( 0, true);
537 showMaximized(); 537 showMaximized();
538 raise(); 538 raise();
539 return; 539 return;
540 540
541 } 541 }
542 if ( cmsg == "-writeFileSilent" ) { 542 if ( cmsg == "-writeFileSilent" ) {
543 // I made from the "-writeFile" an "-writeAlarm" 543 // I made from the "-writeFile" an "-writeAlarm"
544 // mView->viewManager()->showWhatsNextView(); 544 // mView->viewManager()->showWhatsNextView();
545 mCalendar->checkAlarmForIncidence( 0, true); 545 mCalendar->checkAlarmForIncidence( 0, true);
546 //showMaximized(); 546 //showMaximized();
547 //raise(); 547 //raise();
548 hide(); 548 hide();
549 return; 549 return;
550 } 550 }
551 if ( cmsg == "-newCountdown" ) { 551 if ( cmsg == "-newCountdown" ) {
552 qDebug("newCountdown "); 552 qDebug("newCountdown ");
553 553
554 } 554 }
555 QString msg ; 555 QString msg ;
556 QString allmsg = cmsg; 556 QString allmsg = cmsg;
557 while ( allmsg.length() > 0 ) { 557 while ( allmsg.length() > 0 ) {
558 int nextC = allmsg.find( "-", 1 ); 558 int nextC = allmsg.find( "-", 1 );
559 if ( nextC == -1 ) { 559 if ( nextC == -1 ) {
560 msg = allmsg; 560 msg = allmsg;
561 allmsg = ""; 561 allmsg = "";
562 } else{ 562 } else{
563 msg = allmsg.left( nextC ); 563 msg = allmsg.left( nextC );
564 allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); 564 allmsg = allmsg.mid( nextC, allmsg.length()-nextC );
565 } 565 }
566 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); 566 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() );
567 if ( msg == "-newEvent" ) { 567 if ( msg == "-newEvent" ) {
568 mView->newEvent(); 568 mView->newEvent();
569 } 569 }
570 if ( msg == "-newTodo" ) { 570 if ( msg == "-newTodo" ) {
571 mView->newTodo(); 571 mView->newTodo();
572 572
573 } 573 }
574 if ( msg == "-showWN" ) { 574 if ( msg == "-showWN" ) {
575 mView->viewManager()->showWhatsNextView(); 575 mView->viewManager()->showWhatsNextView();
576 } 576 }
577 if ( msg == "-showTodo" ) { 577 if ( msg == "-showTodo" ) {
578 mView->viewManager()->showTodoView(); 578 mView->viewManager()->showTodoView();
579 } 579 }
580 if ( msg == "-showList" ) { 580 if ( msg == "-showList" ) {
581 mView->viewManager()->showListView(); 581 mView->viewManager()->showListView();
582 } 582 }
583 else if ( msg == "-showDay" ) { 583 else if ( msg == "-showDay" ) {
584 mView->viewManager()->showDayView(); 584 mView->viewManager()->showDayView();
585 } 585 }
586 else if ( msg == "-showWWeek" ) { 586 else if ( msg == "-showWWeek" ) {
587 mView->viewManager()->showWorkWeekView(); 587 mView->viewManager()->showWorkWeekView();
588 } 588 }
589 else if ( msg == "-ringSync" ) { 589 else if ( msg == "-ringSync" ) {
590 mSyncManager->multiSync( false ); 590 mSyncManager->multiSync( false );
591 } 591 }
592 else if ( msg == "-showWeek" ) { 592 else if ( msg == "-showWeek" ) {
593 mView->viewManager()->showWeekView(); 593 mView->viewManager()->showWeekView();
594 } 594 }
595 else if ( msg == "-showTodo" ) { 595 else if ( msg == "-showTodo" ) {
596 mView->viewManager()->showTodoView(); 596 mView->viewManager()->showTodoView();
597 } 597 }
598 else if ( msg == "-showJournal" ) { 598 else if ( msg == "-showJournal" ) {
599 mView->dateNavigator()->selectDates( 1 ); 599 mView->dateNavigator()->selectDates( 1 );
600 mView->dateNavigator()->selectToday(); 600 mView->dateNavigator()->selectToday();
601 mView->viewManager()->showJournalView(); 601 mView->viewManager()->showJournalView();
602 } 602 }
603 else if ( msg == "-showKO" ) { 603 else if ( msg == "-showKO" ) {
604 mView->viewManager()->showNextXView(); 604 mView->viewManager()->showNextXView();
605 } 605 }
606 else if ( msg == "-showWNext" ) { 606 else if ( msg == "-showWNext" ) {
607 mView->viewManager()->showWhatsNextView(); 607 mView->viewManager()->showWhatsNextView();
608 } 608 }
609 else if ( msg == "nextView()" ) { 609 else if ( msg == "nextView()" ) {
610 mView->viewManager()->showNextView(); 610 mView->viewManager()->showNextView();
611 } 611 }
612 else if ( msg == "-showNextXView" ) { 612 else if ( msg == "-showNextXView" ) {
613 mView->viewManager()->showNextXView(); 613 mView->viewManager()->showNextXView();
614 } 614 }
615 615
616 616
617 } 617 }
618 618
619 showMaximized(); 619 showMaximized();
620 raise(); 620 raise();
621} 621}
622 622
623QPixmap MainWindow::loadPixmap( QString name ) 623QPixmap MainWindow::loadPixmap( QString name )
624{ 624{
625 return SmallIcon( name ); 625 return SmallIcon( name );
626 626
627} 627}
628void MainWindow::setUsesBigPixmaps ( bool b ) 628void MainWindow::setUsesBigPixmaps ( bool b )
629{ 629{
630 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); 630 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
631 if ( b ) 631 if ( b )
632 qDebug("KO: BigPixmaps are not supported "); 632 qDebug("KO: BigPixmaps are not supported ");
633} 633}
634void MainWindow::initActions() 634void MainWindow::initActions()
635{ 635{
636 //KOPrefs::instance()->mShowFullMenu 636 //KOPrefs::instance()->mShowFullMenu
637 iconToolBar->clear(); 637 iconToolBar->clear();
638 KOPrefs *p = KOPrefs::instance(); 638 KOPrefs *p = KOPrefs::instance();
639 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 639 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
640 640
641 QPopupMenu *viewMenu = new QPopupMenu( this ); 641 QPopupMenu *viewMenu = new QPopupMenu( this );
642 QPopupMenu *actionMenu = new QPopupMenu( this ); 642 QPopupMenu *actionMenu = new QPopupMenu( this );
643 QPopupMenu *importMenu = new QPopupMenu( this ); 643 QPopupMenu *importMenu = new QPopupMenu( this );
644 QPopupMenu *importMenu_X = new QPopupMenu( this ); 644 QPopupMenu *importMenu_X = new QPopupMenu( this );
645 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 645 QPopupMenu *exportMenu_X = new QPopupMenu( this );
646 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 646 QPopupMenu *beamMenu_X = new QPopupMenu( this );
647 selectFilterMenu = new QPopupMenu( this ); 647 selectFilterMenu = new QPopupMenu( this );
648 selectFilterMenu->setCheckable( true ); 648 selectFilterMenu->setCheckable( true );
649 syncMenu = new QPopupMenu( this ); 649 syncMenu = new QPopupMenu( this );
650 configureAgendaMenu = new QPopupMenu( this ); 650 configureAgendaMenu = new QPopupMenu( this );
651 configureToolBarMenu = new QPopupMenu( this ); 651 configureToolBarMenu = new QPopupMenu( this );
652 QPopupMenu *helpMenu = new QPopupMenu( this ); 652 QPopupMenu *helpMenu = new QPopupMenu( this );
653 QIconSet icon; 653 QIconSet icon;
654 int pixWid = 22, pixHei = 22; 654 int pixWid = 22, pixHei = 22;
655 QString pathString = ""; 655 QString pathString = "";
656 if ( !p->mToolBarMiniIcons ) { 656 if ( !p->mToolBarMiniIcons ) {
657 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { 657 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) {
658 pathString += "icons16/"; 658 pathString += "icons16/";
659 pixWid = 18; pixHei = 16; 659 pixWid = 18; pixHei = 16;
660 } 660 }
661 } else { 661 } else {
662 pathString += "iconsmini/"; 662 pathString += "iconsmini/";
663 pixWid = 18; pixHei = 16; 663 pixWid = 18; pixHei = 16;
664 } 664 }
665 if ( KOPrefs::instance()->mShowFullMenu ) { 665 if ( KOPrefs::instance()->mShowFullMenu ) {
666 QMenuBar *menuBar1; 666 QMenuBar *menuBar1;
667 menuBar1 = menuBar(); 667 menuBar1 = menuBar();
668 menuBar1->insertItem( i18n("File"), importMenu ); 668 menuBar1->insertItem( i18n("File"), importMenu );
669 menuBar1->insertItem( i18n("View"), viewMenu ); 669 menuBar1->insertItem( i18n("View"), viewMenu );
670 menuBar1->insertItem( i18n("Actions"), actionMenu ); 670 menuBar1->insertItem( i18n("Actions"), actionMenu );
671#ifdef DESKTOP_VERSION 671#ifdef DESKTOP_VERSION
672 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 672 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
673 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 673 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
674#else 674#else
675 menuBar1->insertItem( i18n("Sync"), syncMenu ); 675 menuBar1->insertItem( i18n("Sync"), syncMenu );
676 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); 676 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu );
677#endif 677#endif
678 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); 678 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
679 menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); 679 menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
680 menuBar1->insertItem( i18n("Help"), helpMenu ); 680 menuBar1->insertItem( i18n("Help"), helpMenu );
681 } else { 681 } else {
682 QPEMenuBar *menuBar1; 682 QPEMenuBar *menuBar1;
683 menuBar1 = new QPEMenuBar( iconToolBar ); 683 menuBar1 = new QPEMenuBar( iconToolBar );
684 QPopupMenu *menuBar = new QPopupMenu( this ); 684 QPopupMenu *menuBar = new QPopupMenu( this );
685 icon = loadPixmap( pathString + "z_menu" ); 685 icon = loadPixmap( pathString + "z_menu" );
686 menuBar1->insertItem( icon.pixmap(), menuBar); 686 menuBar1->insertItem( icon.pixmap(), menuBar);
687 //menuBar1->insertItem( i18n("ME"), menuBar); 687 //menuBar1->insertItem( i18n("ME"), menuBar);
688 menuBar->insertItem( i18n("File"), importMenu ); 688 menuBar->insertItem( i18n("File"), importMenu );
689 menuBar->insertItem( i18n("View"), viewMenu ); 689 menuBar->insertItem( i18n("View"), viewMenu );
690 menuBar->insertItem( i18n("Actions"), actionMenu ); 690 menuBar->insertItem( i18n("Actions"), actionMenu );
691 menuBar->insertItem( i18n("Synchronize"), syncMenu ); 691 menuBar->insertItem( i18n("Synchronize"), syncMenu );
692 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 692 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
693 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 693 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
694 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 694 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
695 menuBar->insertItem( i18n("Help"), helpMenu ); 695 menuBar->insertItem( i18n("Help"), helpMenu );
696 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 696 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
697 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 697 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
698 } 698 }
699 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 699 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
700 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 700 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
701 701
702 702
703 mWeekBgColor = iconToolBar->backgroundColor(); 703 mWeekBgColor = iconToolBar->backgroundColor();
704 mWeekPixmap.resize( pixWid , pixHei ); 704 mWeekPixmap.resize( pixWid , pixHei );
705 mWeekPixmap.fill( mWeekBgColor ); 705 mWeekPixmap.fill( mWeekBgColor );
706 icon = mWeekPixmap; 706 icon = mWeekPixmap;
707 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 707 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
708 if ( p-> mShowIconWeekNum ) 708 if ( p-> mShowIconWeekNum )
709 mWeekAction->addTo( iconToolBar ); 709 mWeekAction->addTo( iconToolBar );
710 mWeekFont = font(); 710 mWeekFont = font();
711 711
712 int fontPoint = mWeekFont.pointSize(); 712 int fontPoint = mWeekFont.pointSize();
713 QFontMetrics f( mWeekFont ); 713 QFontMetrics f( mWeekFont );
714 int fontWid = f.width( "30" ); 714 int fontWid = f.width( "30" );
715 while ( fontWid > pixWid ) { 715 while ( fontWid > pixWid ) {
716 --fontPoint; 716 --fontPoint;
717 mWeekFont.setPointSize( fontPoint ); 717 mWeekFont.setPointSize( fontPoint );
718 QFontMetrics f( mWeekFont ); 718 QFontMetrics f( mWeekFont );
719 fontWid = f.width( "30" ); 719 fontWid = f.width( "30" );
720 //qDebug("dec-- "); 720 //qDebug("dec-- ");
721 } 721 }
722 722
723 connect( mWeekAction, SIGNAL( activated() ), 723 connect( mWeekAction, SIGNAL( activated() ),
724 this, SLOT( weekAction() ) ); 724 this, SLOT( weekAction() ) );
725 725
726 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 726 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
727 if ( p->mShowIconFilterview ) { 727 if ( p->mShowIconFilterview ) {
728 icon = loadPixmap( pathString + "filter" ); 728 icon = loadPixmap( pathString + "filter" );
729 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); 729 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
730 connect( actionFilterMenuTB, SIGNAL( activated() ), 730 connect( actionFilterMenuTB, SIGNAL( activated() ),
731 this, SLOT( fillFilterMenuTB() ) ); 731 this, SLOT( fillFilterMenuTB() ) );
732 actionFilterMenuTB->addTo( iconToolBar ); 732 actionFilterMenuTB->addTo( iconToolBar );
733 selectFilterMenuTB = new QPopupMenu( this ); 733 selectFilterMenuTB = new QPopupMenu( this );
734 selectFilterMenuTB->setCheckable( true ); 734 selectFilterMenuTB->setCheckable( true );
735 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 735 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
736 } 736 }
737 737
738 //#endif 738 //#endif
739 // ****************** 739 // ******************
740 QAction *action; 740 QAction *action;
741 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 741 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
742 configureToolBarMenu->setCheckable( true ); 742 configureToolBarMenu->setCheckable( true );
743 743
744 744
745 configureAgendaMenu->setCheckable( true ); 745 configureAgendaMenu->setCheckable( true );
746 int iii ; 746 int iii ;
747 for ( iii = 1;iii<= 10 ;++iii ){ 747 for ( iii = 1;iii<= 10 ;++iii ){
748 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 748 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
749 } 749 }
750 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 750 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
751 751
752 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 752 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
753 this, SLOT( showConfigureAgenda( ) ) ); 753 this, SLOT( showConfigureAgenda( ) ) );
754 754
755 icon = loadPixmap( pathString + "configure" ); 755 icon = loadPixmap( pathString + "configure" );
756 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); 756 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
757 action->addTo( actionMenu ); 757 action->addTo( actionMenu );
758 connect( action, SIGNAL( activated() ), 758 connect( action, SIGNAL( activated() ),
759 mView, SLOT( edit_options() ) ); 759 mView, SLOT( edit_options() ) );
760 icon = loadPixmap( pathString + "configure" ); 760 icon = loadPixmap( pathString + "configure" );
761 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); 761 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
762 action->addTo( actionMenu ); 762 action->addTo( actionMenu );
763 connect( action, SIGNAL( activated() ), 763 connect( action, SIGNAL( activated() ),
764 mView, SLOT( edit_global_options() ) ); 764 mView, SLOT( edit_global_options() ) );
765 actionMenu->insertSeparator(); 765 actionMenu->insertSeparator();
766 766
767 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 767 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
768 action->addTo( actionMenu ); 768 action->addTo( actionMenu );
769 connect( action, SIGNAL( activated() ), 769 connect( action, SIGNAL( activated() ),
770 mView, SLOT( undo_delete() ) ); 770 mView, SLOT( undo_delete() ) );
771 actionMenu->insertSeparator(); 771 actionMenu->insertSeparator();
772 772
773 icon = loadPixmap( pathString + "newevent" ); 773 icon = loadPixmap( pathString + "newevent" );
774 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 774 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
775 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); 775 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
776 configureToolBarMenu->insertSeparator(); 776 configureToolBarMenu->insertSeparator();
777 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); 777 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
778 configureToolBarMenu->insertSeparator(); 778 configureToolBarMenu->insertSeparator();
779 configureToolBarMenu->insertItem(i18n("Week Number"), 400); 779 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
780 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 780 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
781 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 781 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
782 ne_action->addTo( actionMenu ); 782 ne_action->addTo( actionMenu );
783 connect( ne_action, SIGNAL( activated() ), 783 connect( ne_action, SIGNAL( activated() ),
784 mView, SLOT( newEvent() ) ); 784 mView, SLOT( newEvent() ) );
785 icon = loadPixmap( pathString + "newtodo" ); 785 icon = loadPixmap( pathString + "newtodo" );
786 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 786 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
787 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 787 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
788 nt_action->addTo( actionMenu ); 788 nt_action->addTo( actionMenu );
789 connect( nt_action, SIGNAL( activated() ), 789 connect( nt_action, SIGNAL( activated() ),
790 mView, SLOT( newTodo() ) ); 790 mView, SLOT( newTodo() ) );
791 791
792 icon = loadPixmap( pathString + "today" ); 792 icon = loadPixmap( pathString + "today" );
793 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 793 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
794 today_action->addTo( viewMenu ); 794 today_action->addTo( viewMenu );
795 connect( today_action, SIGNAL( activated() ), 795 connect( today_action, SIGNAL( activated() ),
796 mView, SLOT( goToday() ) ); 796 mView, SLOT( goToday() ) );
797 viewMenu->insertSeparator(); 797 viewMenu->insertSeparator();
798 798
799 // *********************** 799 // ***********************
800 if ( KOPrefs::instance()->mVerticalScreen ) { 800 if ( KOPrefs::instance()->mVerticalScreen ) {
801 icon = SmallIcon( "1updownarrow" ); 801 icon = SmallIcon( "1updownarrow" );
802 } else { 802 } else {
803 icon = SmallIcon("1leftrightarrow" ); 803 icon = SmallIcon("1leftrightarrow" );
804 } 804 }
805 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); 805 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
806 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); 806 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
807 FSaction->addTo( viewMenu ); 807 FSaction->addTo( viewMenu );
808 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); 808 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
809 809
810 810
811 icon = loadPixmap( pathString + "filter" ); 811 icon = loadPixmap( pathString + "filter" );
812 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); 812 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
813 icon = loadPixmap( pathString + "configure" ); 813 icon = loadPixmap( pathString + "configure" );
814 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); 814 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
815 action->addTo( viewMenu ); 815 action->addTo( viewMenu );
816 connect( action, SIGNAL( activated() ), 816 connect( action, SIGNAL( activated() ),
817 mView, SLOT( toggleFilter() ) ); 817 mView, SLOT( toggleFilter() ) );
818 mToggleFilter = action; 818 mToggleFilter = action;
819 icon = loadPixmap( pathString + "navi" ); 819 icon = loadPixmap( pathString + "navi" );
820 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); 820 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
821 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 821 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
822 action->addTo( viewMenu ); 822 action->addTo( viewMenu );
823 connect( action, SIGNAL( activated() ), 823 connect( action, SIGNAL( activated() ),
824 mView, SLOT( toggleDateNavigatorWidget() ) ); 824 mView, SLOT( toggleDateNavigatorWidget() ) );
825 mToggleNav = action ; 825 mToggleNav = action ;
826 icon = loadPixmap( pathString + "allday" ); 826 icon = loadPixmap( pathString + "allday" );
827 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); 827 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
828 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 828 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
829 action->addTo( viewMenu ); 829 action->addTo( viewMenu );
830 connect( action, SIGNAL( activated() ), 830 connect( action, SIGNAL( activated() ),
831 mView, SLOT( toggleAllDaySize() ) ); 831 mView, SLOT( toggleAllDaySize() ) );
832 mToggleAllday = action; 832 mToggleAllday = action;
833 833
834 834
835 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 835 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
836 mToggleNav, SLOT( setEnabled ( bool ) ) ); 836 mToggleNav, SLOT( setEnabled ( bool ) ) );
837 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 837 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
838 // mToggleFilter, SLOT( setEnabled ( bool ) ) ); 838 // mToggleFilter, SLOT( setEnabled ( bool ) ) );
839 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 839 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
840 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 840 mToggleAllday, SLOT( setEnabled ( bool ) ) );
841 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 841 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
842 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); 842 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) );
843 843
844 viewMenu->insertSeparator(); 844 viewMenu->insertSeparator();
845 icon = loadPixmap( pathString + "picker" ); 845 icon = loadPixmap( pathString + "picker" );
846 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); 846 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this );
847 action->addTo( viewMenu ); 847 action->addTo( viewMenu );
848 connect( action, SIGNAL( activated() ), 848 connect( action, SIGNAL( activated() ),
849 mView, SLOT( showDatePicker() ) ); 849 mView, SLOT( showDatePicker() ) );
850 action->addTo( iconToolBar ); 850 action->addTo( iconToolBar );
851 viewMenu->insertSeparator(); 851 viewMenu->insertSeparator();
852 852
853 if ( p-> mShowIconToggleFull ) 853 if ( p-> mShowIconToggleFull )
854 FSaction->addTo( iconToolBar ); 854 FSaction->addTo( iconToolBar );
855 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); 855 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar );
856 856
857 //******************** 857 //********************
858 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); 858 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar );
859 859
860 860
861 icon = loadPixmap( pathString + "whatsnext" ); 861 icon = loadPixmap( pathString + "whatsnext" );
862 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); 862 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
863 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 863 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
864 whatsnext_action->addTo( viewMenu ); 864 whatsnext_action->addTo( viewMenu );
865 connect( whatsnext_action, SIGNAL( activated() ), 865 connect( whatsnext_action, SIGNAL( activated() ),
866 mView->viewManager(), SLOT( showWhatsNextView() ) ); 866 mView->viewManager(), SLOT( showWhatsNextView() ) );
867 867
868 icon = loadPixmap( pathString + "xdays" ); 868 icon = loadPixmap( pathString + "xdays" );
869 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); 869 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 );
870 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 870 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
871 xdays_action->addTo( viewMenu ); 871 xdays_action->addTo( viewMenu );
872 connect( xdays_action, SIGNAL( activated() ), 872 connect( xdays_action, SIGNAL( activated() ),
873 mView->viewManager(), SLOT( showNextXView() ) ); 873 mView->viewManager(), SLOT( showNextXView() ) );
874 874
875 875
876 icon = loadPixmap( pathString + "journal" ); 876 icon = loadPixmap( pathString + "journal" );
877 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 877 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
878 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 878 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
879 viewjournal_action->addTo( viewMenu ); 879 viewjournal_action->addTo( viewMenu );
880 connect( viewjournal_action, SIGNAL( activated() ), 880 connect( viewjournal_action, SIGNAL( activated() ),
881 mView->viewManager(), SLOT( showJournalView() ) ); 881 mView->viewManager(), SLOT( showJournalView() ) );
882 882
883 883
884 icon = loadPixmap( pathString + "day" ); 884 icon = loadPixmap( pathString + "day" );
885 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 885 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
886 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 886 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
887 day1_action->addTo( viewMenu ); 887 day1_action->addTo( viewMenu );
888 // action->addTo( toolBar ); 888 // action->addTo( toolBar );
889 connect( day1_action, SIGNAL( activated() ), 889 connect( day1_action, SIGNAL( activated() ),
890 mView->viewManager(), SLOT( showDayView() ) ); 890 mView->viewManager(), SLOT( showDayView() ) );
891 891
892 icon = loadPixmap( pathString + "workweek" ); 892 icon = loadPixmap( pathString + "workweek" );
893 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 893 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
894 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 894 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
895 day5_action->addTo( viewMenu ); 895 day5_action->addTo( viewMenu );
896 connect( day5_action, SIGNAL( activated() ), 896 connect( day5_action, SIGNAL( activated() ),
897 mView->viewManager(), SLOT( showWorkWeekView() ) ); 897 mView->viewManager(), SLOT( showWorkWeekView() ) );
898 898
899 icon = loadPixmap( pathString + "week" ); 899 icon = loadPixmap( pathString + "week" );
900 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 900 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
901 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 901 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
902 day7_action->addTo( viewMenu ); 902 day7_action->addTo( viewMenu );
903 connect( day7_action, SIGNAL( activated() ), 903 connect( day7_action, SIGNAL( activated() ),
904 mView->viewManager(), SLOT( showWeekView() ) ); 904 mView->viewManager(), SLOT( showWeekView() ) );
905 905
906 icon = loadPixmap( pathString + "workweek2" ); 906 icon = loadPixmap( pathString + "workweek2" );
907 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 907 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
908 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 908 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
909 day6_action->addTo( viewMenu ); 909 day6_action->addTo( viewMenu );
910 connect( day6_action, SIGNAL( activated() ), 910 connect( day6_action, SIGNAL( activated() ),
911 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 911 mView->viewManager(), SLOT( showMonthViewWeek() ) );
912 912
913 icon = loadPixmap( pathString + "month" ); 913 icon = loadPixmap( pathString + "month" );
914 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 914 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
915 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 915 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
916 month_action->addTo( viewMenu ); 916 month_action->addTo( viewMenu );
917 connect( month_action, SIGNAL( activated() ), 917 connect( month_action, SIGNAL( activated() ),
918 mView->viewManager(), SLOT( showMonthView() ) ); 918 mView->viewManager(), SLOT( showMonthView() ) );
919 919
920 icon = loadPixmap( pathString + "list" ); 920 icon = loadPixmap( pathString + "list" );
921 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 921 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
922 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 922 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
923 showlist_action->addTo( viewMenu ); 923 showlist_action->addTo( viewMenu );
924 connect( showlist_action, SIGNAL( activated() ), 924 connect( showlist_action, SIGNAL( activated() ),
925 mView->viewManager(), SLOT( showListView() ) ); 925 mView->viewManager(), SLOT( showListView() ) );
926 926
927 icon = loadPixmap( pathString + "todo" ); 927 icon = loadPixmap( pathString + "todo" );
928 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 928 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
929 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 929 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
930 todoview_action->addTo( viewMenu ); 930 todoview_action->addTo( viewMenu );
931 connect( todoview_action, SIGNAL( activated() ), 931 connect( todoview_action, SIGNAL( activated() ),
932 mView->viewManager(), SLOT( showTodoView() ) ); 932 mView->viewManager(), SLOT( showTodoView() ) );
933 933
934 934
935 935
936#if 0 936#if 0
937 action = new QAction( "view_timespan", "Time Span", 0, this ); 937 action = new QAction( "view_timespan", "Time Span", 0, this );
938 action->addTo( viewMenu ); 938 action->addTo( viewMenu );
939 connect( action, SIGNAL( activated() ), 939 connect( action, SIGNAL( activated() ),
940 mView->viewManager(), SLOT( showTimeSpanView() ) ); 940 mView->viewManager(), SLOT( showTimeSpanView() ) );
941#endif 941#endif
942 942
943 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 943 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
944 this ); 944 this );
945 mNewSubTodoAction->addTo( actionMenu ); 945 mNewSubTodoAction->addTo( actionMenu );
946 connect( mNewSubTodoAction, SIGNAL( activated() ), 946 connect( mNewSubTodoAction, SIGNAL( activated() ),
947 mView, SLOT( newSubTodo() ) ); 947 mView, SLOT( newSubTodo() ) );
948 948
949 actionMenu->insertSeparator(); 949 actionMenu->insertSeparator();
950 950
951 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 951 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
952 mShowAction->addTo( actionMenu ); 952 mShowAction->addTo( actionMenu );
953 connect( mShowAction, SIGNAL( activated() ), 953 connect( mShowAction, SIGNAL( activated() ),
954 mView, SLOT( showIncidence() ) ); 954 mView, SLOT( showIncidence() ) );
955 955
956 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 956 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
957 mEditAction->addTo( actionMenu ); 957 mEditAction->addTo( actionMenu );
958 connect( mEditAction, SIGNAL( activated() ), 958 connect( mEditAction, SIGNAL( activated() ),
959 mView, SLOT( editIncidence() ) ); 959 mView, SLOT( editIncidence() ) );
960 960
961 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 961 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
962 mDeleteAction->addTo( actionMenu ); 962 mDeleteAction->addTo( actionMenu );
963 connect( mDeleteAction, SIGNAL( activated() ), 963 connect( mDeleteAction, SIGNAL( activated() ),
964 mView, SLOT( deleteIncidence() ) ); 964 mView, SLOT( deleteIncidence() ) );
965 965
966 966
967 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 967 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
968 mCloneAction->addTo( actionMenu ); 968 mCloneAction->addTo( actionMenu );
969 connect( mCloneAction, SIGNAL( activated() ), 969 connect( mCloneAction, SIGNAL( activated() ),
970 mView, SLOT( cloneIncidence() ) ); 970 mView, SLOT( cloneIncidence() ) );
971 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 971 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
972 mMoveAction->addTo( actionMenu ); 972 mMoveAction->addTo( actionMenu );
973 connect( mMoveAction, SIGNAL( activated() ), 973 connect( mMoveAction, SIGNAL( activated() ),
974 mView, SLOT( moveIncidence() ) ); 974 mView, SLOT( moveIncidence() ) );
975 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 975 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
976 mBeamAction->addTo( actionMenu ); 976 mBeamAction->addTo( actionMenu );
977 connect( mBeamAction, SIGNAL( activated() ), 977 connect( mBeamAction, SIGNAL( activated() ),
978 mView, SLOT( beamIncidence() ) ); 978 mView, SLOT( beamIncidence() ) );
979 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 979 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
980 mCancelAction->addTo( actionMenu ); 980 mCancelAction->addTo( actionMenu );
981 connect( mCancelAction, SIGNAL( activated() ), 981 connect( mCancelAction, SIGNAL( activated() ),
982 mView, SLOT( toggleCancelIncidence() ) ); 982 mView, SLOT( toggleCancelIncidence() ) );
983 983
984 actionMenu->insertSeparator(); 984 actionMenu->insertSeparator();
985 985
986 action = new QAction( "purge_completed", i18n("Purge Completed"), 0, 986 action = new QAction( "purge_completed", i18n("Purge Completed"), 0,
987 this ); 987 this );
988 action->addTo( actionMenu ); 988 action->addTo( actionMenu );
989 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 989 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
990 990
991 icon = loadPixmap( pathString + "search" ); 991 icon = loadPixmap( pathString + "search" );
992 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 992 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
993 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); 993 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
994 search_action->addTo( actionMenu ); 994 search_action->addTo( actionMenu );
995 connect( search_action, SIGNAL( activated() ), 995 connect( search_action, SIGNAL( activated() ),
996 mView->dialogManager(), SLOT( showSearchDialog() ) ); 996 mView->dialogManager(), SLOT( showSearchDialog() ) );
997 997
998 998
999 999
1000 if ( KOPrefs::instance()->mShowFullMenu ) { 1000 if ( KOPrefs::instance()->mShowFullMenu ) {
1001 actionMenu->insertSeparator(); 1001 actionMenu->insertSeparator();
1002 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); 1002 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
1003 1003
1004 } 1004 }
1005 // actionMenu->insertSeparator(); 1005 // actionMenu->insertSeparator();
1006 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 1006 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
1007 this ); 1007 this );
1008 action->addTo( importMenu_X ); 1008 action->addTo( importMenu_X );
1009 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 1009 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
1010 action = new QAction( "import_quick", i18n("Import last file"), 0, 1010 action = new QAction( "import_quick", i18n("Import last file"), 0,
1011 this ); 1011 this );
1012 action->addTo( importMenu_X ); 1012 action->addTo( importMenu_X );
1013 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 1013 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
1014 importMenu_X->insertSeparator(); 1014 importMenu_X->insertSeparator();
1015 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, 1015 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
1016 this ); 1016 this );
1017 action->addTo( importMenu_X ); 1017 action->addTo( importMenu_X );
1018 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 1018 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
1019 //#ifndef DESKTOP_VERSION 1019 //#ifndef DESKTOP_VERSION
1020 importMenu_X->insertSeparator(); 1020 importMenu_X->insertSeparator();
1021 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 1021 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
1022 this ); 1022 this );
1023 action->addTo( importMenu_X ); 1023 action->addTo( importMenu_X );
1024 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 1024 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
1025 //#else 1025 //#else
1026#ifdef _OL_IMPORT_ 1026#ifdef _OL_IMPORT_
1027 importMenu_X->insertSeparator(); 1027 importMenu_X->insertSeparator();
1028 action = new QAction( "import_ol", i18n("Import from OL"), 0, 1028 action = new QAction( "import_ol", i18n("Import from OL"), 0,
1029 this ); 1029 this );
1030 action->addTo( importMenu_X ); 1030 action->addTo( importMenu_X );
1031 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 1031 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
1032#endif 1032#endif
1033 //#endif 1033 //#endif
1034 1034
1035 //importMenu->insertSeparator(); 1035 //importMenu->insertSeparator();
1036#if 0 1036#if 0
1037 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 1037 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
1038 this ); 1038 this );
1039 action->addTo( importMenu ); 1039 action->addTo( importMenu );
1040 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); 1040 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
1041#endif 1041#endif
1042 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, 1042 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0,
1043 this ); 1043 this );
1044 action->addTo( importMenu ); 1044 action->addTo( importMenu );
1045 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); 1045 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
1046 importMenu->insertSeparator(); 1046 importMenu->insertSeparator();
1047 importMenu->insertItem( i18n("Import"), importMenu_X ); 1047 importMenu->insertItem( i18n("Import"), importMenu_X );
1048 //importMenu->insertSeparator(); 1048 //importMenu->insertSeparator();
1049 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, 1049 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0,
1050 this ); 1050 this );
1051 action->addTo( exportMenu_X ); 1051 action->addTo( exportMenu_X );
1052 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); 1052 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
1053 1053
1054 1054
1055 //LR 1055 //LR
1056 QPopupMenu *ex2phone = new QPopupMenu( this ); 1056 QPopupMenu *ex2phone = new QPopupMenu( this );
1057 ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1057 ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1058 ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1058 ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1059 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); 1059 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) );
1060 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); 1060 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone );
1061 1061
1062 importMenu->insertItem( i18n("Export"), exportMenu_X ); 1062 importMenu->insertItem( i18n("Export"), exportMenu_X );
1063#ifndef DESKTOP_VERSION 1063#ifndef DESKTOP_VERSION
1064 //importMenu->insertSeparator(); 1064 //importMenu->insertSeparator();
1065 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, 1065 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0,
1066 this ); 1066 this );
1067 brAction->addTo( beamMenu_X ); 1067 brAction->addTo( beamMenu_X );
1068 brAction->setToggleAction (true ) ; 1068 brAction->setToggleAction (true ) ;
1069 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); 1069 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) );
1070 1070
1071 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, 1071 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0,
1072 this ); 1072 this );
1073 action->addTo( beamMenu_X ); 1073 action->addTo( beamMenu_X );
1074 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); 1074 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
1075 1075
1076 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, 1076 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
1077 this ); 1077 this );
1078 action->addTo( beamMenu_X ); 1078 action->addTo( beamMenu_X );
1079 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); 1079 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
1080 importMenu->insertItem( i18n("Beam"), beamMenu_X ); 1080 importMenu->insertItem( i18n("Beam"), beamMenu_X );
1081#else 1081#else
1082 //importMenu->insertSeparator(); 1082 //importMenu->insertSeparator();
1083 icon = loadPixmap( pathString + "print" ); 1083 icon = loadPixmap( pathString + "print" );
1084 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 1084 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
1085 action->addTo( beamMenu_X ); 1085 action->addTo( beamMenu_X );
1086 connect( action, SIGNAL( activated() ), 1086 connect( action, SIGNAL( activated() ),
1087 this, SLOT( printCal() ) ); 1087 this, SLOT( printCal() ) );
1088 1088
1089 icon = loadPixmap( pathString + "print" ); 1089 icon = loadPixmap( pathString + "print" );
1090 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 1090 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
1091 action->addTo( beamMenu_X ); 1091 action->addTo( beamMenu_X );
1092 connect( action, SIGNAL( activated() ), 1092 connect( action, SIGNAL( activated() ),
1093 this, SLOT( printSel() ) ); 1093 this, SLOT( printSel() ) );
1094 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 1094 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
1095 action->addTo( beamMenu_X ); 1095 action->addTo( beamMenu_X );
1096 connect( action, SIGNAL( activated() ), 1096 connect( action, SIGNAL( activated() ),
1097 mView->viewManager(), SLOT( slotprintWNV() ) ); 1097 mView->viewManager(), SLOT( slotprintWNV() ) );
1098 1098
1099 1099
1100 icon = loadPixmap( pathString + "print" ); 1100 icon = loadPixmap( pathString + "print" );
1101 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); 1101 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this );
1102 action->addTo( beamMenu_X ); 1102 action->addTo( beamMenu_X );
1103 connect( action, SIGNAL( activated() ), 1103 connect( action, SIGNAL( activated() ),
1104 this, SLOT( printListView() ) ); 1104 this, SLOT( printListView() ) );
1105 1105
1106 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); 1106 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
1107 action->addTo( beamMenu_X ); 1107 action->addTo( beamMenu_X );
1108 connect( action, SIGNAL( activated() ), 1108 connect( action, SIGNAL( activated() ),
1109 mView, SLOT( slotprintSelInc() ) ); 1109 mView, SLOT( slotprintSelInc() ) );
1110 1110
1111 importMenu->insertItem( i18n("Print"), beamMenu_X ); 1111 importMenu->insertItem( i18n("Print"), beamMenu_X );
1112#endif 1112#endif
1113 importMenu->insertSeparator(); 1113 importMenu->insertSeparator();
1114 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1114 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
1115 this ); 1115 this );
1116 action->addTo( importMenu ); 1116 action->addTo( importMenu );
1117 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1117 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
1118 importMenu->insertSeparator(); 1118 importMenu->insertSeparator();
1119 action = new QAction( "beam all", i18n("Save"), 0, 1119 action = new QAction( "beam all", i18n("Save"), 0,
1120 this ); 1120 this );
1121 action->addTo( importMenu ); 1121 action->addTo( importMenu );
1122 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 1122 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
1123 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 1123 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
1124 this ); 1124 this );
1125 action->addTo( importMenu ); 1125 action->addTo( importMenu );
1126 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 1126 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
1127 1127
1128 //menuBar->insertItem( "Configure",configureMenu ); 1128 //menuBar->insertItem( "Configure",configureMenu );
1129 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 1129 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
1130 icon = loadPixmap( "korganizer/korganizer" ); 1130 icon = loadPixmap( "korganizer/korganizer" );
1131 1131
1132 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 1132 action = new QAction( "Whats New", i18n("What's new?"), 0,this );
1133 action->addTo( helpMenu ); 1133 action->addTo( helpMenu );
1134 connect( action, SIGNAL( activated() ), 1134 connect( action, SIGNAL( activated() ),
1135 SLOT( whatsNew() ) ); 1135 SLOT( whatsNew() ) );
1136 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 1136 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
1137 action->addTo( helpMenu ); 1137 action->addTo( helpMenu );
1138 connect( action, SIGNAL( activated() ), 1138 connect( action, SIGNAL( activated() ),
1139 SLOT( features() ) ); 1139 SLOT( features() ) );
1140 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 1140 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
1141 action->addTo( helpMenu ); 1141 action->addTo( helpMenu );
1142 connect( action, SIGNAL( activated() ), 1142 connect( action, SIGNAL( activated() ),
1143 SLOT( keyBindings() ) ); 1143 SLOT( keyBindings() ) );
1144 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); 1144 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this );
1145 action->addTo( helpMenu ); 1145 action->addTo( helpMenu );
1146 connect( action, SIGNAL( activated() ), 1146 connect( action, SIGNAL( activated() ),
1147 SLOT( storagehowto() ) ); 1147 SLOT( storagehowto() ) );
1148 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); 1148 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this );
1149 action->addTo( helpMenu ); 1149 action->addTo( helpMenu );
1150 connect( action, SIGNAL( activated() ), 1150 connect( action, SIGNAL( activated() ),
1151 SLOT( timetrackinghowto() ) ); 1151 SLOT( timetrackinghowto() ) );
1152 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 1152 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
1153 action->addTo( helpMenu ); 1153 action->addTo( helpMenu );
1154 connect( action, SIGNAL( activated() ), 1154 connect( action, SIGNAL( activated() ),
1155 SLOT( synchowto() ) ); 1155 SLOT( synchowto() ) );
1156 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 1156 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
1157 action->addTo( helpMenu ); 1157 action->addTo( helpMenu );
1158 connect( action, SIGNAL( activated() ), 1158 connect( action, SIGNAL( activated() ),
1159 SLOT( kdesynchowto() ) ); 1159 SLOT( kdesynchowto() ) );
1160 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 1160 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
1161 action->addTo( helpMenu ); 1161 action->addTo( helpMenu );
1162 connect( action, SIGNAL( activated() ), 1162 connect( action, SIGNAL( activated() ),
1163 SLOT( multisynchowto() ) ); 1163 SLOT( multisynchowto() ) );
1164 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 1164 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
1165 action->addTo( helpMenu ); 1165 action->addTo( helpMenu );
1166 connect( action, SIGNAL( activated() ), 1166 connect( action, SIGNAL( activated() ),
1167 SLOT( aboutAutoSaving() ) ); 1167 SLOT( aboutAutoSaving() ) );
1168 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 1168 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
1169 action->addTo( helpMenu ); 1169 action->addTo( helpMenu );
1170 connect( action, SIGNAL( activated() ), 1170 connect( action, SIGNAL( activated() ),
1171 SLOT( aboutKnownBugs() ) ); 1171 SLOT( aboutKnownBugs() ) );
1172 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 1172 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
1173 action->addTo( helpMenu ); 1173 action->addTo( helpMenu );
1174 connect( action, SIGNAL( activated() ), 1174 connect( action, SIGNAL( activated() ),
1175 SLOT( usertrans() ) ); 1175 SLOT( usertrans() ) );
1176 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 1176 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
1177 action->addTo( helpMenu ); 1177 action->addTo( helpMenu );
1178 connect( action, SIGNAL( activated() ), 1178 connect( action, SIGNAL( activated() ),
1179 SLOT( faq() ) ); 1179 SLOT( faq() ) );
1180 action = new QAction( "licence", i18n("Licence..."), 0, this ); 1180 action = new QAction( "licence", i18n("Licence..."), 0, this );
1181 action->addTo( helpMenu ); 1181 action->addTo( helpMenu );
1182 connect( action, SIGNAL( activated() ), 1182 connect( action, SIGNAL( activated() ),
1183 SLOT( licence() ) ); 1183 SLOT( licence() ) );
1184 action = new QAction( "about", i18n("About..."), 0, this ); 1184 action = new QAction( "about", i18n("About..."), 0, this );
1185 action->addTo( helpMenu ); 1185 action->addTo( helpMenu );
1186 connect( action, SIGNAL( activated() ), 1186 connect( action, SIGNAL( activated() ),
1187 SLOT( about() ) ); 1187 SLOT( about() ) );
1188 //menuBar->insertSeparator(); 1188 //menuBar->insertSeparator();
1189 1189
1190 // ****************************************************** 1190 // ******************************************************
1191 // menubar icons 1191 // menubar icons
1192 1192
1193 1193
1194 1194
1195 //menuBar->insertItem( iconToolBar ); 1195 //menuBar->insertItem( iconToolBar );
1196 //xdays_action 1196 //xdays_action
1197 if (p-> mShowIconNewEvent) 1197 if (p-> mShowIconNewEvent)
1198 ne_action->addTo( iconToolBar ); 1198 ne_action->addTo( iconToolBar );
1199 if (p->mShowIconNewTodo ) 1199 if (p->mShowIconNewTodo )
1200 nt_action->addTo( iconToolBar ); 1200 nt_action->addTo( iconToolBar );
1201 if (p-> mShowIconSearch) 1201 if (p-> mShowIconSearch)
1202 search_action->addTo( iconToolBar ); 1202 search_action->addTo( iconToolBar );
1203 if (p-> mShowIconWhatsThis) 1203 if (p-> mShowIconWhatsThis)
1204 QWhatsThis::whatsThisButton ( iconToolBar ); 1204 QWhatsThis::whatsThisButton ( iconToolBar );
1205 if (p-> mShowIconNext) 1205 if (p-> mShowIconNext)
1206 whatsnext_action->addTo( viewToolBar ); 1206 whatsnext_action->addTo( viewToolBar );
1207 if (p-> mShowIconNextDays) 1207 if (p-> mShowIconNextDays)
1208 xdays_action->addTo( viewToolBar ); 1208 xdays_action->addTo( viewToolBar );
1209 if (p-> mShowIconJournal) 1209 if (p-> mShowIconJournal)
1210 viewjournal_action->addTo( viewToolBar ); 1210 viewjournal_action->addTo( viewToolBar );
1211 if (p-> mShowIconDay1) 1211 if (p-> mShowIconDay1)
1212 day1_action->addTo( viewToolBar ); 1212 day1_action->addTo( viewToolBar );
1213 if (p-> mShowIconDay5) 1213 if (p-> mShowIconDay5)
1214 day5_action->addTo( viewToolBar ); 1214 day5_action->addTo( viewToolBar );
1215 if (p-> mShowIconDay7) 1215 if (p-> mShowIconDay7)
1216 day7_action->addTo( viewToolBar ); 1216 day7_action->addTo( viewToolBar );
1217 if (p-> mShowIconDay6) 1217 if (p-> mShowIconDay6)
1218 day6_action->addTo( viewToolBar ); 1218 day6_action->addTo( viewToolBar );
1219 if (p-> mShowIconMonth) 1219 if (p-> mShowIconMonth)
1220 month_action->addTo( viewToolBar ); 1220 month_action->addTo( viewToolBar );
1221 if (p-> mShowIconList) 1221 if (p-> mShowIconList)
1222 showlist_action->addTo( viewToolBar ); 1222 showlist_action->addTo( viewToolBar );
1223 if (p-> mShowIconTodoview) 1223 if (p-> mShowIconTodoview)
1224 todoview_action->addTo( viewToolBar ); 1224 todoview_action->addTo( viewToolBar );
1225 1225
1226 icon = loadPixmap( pathString + "2leftarrowB" ); 1226 icon = loadPixmap( pathString + "2leftarrowB" );
1227 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); 1227 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200);
1228 if (p-> mShowIconBackFast) { 1228 if (p-> mShowIconBackFast) {
1229 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1229 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1230 connect( action, SIGNAL( activated() ), 1230 connect( action, SIGNAL( activated() ),
1231 mView, SLOT( goPreviousMonth() ) ); 1231 mView, SLOT( goPreviousMonth() ) );
1232 action->addTo( navigatorToolBar ); 1232 action->addTo( navigatorToolBar );
1233 } 1233 }
1234 icon = loadPixmap( pathString + "1leftarrowB" ); 1234 icon = loadPixmap( pathString + "1leftarrowB" );
1235 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); 1235 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210);
1236 if (p-> mShowIconBack) { 1236 if (p-> mShowIconBack) {
1237 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1237 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1238 connect( action, SIGNAL( activated() ), 1238 connect( action, SIGNAL( activated() ),
1239 mView, SLOT( goPrevious() ) ); 1239 mView, SLOT( goPrevious() ) );
1240 action->addTo( navigatorToolBar ); 1240 action->addTo( navigatorToolBar );
1241 } 1241 }
1242 icon = loadPixmap( pathString + "today" ); 1242 icon = loadPixmap( pathString + "today" );
1243 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); 1243 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
1244 if (p-> mShowIconToday) 1244 if (p-> mShowIconToday)
1245 today_action->addTo( navigatorToolBar ); 1245 today_action->addTo( navigatorToolBar );
1246 icon = loadPixmap( pathString + "1rightarrowB" ); 1246 icon = loadPixmap( pathString + "1rightarrowB" );
1247 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1247 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1248 if (p-> mShowIconForward) { 1248 if (p-> mShowIconForward) {
1249 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1249 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1250 connect( action, SIGNAL( activated() ), 1250 connect( action, SIGNAL( activated() ),
1251 mView, SLOT( goNext() ) ); 1251 mView, SLOT( goNext() ) );
1252 action->addTo( navigatorToolBar ); 1252 action->addTo( navigatorToolBar );
1253 } 1253 }
1254 icon = loadPixmap( pathString + "2rightarrowB" ); 1254 icon = loadPixmap( pathString + "2rightarrowB" );
1255 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1255 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1256 if (p-> mShowIconForwardFast) { 1256 if (p-> mShowIconForwardFast) {
1257 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1257 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
1258 connect( action, SIGNAL( activated() ), 1258 connect( action, SIGNAL( activated() ),
1259 mView, SLOT( goNextMonth() ) ); 1259 mView, SLOT( goNextMonth() ) );
1260 action->addTo( navigatorToolBar ); 1260 action->addTo( navigatorToolBar );
1261 } 1261 }
1262 1262
1263 1263
1264 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); 1264 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6);
1265 1265
1266 1266
1267 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); 1267 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true);
1268 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); 1268 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true);
1269 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); 1269 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true);
1270 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); 1270 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true);
1271 1271
1272 if (p-> mShowIconNewEvent) 1272 if (p-> mShowIconNewEvent)
1273 configureToolBarMenu->setItemChecked( 10, true ); 1273 configureToolBarMenu->setItemChecked( 10, true );
1274 if (p->mShowIconNewTodo ) 1274 if (p->mShowIconNewTodo )
1275 configureToolBarMenu->setItemChecked( 20, true ); 1275 configureToolBarMenu->setItemChecked( 20, true );
1276 if (p-> mShowIconSearch) 1276 if (p-> mShowIconSearch)
1277 configureToolBarMenu->setItemChecked( 120, true ); 1277 configureToolBarMenu->setItemChecked( 120, true );
1278 if (p-> mShowIconList) 1278 if (p-> mShowIconList)
1279 configureToolBarMenu->setItemChecked( 30, true ); 1279 configureToolBarMenu->setItemChecked( 30, true );
1280 if (p-> mShowIconDay1) 1280 if (p-> mShowIconDay1)
1281 configureToolBarMenu->setItemChecked( 40, true ); 1281 configureToolBarMenu->setItemChecked( 40, true );
1282 if (p-> mShowIconDay5) 1282 if (p-> mShowIconDay5)
1283 configureToolBarMenu->setItemChecked( 50, true ); 1283 configureToolBarMenu->setItemChecked( 50, true );
1284 if (p-> mShowIconDay6) 1284 if (p-> mShowIconDay6)
1285 configureToolBarMenu->setItemChecked( 75, true ); 1285 configureToolBarMenu->setItemChecked( 75, true );
1286 if (p-> mShowIconDay7) 1286 if (p-> mShowIconDay7)
1287 configureToolBarMenu->setItemChecked( 60, true ); 1287 configureToolBarMenu->setItemChecked( 60, true );
1288 if (p-> mShowIconMonth) 1288 if (p-> mShowIconMonth)
1289 configureToolBarMenu->setItemChecked( 70, true ); 1289 configureToolBarMenu->setItemChecked( 70, true );
1290 if (p-> mShowIconTodoview) 1290 if (p-> mShowIconTodoview)
1291 configureToolBarMenu->setItemChecked( 80, true ); 1291 configureToolBarMenu->setItemChecked( 80, true );
1292 if (p-> mShowIconBackFast) 1292 if (p-> mShowIconBackFast)
1293 configureToolBarMenu->setItemChecked( 200, true ); 1293 configureToolBarMenu->setItemChecked( 200, true );
1294 if (p-> mShowIconBack) 1294 if (p-> mShowIconBack)
1295 configureToolBarMenu->setItemChecked( 210, true ); 1295 configureToolBarMenu->setItemChecked( 210, true );
1296 if (p-> mShowIconToday) 1296 if (p-> mShowIconToday)
1297 configureToolBarMenu->setItemChecked( 130, true ); 1297 configureToolBarMenu->setItemChecked( 130, true );
1298 if (p-> mShowIconForward) 1298 if (p-> mShowIconForward)
1299 configureToolBarMenu->setItemChecked( 220, true ); 1299 configureToolBarMenu->setItemChecked( 220, true );
1300 if (p-> mShowIconForwardFast) 1300 if (p-> mShowIconForwardFast)
1301 configureToolBarMenu->setItemChecked( 230, true ); 1301 configureToolBarMenu->setItemChecked( 230, true );
1302 if (p-> mShowIconNextDays) 1302 if (p-> mShowIconNextDays)
1303 configureToolBarMenu->setItemChecked( 100, true ); 1303 configureToolBarMenu->setItemChecked( 100, true );
1304 if (p-> mShowIconNext) 1304 if (p-> mShowIconNext)
1305 configureToolBarMenu->setItemChecked( 110, true ); 1305 configureToolBarMenu->setItemChecked( 110, true );
1306 if (p-> mShowIconJournal) 1306 if (p-> mShowIconJournal)
1307 configureToolBarMenu->setItemChecked( 90, true ); 1307 configureToolBarMenu->setItemChecked( 90, true );
1308 if (p-> mShowIconWhatsThis) 1308 if (p-> mShowIconWhatsThis)
1309 configureToolBarMenu->setItemChecked( 300, true ); 1309 configureToolBarMenu->setItemChecked( 300, true );
1310 if (p-> mShowIconWeekNum) 1310 if (p-> mShowIconWeekNum)
1311 configureToolBarMenu->setItemChecked( 400, true ); 1311 configureToolBarMenu->setItemChecked( 400, true );
1312 if (!p-> mShowIconStretch) { 1312 if (!p-> mShowIconStretch) {
1313 QLabel* dummy = new QLabel( iconToolBar ); 1313 QLabel* dummy = new QLabel( iconToolBar );
1314 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 1314 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
1315 dummy->setMinimumWidth( 0 ); 1315 dummy->setMinimumWidth( 0 );
1316 iconToolBar->setStretchableWidget ( dummy ) ; 1316 iconToolBar->setStretchableWidget ( dummy ) ;
1317 } 1317 }
1318 else { 1318 else {
1319 iconToolBar->setHorizontalStretchable (true ); 1319 iconToolBar->setHorizontalStretchable (true );
1320 viewToolBar->setHorizontalStretchable (true ); 1320 viewToolBar->setHorizontalStretchable (true );
1321 navigatorToolBar->setHorizontalStretchable (true ); 1321 navigatorToolBar->setHorizontalStretchable (true );
1322 iconToolBar->setVerticalStretchable (true ); 1322 iconToolBar->setVerticalStretchable (true );
1323 viewToolBar->setVerticalStretchable (true ); 1323 viewToolBar->setVerticalStretchable (true );
1324 navigatorToolBar->setVerticalStretchable (true ); 1324 navigatorToolBar->setVerticalStretchable (true );
1325 configureToolBarMenu->setItemChecked( 5, true ); 1325 configureToolBarMenu->setItemChecked( 5, true );
1326 } 1326 }
1327 if (p-> mShowIconFilter) 1327 if (p-> mShowIconFilter)
1328 configureToolBarMenu->setItemChecked( 7, true ); 1328 configureToolBarMenu->setItemChecked( 7, true );
1329 if (p-> mShowIconOnetoolbar) 1329 if (p-> mShowIconOnetoolbar)
1330 configureToolBarMenu->setItemChecked( 6, true ); 1330 configureToolBarMenu->setItemChecked( 6, true );
1331 1331
1332 1332
1333 if ( filterMenubar ) { 1333 if ( filterMenubar ) {
1334 filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); 1334 filterMenubar->reparent(filterToolBar,0,QPoint(0,0) );
1335 connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) ); 1335 connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) );
1336 } 1336 }
1337 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 1337 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
1338 configureAgenda( p->mHourSize ); 1338 configureAgenda( p->mHourSize );
1339 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 1339 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
1340} 1340}
1341 1341
1342void MainWindow::exportToPhone( int mode ) 1342void MainWindow::exportToPhone( int mode )
1343{ 1343{
1344 1344
1345 //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1345 //ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1346 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1346 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1347 KOex2phonePrefs ex2phone; 1347 KOex2phonePrefs ex2phone;
1348 1348
1349 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 1349 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
1350 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 1350 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
1351 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1351 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
1352 if ( mode == 1 ) 1352 if ( mode == 1 )
1353 ex2phone.setCaption(i18n("Export complete calendar")); 1353 ex2phone.setCaption(i18n("Export complete calendar"));
1354 if ( mode == 2 ) 1354 if ( mode == 2 )
1355 ex2phone.setCaption(i18n("Export filtered calendar")); 1355 ex2phone.setCaption(i18n("Export filtered calendar"));
1356 1356
1357 if ( !ex2phone.exec() ) { 1357 if ( !ex2phone.exec() ) {
1358 return; 1358 return;
1359 } 1359 }
1360 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 1360 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
1361 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 1361 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
1362 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 1362 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
1363 1363
1364 int inFuture = 0; 1364 int inFuture = 0;
1365 if ( ex2phone.mWriteBackFuture->isChecked() ) 1365 if ( ex2phone.mWriteBackFuture->isChecked() )
1366 inFuture = ex2phone.mWriteBackFutureWeeks->value(); 1366 inFuture = ex2phone.mWriteBackFutureWeeks->value();
1367 QPtrList<Incidence> delSel; 1367 QPtrList<Incidence> delSel;
1368 if ( mode == 1 ) 1368 if ( mode == 1 )
1369 delSel = mCalendar->rawIncidences(); 1369 delSel = mCalendar->rawIncidences();
1370 if ( mode == 2 ) 1370 if ( mode == 2 )
1371 delSel = mCalendar->incidences(); 1371 delSel = mCalendar->incidences();
1372 CalendarLocal* cal = new CalendarLocal(); 1372 CalendarLocal* cal = new CalendarLocal();
1373 cal->setLocalTime(); 1373 cal->setLocalTime();
1374 Incidence *incidence = delSel.first(); 1374 Incidence *incidence = delSel.first();
1375 QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); 1375 QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
1376 QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); 1376 QDateTime end = cur.addDays( ( inFuture +1 ) *7 );
1377 while ( incidence ) { 1377 while ( incidence ) {
1378 if ( incidence->typeID() != journalID ) { 1378 if ( incidence->typeID() != journalID ) {
1379 bool add = true; 1379 bool add = true;
1380 if ( inFuture ) { 1380 if ( inFuture ) {
1381 QDateTime dt; 1381 QDateTime dt;
1382 if ( incidence->typeID() == todoID ) { 1382 if ( incidence->typeID() == todoID ) {
1383 Todo * t = (Todo*)incidence; 1383 Todo * t = (Todo*)incidence;
1384 if ( t->hasDueDate() ) 1384 if ( t->hasDueDate() )
1385 dt = t->dtDue(); 1385 dt = t->dtDue();
1386 else 1386 else
1387 dt = cur.addSecs( 62 ); 1387 dt = cur.addSecs( 62 );
1388 } 1388 }
1389 else { 1389 else {
1390 bool ok; 1390 bool ok;
1391 dt = incidence->getNextOccurence( cur, &ok ); 1391 dt = incidence->getNextOccurence( cur, &ok );
1392 if ( !ok ) 1392 if ( !ok )
1393 dt = cur.addSecs( -62 ); 1393 dt = cur.addSecs( -62 );
1394 } 1394 }
1395 if ( dt < cur || dt > end ) { 1395 if ( dt < cur || dt > end ) {
1396 add = false; 1396 add = false;
1397 } 1397 }
1398 } 1398 }
1399 if ( add ) { 1399 if ( add ) {
1400 Incidence *in = incidence->clone(); 1400 Incidence *in = incidence->clone();
1401 cal->addIncidence( in ); 1401 cal->addIncidence( in );
1402 } 1402 }
1403 } 1403 }
1404 incidence = delSel.next(); 1404 incidence = delSel.next();
1405 } 1405 }
1406 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 1406 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
1407 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 1407 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
1408 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1408 KPimGlobalPrefs::instance()->mEx2PhoneModel );
1409 1409
1410 setCaption( i18n("Writing to phone...")); 1410 setCaption( i18n("Writing to phone..."));
1411 if ( PhoneFormat::writeToPhone( cal ) ) 1411 if ( PhoneFormat::writeToPhone( cal ) )
1412 setCaption( i18n("Export to phone successful!")); 1412 setCaption( i18n("Export to phone successful!"));
1413 else 1413 else
1414 setCaption( i18n("Error exporting to phone!")); 1414 setCaption( i18n("Error exporting to phone!"));
1415 delete cal; 1415 delete cal;
1416} 1416}
1417 1417
1418 1418
1419void MainWindow::setDefaultPreferences() 1419void MainWindow::setDefaultPreferences()
1420{ 1420{
1421 KOPrefs *p = KOPrefs::instance(); 1421 KOPrefs *p = KOPrefs::instance();
1422 1422
1423 p->mCompactDialogs = true; 1423 p->mCompactDialogs = true;
1424 p->mConfirm = true; 1424 p->mConfirm = true;
1425 // p->mEnableQuickTodo = false; 1425 // p->mEnableQuickTodo = false;
1426 1426
1427} 1427}
1428 1428
1429QString MainWindow::resourcePath() 1429QString MainWindow::resourcePath()
1430{ 1430{
1431 return KGlobal::iconLoader()->iconPath(); 1431 return KGlobal::iconLoader()->iconPath();
1432} 1432}
1433 1433
1434void MainWindow::displayText( QString text ,QString cap ) 1434void MainWindow::displayText( QString text ,QString cap )
1435{ 1435{
1436 QDialog dia( this, "name", true ); ; 1436 QDialog dia( this, "name", true ); ;
1437 dia.setCaption( cap ); 1437 dia.setCaption( cap );
1438 QVBoxLayout* lay = new QVBoxLayout( &dia ); 1438 QVBoxLayout* lay = new QVBoxLayout( &dia );
1439 lay->setSpacing( 3 ); 1439 lay->setSpacing( 3 );
1440 lay->setMargin( 3 ); 1440 lay->setMargin( 3 );
1441 QTextBrowser tb ( &dia ); 1441 QTextBrowser tb ( &dia );
1442 lay->addWidget( &tb ); 1442 lay->addWidget( &tb );
1443 tb.setText( text ); 1443 tb.setText( text );
1444#ifdef DESKTOP_VERSION 1444#ifdef DESKTOP_VERSION
1445 dia.resize( 640, 480); 1445 dia.resize( 640, 480);
1446#else 1446#else
1447 dia.showMaximized(); 1447 dia.showMaximized();
1448#endif 1448#endif
1449 dia.exec(); 1449 dia.exec();
1450} 1450}
1451 1451
1452void MainWindow::features() 1452void MainWindow::features()
1453{ 1453{
1454 1454
1455 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); 1455 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" );
1456} 1456}
1457 1457
1458void MainWindow::usertrans() 1458void MainWindow::usertrans()
1459{ 1459{
1460 1460
1461 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); 1461 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" );
1462} 1462}
1463 1463
1464void MainWindow::storagehowto() 1464void MainWindow::storagehowto()
1465{ 1465{
1466 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); 1466 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" );
1467} 1467}
1468void MainWindow::timetrackinghowto() 1468void MainWindow::timetrackinghowto()
1469{ 1469{
1470 KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); 1470 KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" );
1471} 1471}
1472void MainWindow::kdesynchowto() 1472void MainWindow::kdesynchowto()
1473{ 1473{
1474 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 1474 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
1475} 1475}
1476void MainWindow::multisynchowto() 1476void MainWindow::multisynchowto()
1477{ 1477{
1478 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 1478 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
1479} 1479}
1480void MainWindow::synchowto() 1480void MainWindow::synchowto()
1481{ 1481{
1482 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 1482 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
1483} 1483}
1484void MainWindow::faq() 1484void MainWindow::faq()
1485{ 1485{
1486 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); 1486 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" );
1487 1487
1488} 1488}
1489void MainWindow::whatsNew() 1489void MainWindow::whatsNew()
1490{ 1490{
1491 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 1491 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
1492 1492
1493} 1493}
1494void MainWindow::licence() 1494void MainWindow::licence()
1495{ 1495{
1496 KApplication::showLicence(); 1496 KApplication::showLicence();
1497 1497
1498} 1498}
1499void MainWindow::about() 1499void MainWindow::about()
1500{ 1500{
1501 QString version; 1501 QString version;
1502#include <../version> 1502#include <../version>
1503 QMessageBox::about( this, i18n("About KOrganizer/Pi"), 1503 QMessageBox::about( this, i18n("About KOrganizer/Pi"),
1504 i18n("KOrganizer/Platform-independent\n") + 1504 i18n("KOrganizer/Platform-independent\n") +
1505 "(KO/Pi) " + version + " - " + 1505 "(KO/Pi) " + version + " - " +
1506 1506
1507#ifdef DESKTOP_VERSION 1507#ifdef DESKTOP_VERSION
1508 i18n("Desktop Edition\n") + 1508 i18n("Desktop Edition\n") +
1509#else 1509#else
1510 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + 1510 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") +
1511#endif 1511#endif
1512 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!") ); 1512 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!") );
1513} 1513}
1514void MainWindow::keyBindings() 1514void MainWindow::keyBindings()
1515{ 1515{
1516 QString cap = i18n("KO/Pi Keys + Colors"); 1516 QString cap = i18n("KO/Pi Keys + Colors");
1517 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1517 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1518 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1518 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
1519 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + 1519 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") +
1520 i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + 1520 i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") +
1521 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + 1521 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
1522 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ 1522 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
1523 i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ 1523 i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+
1524 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ 1524 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
1525 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ 1525 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
1526 i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ 1526 i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+
1527 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ 1527 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
1528 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ 1528 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
1529 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ 1529 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
1530 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ 1530 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+
1531 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ 1531 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
1532 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ 1532 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+
1533 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ 1533 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+
1534 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ 1534 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+
1535 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ 1535 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+
1536 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ 1536 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+
1537 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ 1537 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+
1538 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ 1538 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+
1539 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ 1539 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+
1540 i18n("<p><h3>In agenda view:</h3></p>\n") + 1540 i18n("<p><h3>In agenda view:</h3></p>\n") +
1541 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ 1541 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+
1542 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ 1542 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+
1543 i18n("<p><h3>In todo view:</h3></p>\n") + 1543 i18n("<p><h3>In todo view:</h3></p>\n") +
1544 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ 1544 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+
1545 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ 1545 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+
1546 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ 1546 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+
1547 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ 1547 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+
1548 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1548 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1549 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ 1549 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+
1550 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ 1550 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+
1551 i18n("<p><h3>In list view:</h3></p>\n") + 1551 i18n("<p><h3>In list view:</h3></p>\n") +
1552 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1552 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1553 i18n("<p><b>return</b>: Select item+one step down</p>\n")+ 1553 i18n("<p><b>return</b>: Select item+one step down</p>\n")+
1554 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ 1554 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+
1555 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ 1555 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+
1556 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ 1556 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+
1557 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ 1557 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+
1558 i18n("<p><h3>In event/todo viewer:</h3></p>\n") + 1558 i18n("<p><h3>In event/todo viewer:</h3></p>\n") +
1559 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ 1559 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+
1560 i18n("<p><b>A</b>: Show agenda view.</p>\n")+ 1560 i18n("<p><b>A</b>: Show agenda view.</p>\n")+
1561 i18n("<p><b>E</b>: Edit item</p>\n") + 1561 i18n("<p><b>E</b>: Edit item</p>\n") +
1562 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + 1562 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") +
1563 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + 1563 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") +
1564 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ 1564 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+
1565 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ 1565 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+
1566 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ 1566 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+
1567 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ 1567 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+
1568 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ 1568 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+
1569 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + 1569 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") +
1570 i18n("<p><b>White</b>: Item readonly</p>\n"); 1570 i18n("<p><b>White</b>: Item readonly</p>\n");
1571 displayText( text, cap); 1571 displayText( text, cap);
1572} 1572}
1573void MainWindow::aboutAutoSaving() 1573void MainWindow::aboutAutoSaving()
1574{ 1574{
1575 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"); 1575 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");
1576 1576
1577 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); 1577 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text);
1578 1578
1579} 1579}
1580void MainWindow::aboutKnownBugs() 1580void MainWindow::aboutKnownBugs()
1581{ 1581{
1582 QMessageBox* msg; 1582 QMessageBox* msg;
1583 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), 1583 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"),
1584 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")+ 1584 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")+
1585 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ 1585 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+
1586 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + 1586 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") +
1587 i18n("\nor report them in the bugtracker on\n") + 1587 i18n("\nor report them in the bugtracker on\n") +
1588 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), 1588 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"),
1589 QMessageBox::NoIcon, 1589 QMessageBox::NoIcon,
1590 QMessageBox::Ok, 1590 QMessageBox::Ok,
1591 QMessageBox::NoButton, 1591 QMessageBox::NoButton,
1592 QMessageBox::NoButton); 1592 QMessageBox::NoButton);
1593 msg->exec(); 1593 msg->exec();
1594 delete msg; 1594 delete msg;
1595 1595
1596} 1596}
1597 1597
1598QString MainWindow::defaultFileName() 1598QString MainWindow::defaultFileName()
1599{ 1599{
1600 return locateLocal( "data", "korganizer/mycalendar.ics" ); 1600 return locateLocal( "data", "korganizer/mycalendar.ics" );
1601} 1601}
1602QString MainWindow::syncFileName() 1602QString MainWindow::syncFileName()
1603{ 1603{
1604#ifdef DESKTOP_VERSION 1604#ifdef DESKTOP_VERSION
1605 return locateLocal( "tmp", "synccalendar.ics" ); 1605 return locateLocal( "tmp", "synccalendar.ics" );
1606#else 1606#else
1607 return QString( "/tmp/synccalendar.ics" ); 1607 return QString( "/tmp/synccalendar.ics" );
1608#endif 1608#endif
1609} 1609}
1610#include "koglobals.h" 1610#include "koglobals.h"
1611#include <kcalendarsystem.h> 1611#include <kcalendarsystem.h>
1612void MainWindow::updateWeek(QDate seda) 1612void MainWindow::updateWeek(QDate seda)
1613{ 1613{
1614 int weekNum = KGlobal::locale()->weekNum ( seda ); 1614 int weekNum = KGlobal::locale()->weekNum ( seda );
1615 mWeekPixmap.fill( mWeekBgColor ); 1615 mWeekPixmap.fill( mWeekBgColor );
1616 QPainter p ( &mWeekPixmap ); 1616 QPainter p ( &mWeekPixmap );
1617 p.setFont( mWeekFont ); 1617 p.setFont( mWeekFont );
1618 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); 1618 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) );
1619 p.end(); 1619 p.end();
1620 QIconSet icon3 ( mWeekPixmap ); 1620 QIconSet icon3 ( mWeekPixmap );
1621 mWeekAction->setIconSet ( icon3 ); 1621 mWeekAction->setIconSet ( icon3 );
1622 1622
1623} 1623}
1624void MainWindow::updateWeekNum(const DateList &selectedDates) 1624void MainWindow::updateWeekNum(const DateList &selectedDates)
1625{ 1625{
1626 updateWeek( selectedDates.first() ); 1626 updateWeek( selectedDates.first() );
1627} 1627}
1628void MainWindow::processIncidenceSelection( Incidence *incidence ) 1628void MainWindow::processIncidenceSelection( Incidence *incidence )
1629{ 1629{
1630 1630
1631 if ( !incidence ) { 1631 if ( !incidence ) {
1632 enableIncidenceActions( false ); 1632 enableIncidenceActions( false );
1633 1633
1634 mNewSubTodoAction->setEnabled( false ); 1634 mNewSubTodoAction->setEnabled( false );
1635 setCaptionToDates(); 1635 setCaptionToDates();
1636 return; 1636 return;
1637 1637
1638 } 1638 }
1639 1639
1640 //KGlobal::locale()->formatDateTime(nextA, true); 1640 //KGlobal::locale()->formatDateTime(nextA, true);
1641 QString startString = ""; 1641 QString startString = "";
1642 if ( incidence->typeID() != todoID ) { 1642 if ( incidence->typeID() != todoID ) {
1643 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { 1643 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
1644 if ( incidence->doesFloat() ) { 1644 if ( incidence->doesFloat() ) {
1645 startString += ": "+incidence->dtStartDateStr( true ); 1645 startString += ": "+incidence->dtStartDateStr( true );
1646 startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); 1646 startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
1647 1647
1648 } else { 1648 } else {
1649 startString = ": "+incidence->dtStartStr(true); 1649 startString = ": "+incidence->dtStartStr(true);
1650 startString += " --- "+((Event*)incidence)->dtEndStr(true); 1650 startString += " --- "+((Event*)incidence)->dtEndStr(true);
1651 1651
1652 } 1652 }
1653 1653
1654 } else { 1654 } else {
1655 if ( incidence->dtStart().time() != incidence->dtEnd().time() ) 1655 if ( incidence->dtStart().time() != incidence->dtEnd().time() )
1656 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ 1656 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
1657 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); 1657 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
1658 1658
1659 if ( incidence->isBirthday() || incidence->isAnniversary() ) { 1659 if ( incidence->isBirthday() || incidence->isAnniversary() ) {
1660 bool ok; 1660 bool ok;
1661 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1661 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
1662 if ( ok ) { 1662 if ( ok ) {
1663 int years = noc.date().year() - incidence->dtStart().date().year(); 1663 int years = noc.date().year() - incidence->dtStart().date().year();
1664 startString += i18n(" (%1 y.)"). arg( years ); 1664 startString += i18n(" (%1 y.)"). arg( years );
1665 } 1665 }
1666 } 1666 }
1667 else 1667 else
1668 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); 1668 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
1669 } 1669 }
1670 1670
1671 } 1671 }
1672 else 1672 else
1673 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); 1673 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
1674 if ( !incidence->location().isEmpty() ) 1674 if ( !incidence->location().isEmpty() )
1675 startString += " (" +incidence->location()+")"; 1675 startString += " (" +incidence->location()+")";
1676 setCaption( incidence->summary()+startString); 1676 setCaption( incidence->summary()+startString);
1677 1677
1678 enableIncidenceActions( true ); 1678 enableIncidenceActions( true );
1679 1679
1680 if ( incidence->typeID() == eventID ) { 1680 if ( incidence->typeID() == eventID ) {
1681 mShowAction->setText( i18n("Show Event...") ); 1681 mShowAction->setText( i18n("Show Event...") );
1682 mEditAction->setText( i18n("Edit Event...") ); 1682 mEditAction->setText( i18n("Edit Event...") );
1683 mDeleteAction->setText( i18n("Delete Event...") ); 1683 mDeleteAction->setText( i18n("Delete Event...") );
1684 1684
1685 mNewSubTodoAction->setEnabled( false ); 1685 mNewSubTodoAction->setEnabled( false );
1686 } else if ( incidence->typeID() == todoID ) { 1686 } else if ( incidence->typeID() == todoID ) {
1687 mShowAction->setText( i18n("Show Todo...") ); 1687 mShowAction->setText( i18n("Show Todo...") );
1688 mEditAction->setText( i18n("Edit Todo...") ); 1688 mEditAction->setText( i18n("Edit Todo...") );
1689 mDeleteAction->setText( i18n("Delete Todo...") ); 1689 mDeleteAction->setText( i18n("Delete Todo...") );
1690 1690
1691 mNewSubTodoAction->setEnabled( true ); 1691 mNewSubTodoAction->setEnabled( true );
1692 } else { 1692 } else {
1693 mShowAction->setText( i18n("Show...") ); 1693 mShowAction->setText( i18n("Show...") );
1694 mShowAction->setText( i18n("Edit...") ); 1694 mShowAction->setText( i18n("Edit...") );
1695 mShowAction->setText( i18n("Delete...") ); 1695 mShowAction->setText( i18n("Delete...") );
1696 1696
1697 mNewSubTodoAction->setEnabled( false ); 1697 mNewSubTodoAction->setEnabled( false );
1698 } 1698 }
1699} 1699}
1700 1700
1701void MainWindow::enableIncidenceActions( bool enabled ) 1701void MainWindow::enableIncidenceActions( bool enabled )
1702{ 1702{
1703 mShowAction->setEnabled( enabled ); 1703 mShowAction->setEnabled( enabled );
1704 mEditAction->setEnabled( enabled ); 1704 mEditAction->setEnabled( enabled );
1705 mDeleteAction->setEnabled( enabled ); 1705 mDeleteAction->setEnabled( enabled );
1706 1706
1707 mCloneAction->setEnabled( enabled ); 1707 mCloneAction->setEnabled( enabled );
1708 mMoveAction->setEnabled( enabled ); 1708 mMoveAction->setEnabled( enabled );
1709 mBeamAction->setEnabled( enabled ); 1709 mBeamAction->setEnabled( enabled );
1710 mCancelAction->setEnabled( enabled ); 1710 mCancelAction->setEnabled( enabled );
1711} 1711}
1712 1712
1713void MainWindow::importOL() 1713void MainWindow::importOL()
1714{ 1714{
1715#ifdef _OL_IMPORT_ 1715#ifdef _OL_IMPORT_
1716 mView->clearAllViews(); 1716 mView->clearAllViews();
1717 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); 1717 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this );
1718 id->exec(); 1718 id->exec();
1719 delete id; 1719 delete id;
1720 mView->calendar()->checkAlarmForIncidence( 0, true ); 1720 mView->calendar()->checkAlarmForIncidence( 0, true );
1721 mView->updateView(); 1721 mView->updateView();
1722#endif 1722#endif
1723} 1723}
1724void MainWindow::importBday() 1724void MainWindow::importBday()
1725{ 1725{
1726 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1726 int result = QMessageBox::warning( this, i18n("KO/Pi import information!"),
1727 i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), 1727 i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"),
1728 i18n("Import!"), i18n("Cancel"), 0, 1728 i18n("Import!"), i18n("Cancel"), 0,
1729 0, 1 ); 1729 0, 1 );
1730 if ( result == 0 ) { 1730 if ( result == 0 ) {
1731 mView->importBday(); 1731 mView->importBday();
1732 1732
1733 } 1733 }
1734 1734
1735 1735
1736} 1736}
1737void MainWindow::importQtopia() 1737void MainWindow::importQtopia()
1738{ 1738{
1739 //#ifndef DESKTOP_VERSION 1739 //#ifndef DESKTOP_VERSION
1740 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"); 1740 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");
1741#ifdef DESKTOP_VERSION 1741#ifdef DESKTOP_VERSION
1742 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"); 1742 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");
1743#endif 1743#endif
1744 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, 1744 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess,
1745 i18n("Import!"), i18n("Cancel"), 0, 1745 i18n("Import!"), i18n("Cancel"), 0,
1746 0, 1 ); 1746 0, 1 );
1747 if ( result == 0 ) { 1747 if ( result == 0 ) {
1748#ifndef DESKTOP_VERSION 1748#ifndef DESKTOP_VERSION
1749 QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); 1749 QString datebook = Global::applicationFileName( "datebook", "datebook.xml");
1750 QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); 1750 QString todolist = Global::applicationFileName( "todolist", "todolist.xml");
1751 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; 1751 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml";
1752#else 1752#else
1753 QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; 1753 QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml";
1754 QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; 1754 QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml";
1755 QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; 1755 QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml";
1756#endif 1756#endif
1757 mView->importQtopia( categories, datebook, todolist ); 1757 mView->importQtopia( categories, datebook, todolist );
1758 } 1758 }
1759 mView->calendar()->reInitAlarmSettings(); 1759 mView->calendar()->reInitAlarmSettings();
1760#if 0 1760#if 0
1761 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1761 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
1762 i18n("Not supported \non desktop!\n"), 1762 i18n("Not supported \non desktop!\n"),
1763 i18n("Ok"), i18n("Cancel"), 0, 1763 i18n("Ok"), i18n("Cancel"), 0,
1764 0, 1 ); 1764 0, 1 );
1765 1765
1766#endif 1766#endif
1767} 1767}
1768 1768
1769void MainWindow::saveOnClose() 1769void MainWindow::saveOnClose()
1770{ 1770{
1771 KOPrefs *p = KOPrefs::instance(); 1771 KOPrefs *p = KOPrefs::instance();
1772 p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); 1772 p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal );
1773 p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); 1773 p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal );
1774 p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); 1774 p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal );
1775 if ( filterToolBar ) { 1775 if ( filterToolBar ) {
1776 p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); 1776 p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal );
1777 } 1777 }
1778#ifdef DESKTOP_VERSION 1778#ifdef DESKTOP_VERSION
1779 1779
1780 QPoint myP; 1780 QPoint myP;
1781 myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); 1781 myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) );
1782 if ( p->mToolBarHor ) 1782 if ( p->mToolBarHor )
1783 p->mToolBarUp = myP.y() > height()/2; 1783 p->mToolBarUp = myP.y() > height()/2;
1784 else 1784 else
1785 p->mToolBarUp = myP.x() > width()/2; 1785 p->mToolBarUp = myP.x() > width()/2;
1786 myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); 1786 myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) );
1787 if ( p->mToolBarHorV ) 1787 if ( p->mToolBarHorV )
1788 p->mToolBarUpV = myP.y() > height()/2; 1788 p->mToolBarUpV = myP.y() > height()/2;
1789 else 1789 else
1790 p->mToolBarUpV = myP.x() > width()/2 ; 1790 p->mToolBarUpV = myP.x() > width()/2 ;
1791 myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); 1791 myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) );
1792 if ( p->mToolBarHorN ) 1792 if ( p->mToolBarHorN )
1793 p->mToolBarUpN = myP.y() > height()/2; 1793 p->mToolBarUpN = myP.y() > height()/2;
1794 else 1794 else
1795 p->mToolBarUpN = myP.x() > width()/2 ; 1795 p->mToolBarUpN = myP.x() > width()/2 ;
1796 if ( filterToolBar ) { 1796 if ( filterToolBar ) {
1797 myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); 1797 myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) );
1798 if ( p->mToolBarHorF ) 1798 if ( p->mToolBarHorF )
1799 p->mToolBarUpF = myP.y() > height()/2; 1799 p->mToolBarUpF = myP.y() > height()/2;
1800 else 1800 else
1801 p->mToolBarUpF = myP.x() > width()/2 ; 1801 p->mToolBarUpF = myP.x() > width()/2 ;
1802 } 1802 }
1803#else 1803#else
1804 if ( p->mToolBarHor ) 1804 if ( p->mToolBarHor )
1805 p->mToolBarUp = iconToolBar->y() > height()/2; 1805 p->mToolBarUp = iconToolBar->y() > height()/2;
1806 else 1806 else
1807 p->mToolBarUp = iconToolBar->x() > width()/2; 1807 p->mToolBarUp = iconToolBar->x() > width()/2;
1808 if ( p->mToolBarHorV ) 1808 if ( p->mToolBarHorV )
1809 p->mToolBarUpV = viewToolBar->y() > height()/2; 1809 p->mToolBarUpV = viewToolBar->y() > height()/2;
1810 else 1810 else
1811 p->mToolBarUpV = viewToolBar->x() > width()/2 ; 1811 p->mToolBarUpV = viewToolBar->x() > width()/2 ;
1812 1812
1813 if ( p->mToolBarHorN ) 1813 if ( p->mToolBarHorN )
1814 p->mToolBarUpN = navigatorToolBar->y() > height()/2; 1814 p->mToolBarUpN = navigatorToolBar->y() > height()/2;
1815 else 1815 else
1816 p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; 1816 p->mToolBarUpN = navigatorToolBar->x() > width()/2 ;
1817 if ( filterToolBar ) { 1817 if ( filterToolBar ) {
1818 if ( p->mToolBarHorF ) 1818 if ( p->mToolBarHorF )
1819 p->mToolBarUpF = filterToolBar->y() > height()/2; 1819 p->mToolBarUpF = filterToolBar->y() > height()/2;
1820 else 1820 else
1821 p->mToolBarUpF = filterToolBar->x() > width()/2 ; 1821 p->mToolBarUpF = filterToolBar->x() > width()/2 ;
1822 } 1822 }
1823#endif 1823#endif
1824 1824
1825 if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) 1825 if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName()))
1826 save(); 1826 save();
1827 mView->writeSettings(); 1827 mView->writeSettings();
1828} 1828}
1829void MainWindow::slotModifiedChanged( bool changed ) 1829void MainWindow::slotModifiedChanged( bool changed )
1830{ 1830{
1831 if ( mBlockAtStartup ) 1831 if ( mBlockAtStartup )
1832 return; 1832 return;
1833 1833
1834 int msec; 1834 int msec;
1835 // we store the changes after 1 minute, 1835 // we store the changes after 1 minute,
1836 // and for safety reasons after 10 minutes again 1836 // and for safety reasons after 10 minutes again
1837 if ( !mSyncManager->blockSave() ) 1837 if ( !mSyncManager->blockSave() )
1838 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; 1838 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000;
1839 else 1839 else
1840 msec = 1000 * 600; 1840 msec = 1000 * 600;
1841 mSaveTimer.start( msec, true ); // 1 minute 1841 mSaveTimer.start( msec, true ); // 1 minute
1842 qDebug("KO: Saving File in %d secs!", msec/1000); 1842 qDebug("KO: Saving File in %d secs!", msec/1000);
1843 mCalendarModifiedFlag = true; 1843 mCalendarModifiedFlag = true;
1844} 1844}
1845void MainWindow::saveStopTimer() 1845void MainWindow::saveStopTimer()
1846{ 1846{
1847 mSaveTimer.stop(); 1847 mSaveTimer.stop();
1848} 1848}
1849void MainWindow::backupAllFiles() 1849void MainWindow::backupAllFiles()
1850{ 1850{
1851 QDate reference ( 2000,1,1); 1851 QDate reference ( 2000,1,1);
1852 int daysTo = reference.daysTo ( QDate::currentDate() ); 1852 int daysTo = reference.daysTo ( QDate::currentDate() );
1853 setCaption(i18n("Creating backup ... please wait ..." )); 1853 setCaption(i18n("Creating backup ... please wait ..." ));
1854 qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); 1854 qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate);
1855 // we need the file path, the backup dir and the number of bups as param 1855 // we need the file path, the backup dir and the number of bups as param
1856 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; 1856 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir;
1857 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) 1857 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir)
1858 bupDir = KGlobalSettings::backupDataDir(); 1858 bupDir = KGlobalSettings::backupDataDir();
1859 int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); 1859 int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
1860 if ( retval == 0 ) { 1860 if ( retval == 0 ) {
1861 setCaption(i18n("Backup cancelled" )); 1861 setCaption(i18n("Backup cancelled" ));
1862 qDebug("KO: Backup cancelled. Will try again tomorrow "); 1862 qDebug("KO: Backup cancelled. Will try again tomorrow ");
1863 // retval == 0 : backup skipped for today, try again tomorrow 1863 // retval == 0 : backup skipped for today, try again tomorrow
1864 KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; 1864 KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1;
1865 } else if ( retval == 1 ){ 1865 } else if ( retval == 1 ){
1866 qDebug("KO: Backup created."); 1866 qDebug("KO: Backup created.");
1867 // backup ok 1867 // backup ok
1868 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 1868 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
1869 KopiCalendarFile * cal = calendars.first(); 1869 KopiCalendarFile * cal = calendars.first();
1870 cal = calendars.next(); 1870 cal = calendars.next();
1871 while ( cal ) { 1871 while ( cal ) {
1872 if ( !cal->mErrorOnLoad ) { 1872 if ( !cal->mErrorOnLoad ) {
1873 int retval = KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); 1873 int retval = KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
1874 } 1874 }
1875 cal = calendars.next(); 1875 cal = calendars.next();
1876 } 1876 }
1877 KOPrefs::instance()->mLastBackupDate = daysTo; 1877 KOPrefs::instance()->mLastBackupDate = daysTo;
1878 setCaption(i18n("Backup succesfully finished" )); 1878 setCaption(i18n("Backup succesfully finished" ));
1879 } else if ( retval == 2 ){ 1879 } else if ( retval == 2 ){
1880 setCaption(i18n("Backup globally disabled" )); 1880 setCaption(i18n("Backup globally disabled" ));
1881 qDebug("KO: Backup globally cancelled."); 1881 qDebug("KO: Backup globally cancelled.");
1882 // backup globally cancelled 1882 // backup globally cancelled
1883 KPimGlobalPrefs::instance()->mBackupEnabled = false; 1883 KPimGlobalPrefs::instance()->mBackupEnabled = false;
1884 } 1884 }
1885 // retval == 3: do nothing, try again later 1885 // retval == 3: do nothing, try again later
1886} 1886}
1887void MainWindow::save() 1887void MainWindow::save()
1888{ 1888{
1889 if ( !mCalendarModifiedFlag ) { 1889 if ( !mCalendarModifiedFlag ) {
1890 qDebug("KO: Calendar not modified. Nothing saved."); 1890 qDebug("KO: Calendar not modified. Nothing saved.");
1891 return; 1891 return;
1892 } 1892 }
1893 if ( mSyncManager->blockSave() ) 1893 if ( mSyncManager->blockSave() )
1894 return; 1894 return;
1895 mSyncManager->setBlockSave(true); 1895 mSyncManager->setBlockSave(true);
1896 if ( mView->checkAllFileVersions() ) { 1896 if ( mView->checkAllFileVersions() ) {
1897 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ 1897 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){
1898 QDate reference ( 2000,1,1); 1898 QDate reference ( 2000,1,1);
1899 int daysTo = reference.daysTo ( QDate::currentDate() ); 1899 int daysTo = reference.daysTo ( QDate::currentDate() );
1900 if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { 1900 if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) {
1901 backupAllFiles(); 1901 backupAllFiles();
1902 } 1902 }
1903 ; // KPimGlobalPrefs::instance()->mLastBackupDate 1903 ; // KPimGlobalPrefs::instance()->mLastBackupDate
1904 } 1904 }
1905 QTime neededSaveTime = QDateTime::currentDateTime().time(); 1905 QTime neededSaveTime = QDateTime::currentDateTime().time();
1906 setCaption(i18n("KO/Pi:Saving Data to File ..." )); 1906 setCaption(i18n("KO/Pi:Saving Data to File ..." ));
1907 qDebug("KO: Start saving data to file!"); 1907 qDebug("KO: Start saving data to file!");
1908 mView->saveCalendars(); 1908 mView->saveCalendars();
1909 mCalendarModifiedFlag = false; 1909 mCalendarModifiedFlag = false;
1910 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 1910 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
1911 qDebug("KO: Needed %d ms for saving.",msNeeded ); 1911 qDebug("KO: Needed %d ms for saving.",msNeeded );
1912 QString savemes; 1912 QString savemes;
1913 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); 1913 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
1914 setCaption(savemes); 1914 setCaption(savemes);
1915 } else 1915 } else
1916 setCaption(i18n("Saving cancelled!")); 1916 setCaption(i18n("Saving cancelled!"));
1917 mSyncManager->setBlockSave( false ); 1917 mSyncManager->setBlockSave( false );
1918} 1918}
1919 1919
1920void MainWindow::keyReleaseEvent ( QKeyEvent * e) 1920void MainWindow::keyReleaseEvent ( QKeyEvent * e)
1921{ 1921{
1922 if ( !e->isAutoRepeat() ) { 1922 if ( !e->isAutoRepeat() ) {
1923 mFlagKeyPressed = false; 1923 mFlagKeyPressed = false;
1924 } 1924 }
1925} 1925}
1926void MainWindow::keyPressEvent ( QKeyEvent * e ) 1926void MainWindow::keyPressEvent ( QKeyEvent * e )
1927{ 1927{
1928 qApp->processEvents(); 1928 qApp->processEvents();
1929 if ( e->isAutoRepeat() && !mFlagKeyPressed ) { 1929 if ( e->isAutoRepeat() && !mFlagKeyPressed ) {
1930 e->ignore(); 1930 e->ignore();
1931 // qDebug(" ignore %d",e->isAutoRepeat() ); 1931 // qDebug(" ignore %d",e->isAutoRepeat() );
1932 return; 1932 return;
1933 } 1933 }
1934 if (! e->isAutoRepeat() ) 1934 if (! e->isAutoRepeat() )
1935 mFlagKeyPressed = true; 1935 mFlagKeyPressed = true;
1936 KOPrefs *p = KOPrefs::instance(); 1936 KOPrefs *p = KOPrefs::instance();
1937 bool showSelectedDates = false; 1937 bool showSelectedDates = false;
1938 int size; 1938 int size;
1939 int pro = 0; 1939 int pro = 0;
1940 //qDebug("MainWindow::keyPressEvent "); 1940 //qDebug("MainWindow::keyPressEvent ");
1941 switch ( e->key() ) { 1941 switch ( e->key() ) {
1942 case Qt::Key_Right: 1942 case Qt::Key_Right:
1943 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 1943 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
1944 mView->goNextMonth(); 1944 mView->goNextMonth();
1945 else 1945 else
1946 mView->goNext(); 1946 mView->goNext();
1947 showSelectedDates = true; 1947 showSelectedDates = true;
1948 break; 1948 break;
1949 case Qt::Key_Left: 1949 case Qt::Key_Left:
1950 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 1950 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
1951 mView->goPreviousMonth(); 1951 mView->goPreviousMonth();
1952 else 1952 else
1953 mView->goPrevious(); 1953 mView->goPrevious();
1954 showSelectedDates = true; 1954 showSelectedDates = true;
1955 break; 1955 break;
1956 case Qt::Key_Down: 1956 case Qt::Key_Down:
1957 mView->viewManager()->agendaView()->scrollOneHourDown(); 1957 mView->viewManager()->agendaView()->scrollOneHourDown();
1958 break; 1958 break;
1959 case Qt::Key_Up: 1959 case Qt::Key_Up:
1960 mView->viewManager()->agendaView()->scrollOneHourUp(); 1960 mView->viewManager()->agendaView()->scrollOneHourUp();
1961 break; 1961 break;
1962 case Qt::Key_K: 1962 case Qt::Key_K:
1963 mView->viewManager()->showMonthViewWeek(); 1963 mView->viewManager()->showMonthViewWeek();
1964 break; 1964 break;
1965 case Qt::Key_I: 1965 case Qt::Key_I:
1966 mView->showIncidence(); 1966 mView->showIncidence();
1967 break; 1967 break;
1968 case Qt::Key_Delete: 1968 case Qt::Key_Delete:
1969 case Qt::Key_Backspace: 1969 case Qt::Key_Backspace:
1970 mView->deleteIncidence(); 1970 mView->deleteIncidence();
1971 break; 1971 break;
1972 case Qt::Key_D: 1972 case Qt::Key_D:
1973 mView->viewManager()->showDayView(); 1973 mView->viewManager()->showDayView();
1974 showSelectedDates = true; 1974 showSelectedDates = true;
1975 break; 1975 break;
1976 case Qt::Key_O: 1976 case Qt::Key_O:
1977 mView->toggleFilerEnabled( ); 1977 mView->toggleFilerEnabled( );
1978 break; 1978 break;
1979 case Qt::Key_0: 1979 case Qt::Key_0:
1980 case Qt::Key_1: 1980 case Qt::Key_1:
1981 case Qt::Key_2: 1981 case Qt::Key_2:
1982 case Qt::Key_3: 1982 case Qt::Key_3:
1983 case Qt::Key_4: 1983 case Qt::Key_4:
1984 case Qt::Key_5: 1984 case Qt::Key_5:
1985 case Qt::Key_6: 1985 case Qt::Key_6:
1986 case Qt::Key_7: 1986 case Qt::Key_7:
1987 case Qt::Key_8: 1987 case Qt::Key_8:
1988 case Qt::Key_9: 1988 case Qt::Key_9:
1989 pro = e->key()-48; 1989 pro = e->key()-48;
1990 if ( pro == 0 ) 1990 if ( pro == 0 )
1991 pro = 10; 1991 pro = 10;
1992 if ( e->state() == Qt::ControlButton) 1992 if ( e->state() == Qt::ControlButton)
1993 pro += 10; 1993 pro += 10;
1994 break; 1994 break;
1995 case Qt::Key_M: 1995 case Qt::Key_M:
1996 mView->viewManager()->showMonthView(); 1996 mView->viewManager()->showMonthView();
1997 showSelectedDates = true; 1997 showSelectedDates = true;
1998 break; 1998 break;
1999 case Qt::Key_Insert: 1999 case Qt::Key_Insert:
2000 mView->newEvent(); 2000 mView->newEvent();
2001 break; 2001 break;
2002 case Qt::Key_S : 2002 case Qt::Key_S :
2003 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 2003 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
2004 mView->newSubTodo(); 2004 mView->newSubTodo();
2005 else 2005 else
2006 mView->dialogManager()->showSearchDialog(); 2006 mView->dialogManager()->showSearchDialog();
2007 break; 2007 break;
2008 case Qt::Key_Y : 2008 case Qt::Key_Y :
2009 case Qt::Key_Z : 2009 case Qt::Key_Z :
2010 mView->viewManager()->showWorkWeekView(); 2010 mView->viewManager()->showWorkWeekView();
2011 showSelectedDates = true; 2011 showSelectedDates = true;
2012 break; 2012 break;
2013 case Qt::Key_U : 2013 case Qt::Key_U :
2014 mView->viewManager()->showWeekView(); 2014 mView->viewManager()->showWeekView();
2015 showSelectedDates = true; 2015 showSelectedDates = true;
2016 break; 2016 break;
2017 case Qt::Key_H : 2017 case Qt::Key_H :
2018 keyBindings(); 2018 keyBindings();
2019 break; 2019 break;
2020 case Qt::Key_W: 2020 case Qt::Key_W:
2021 mView->viewManager()->showWhatsNextView(); 2021 mView->viewManager()->showWhatsNextView();
2022 break; 2022 break;
2023 case Qt::Key_L: 2023 case Qt::Key_L:
2024 mView->viewManager()->showListView(); 2024 mView->viewManager()->showListView();
2025 break; 2025 break;
2026 case Qt::Key_N: 2026 case Qt::Key_N:
2027 mView->viewManager()->showNextView(); 2027 mView->viewManager()->showNextView();
2028 break; 2028 break;
2029 case Qt::Key_V: 2029 case Qt::Key_V:
2030 mView->viewManager()->showTodoView(); 2030 mView->viewManager()->showTodoView();
2031 break; 2031 break;
2032 case Qt::Key_C: 2032 case Qt::Key_C:
2033 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); 2033 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() );
2034 break; 2034 break;
2035 case Qt::Key_P: 2035 case Qt::Key_P:
2036 mView->showDatePicker( ); 2036 mView->showDatePicker( );
2037 break; 2037 break;
2038 case Qt::Key_F: 2038 case Qt::Key_F:
2039 mView->editFilters(); 2039 mView->editFilters();
2040 break; 2040 break;
2041 case Qt::Key_R: 2041 case Qt::Key_R:
2042 mView->toggleFilter(); 2042 mView->toggleFilter();
2043 break; 2043 break;
2044 case Qt::Key_X: 2044 case Qt::Key_X:
2045 if ( e->state() == Qt::ControlButton ) 2045 if ( e->state() == Qt::ControlButton )
2046 mView->toggleDateNavigatorWidget(); 2046 mView->toggleDateNavigatorWidget();
2047 else { 2047 else {
2048 mView->viewManager()->showNextXView(); 2048 mView->viewManager()->showNextXView();
2049 showSelectedDates = true; 2049 showSelectedDates = true;
2050 } 2050 }
2051 break; 2051 break;
2052 case Qt::Key_Space: 2052 case Qt::Key_Space:
2053 mView->toggleExpand(); 2053 mView->toggleExpand();
2054 break; 2054 break;
2055 case Qt::Key_A: 2055 case Qt::Key_A:
2056 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) 2056 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton )
2057 mView->showNextAlarms(); 2057 mView->showNextAlarms();
2058 else 2058 else
2059 mView->toggleAllDaySize(); 2059 mView->toggleAllDaySize();
2060 break; 2060 break;
2061 case Qt::Key_T: 2061 case Qt::Key_T:
2062 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2062 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2063 mView->newTodo(); 2063 mView->newTodo();
2064 else { 2064 else {
2065 mView->goToday(); 2065 mView->goToday();
2066 showSelectedDates = true; 2066 showSelectedDates = true;
2067 } 2067 }
2068 break; 2068 break;
2069 case Qt::Key_J: 2069 case Qt::Key_J:
2070 mView->viewManager()->showJournalView(); 2070 mView->viewManager()->showJournalView();
2071 break; 2071 break;
2072 case Qt::Key_B: 2072 case Qt::Key_B:
2073 mView->editIncidenceDescription();; 2073 mView->editIncidenceDescription();;
2074 break; 2074 break;
2075 // case Qt::Key_Return: 2075 // case Qt::Key_Return:
2076 case Qt::Key_E: 2076 case Qt::Key_E:
2077 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2077 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2078 mView->newEvent(); 2078 mView->newEvent();
2079 else 2079 else
2080 mView->editIncidence(); 2080 mView->editIncidence();
2081 break; 2081 break;
2082 case Qt::Key_Plus: 2082 case Qt::Key_Plus:
2083 size = p->mHourSize +2; 2083 size = p->mHourSize +2;
2084 if ( size <= 22 ) 2084 if ( size <= 22 )
2085 configureAgenda( size ); 2085 configureAgenda( size );
2086 break; 2086 break;
2087 case Qt::Key_Minus: 2087 case Qt::Key_Minus:
2088 size = p->mHourSize - 2; 2088 size = p->mHourSize - 2;
2089 if ( size >= 4 ) 2089 if ( size >= 4 )
2090 configureAgenda( size ); 2090 configureAgenda( size );
2091 break; 2091 break;
2092 2092
2093 2093
2094 default: 2094 default:
2095 e->ignore(); 2095 e->ignore();
2096 } 2096 }
2097 if ( pro > 0 ) { 2097 if ( pro > 0 ) {
2098 selectFilter( pro+1 ); 2098 selectFilter( pro+1 );
2099 } 2099 }
2100 if ( showSelectedDates ) { 2100 if ( showSelectedDates ) {
2101 ;// setCaptionToDates(); 2101 ;// setCaptionToDates();
2102 } 2102 }
2103 2103
2104} 2104}
2105void MainWindow::fillFilterMenuTB() 2105void MainWindow::fillFilterMenuTB()
2106{ 2106{
2107 selectFilterMenuTB->clear(); 2107 selectFilterMenuTB->clear();
2108 selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); 2108 selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 );
2109 selectFilterMenuTB->insertSeparator(); 2109 selectFilterMenuTB->insertSeparator();
2110 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); 2110 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 );
2111 2111
2112 selectFilterMenuTB->insertSeparator(); 2112 selectFilterMenuTB->insertSeparator();
2113 QPtrList<CalFilter> fili = mView->filters(); 2113 QPtrList<CalFilter> fili = mView->filters();
2114 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2114 CalFilter *curfilter = mView->filterView()->selectedFilter();
2115 CalFilter *filter = fili.first(); 2115 CalFilter *filter = fili.first();
2116 int iii = 2; 2116 int iii = 2;
2117 bool checkitem = mView->filterView()->filtersEnabled(); 2117 bool checkitem = mView->filterView()->filtersEnabled();
2118 while(filter) { 2118 while(filter) {
2119 selectFilterMenuTB->insertItem( filter->name(), iii ); 2119 selectFilterMenuTB->insertItem( filter->name(), iii );
2120 if ( filter == curfilter) 2120 if ( filter == curfilter)
2121 selectFilterMenuTB->setItemChecked( iii, checkitem ); 2121 selectFilterMenuTB->setItemChecked( iii, checkitem );
2122 filter = fili.next(); 2122 filter = fili.next();
2123 ++iii; 2123 ++iii;
2124 } 2124 }
2125 if ( !checkitem ) 2125 if ( !checkitem )
2126 selectFilterMenuTB->setItemChecked( 1, true ); 2126 selectFilterMenuTB->setItemChecked( 1, true );
2127 2127
2128 int x = 0; 2128 int x = 0;
2129 int y = iconToolBar->height(); 2129 int y = iconToolBar->height();
2130 int dX = 0; 2130 int dX = 0;
2131 int dY = 0; 2131 int dY = 0;
2132 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2132 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2133 if ( iconToolBar->y() > height()/2 ) { 2133 if ( iconToolBar->y() > height()/2 ) {
2134 dY = selectFilterMenuTB->sizeHint().height()+8; 2134 dY = selectFilterMenuTB->sizeHint().height()+8;
2135 y = 0; 2135 y = 0;
2136 } 2136 }
2137 } else { 2137 } else {
2138 if ( iconToolBar->x() > width()/2 ) { // right side 2138 if ( iconToolBar->x() > width()/2 ) { // right side
2139 x=0; 2139 x=0;
2140 dX= selectFilterMenuTB->sizeHint().width()+8; 2140 dX= selectFilterMenuTB->sizeHint().width()+8;
2141 y = 0; 2141 y = 0;
2142 } else { 2142 } else {
2143 x= iconToolBar->width(); 2143 x= iconToolBar->width();
2144 y = 0; 2144 y = 0;
2145 } 2145 }
2146 } 2146 }
2147 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2147 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2148 selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); 2148 selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)));
2149} 2149}
2150void MainWindow::fillFilterMenu() 2150void MainWindow::fillFilterMenu()
2151{ 2151{
2152 selectFilterMenu->clear(); 2152 selectFilterMenu->clear();
2153 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); 2153 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 );
2154 selectFilterMenu->insertSeparator(); 2154 selectFilterMenu->insertSeparator();
2155 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); 2155 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 );
2156 2156
2157 selectFilterMenu->insertSeparator(); 2157 selectFilterMenu->insertSeparator();
2158 QPtrList<CalFilter> fili = mView->filters(); 2158 QPtrList<CalFilter> fili = mView->filters();
2159 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2159 CalFilter *curfilter = mView->filterView()->selectedFilter();
2160 CalFilter *filter = fili.first(); 2160 CalFilter *filter = fili.first();
2161 int iii = 2; 2161 int iii = 2;
2162 bool checkitem = mView->filterView()->filtersEnabled(); 2162 bool checkitem = mView->filterView()->filtersEnabled();
2163 while(filter) { 2163 while(filter) {
2164 selectFilterMenu->insertItem( filter->name(), iii ); 2164 selectFilterMenu->insertItem( filter->name(), iii );
2165 if ( filter == curfilter) 2165 if ( filter == curfilter)
2166 selectFilterMenu->setItemChecked( iii, checkitem ); 2166 selectFilterMenu->setItemChecked( iii, checkitem );
2167 filter = fili.next(); 2167 filter = fili.next();
2168 ++iii; 2168 ++iii;
2169 } 2169 }
2170 if ( !checkitem ) 2170 if ( !checkitem )
2171 selectFilterMenu->setItemChecked( 1, true ); 2171 selectFilterMenu->setItemChecked( 1, true );
2172} 2172}
2173void MainWindow::fillFilterMenuPopup() 2173void MainWindow::fillFilterMenuPopup()
2174{ 2174{
2175 filterPopupMenu->clear(); 2175 filterPopupMenu->clear();
2176 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); 2176 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 );
2177 2177
2178 filterPopupMenu->insertSeparator(); 2178 filterPopupMenu->insertSeparator();
2179 QPtrList<CalFilter> fili = mView->filters(); 2179 QPtrList<CalFilter> fili = mView->filters();
2180 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2180 CalFilter *curfilter = mView->filterView()->selectedFilter();
2181 CalFilter *filter = fili.first(); 2181 CalFilter *filter = fili.first();
2182 int iii = 1; 2182 int iii = 1;
2183 bool checkitem = mView->filterView()->filtersEnabled(); 2183 bool checkitem = mView->filterView()->filtersEnabled();
2184 while(filter) { 2184 while(filter) {
2185 filterPopupMenu->insertItem( filter->name(), iii ); 2185 filterPopupMenu->insertItem( filter->name(), iii );
2186 if ( filter == curfilter) 2186 if ( filter == curfilter)
2187 filterPopupMenu->setItemChecked( iii, checkitem ); 2187 filterPopupMenu->setItemChecked( iii, checkitem );
2188 filter = fili.next(); 2188 filter = fili.next();
2189 ++iii; 2189 ++iii;
2190 } 2190 }
2191 if ( !checkitem ) 2191 if ( !checkitem )
2192 filterPopupMenu->setItemChecked( 0, true ); 2192 filterPopupMenu->setItemChecked( 0, true );
2193} 2193}
2194void MainWindow::selectFilter( int fil ) 2194void MainWindow::selectFilter( int fil )
2195{ 2195{
2196 2196
2197 if ( fil == 0 ) { 2197 if ( fil == 0 ) {
2198 mView->editFilters( ); 2198 mView->editFilters( );
2199 } else if ( fil == 1 ){ 2199 } else if ( fil == 1 ){
2200 if ( mView->filterView()->filtersEnabled() ) 2200 if ( mView->filterView()->filtersEnabled() )
2201 mView->toggleFilerEnabled( ); 2201 mView->toggleFilerEnabled( );
2202 } else { 2202 } else {
2203 if ( !mView->filterView()->filtersEnabled() ) { 2203 if ( !mView->filterView()->filtersEnabled() ) {
2204 mView->filterView()->blockSignals( true ); 2204 mView->filterView()->blockSignals( true );
2205 mView->toggleFilerEnabled( ); 2205 mView->toggleFilerEnabled( );
2206 mView->filterView()->blockSignals( false ); 2206 mView->filterView()->blockSignals( false );
2207 } 2207 }
2208 mView->selectFilter( fil-2 ); 2208 mView->selectFilter( fil-2 );
2209 } 2209 }
2210} 2210}
2211void MainWindow::updateFilterToolbar() 2211void MainWindow::updateFilterToolbar()
2212{ 2212{
2213 if ( filterMenubar ) { 2213 if ( filterMenubar ) {
2214 if ( !mView->filterView()->filtersEnabled() ) { 2214 if ( !mView->filterView()->filtersEnabled() ) {
2215 filterMenubar->changeItem( 0, i18n("No Filter") ); 2215 filterMenubar->changeItem( 0, i18n("No Filter") );
2216 } else { 2216 } else {
2217 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2217 CalFilter *curfilter = mView->filterView()->selectedFilter();
2218 if ( curfilter ) { 2218 if ( curfilter ) {
2219 filterMenubar->changeItem( 0, curfilter->name() ); 2219 filterMenubar->changeItem( 0, curfilter->name() );
2220 } 2220 }
2221 } 2221 }
2222 } 2222 }
2223} 2223}
2224void MainWindow::selectFilterPopup( int fil ) 2224void MainWindow::selectFilterPopup( int fil )
2225{ 2225{
2226 selectFilter( fil + 1 ); 2226 selectFilter( fil + 1 );
2227 2227
2228} 2228}
2229void MainWindow::configureToolBar( int item ) 2229void MainWindow::configureToolBar( int item )
2230{ 2230{
2231 2231
2232 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); 2232 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) );
2233 KOPrefs *p = KOPrefs::instance(); 2233 KOPrefs *p = KOPrefs::instance();
2234 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); 2234 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 );
2235 p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); 2235 p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 );
2236 p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); 2236 p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 );
2237 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); 2237 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 );
2238 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); 2238 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 );
2239 p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); 2239 p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 );
2240 p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); 2240 p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 );
2241 p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); 2241 p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 );
2242 p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); 2242 p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 );
2243 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); 2243 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 );
2244 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); 2244 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
2245 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); 2245 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );
2246 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); 2246 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 );
2247 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); 2247 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 );
2248 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); 2248 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 );
2249 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); 2249 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 );
2250 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); 2250 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 );
2251 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); 2251 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
2252 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); 2252 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
2253 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); 2253 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
2254 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); 2254 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
2255 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); 2255 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
2256 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); 2256 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
2257 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); 2257 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
2258 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); 2258 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
2259 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); 2259 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
2260 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); 2260 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 );
2261 // initActions(); 2261 // initActions();
2262} 2262}
2263void MainWindow::setCaption ( const QString & c ) 2263void MainWindow::setCaption ( const QString & c )
2264{ 2264{
2265 QString cap = c; 2265 QString cap = c;
2266 cap.replace( QRegExp("\n"), " " ); 2266 cap.replace( QRegExp("\n"), " " );
2267 cap = cap.stripWhiteSpace(); 2267 cap = cap.stripWhiteSpace();
2268 if ( cap.isEmpty() ) 2268 if ( cap.isEmpty() )
2269 cap = "KO/Pi"; 2269 cap = "KO/Pi";
2270 QWidget::setCaption( cap ); 2270 QWidget::setCaption( cap );
2271} 2271}
2272void MainWindow::setCaptionToDates() 2272void MainWindow::setCaptionToDates()
2273{ 2273{
2274 QString selDates; 2274 QString selDates;
2275 QDate date = mView->startDate(); 2275 QDate date = mView->startDate();
2276 if ( ! date.isValid() ) { 2276 if ( ! date.isValid() ) {
2277 setCaption(""); 2277 setCaption("");
2278 return; 2278 return;
2279 } 2279 }
2280 selDates = KGlobal::locale()->formatDate( date, true); 2280 selDates = KGlobal::locale()->formatDate( date, true);
2281 if (mView->startDate() < mView->endDate() ) 2281 if (mView->startDate() < mView->endDate() )
2282 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); 2282 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
2283 else { 2283 else {
2284 QString addString; 2284 QString addString;
2285 if ( date == QDateTime::currentDateTime().date() ) 2285 if ( date == QDateTime::currentDateTime().date() )
2286 addString = i18n("Today"); 2286 addString = i18n("Today");
2287 else if ( date == QDateTime::currentDateTime().date().addDays(1) ) 2287 else if ( date == QDateTime::currentDateTime().date().addDays(1) )
2288 addString = i18n("Tomorrow"); 2288 addString = i18n("Tomorrow");
2289 if ( !addString.isEmpty() ) 2289 if ( !addString.isEmpty() )
2290 selDates = addString+", "+selDates ; 2290 selDates = addString+", "+selDates ;
2291 } 2291 }
2292 setCaption( i18n("Dates: ") + selDates ); 2292 setCaption( i18n("Dates: ") + selDates );
2293 2293
2294} 2294}
2295void MainWindow::showConfigureAgenda( ) 2295void MainWindow::showConfigureAgenda( )
2296{ 2296{
2297 int iii; 2297 int iii;
2298 for ( iii = 1;iii<= 10 ;++iii ){ 2298 for ( iii = 1;iii<= 10 ;++iii ){
2299 configureAgendaMenu->setItemChecked( (iii+1)*2, false ); 2299 configureAgendaMenu->setItemChecked( (iii+1)*2, false );
2300 } 2300 }
2301 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); 2301 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true );
2302} 2302}
2303void MainWindow::configureAgenda( int item ) 2303void MainWindow::configureAgenda( int item )
2304{ 2304{
2305 if ( KOPrefs::instance()->mHourSize == item ) 2305 if ( KOPrefs::instance()->mHourSize == item )
2306 return; 2306 return;
2307 KOPrefs::instance()->mHourSize=item; 2307 KOPrefs::instance()->mHourSize=item;
2308 mView->viewManager()->agendaView()->updateConfig(); 2308 mView->viewManager()->agendaView()->updateConfig();
2309} 2309}
2310 2310
2311void MainWindow::saveCalendar() 2311void MainWindow::saveCalendar()
2312{ 2312{
2313
2314 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; 2313 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir;
2315 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) 2314 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir)
2316 bupDir = KGlobalSettings::backupDataDir(); 2315 bupDir = KGlobalSettings::backupDataDir();
2317 bupDir = KGlobal::formatMessage ( bupDir, 0 ); 2316 bupDir = KGlobal::formatMessage ( bupDir, 0 );
2318 QString bupHint; 2317 QString bupHint;
2319 if ( !KPimGlobalPrefs::instance()->mBackupEnabled ) 2318 if ( !KPimGlobalPrefs::instance()->mBackupEnabled )
2320 bupHint = i18n("(Hint: You can enable automatic backup in the global settings!)"); 2319 bupHint = i18n("(Hint: You can enable automatic backup in the global settings!)");
2321 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; 2320 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;
2321 bool enabled = KPimGlobalPrefs::instance()->mBackupEnabled;
2322 KPimGlobalPrefs::instance()->mBackupEnabled = false;
2323 save();
2324 KPimGlobalPrefs::instance()->mBackupEnabled = enabled;
2322 backupAllFiles(); 2325 backupAllFiles();
2323} 2326}
2324void MainWindow::loadCalendar() 2327void MainWindow::loadCalendar()
2325{ 2328{
2326 2329
2327 2330
2328#if 0 2331#if 0
2329 QString fn = KOPrefs::instance()->mLastLoadFile; 2332 QString fn = KOPrefs::instance()->mLastLoadFile;
2330 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); 2333 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this );
2331 2334
2332 if ( fn == "" ) 2335 if ( fn == "" )
2333 return; 2336 return;
2334 QFileInfo info; 2337 QFileInfo info;
2335 info.setFile( fn ); 2338 info.setFile( fn );
2336 QString mess; 2339 QString mess;
2337 bool loadbup = true; 2340 bool loadbup = true;
2338 if ( info. exists() ) { 2341 if ( info. exists() ) {
2339 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 2342 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
2340 int result = QMessageBox::warning( this, "KO/Pi: Warning!", 2343 int result = QMessageBox::warning( this, "KO/Pi: Warning!",
2341 mess, 2344 mess,
2342 i18n("Load!"), i18n("Cancel"), 0, 2345 i18n("Load!"), i18n("Cancel"), 0,
2343 0, 1 ); 2346 0, 1 );
2344 if ( result != 0 ) { 2347 if ( result != 0 ) {
2345 loadbup = false; 2348 loadbup = false;
2346 } 2349 }
2347 } else { 2350 } else {
2348 QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 2351 QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
2349 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, 2352 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0,
2350 0, 1 ); 2353 0, 1 );
2351 2354
2352 return; 2355 return;
2353 } 2356 }
2354 if ( loadbup ) { 2357 if ( loadbup ) {
2355 mView->openCalendar( fn ); 2358 mView->openCalendar( fn );
2356 KOPrefs::instance()->mLastLoadFile = fn; 2359 KOPrefs::instance()->mLastLoadFile = fn;
2357 mess = i18n("KO/Pi:Loaded %1").arg(fn) ; 2360 mess = i18n("KO/Pi:Loaded %1").arg(fn) ;
2358 setCaption(mess); 2361 setCaption(mess);
2359 } 2362 }
2360#endif 2363#endif
2361 2364
2362} 2365}
2363void MainWindow::quickImportIcal() 2366void MainWindow::quickImportIcal()
2364{ 2367{
2365 importFile( KOPrefs::instance()->mLastImportFile, false ); 2368 importFile( KOPrefs::instance()->mLastImportFile, false );
2366} 2369}
2367void MainWindow::importFile( QString fn, bool quick ) 2370void MainWindow::importFile( QString fn, bool quick )
2368{ 2371{
2369 QFileInfo info; 2372 QFileInfo info;
2370 info.setFile( fn ); 2373 info.setFile( fn );
2371 QString mess; 2374 QString mess;
2372 bool loadbup = true; 2375 bool loadbup = true;
2373 if ( !info. exists() ) { 2376 if ( !info. exists() ) {
2374 mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); 2377 mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30));
2375 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 2378 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
2376 mess ); 2379 mess );
2377 return; 2380 return;
2378 } 2381 }
2379 int result = 0; 2382 int result = 0;
2380 if ( !quick ) { 2383 if ( !quick ) {
2381 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 )); 2384 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 ));
2382 result = QMessageBox::warning( this, "KO/Pi: Warning!", 2385 result = QMessageBox::warning( this, "KO/Pi: Warning!",
2383 mess, 2386 mess,
2384 "Import", "Cancel", 0, 2387 "Import", "Cancel", 0,
2385 0, 1 ); 2388 0, 1 );
2386 } 2389 }
2387 if ( result == 0 ) { 2390 if ( result == 0 ) {
2388 if ( mView->openCalendar( fn, true )) { 2391 if ( mView->openCalendar( fn, true )) {
2389 KOPrefs::instance()->mLastImportFile = fn; 2392 KOPrefs::instance()->mLastImportFile = fn;
2390 setCaption(i18n("Imported file successfully")); 2393 setCaption(i18n("Imported file successfully"));
2391 } else { 2394 } else {
2392 setCaption(i18n("Error importing file")); 2395 setCaption(i18n("Error importing file"));
2393 } 2396 }
2394 } 2397 }
2395} 2398}
2396 2399
2397void MainWindow::importIcal() 2400void MainWindow::importIcal()
2398{ 2401{
2399 2402
2400 QString fn =KOPrefs::instance()->mLastImportFile; 2403 QString fn =KOPrefs::instance()->mLastImportFile;
2401 2404
2402 fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); 2405 fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this );
2403 if ( fn == "" ) 2406 if ( fn == "" )
2404 return; 2407 return;
2405 importFile( fn, true ); 2408 importFile( fn, true );
2406 2409
2407} 2410}
2408 2411
2409void MainWindow::exportVCalendar() 2412void MainWindow::exportVCalendar()
2410{ 2413{
2411 QString fn = KOPrefs::instance()->mLastVcalFile; 2414 QString fn = KOPrefs::instance()->mLastVcalFile;
2412 fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); 2415 fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this );
2413 if ( fn == "" ) 2416 if ( fn == "" )
2414 return; 2417 return;
2415 QFileInfo info; 2418 QFileInfo info;
2416 info.setFile( fn ); 2419 info.setFile( fn );
2417 QString mes; 2420 QString mes;
2418 bool createbup = true; 2421 bool createbup = true;
2419 if ( info. exists() ) { 2422 if ( info. exists() ) {
2420 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); 2423 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
2421 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 2424 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
2422 i18n("Overwrite!"), i18n("Cancel"), 0, 2425 i18n("Overwrite!"), i18n("Cancel"), 0,
2423 0, 1 ); 2426 0, 1 );
2424 if ( result != 0 ) { 2427 if ( result != 0 ) {
2425 createbup = false; 2428 createbup = false;
2426 } 2429 }
2427 } 2430 }
2428 if ( createbup ) { 2431 if ( createbup ) {
2429 if ( mView->exportVCalendar( fn ) ) { 2432 if ( mView->exportVCalendar( fn ) ) {
2430 KOPrefs::instance()->mLastVcalFile = fn; 2433 KOPrefs::instance()->mLastVcalFile = fn;
2431 if ( fn.length() > 20 ) 2434 if ( fn.length() > 20 )
2432 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; 2435 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ;
2433 else 2436 else
2434 mes = i18n("KO/Pi:Exported to %1").arg(fn ); 2437 mes = i18n("KO/Pi:Exported to %1").arg(fn );
2435 setCaption(mes); 2438 setCaption(mes);
2436 } 2439 }
2437 } 2440 }
2438 2441
2439} 2442}
2440QString MainWindow::sentSyncFile() 2443QString MainWindow::sentSyncFile()
2441{ 2444{
2442#ifdef DESKTOP_VERSION 2445#ifdef DESKTOP_VERSION
2443 return locateLocal( "tmp", "copysynccal.ics" ); 2446 return locateLocal( "tmp", "copysynccal.ics" );
2444#else 2447#else
2445 return QString( "/tmp/copysynccal.ics" ); 2448 return QString( "/tmp/copysynccal.ics" );
2446#endif 2449#endif
2447} 2450}
2448 2451
2449void MainWindow::syncFileRequest() 2452void MainWindow::syncFileRequest()
2450{ 2453{
2451 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2454 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2452 mSyncManager->slotSyncMenu( 999 ); 2455 mSyncManager->slotSyncMenu( 999 );
2453 } 2456 }
2454 2457
2455 setCaption(i18n("Saving Data to temp file ..." )); 2458 setCaption(i18n("Saving Data to temp file ..." ));
2456 mView->saveCalendar( sentSyncFile() ); 2459 mView->saveCalendar( sentSyncFile() );
2457 setCaption(i18n("Data saved to temp file!" )); 2460 setCaption(i18n("Data saved to temp file!" ));
2458 2461
2459} 2462}
2460void MainWindow::getFile( bool success ) 2463void MainWindow::getFile( bool success )
2461{ 2464{
2462 if ( ! success ) { 2465 if ( ! success ) {
2463 setCaption( i18n("Error receiving file. Nothing changed!") ); 2466 setCaption( i18n("Error receiving file. Nothing changed!") );
2464 return; 2467 return;
2465 } 2468 }
2466 mView->openCalendar( sentSyncFile() ); 2469 mView->openCalendar( sentSyncFile() );
2467 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2470 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2468 mSyncManager->slotSyncMenu( 999 ); 2471 mSyncManager->slotSyncMenu( 999 );
2469 } 2472 }
2470 setCaption( i18n("Pi-Sync successful!") ); 2473 setCaption( i18n("Pi-Sync successful!") );
2471} 2474}
2472void MainWindow::printListView() 2475void MainWindow::printListView()
2473{ 2476{
2474 2477
2475 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."); 2478 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.");
2476 2479
2477 KMessageBox::information( this, message); 2480 KMessageBox::information( this, message);
2478} 2481}
2479void MainWindow::printSel( ) 2482void MainWindow::printSel( )
2480{ 2483{
2481 mView->viewManager()->agendaView()->agenda()->printSelection(); 2484 mView->viewManager()->agendaView()->agenda()->printSelection();
2482} 2485}
2483 2486
2484void MainWindow::printCal() 2487void MainWindow::printCal()
2485{ 2488{
2486 mView->print();//mCp->showDialog(); 2489 mView->print();//mCp->showDialog();
2487} 2490}
2488 2491
2489 2492
2490#include "libkdepim/kdatepicker.h" 2493#include "libkdepim/kdatepicker.h"
2491#include <kdatetbl.h> 2494#include <kdatetbl.h>
2492 2495
2493void MainWindow::weekAction() 2496void MainWindow::weekAction()
2494{ 2497{
2495 int month; 2498 int month;
2496 KPopupFrame* popup = new KPopupFrame(this); 2499 KPopupFrame* popup = new KPopupFrame(this);
2497 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); 2500 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup);
2498 // ----- 2501 // -----
2499 picker->resize(picker->sizeHint()); 2502 picker->resize(picker->sizeHint());
2500 popup->setMainWidget(picker); 2503 popup->setMainWidget(picker);
2501 picker->setFocus(); 2504 picker->setFocus();
2502 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 2505 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
2503 int x = 0; 2506 int x = 0;
2504 int y = iconToolBar->height(); 2507 int y = iconToolBar->height();
2505 int dX = 0; 2508 int dX = 0;
2506 int dY = 0; 2509 int dY = 0;
2507 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2510 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2508 if ( iconToolBar->y() > height()/2 ) { 2511 if ( iconToolBar->y() > height()/2 ) {
2509 dY = picker->sizeHint().height()+8; 2512 dY = picker->sizeHint().height()+8;
2510 y = 0; 2513 y = 0;
2511 } 2514 }
2512 } else { 2515 } else {
2513 if ( iconToolBar->x() > width()/2 ) { // right side 2516 if ( iconToolBar->x() > width()/2 ) { // right side
2514 x=0; 2517 x=0;
2515 dX= picker->sizeHint().width()+8; 2518 dX= picker->sizeHint().width()+8;
2516 y = 0; 2519 y = 0;
2517 } else { 2520 } else {
2518 x= iconToolBar->width(); 2521 x= iconToolBar->width();
2519 y = 0; 2522 y = 0;
2520 } 2523 }
2521 } 2524 }
2522 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2525 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2523 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) 2526 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))))
2524 { 2527 {
2525 month = picker->getResult(); 2528 month = picker->getResult();
2526 emit selectWeek ( month ); 2529 emit selectWeek ( month );
2527 //qDebug("weekSelected %d ", month); 2530 //qDebug("weekSelected %d ", month);
2528 } 2531 }
2529 delete popup; 2532 delete popup;
2530} 2533}
2531 2534
2532void MainWindow::hideEvent ( QHideEvent * ) 2535void MainWindow::hideEvent ( QHideEvent * )
2533{ 2536{
2534 QString message; 2537 QString message;
2535 QDateTime nextA = mCalendar->nextAlarmEventDateTime(); 2538 QDateTime nextA = mCalendar->nextAlarmEventDateTime();
2536 if ( nextA.isValid() ) { 2539 if ( nextA.isValid() ) {
2537 QString sum = mCalendar->nextSummary(); 2540 QString sum = mCalendar->nextSummary();
2538 2541
2539 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)); 2542 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));
2540 setCaption( message ); 2543 setCaption( message );
2541 } 2544 }
2542} 2545}
2543 2546
2544void MainWindow::resizeEvent( QResizeEvent* e) 2547void MainWindow::resizeEvent( QResizeEvent* e)
2545{ 2548{
2546#ifndef DESKTOP_VERSION 2549#ifndef DESKTOP_VERSION
2547 if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) { 2550 if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) {
2548 if (QApplication::desktop()->width() > QApplication::desktop()->height() ) 2551 if (QApplication::desktop()->width() > QApplication::desktop()->height() )
2549 filterToolBar->hide(); 2552 filterToolBar->hide();
2550 else 2553 else
2551 filterToolBar->show(); 2554 filterToolBar->show();
2552 } 2555 }
2553#endif 2556#endif
2554 QMainWindow::resizeEvent( e); 2557 QMainWindow::resizeEvent( e);
2555} 2558}