-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 14 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 73 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 10 | ||||
-rw-r--r-- | korganizer/koprefs.h | 9 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 52 | ||||
-rw-r--r-- | korganizer/koprefsdialog.h | 2 |
6 files changed, 138 insertions, 22 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 1a1fd0e..fcfa282 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1,1556 +1,1562 @@ | |||
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 | { "Action","Aktion" }, | 47 | { "Action","Aktion" }, |
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 | { "Clone Item","Klone Eintrag" }, | 93 | { "Clone Item","Klone Eintrag" }, |
94 | { "&Close","S&chließen" }, | 94 | { "&Close","S&chließen" }, |
95 | { "Close","Schließen" }, | 95 | { "Close","Schließen" }, |
96 | { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, | 96 | { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, |
97 | { "Colors","Farben" }, | 97 | { "Colors","Farben" }, |
98 | { "completed","erledigt" }, | 98 | { "completed","erledigt" }, |
99 | { "completed on %1","erledigt am %1" }, | 99 | { "completed on %1","erledigt am %1" }, |
100 | { "Complete","Erledigt" }, | 100 | { "Complete","Erledigt" }, |
101 | { "Confidential","Vertraulich" }, | 101 | { "Confidential","Vertraulich" }, |
102 | { "Configure...","Einstellungen..." }, | 102 | { "Configure...","Einstellungen..." }, |
103 | { "Confirm &deletes","Löschvogang bestätigen" }, | 103 | { "Confirm &deletes","Löschvogang bestätigen" }, |
104 | { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, | 104 | { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, |
105 | { "Counter-event Viewer","Terminzähler Ansicht" }, | 105 | { "Counter-event Viewer","Terminzähler Ansicht" }, |
106 | { "Daily ending hour:","Feierabend:" }, | 106 | { "Daily ending hour:","Feierabend:" }, |
107 | { "Daily starting hour:","Anfangszeit:" }, | 107 | { "Daily starting hour:","Anfangszeit:" }, |
108 | { "Daily","Täglich" }, | 108 | { "Daily","Täglich" }, |
109 | { "Date Format","Datums Format" }, | 109 | { "Date Format","Datums Format" }, |
110 | { "Date Format:","Datums Format:" }, | 110 | { "Date Format:","Datums Format:" }, |
111 | { "DateNavigator:(nr)","Datums Navigator" }, | 111 | { "DateNavigator:(nr)","Datums Navigator" }, |
112 | { "Dates: ","Datum: " }, | 112 | { "Dates: ","Datum: " }, |
113 | { "Date && Time","Datum && Zeit" }, | 113 | { "Date && Time","Datum && Zeit" }, |
114 | { "Day begins at:","Der Tag beginnt um:" }, | 114 | { "Day begins at:","Der Tag beginnt um:" }, |
115 | { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, | 115 | { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, |
116 | { "Days in What's Next:","Tage in What's Next:" }, | 116 | { "Days in What's Next:","Tage in What's Next:" }, |
117 | { "day(s)","Tag(e)" }, | 117 | { "day(s)","Tag(e)" }, |
118 | { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, | 118 | { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, |
119 | { "day","Tag" }, | 119 | { "day","Tag" }, |
120 | { "Dec","Dez" }, | 120 | { "Dec","Dez" }, |
121 | { "December","Dezember" }, | 121 | { "December","Dezember" }, |
122 | { "Default alarm time:","Standard Alarmzeit:" }, | 122 | { "Default alarm time:","Standard Alarmzeit:" }, |
123 | { "Default appointment time:","Standard Termin Startzeit:" }, | 123 | { "Default appointment time:","Standard Termin Startzeit:" }, |
124 | { "Default event color:","Standard Terminfarbe:" }, | 124 | { "Default event color:","Standard Terminfarbe:" }, |
125 | { "Default","Standard" }, | 125 | { "Default","Standard" }, |
126 | { "Def. duration of new app.:","Standard Termin Länge:" }, | 126 | { "Def. duration of new app.:","Standard Termin Länge:" }, |
127 | { "Delete All","Lösche alles" }, | 127 | { "Delete All","Lösche alles" }, |
128 | { "Delete all selected","Lösche alle Selektierten" }, | 128 | { "Delete all selected","Lösche alle Selektierten" }, |
129 | { "Delete Current","Aktuellen löschen" }, | 129 | { "Delete Current","Aktuellen löschen" }, |
130 | { "Delete Event...","Lösche Termin..." }, | 130 | { "Delete Event...","Lösche Termin..." }, |
131 | { "Delete Event","Lösche Termin" }, | 131 | { "Delete Event","Lösche Termin" }, |
132 | { "&Delete...","Lösche..." }, | 132 | { "&Delete...","Lösche..." }, |
133 | { "Delete...","Lösche..." }, | 133 | { "Delete...","Lösche..." }, |
134 | { "Delete","Lösche" }, | 134 | { "Delete","Lösche" }, |
135 | { "Delete Todo...","Lösche Todo..." }, | 135 | { "Delete Todo...","Lösche Todo..." }, |
136 | { "Delete To-Do","Lösche Todo" }, | 136 | { "Delete To-Do","Lösche Todo" }, |
137 | { "Deleting item %d ...","Lösche Eintrag %d..." }, | 137 | { "Deleting item %d ...","Lösche Eintrag %d..." }, |
138 | { "Descriptions","Beschreibungen" }, | 138 | { "Descriptions","Beschreibungen" }, |
139 | { "Deselect all","Deselektiere Alle" }, | 139 | { "Deselect all","Deselektiere Alle" }, |
140 | { "Details","Details" }, | 140 | { "Details","Details" }, |
141 | { "Dinner","Abendessen" }, | 141 | { "Dinner","Abendessen" }, |
142 | { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, | 142 | { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, |
143 | { "Due Date","Fällig am" }, | 143 | { "Due Date","Fällig am" }, |
144 | { "Due: ","Fällig: "}, | 144 | { "Due: ","Fällig: "}, |
145 | { "Due Time","Fällig um" }, | 145 | { "Due Time","Fällig um" }, |
146 | { "Due:","Fällig:"}, | 146 | { "Due:","Fällig:"}, |
147 | { "Duration: ","Dauer: " }, | 147 | { "Duration: ","Dauer: " }, |
148 | { "Edit...","Bearbeite..." }, | 148 | { "Edit...","Bearbeite..." }, |
149 | { "Edit Event...","Bearbeite Termin..." }, | 149 | { "Edit Event...","Bearbeite Termin..." }, |
150 | { "Edit Event","Bearbeite Termin" }, | 150 | { "Edit Event","Bearbeite Termin" }, |
151 | { "Edit exceptions","Bearbeite Ausnahmen" }, | 151 | { "Edit exceptions","Bearbeite Ausnahmen" }, |
152 | { "EditorBox:","Editor Fenster:" }, | 152 | { "EditorBox:","Editor Fenster:" }, |
153 | { "Edit Recurrence Range","Bearbeite Wiederholung" }, | 153 | { "Edit Recurrence Range","Bearbeite Wiederholung" }, |
154 | { "Edit Todo...","Berabeite Todo..." }, | 154 | { "Edit Todo...","Berabeite Todo..." }, |
155 | { "Edit To-Do","Todo bearbeiten" }, | 155 | { "Edit To-Do","Todo bearbeiten" }, |
156 | { "E&mail address:","E&mail Adresse:" }, | 156 | { "E&mail address:","E&mail Adresse:" }, |
157 | { "(EmptyEmail)","(KeineEmail)" }, | 157 | { "(EmptyEmail)","(KeineEmail)" }, |
158 | { "(EmptyName)","(KeinName)" }, | 158 | { "(EmptyName)","(KeinName)" }, |
159 | { "Enable Recurrence","Wiederholung anschalten" }, | 159 | { "Enable Recurrence","Wiederholung anschalten" }, |
160 | { "End after","Endet nach"}, | 160 | { "End after","Endet nach"}, |
161 | { "End by:","Endet am"}, | 161 | { "End by:","Endet am"}, |
162 | { "End/Due Date","Ende/Fällig am" }, | 162 | { "End/Due Date","Ende/Fällig am" }, |
163 | { "End:","Ende:" }, | 163 | { "End:","Ende:" }, |
164 | { "End/Due Time","Ende/Fällig um" }, | 164 | { "End/Due Time","Ende/Fällig um" }, |
165 | { "English","Englisch" }, | 165 | { "English","Englisch" }, |
166 | { "Event","Termin" }, | 166 | { "Event","Termin" }, |
167 | { "Event list","Termin Liste" }, | 167 | { "Event list","Termin Liste" }, |
168 | { "Events","Termine" }, | 168 | { "Events","Termine" }, |
169 | { "Event Viewer:","Termin Übersicht:" }, | 169 | { "Event Viewer:","Termin Übersicht:" }, |
170 | { "every","jede" }, | 170 | { "every","jede" }, |
171 | { "Exceptions...","Ausnahmen..." }, | 171 | { "Exceptions...","Ausnahmen..." }, |
172 | { "Exceptions","Ausnahmen" }, | 172 | { "Exceptions","Ausnahmen" }, |
173 | { "Exclude holidays","Ohne freie Tage" }, | 173 | { "Exclude holidays","Ohne freie Tage" }, |
174 | { "Exclude Saturdays","Ohne Samstage" }, | 174 | { "Exclude Saturdays","Ohne Samstage" }, |
175 | { "Feb","Feb" }, | 175 | { "Feb","Feb" }, |
176 | { "February","Februar" }, | 176 | { "February","Februar" }, |
177 | { "&Find","Suche!" }, | 177 | { "&Find","Suche!" }, |
178 | { "Fonts","Schriftart" }, | 178 | { "Fonts","Schriftart" }, |
179 | { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, | 179 | { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, |
180 | { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, | 180 | { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, |
181 | { "Free","Frei" }, | 181 | { "Free","Frei" }, |
182 | { "Friday","Freitag" }, | 182 | { "Friday","Freitag" }, |
183 | { "Fri","Fr" }, | 183 | { "Fri","Fr" }, |
184 | { "From:","Vom:" }, | 184 | { "From:","Vom:" }, |
185 | { "Full &name:","Vor- und &Nachname:" }, | 185 | { "Full &name:","Vor- und &Nachname:" }, |
186 | { "General","Allgemein" }, | 186 | { "General","Allgemein" }, |
187 | { "German","Deutsch" }, | 187 | { "German","Deutsch" }, |
188 | { "Gifts","Geschenke" }, | 188 | { "Gifts","Geschenke" }, |
189 | { "Go to Today","Heute anzeigen" }, | 189 | { "Go to Today","Heute anzeigen" }, |
190 | { "Help","Hilfe" }, | 190 | { "Help","Hilfe" }, |
191 | { "Hide Dates","Daten ausblenden" }, | 191 | { "Hide Dates","Daten ausblenden" }, |
192 | { "Highlight color:","Markierungen:" }, | 192 | { "Highlight color:","Markierungen:" }, |
193 | { "Holiday color:","Freie Tage:" }, | 193 | { "Holiday color:","Freie Tage:" }, |
194 | { "hour(s)","Stunde(n)" }, | 194 | { "hour(s)","Stunde(n)" }, |
195 | { "In %1 days: ","In %1 Tagen: " }, | 195 | { "In %1 days: ","In %1 Tagen: " }, |
196 | { "Incomplete Todo:","Unerledigte Aufgaben:" }, | 196 | { "Incomplete Todo:","Unerledigte Aufgaben:" }, |
197 | { "Information","Information" }, | 197 | { "Information","Information" }, |
198 | { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, | 198 | { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, |
199 | { "Jan","Jan" }, | 199 | { "Jan","Jan" }, |
200 | { "January","Januar" }, | 200 | { "January","Januar" }, |
201 | { "JournalView:","Journal Ansicht:" }, | 201 | { "JournalView:","Journal Ansicht:" }, |
202 | { "Journals","Journale" }, | 202 | { "Journals","Journale" }, |
203 | { "Jul","Jul" }, | 203 | { "Jul","Jul" }, |
204 | { "July","Juli" }, | 204 | { "July","Juli" }, |
205 | { "Jump to date","Springe zum Datum" }, | 205 | { "Jump to date","Springe zum Datum" }, |
206 | { "June","Juni" }, | 206 | { "June","Juni" }, |
207 | { "Jun","Jun" }, | 207 | { "Jun","Jun" }, |
208 | { "Key Bindings...","Tastenzuordnung..." }, | 208 | { "Key Bindings...","Tastenzuordnung..." }, |
209 | { "Kids","Kinder" }, | 209 | { "Kids","Kinder" }, |
210 | { "Known Problems...","Bekannte Probleme..." }, | 210 | { "Known Problems...","Bekannte Probleme..." }, |
211 | { "KO/Pi Find ","KO/Pi Suchdialog " }, | 211 | { "KO/Pi Find ","KO/Pi Suchdialog " }, |
212 | { "KO/Pi Find: ","KO/Pi Suchen: " }, | 212 | { "KO/Pi Find: ","KO/Pi Suchen: " }, |
213 | { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, | 213 | { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, |
214 | { "Language:(needs restart)","Sprache (Neustart!)" }, | 214 | { "Language:(needs restart)","Sprache (Neustart!)" }, |
215 | { "Language:","Sprache" }, | 215 | { "Language:","Sprache" }, |
216 | { "Large","Etwas mehr" }, | 216 | { "Large","Etwas mehr" }, |
217 | { "List View:","Listenansicht:" }, | 217 | { "List View:","Listenansicht:" }, |
218 | { "List View","Listenansicht" }, | 218 | { "List View","Listenansicht" }, |
219 | { "Load/Save","Laden/Speichern" }, | 219 | { "Load/Save","Laden/Speichern" }, |
220 | { "Load Template","Lade Vorlage" }, | 220 | { "Load Template","Lade Vorlage" }, |
221 | { "Locale","Lokalisation" }, | 221 | { "Locale","Lokalisation" }, |
222 | { "Local temp file:","Lokale temp. Datei:" }, | 222 | { "Local temp file:","Lokale temp. Datei:" }, |
223 | { "Location: ","Ort: " }, | 223 | { "Location: ","Ort: " }, |
224 | { "Location:","Ort:" }, | 224 | { "Location:","Ort:" }, |
225 | { "Mail client","Mail Programm" }, | 225 | { "Mail client","Mail Programm" }, |
226 | { "Mail Client","Mail Programm" }, | 226 | { "Mail Client","Mail Programm" }, |
227 | { "March","März" }, | 227 | { "March","März" }, |
228 | { "Mar","Mär" }, | 228 | { "Mar","Mär" }, |
229 | { "May","Mai" }, | 229 | { "May","Mai" }, |
230 | { "M. Bains line:","M. Bains Linie:" }, | 230 | { "M. Bains line:","M. Bains Linie:" }, |
231 | { "Medium","Medium" }, | 231 | { "Medium","Medium" }, |
232 | { "Method","Methode" }, | 232 | { "Method","Methode" }, |
233 | { "minute(s)","Minute(n)" }, | 233 | { "minute(s)","Minute(n)" }, |
234 | { "Monday","Montag" }, | 234 | { "Monday","Montag" }, |
235 | { "Mon","Mo" }, | 235 | { "Mon","Mo" }, |
236 | { "Monthly","Monatlich" }, | 236 | { "Monthly","Monatlich" }, |
237 | { "Month not long enough","Monat ist nicht lang genug" }, | 237 | { "Month not long enough","Monat ist nicht lang genug" }, |
238 | { "month(s)","Monat(e)" }, | 238 | { "month(s)","Monat(e)" }, |
239 | { "Month view:","Monatsansicht:" }, | 239 | { "Month view:","Monatsansicht:" }, |
240 | { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, | 240 | { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, |
241 | { "Todo view uses category colors","Todo Ansicht zeigt Kategorie Farben" }, | 241 | { "Todo view uses category colors","Todo Ansicht zeigt Kategorie Farben" }, |
242 | { "Move &Down","Nach unten verschieben" }, | 242 | { "Move &Down","Nach unten verschieben" }, |
243 | { "Move &Up","Nach oben verschieben" }, | 243 | { "Move &Up","Nach oben verschieben" }, |
244 | { "Name:","Name:" }, | 244 | { "Name:","Name:" }, |
245 | { "Name","Name" }, | 245 | { "Name","Name" }, |
246 | { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, | 246 | { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, |
247 | { "%n Days","%n Tage" }, | 247 | { "%n Days","%n Tage" }, |
248 | { "Never","Nie" }, | 248 | { "Never","Nie" }, |
249 | { "New event...","Neuer Termin..." }, | 249 | { "New event...","Neuer Termin..." }, |
250 | { "New event","Neuer Termin" }, | 250 | { "New event","Neuer Termin" }, |
251 | { "New Event...","Neuer Termin..." }, | 251 | { "New Event...","Neuer Termin..." }, |
252 | { "New Events/Todos should","Neue Termine/Todos sollten" }, | 252 | { "New Events/Todos should","Neue Termine/Todos sollten" }, |
253 | { "&New","&Neu" }, | 253 | { "&New","&Neu" }, |
254 | { "New","Neu", }, | 254 | { "New","Neu", }, |
255 | { "New Sub-Todo...","Neues Sub-Todo..." }, | 255 | { "New Sub-Todo...","Neues Sub-Todo..." }, |
256 | { "New Todo...","Neues Todo..." }, | 256 | { "New Todo...","Neues Todo..." }, |
257 | { "Next Alarm: ","Nächster Alarm: ", }, | 257 | { "Next Alarm: ","Nächster Alarm: ", }, |
258 | { "&Next Day","&Nächster Tag", }, | 258 | { "&Next Day","&Nächster Tag", }, |
259 | { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, | 259 | { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, |
260 | { "Next month","Nächster Monat" }, | 260 | { "Next month","Nächster Monat" }, |
261 | { "&Next Week","&Nächste Woche" }, | 261 | { "&Next Week","&Nächste Woche" }, |
262 | { "Next year","Nächstes Jahr" }, | 262 | { "Next year","Nächstes Jahr" }, |
263 | { "Next Year","Nächstes Jahr" }, | 263 | { "Next Year","Nächstes Jahr" }, |
264 | { "%n h","%n Std" }, | 264 | { "%n h","%n Std" }, |
265 | { "No ending date","Kein End-Datum", }, | 265 | { "No ending date","Kein End-Datum", }, |
266 | { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, | 266 | { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, |
267 | { "No event selected.","Kein Termin selektiert" }, | 267 | { "No event selected.","Kein Termin selektiert" }, |
268 | { "No","Nein" }, | 268 | { "No","Nein" }, |
269 | { "No program set","Kein Programm ausgewählt", }, | 269 | { "No program set","Kein Programm ausgewählt", }, |
270 | { "Normal","Normal" }, | 270 | { "Normal","Normal" }, |
271 | { "[No selection]","Keine Selektion", }, | 271 | { "[No selection]","Keine Selektion", }, |
272 | { "No sound set","Kein Sound ausgewählt", }, | 272 | { "No sound set","Kein Sound ausgewählt", }, |
273 | { "no time ","keine Zeit ", }, | 273 | { "no time ","keine Zeit ", }, |
274 | { "no time","keine Zeit", }, | 274 | { "no time","keine Zeit", }, |
275 | { "No Time","Keine Zeit" }, | 275 | { "No Time","Keine Zeit" }, |
276 | { "November","November" }, | 276 | { "November","November" }, |
277 | { "Nov","Nov", }, | 277 | { "Nov","Nov", }, |
278 | { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, | 278 | { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, |
279 | { "occurrence(s)","Vorkommen" }, | 279 | { "occurrence(s)","Vorkommen" }, |
280 | { "October","Oktober" }, | 280 | { "October","Oktober" }, |
281 | { "Oct","Okt", }, | 281 | { "Oct","Okt", }, |
282 | { "O-due!","Ü-fällig! " }, | 282 | { "O-due!","Ü-fällig! " }, |
283 | { "&OK","&OK" }, | 283 | { "&OK","&OK" }, |
284 | { "Ok+Show!","Ok+Anzeigen" }, | 284 | { "Ok+Show!","Ok+Anzeigen" }, |
285 | { "Organizer: %1","Organisator %1" }, | 285 | { "Organizer: %1","Organisator %1" }, |
286 | { "Organizer","Organisator" }, | 286 | { "Organizer","Organisator" }, |
287 | { "Owner: ","Besitzer: " }, | 287 | { "Owner: ","Besitzer: " }, |
288 | { "Owner:","Besitzer:" }, | 288 | { "Owner:","Besitzer:" }, |
289 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, | 289 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, |
290 | { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, | 290 | { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, |
291 | { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, | 291 | { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, |
292 | { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, | 292 | { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, |
293 | { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, | 293 | { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, |
294 | { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, | 294 | { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, |
295 | { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, | 295 | { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, |
296 | { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, | 296 | { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, |
297 | { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, | 297 | { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, |
298 | { "&Previous Day","Vorheriger Tag" }, | 298 | { "&Previous Day","Vorheriger Tag" }, |
299 | { "Previous month","Vorheriger Monat" }, | 299 | { "Previous month","Vorheriger Monat" }, |
300 | { "Previous Month","Vorheriger Monat" }, | 300 | { "Previous Month","Vorheriger Monat" }, |
301 | { "&Previous Week","Vorherige Woche" }, | 301 | { "&Previous Week","Vorherige Woche" }, |
302 | { "Previous year","Vorheriges Jahr" }, | 302 | { "Previous year","Vorheriges Jahr" }, |
303 | { "Previous Year","Vorheriges Jahr" }, | 303 | { "Previous Year","Vorheriges Jahr" }, |
304 | { "Printing","Drucken" }, | 304 | { "Printing","Drucken" }, |
305 | { "Priority:","Priorität:" }, | 305 | { "Priority:","Priorität:" }, |
306 | { "Private","Privat" }, | 306 | { "Private","Privat" }, |
307 | { "Proceed","Weiter" }, | 307 | { "Proceed","Weiter" }, |
308 | { "Public","Öffentlich" }, | 308 | { "Public","Öffentlich" }, |
309 | { "Purge","Entferne" }, | 309 | { "Purge","Entferne" }, |
310 | { "Purge Completed...","Entferne erledigte Todos..." }, | 310 | { "Purge Completed...","Entferne erledigte Todos..." }, |
311 | { "Purge Todos","Todos bereinigen" }, | 311 | { "Purge Todos","Todos bereinigen" }, |
312 | { "read-only","schreibgeschützt" }, | 312 | { "read-only","schreibgeschützt" }, |
313 | { "Recur every","Wiederh. alle" }, | 313 | { "Recur every","Wiederh. alle" }, |
314 | { "Recur in the month of","Wiederh. im Monat" }, | 314 | { "Recur in the month of","Wiederh. im Monat" }, |
315 | { "Recur on the","Wiederh. am" }, | 315 | { "Recur on the","Wiederh. am" }, |
316 | { "Recur on this day","Wiederh. am diesen Tag" }, | 316 | { "Recur on this day","Wiederh. am diesen Tag" }, |
317 | { "Recurrence Range...","Wiederholungs Zeitraum..." }, | 317 | { "Recurrence Range...","Wiederholungs Zeitraum..." }, |
318 | { "Recurrence Range","Wiederholungs Zeitraum" }, | 318 | { "Recurrence Range","Wiederholungs Zeitraum" }, |
319 | { "Recurrence Rule","Wiederholungs Regel" }, | 319 | { "Recurrence Rule","Wiederholungs Regel" }, |
320 | { "Recurrence","Wiederholung" }, | 320 | { "Recurrence","Wiederholung" }, |
321 | { "Recurs","Wiederholung" }, | 321 | { "Recurs","Wiederholung" }, |
322 | {"&Reject","Abweisen"}, | 322 | {"&Reject","Abweisen"}, |
323 | { "Reminder:","Alarm:" }, | 323 | { "Reminder:","Alarm:" }, |
324 | { "Rem.:","Alarm:" }, | 324 | { "Rem.:","Alarm:" }, |
325 | { "Rem.","Alarm:" }, | 325 | { "Rem.","Alarm:" }, |
326 | { "Remote file:","Remote Datei:"}, | 326 | { "Remote file:","Remote Datei:"}, |
327 | { "Remote IP:","Remote (ferne) IP:" }, | 327 | { "Remote IP:","Remote (ferne) IP:" }, |
328 | { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, | 328 | { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, |
329 | { "Remote user:","Remote Benutzer"}, | 329 | { "Remote user:","Remote Benutzer"}, |
330 | { "&Remove","Entfe&rnen" }, | 330 | { "&Remove","Entfe&rnen" }, |
331 | { "Remove","Entfernen" }, | 331 | { "Remove","Entfernen" }, |
332 | { "Request response","Bemerkung anfordern" }, | 332 | { "Request response","Bemerkung anfordern" }, |
333 | { "Role:","Rolle:" }, | 333 | { "Role:","Rolle:" }, |
334 | { "Role","Rolle" }, | 334 | { "Role","Rolle" }, |
335 | { "Sat","Sa" }, | 335 | { "Sat","Sa" }, |
336 | { "Saturday","Samstag" }, | 336 | { "Saturday","Samstag" }, |
337 | { "Search for:","Suche nach:" }, | 337 | { "Search for:","Suche nach:" }, |
338 | { "Search In","Suche in" }, | 338 | { "Search In","Suche in" }, |
339 | { "Search...","Suche..." }, | 339 | { "Search...","Suche..." }, |
340 | { "Search","Suche" }, | 340 | { "Search","Suche" }, |
341 | { "Select Addresses","Wähle Adressen" }, | 341 | { "Select Addresses","Wähle Adressen" }, |
342 | { "Select all","Selektiere Alle" }, | 342 | { "Select all","Selektiere Alle" }, |
343 | { "Select a month","Wähle Monat" }, | 343 | { "Select a month","Wähle Monat" }, |
344 | { "Select a week","Wähle Woche" }, | 344 | { "Select a week","Wähle Woche" }, |
345 | { "Select a year","Wähle Jahr" }, | 345 | { "Select a year","Wähle Jahr" }, |
346 | { "Send directly","Sende direkt" }, | 346 | { "Send directly","Sende direkt" }, |
347 | { "&Send Messages","&Sende Nachrichten", }, | 347 | { "&Send Messages","&Sende Nachrichten", }, |
348 | { "Sep","Sep" }, | 348 | { "Sep","Sep" }, |
349 | { "September","September" }, | 349 | { "September","September" }, |
350 | { "Shopping","Einkaufen" }, | 350 | { "Shopping","Einkaufen" }, |
351 | { "Show Dates","Zeige Daten" }, | 351 | { "Show Dates","Zeige Daten" }, |
352 | { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, | 352 | { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, |
353 | { "Show Event","Termin anzeigen" }, | 353 | { "Show Event","Termin anzeigen" }, |
354 | { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, | 354 | { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, |
355 | { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, | 355 | { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, |
356 | { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, | 356 | { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, |
357 | { "Show time as:","Zeige Zeit als" }, | 357 | { "Show time as:","Zeige Zeit als" }, |
358 | { "Show Todo","Todo anzeigen" }, | 358 | { "Show Todo","Todo anzeigen" }, |
359 | { "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, | 359 | { "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, |
360 | { "&Show","Anzeigen" }, | 360 | { "&Show","Anzeigen" }, |
361 | { "Show...","Anzeigen..." }, | 361 | { "Show...","Anzeigen..." }, |
362 | { "Show","Anzeigen" }, | 362 | { "Show","Anzeigen" }, |
363 | { "Small","Klein" }, | 363 | { "Small","Klein" }, |
364 | { "Sorry","Tut mir leid" }, | 364 | { "Sorry","Tut mir leid" }, |
365 | {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, | 365 | {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, |
366 | { "Start:","Start:" }, | 366 | { "Start:","Start:" }, |
367 | { "Start Date","Start am" }, | 367 | { "Start Date","Start am" }, |
368 | { "Start date: %1","Start Datum: %1" }, | 368 | { "Start date: %1","Start Datum: %1" }, |
369 | { "Start Time","Start um" }, | 369 | { "Start Time","Start um" }, |
370 | { "Status:","Status:" }, | 370 | { "Status:","Status:" }, |
371 | { "Status","Status:" }, | 371 | { "Status","Status:" }, |
372 | { "Summaries","Titel" }, | 372 | { "Summaries","Titel" }, |
373 | { "Summary:","Titel:" }, | 373 | { "Summary:","Titel:" }, |
374 | { "Summary","Titel" }, | 374 | { "Summary","Titel" }, |
375 | { "Sunday","Sonntag" }, | 375 | { "Sunday","Sonntag" }, |
376 | { "Sun","So" }, | 376 | { "Sun","So" }, |
377 | { "Sync preferences:","Sync Einstellungen" }, | 377 | { "Sync preferences:","Sync Einstellungen" }, |
378 | { "Sync Prefs","Sync Einstellungen" }, | 378 | { "Sync Prefs","Sync Einstellungen" }, |
379 | { "Syncronize","Daten abgleich" }, | 379 | { "Syncronize","Daten abgleich" }, |
380 | { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, | 380 | { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, |
381 | { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, | 381 | { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, |
382 | { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, | 382 | { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, |
383 | { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges Todo" }, | 383 | { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges Todo" }, |
384 | { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, | 384 | { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, |
385 | { "Template...","Vorlage..." }, | 385 | { "Template...","Vorlage..." }, |
386 | { "This day","Dieser Tag" }, | 386 | { "This day","Dieser Tag" }, |
387 | { "This is an experimental feature. ","Dieses Feature ist experimentel" }, | 387 | { "This is an experimental feature. ","Dieses Feature ist experimentel" }, |
388 | { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, | 388 | { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, |
389 | { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, | 389 | { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, |
390 | { "Thu","Do" }, | 390 | { "Thu","Do" }, |
391 | { "Thursday","Donnerstag" }, | 391 | { "Thursday","Donnerstag" }, |
392 | { "Time associated","Mit Zeit" }, | 392 | { "Time associated","Mit Zeit" }, |
393 | { "Time bar:","Uhrzeit Zeile:" }, | 393 | { "Time bar:","Uhrzeit Zeile:" }, |
394 | { "Time && Date","Zeit und Datum" }, | 394 | { "Time && Date","Zeit und Datum" }, |
395 | { "Time Format","Zeit Format" }, | 395 | { "Time Format","Zeit Format" }, |
396 | { "Time Format(nr):","Zeit Format(Neustart!)" }, | 396 | { "Time Format(nr):","Zeit Format(Neustart!)" }, |
397 | { "Date Labels:","Datumsleiste:" }, | 397 | { "Date Labels:","Datumsleiste:" }, |
398 | { "Time: ","Zeit: " }, | 398 | { "Time: ","Zeit: " }, |
399 | { "Timezone:","Zeitzone:" }, | 399 | { "Timezone:","Zeitzone:" }, |
400 | { "To: ","Bis: " }, | 400 | { "To: ","Bis: " }, |
401 | { "To:","Bis:" }, | 401 | { "To:","Bis:" }, |
402 | { "Today: ","Heute: " }, | 402 | { "Today: ","Heute: " }, |
403 | { "Todo due today color:","Heute fällige Todos" }, | 403 | { "Todo due today color:","Heute fällige Todos" }, |
404 | { "To-do items:","To-Do items:" }, | 404 | { "To-do items:","To-Do items:" }, |
405 | { "Todo overdue color:","Überfällige Todos" }, | 405 | { "Todo overdue color:","Überfällige Todos" }, |
406 | { "Todo","Todo" }, | 406 | { "Todo","Todo" }, |
407 | { "To-do view shows completed Todos","Todo Ansicht zeigt erledigte Todos" }, | 407 | { "To-do view shows completed Todos","Todo Ansicht zeigt erledigte Todos" }, |
408 | { "ToDoView:","Todo Ansicht:" }, | 408 | { "ToDoView:","Todo Ansicht:" }, |
409 | { "Toggle Alarm","Wechsle Alarm" }, | 409 | { "Toggle Alarm","Wechsle Alarm" }, |
410 | { "Toggle Allday","Umschalten Ganztag" }, | 410 | { "Toggle Allday","Umschalten Ganztag" }, |
411 | { "Tomorrow: ","Morgen: " }, | 411 | { "Tomorrow: ","Morgen: " }, |
412 | { "Tue","Di" }, | 412 | { "Tue","Di" }, |
413 | { "Tuesday","Dienstag" }, | 413 | { "Tuesday","Dienstag" }, |
414 | { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, | 414 | { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, |
415 | { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, | 415 | { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, |
416 | { "Unknown","Unbekannt" }, | 416 | { "Unknown","Unbekannt" }, |
417 | { "Up","Hinauf" }, | 417 | { "Up","Hinauf" }, |
418 | { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, | 418 | { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, |
419 | { "User defined","Benutzerdefiniert" }, | 419 | { "User defined","Benutzerdefiniert" }, |
420 | { "User long date:","Format langes Datum:" }, | 420 | { "User long date:","Format langes Datum:" }, |
421 | { "User short date:","Forma kurzes Datum:" }, | 421 | { "User short date:","Forma kurzes Datum:" }, |
422 | { "View","Ansicht" }, | 422 | { "View","Ansicht" }, |
423 | { "View Fonts","Schriftarten Ansichten" }, | 423 | { "View Fonts","Schriftarten Ansichten" }, |
424 | { "Views","Ansichten" }, | 424 | { "Views","Ansichten" }, |
425 | { "Wed","Mi" }, | 425 | { "Wed","Mi" }, |
426 | { "Wednesday","Mittwoch" }, | 426 | { "Wednesday","Mittwoch" }, |
427 | { "Week %1","Woche %1" }, | 427 | { "Week %1","Woche %1" }, |
428 | { "Weekly","Wöchentlich" }, | 428 | { "Weekly","Wöchentlich" }, |
429 | { "Week starts on Sunday","Woche beginnt Sonntags" }, | 429 | { "Week starts on Sunday","Woche beginnt Sonntags" }, |
430 | { "What's Next View:","What's Next Anz." }, | 430 | { "What's Next View:","What's Next Anz." }, |
431 | { "What's next ?","Was kommt als nächstes?(What's Next)" }, | 431 | { "What's next ?","Was kommt als nächstes?(What's Next)" }, |
432 | { "Working Hours","Tägliche Arbeitszeit" }, | 432 | { "Working Hours","Tägliche Arbeitszeit" }, |
433 | { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, | 433 | { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, |
434 | { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, | 434 | { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, |
435 | { "Write back synced file","Syncronisierte Datei zurückschreiben" }, | 435 | { "Write back synced file","Syncronisierte Datei zurückschreiben" }, |
436 | { "Yearly","Jährlich" }, | 436 | { "Yearly","Jährlich" }, |
437 | { "year(s)","Jahr(e)" }, | 437 | { "year(s)","Jahr(e)" }, |
438 | { "Yes","Ja" }, | 438 | { "Yes","Ja" }, |
439 | { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, | 439 | { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, |
440 | { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, | 440 | { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, |
441 | { "week(s) on:","Woche(n) am: " }, | 441 | { "week(s) on:","Woche(n) am: " }, |
442 | { "Full menu bar(nr)","Volle Menuleiste(bn)" }, | 442 | { "Full menu bar(nr)","Volle Menuleiste(bn)" }, |
443 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, | 443 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, |
444 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, | 444 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, |
445 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, | 445 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, |
446 | { "Daylight start:","Sommerzeit Start:" }, | 446 | { "Daylight start:","Sommerzeit Start:" }, |
447 | { "Daylight end:","Sommerzeit Ende:" }, | 447 | { "Daylight end:","Sommerzeit Ende:" }, |
448 | { "Time Zone","Zeitzone" }, | 448 | { "Time Zone","Zeitzone" }, |
449 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, | 449 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, |
450 | { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, | 450 | { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, |
451 | { "minutely","minütlich" }, | 451 | { "minutely","minütlich" }, |
452 | { "hourly","stündlich" }, | 452 | { "hourly","stündlich" }, |
453 | { "daily","täglich" }, | 453 | { "daily","täglich" }, |
454 | { "weekly","wöchentlich" }, | 454 | { "weekly","wöchentlich" }, |
455 | { "monthly","monatlich" }, | 455 | { "monthly","monatlich" }, |
456 | { "day-monthly","tag-monatlich" }, | 456 | { "day-monthly","tag-monatlich" }, |
457 | { "month-yearly","monat-jährlich" }, | 457 | { "month-yearly","monat-jährlich" }, |
458 | { "day-yearly","tag-jährlich" }, | 458 | { "day-yearly","tag-jährlich" }, |
459 | { "position-yearly","pos-jährlich" }, | 459 | { "position-yearly","pos-jährlich" }, |
460 | { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, | 460 | { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, |
461 | { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, | 461 | { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, |
462 | { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, | 462 | { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, |
463 | { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, | 463 | { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, |
464 | { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, | 464 | { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, |
465 | { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, | 465 | { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, |
466 | { "Event list view uses full window","Listenansicht nutzt Vollbild" }, | 466 | { "Event list view uses full window","Listenansicht nutzt Vollbild" }, |
467 | { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, | 467 | { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, |
468 | { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, | 468 | { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, |
469 | { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, | 469 | { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, |
470 | { "ViewChange","Ansichtswechsel" }, | 470 | { "ViewChange","Ansichtswechsel" }, |
471 | { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, | 471 | { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, |
472 | { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, | 472 | { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, |
473 | { "File","Datei" }, | 473 | { "File","Datei" }, |
474 | { "Clone...","Dupliziere..." }, | 474 | { "Clone...","Dupliziere..." }, |
475 | { "Move...","Bewege..." }, | 475 | { "Move...","Bewege..." }, |
476 | { "Beam...","Sende via IR..." }, | 476 | { "Beam...","Sende via IR..." }, |
477 | { "&Clone...","Dupliziere..." }, | 477 | { "&Clone...","Dupliziere..." }, |
478 | { "&Move...","Bewege..." }, | 478 | { "&Move...","Bewege..." }, |
479 | { "&Beam...","Sende via IR..." }, | 479 | { "&Beam...","Sende via IR..." }, |
480 | { "Show Completed","Zeige erledigte Todos" }, | 480 | { "Show Completed","Zeige erledigte Todos" }, |
481 | { "Show Quick Todo","Zeige Quick-Todo" }, | 481 | { "Show Quick Todo","Zeige Quick-Todo" }, |
482 | { "Unparent Todo","Un-sub Todo" }, | 482 | { "Unparent Todo","Un-sub Todo" }, |
483 | { "Save selected to file...","Speichere Selektierte..." }, | 483 | { "Save selected to file...","Speichere Selektierte..." }, |
484 | { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, | 484 | { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, |
485 | { "Set Categ. for selected...","Setze Kateg. für Selekt." }, | 485 | { "Set Categ. for selected...","Setze Kateg. für Selekt." }, |
486 | { "Beam via IR...","Sende via IR..." }, | 486 | { "Beam via IR...","Sende via IR..." }, |
487 | { "Search","Suchen" }, | 487 | { "Search","Suchen" }, |
488 | { "Date Picker","Datum auswählen" }, | 488 | { "Date Picker","Datum auswählen" }, |
489 | { "Day View","Tagesansicht" }, | 489 | { "Day View","Tagesansicht" }, |
490 | { "Work Week","Arbeitswoche" }, | 490 | { "Work Week","Arbeitswoche" }, |
491 | { "Week","Wochenansicht" }, | 491 | { "Week","Wochenansicht" }, |
492 | { "Month","Monatsansicht" }, | 492 | { "Month","Monatsansicht" }, |
493 | { "Todo View","Todo Liste" }, | 493 | { "Todo View","Todo Liste" }, |
494 | { "Journal","Journal" }, | 494 | { "Journal","Journal" }, |
495 | { "Next days","Nächste Tage" }, | 495 | { "Next days","Nächste Tage" }, |
496 | { "Print agenda selection...","Drucke Agendaselektion..." }, | 496 | { "Print agenda selection...","Drucke Agendaselektion..." }, |
497 | { "Toggle DateNavigator","Navigator umschalten" }, | 497 | { "Toggle DateNavigator","Navigator umschalten" }, |
498 | { "Toggle FilterView","Filteransicht umschalten" }, | 498 | { "Toggle FilterView","Filteransicht umschalten" }, |
499 | { "Prev. month","Vorheriger Monat" }, | 499 | { "Prev. month","Vorheriger Monat" }, |
500 | { "Go backward","Gehe zurück" }, | 500 | { "Go backward","Gehe zurück" }, |
501 | { "Go forward","Gehe weiter" }, | 501 | { "Go forward","Gehe weiter" }, |
502 | { "Synchronize","Synchronisieren" }, | 502 | { "Synchronize","Synchronisieren" }, |
503 | { "AgendaSize","Agendagröße" }, | 503 | { "AgendaSize","Agendagröße" }, |
504 | { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, | 504 | { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, |
505 | { "Import last file","Importiere letzte Datei" }, | 505 | { "Import last file","Importiere letzte Datei" }, |
506 | { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, | 506 | { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, |
507 | { "Save Backup...","Speichere Backup..." }, | 507 | { "Save Backup...","Speichere Backup..." }, |
508 | { "Export VCalendar","Exportiere VCalendar" }, | 508 | { "Export VCalendar","Exportiere VCalendar" }, |
509 | { "Manage new categories...","Verwalte neue Kategorien..." }, | 509 | { "Manage new categories...","Verwalte neue Kategorien..." }, |
510 | { "Beam complete calendar...","Sende kompletten Kalender..." }, | 510 | { "Beam complete calendar...","Sende kompletten Kalender..." }, |
511 | { "Beam filtered calendar...","Sende gefilterten Kalender..." }, | 511 | { "Beam filtered calendar...","Sende gefilterten Kalender..." }, |
512 | { "Remote via ssh","Über Netzwerk via ssh" }, | 512 | { "Remote via ssh","Über Netzwerk via ssh" }, |
513 | { "With local file","Mit lokaler Datei" }, | 513 | { "With local file","Mit lokaler Datei" }, |
514 | { "With last file","Mit letzter Datei" }, | 514 | { "With last file","Mit letzter Datei" }, |
515 | { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, | 515 | { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, |
516 | { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, | 516 | { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, |
517 | { "Save filename","Speichern: Dateinamen wählen" }, | 517 | { "Save filename","Speichern: Dateinamen wählen" }, |
518 | { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, | 518 | { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, |
519 | { "KO/Pi: Warning!","KO/Pi: Warnung!" }, | 519 | { "KO/Pi: Warning!","KO/Pi: Warnung!" }, |
520 | { "Overwrite!","Überschreibe!" }, | 520 | { "Overwrite!","Überschreibe!" }, |
521 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 521 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
522 | { "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, | 522 | { "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, |
523 | { "KO/Pi Confirmation","KO/Pi Bestätigung" }, | 523 | { "KO/Pi Confirmation","KO/Pi Bestätigung" }, |
524 | { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, | 524 | { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, |
525 | { "Deleting item %d ...","Lösche Eintrag %d ..." }, | 525 | { "Deleting item %d ...","Lösche Eintrag %d ..." }, |
526 | { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, | 526 | { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, |
527 | { "Size","Größe" }, | 527 | { "Size","Größe" }, |
528 | { "Date","Datum" }, | 528 | { "Date","Datum" }, |
529 | { "Mime Type","Datei Typ" }, | 529 | { "Mime Type","Datei Typ" }, |
530 | { "All Files","Alle Dateien" }, | 530 | { "All Files","Alle Dateien" }, |
531 | { "Files","Dateien" }, | 531 | { "Files","Dateien" }, |
532 | { "Documents","DoKumente" }, | 532 | { "Documents","DoKumente" }, |
533 | { "Select Categories","Selektiere Kategorien" }, | 533 | { "Select Categories","Selektiere Kategorien" }, |
534 | { " &Deselect All "," Auswahl aufheben " }, | 534 | { " &Deselect All "," Auswahl aufheben " }, |
535 | { "A&dd","Hinzu" }, | 535 | { "A&dd","Hinzu" }, |
536 | { "&Modify","Ändern" }, | 536 | { "&Modify","Ändern" }, |
537 | { "Edit Categories","Editiere Kategorien" }, | 537 | { "Edit Categories","Editiere Kategorien" }, |
538 | { " &Edit Categories "," &Editiere Kategorien " }, | 538 | { " &Edit Categories "," &Editiere Kategorien " }, |
539 | { "Beam Options","Beam Einstellungen" }, | 539 | { "Beam Options","Beam Einstellungen" }, |
540 | { " With timezone "," Mit Zeitzone " }, | 540 | { " With timezone "," Mit Zeitzone " }, |
541 | { " Local time ", " Lokale Zeit " }, | 541 | { " Local time ", " Lokale Zeit " }, |
542 | { "Manage new Categories","Verwalte neue Kategorien" }, | 542 | { "Manage new Categories","Verwalte neue Kategorien" }, |
543 | { "Add to category list","Füge zur Kategorieliste hinzu" }, | 543 | { "Add to category list","Füge zur Kategorieliste hinzu" }, |
544 | { "Remove from Events/Todos","Entferne von Terminen/Todos" }, | 544 | { "Remove from Events/Todos","Entferne von Terminen/Todos" }, |
545 | { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, | 545 | { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, |
546 | { "File format","Datei Format" }, | 546 | { "File format","Datei Format" }, |
547 | { "Time format","Zeit Format" }, | 547 | { "Time format","Zeit Format" }, |
548 | { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, | 548 | { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, |
549 | { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, | 549 | { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, |
550 | { "h","Std" }, | 550 | { "h","Std" }, |
551 | { "min","Min" }, | 551 | { "min","Min" }, |
552 | { "hou","Std" }, | 552 | { "hou","Std" }, |
553 | { "day","Tag" }, | 553 | { "day","Tag" }, |
554 | { "French","Französich" }, | 554 | { "French","Französich" }, |
555 | { "Time","Zeit" }, | 555 | { "Time","Zeit" }, |
556 | { "Event Viewer","Termin Anzeige" }, | 556 | { "Event Viewer","Termin Anzeige" }, |
557 | { "Cancel Sync","Sync Abbrechen" }, | 557 | { "Cancel Sync","Sync Abbrechen" }, |
558 | { "Remote","Fern" }, | 558 | { "Remote","Fern" }, |
559 | { "Local","Lokal" }, | 559 | { "Local","Lokal" }, |
560 | { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, | 560 | { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, |
561 | { "Local: ","Lokal: " }, | 561 | { "Local: ","Lokal: " }, |
562 | { "Remote: ","Fern: " }, | 562 | { "Remote: ","Fern: " }, |
563 | { "Last modified: ","Zuletzt geändert: " }, | 563 | { "Last modified: ","Zuletzt geändert: " }, |
564 | { "Location: ","Ort: " }, | 564 | { "Location: ","Ort: " }, |
565 | { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, | 565 | { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, |
566 | { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, | 566 | { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, |
567 | { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, | 567 | { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, |
568 | { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, | 568 | { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, |
569 | { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, | 569 | { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, |
570 | { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, | 570 | { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, |
571 | { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, | 571 | { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, |
572 | { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, | 572 | { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, |
573 | { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, | 573 | { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, |
574 | { "( %1 min before )","( %1 min vorher )" }, | 574 | { "( %1 min before )","( %1 min vorher )" }, |
575 | { "<b>Alarm on: ","<b>Alarm am: " }, | 575 | { "<b>Alarm on: ","<b>Alarm am: " }, |
576 | { "<b>Details: </b>","<b>Details: </b>" }, | 576 | { "<b>Details: </b>","<b>Details: </b>" }, |
577 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, | 577 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, |
578 | { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, | 578 | { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, |
579 | { "Organizer","Organisator" }, | 579 | { "Organizer","Organisator" }, |
580 | { "Save","Speichern" }, | 580 | { "Save","Speichern" }, |
581 | { "Exit (+save)","Beenden(+speichern)" }, | 581 | { "Exit (+save)","Beenden(+speichern)" }, |
582 | { "Home","Zuhause" }, | 582 | { "Home","Zuhause" }, |
583 | { "Office","Büro" }, | 583 | { "Office","Büro" }, |
584 | { "Library","Bibliothek" }, | 584 | { "Library","Bibliothek" }, |
585 | { "Doctor","Arzt" }, | 585 | { "Doctor","Arzt" }, |
586 | { "Beach","Strand" }, | 586 | { "Beach","Strand" }, |
587 | { "Conference room","Konferenzraum" }, | 587 | { "Conference room","Konferenzraum" }, |
588 | { "Drive Home","Heimfahrt" }, | 588 | { "Drive Home","Heimfahrt" }, |
589 | { "Watch TV","Tv gucken" }, | 589 | { "Watch TV","Tv gucken" }, |
590 | { "Phone call","Telefonanruf" }, | 590 | { "Phone call","Telefonanruf" }, |
591 | { "Pay bill","Rechnung bezahlen" }, | 591 | { "Pay bill","Rechnung bezahlen" }, |
592 | { "Read book","Buch lesen" }, | 592 | { "Read book","Buch lesen" }, |
593 | { "Watering plants","Pflanzen giessen" }, | 593 | { "Watering plants","Pflanzen giessen" }, |
594 | {"Appointment","Verabredung" }, | 594 | {"Appointment","Verabredung" }, |
595 | {"Birthday","Geburtstag" }, | 595 | {"Birthday","Geburtstag" }, |
596 | {"Business","Geschäft" }, | 596 | {"Business","Geschäft" }, |
597 | {"Business Travel","Geschäftsreise" }, | 597 | {"Business Travel","Geschäftsreise" }, |
598 | {"Cinema","Kino" }, | 598 | {"Cinema","Kino" }, |
599 | {"Customer","Kunde" }, | 599 | {"Customer","Kunde" }, |
600 | {"Break","Pause" }, | 600 | {"Break","Pause" }, |
601 | {"Breakfast","Frühstück" }, | 601 | {"Breakfast","Frühstück" }, |
602 | {"Competition","Wettkampf" }, | 602 | {"Competition","Wettkampf" }, |
603 | {"Dinner","Abendessen" }, | 603 | {"Dinner","Abendessen" }, |
604 | {"Education","Erziehung" }, | 604 | {"Education","Erziehung" }, |
605 | {"Family","Familie" }, | 605 | {"Family","Familie" }, |
606 | {"Favorites","Favoriten" }, | 606 | {"Favorites","Favoriten" }, |
607 | {"Festival","Festival" }, | 607 | {"Festival","Festival" }, |
608 | {"Fishing","Angeln" }, | 608 | {"Fishing","Angeln" }, |
609 | {"Flight","Flug" }, | 609 | {"Flight","Flug" }, |
610 | {"Gifts","Geschenk" }, | 610 | {"Gifts","Geschenk" }, |
611 | {"Holiday","Feiertag" }, | 611 | {"Holiday","Feiertag" }, |
612 | {"Holiday Cards","Ansichtskarten" }, | 612 | {"Holiday Cards","Ansichtskarten" }, |
613 | {"Hot Contacts","Heisse Kontakte" }, | 613 | {"Hot Contacts","Heisse Kontakte" }, |
614 | {"Hiking","Wandern" }, | 614 | {"Hiking","Wandern" }, |
615 | {"Hunting","Jagen" }, | 615 | {"Hunting","Jagen" }, |
616 | {"Key Customer","Wichtiger Kunde" }, | 616 | {"Key Customer","Wichtiger Kunde" }, |
617 | {"Kids","Kinder" }, | 617 | {"Kids","Kinder" }, |
618 | {"Lunch","Mittagessen" }, | 618 | {"Lunch","Mittagessen" }, |
619 | {"Meeting","Treffen" }, | 619 | {"Meeting","Treffen" }, |
620 | {"Miscellaneous","Verschiedenes" }, | 620 | {"Miscellaneous","Verschiedenes" }, |
621 | {"Partner","Partner" }, | 621 | {"Partner","Partner" }, |
622 | {"Party","Partie" }, | 622 | {"Party","Partie" }, |
623 | {"Personal","Privat" }, | 623 | {"Personal","Privat" }, |
624 | {"Personal Travel","Privatreise"}, | 624 | {"Personal Travel","Privatreise"}, |
625 | {"PHB","PHB" }, | 625 | {"PHB","PHB" }, |
626 | {"Phone Calls","Telefonanruf" }, | 626 | {"Phone Calls","Telefonanruf" }, |
627 | {"Projects","Projekt" }, | 627 | {"Projects","Projekt" }, |
628 | {"Recurring","Wiederholend" }, | 628 | {"Recurring","Wiederholend" }, |
629 | {"School","Schule" }, | 629 | {"School","Schule" }, |
630 | {"Shopping","Einkaufen" }, | 630 | {"Shopping","Einkaufen" }, |
631 | {"Speach","Rede" }, | 631 | {"Speach","Rede" }, |
632 | {"Special Occasion","Spez.Gelegenheit" }, | 632 | {"Special Occasion","Spez.Gelegenheit" }, |
633 | {"Sports","Sport" }, | 633 | {"Sports","Sport" }, |
634 | {"Talk","Vortrag" }, | 634 | {"Talk","Vortrag" }, |
635 | {"Travel","Reise" }, | 635 | {"Travel","Reise" }, |
636 | {"TV","TV" }, | 636 | {"TV","TV" }, |
637 | {"Germany","Deutschland" }, | 637 | {"Germany","Deutschland" }, |
638 | {"Sweden","Schweden" }, | 638 | {"Sweden","Schweden" }, |
639 | {"Forest","Wald" }, | 639 | {"Forest","Wald" }, |
640 | { "Desert","Wüste" }, | 640 | { "Desert","Wüste" }, |
641 | { "Kitchen","Küche" }, | 641 | { "Kitchen","Küche" }, |
642 | { "Lake","See" }, | 642 | { "Lake","See" }, |
643 | {"University","Universität"}, | 643 | {"University","Universität"}, |
644 | {"Vacation","Urlaub" }, | 644 | {"Vacation","Urlaub" }, |
645 | {"VIP","VIP" }, | 645 | {"VIP","VIP" }, |
646 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, | 646 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, |
647 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, | 647 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, |
648 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, | 648 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, |
649 | { "Cancelled","Gecancelt" }, | 649 | { "Cancelled","Gecancelt" }, |
650 | { "Multiple sync","Mehrfach Sync" }, | 650 | { "Multiple sync","Mehrfach Sync" }, |
651 | { "Local file","Lokale Datei" }, | 651 | { "Local file","Lokale Datei" }, |
652 | { "Last file","Letzte Datei" }, | 652 | { "Last file","Letzte Datei" }, |
653 | { "Keys + Colors...","Tasten + Farben..." }, | 653 | { "Keys + Colors...","Tasten + Farben..." }, |
654 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, | 654 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, |
655 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, | 655 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, |
656 | { "Choose...","Wähle..." }, | 656 | { "Choose...","Wähle..." }, |
657 | { "Use colors for application:","Setze Farben für Programm:" }, | 657 | { "Use colors for application:","Setze Farben für Programm:" }, |
658 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, | 658 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, |
659 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, | 659 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, |
660 | { "Show parent To-Do's","Zeige Ober-Todos" }, | 660 | { "Show parent To-Do's","Zeige Ober-Todos" }, |
661 | { "Show location","Zeige Orte" }, | 661 | { "Show location","Zeige Orte" }, |
662 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, | 662 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, |
663 | { "Show in every cell ","Zeige in jeder Zelle " }, | 663 | { "Show in every cell ","Zeige in jeder Zelle " }, |
664 | { "short month","kurzen Monat" }, | 664 | { "short month","kurzen Monat" }, |
665 | { "icons","Icons" }, | 665 | { "icons","Icons" }, |
666 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, | 666 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, |
667 | { "Category colors are applied to text","Kategorie Farben färben Text" }, | 667 | { "Category colors are applied to text","Kategorie Farben färben Text" }, |
668 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, | 668 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, |
669 | { "Day color odd months","Tagesfarbe ungerade Monate" }, | 669 | { "Day color odd months","Tagesfarbe ungerade Monate" }, |
670 | { "Day color even months","Tagesfarbe gerade Monate" }, | 670 | { "Day color even months","Tagesfarbe gerade Monate" }, |
671 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, | 671 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, |
672 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, | 672 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, |
673 | { "Small To-do view uses smaller font","Kleine Todo Ansicht nutzt kleineren Font" }, | 673 | { "Small To-do view uses smaller font","Kleine Todo Ansicht nutzt kleineren Font" }, |
674 | { "Colors are applied to text","Farben werden auf Text angewendet" }, | 674 | { "Colors are applied to text","Farben werden auf Text angewendet" }, |
675 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, | 675 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, |
676 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, | 676 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, |
677 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, | 677 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, |
678 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, | 678 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, |
679 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, | 679 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, |
680 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, | 680 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, |
681 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, | 681 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, |
682 | { "New profile","Neues Profil" }, | 682 | { "New profile","Neues Profil" }, |
683 | { "Clone profile","Klone Profil" }, | 683 | { "Clone profile","Klone Profil" }, |
684 | { "Delete profile","Lösche Profil" }, | 684 | { "Delete profile","Lösche Profil" }, |
685 | { "Profile:","Profil:" }, | 685 | { "Profile:","Profil:" }, |
686 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, | 686 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, |
687 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, | 687 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, |
688 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, | 688 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, |
689 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, | 689 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, |
690 | { "Write back file","Schreibe Datei zurück" }, | 690 | { "Write back file","Schreibe Datei zurück" }, |
691 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, | 691 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, |
692 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, | 692 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, |
693 | { "Local device name:","Name dieses Gerätes:" }, | 693 | { "Local device name:","Name dieses Gerätes:" }, |
694 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, | 694 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, |
695 | { "Sync preferences","Synchronisations Einstellungen" }, | 695 | { "Sync preferences","Synchronisations Einstellungen" }, |
696 | { "Profile kind","Profil Art" }, | 696 | { "Profile kind","Profil Art" }, |
697 | { "Local file","Lokale Datei" }, | 697 | { "Local file","Lokale Datei" }, |
698 | { "Local file:","Lokale Datei:" }, | 698 | { "Local file:","Lokale Datei:" }, |
699 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, | 699 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, |
700 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, | 700 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, |
701 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, | 701 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, |
702 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, | 702 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, |
703 | { "Device","Gerät:" }, | 703 | { "Device","Gerät:" }, |
704 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, | 704 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, |
705 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, | 705 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, |
706 | { "Synchronization successful","Synchronisation erfolgreich" }, | 706 | { "Synchronization successful","Synchronisation erfolgreich" }, |
707 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, | 707 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, |
708 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, | 708 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, |
709 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, | 709 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, |
710 | { "Enter password","Passwort eingeben" }, | 710 | { "Enter password","Passwort eingeben" }, |
711 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, | 711 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, |
712 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, | 712 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, |
713 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, | 713 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, |
714 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, | 714 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, |
715 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, | 715 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, |
716 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, | 716 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, |
717 | { "Enter filter name:","Neuer Filter Name:" }, | 717 | { "Enter filter name:","Neuer Filter Name:" }, |
718 | { "Add Filter","Filter hinzufügen" }, | 718 | { "Add Filter","Filter hinzufügen" }, |
719 | { "Question","Frage" }, | 719 | { "Question","Frage" }, |
720 | { "Filter position: ","Filter Position: " }, | 720 | { "Filter position: ","Filter Position: " }, |
721 | { "Month View","Monatsansicht" }, | 721 | { "Month View","Monatsansicht" }, |
722 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, | 722 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, |
723 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, | 723 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, |
724 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, | 724 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, |
725 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, | 725 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, |
726 | { "Access: ","Zugriff: " }, | 726 | { "Access: ","Zugriff: " }, |
727 | { "Needs Action","Aktion notwendig" }, | 727 | { "Needs Action","Aktion notwendig" }, |
728 | { "Accepted","Akzeptiert" }, | 728 | { "Accepted","Akzeptiert" }, |
729 | { "Declined","Abgelehnt" }, | 729 | { "Declined","Abgelehnt" }, |
730 | { "Tentative","Vorläufig" }, | 730 | { "Tentative","Vorläufig" }, |
731 | { "Delegated","Beauftragt" }, | 731 | { "Delegated","Beauftragt" }, |
732 | { "Completed","Vollständig" }, | 732 | { "Completed","Vollständig" }, |
733 | { "In Process","In Bearbeitung" }, | 733 | { "In Process","In Bearbeitung" }, |
734 | { "Participant","Teilnehmer" }, | 734 | { "Participant","Teilnehmer" }, |
735 | { "Optional Participant","Möglicher Teilnehmer" }, | 735 | { "Optional Participant","Möglicher Teilnehmer" }, |
736 | { "Observer","Beobachter" }, | 736 | { "Observer","Beobachter" }, |
737 | { "Chair","Vorsitzender" }, | 737 | { "Chair","Vorsitzender" }, |
738 | { "Not supported \non desktop!\n","" }, | 738 | { "Not supported \non desktop!\n","" }, |
739 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, | 739 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, |
740 | { "Date range: ","Datums Zeitspanne: " }, | 740 | { "Date range: ","Datums Zeitspanne: " }, |
741 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, | 741 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, |
742 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, | 742 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, |
743 | { "Add / remove events","Add./entferne Termine" }, | 743 | { "Add / remove events","Add./entferne Termine" }, |
744 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, | 744 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, |
745 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, | 745 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, |
746 | { "Overwrite","Überschreiben" }, | 746 | { "Overwrite","Überschreiben" }, |
747 | { "Sync+save","Syncen+speichern" }, | 747 | { "Sync+save","Syncen+speichern" }, |
748 | { "Default","Standard" }, | 748 | { "Default","Standard" }, |
749 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, | 749 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, |
750 | { " %d items?"," %d Einträge?" }, | 750 | { " %d items?"," %d Einträge?" }, |
751 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, | 751 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, |
752 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, | 752 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, |
753 | { "Current","Aktuelle" }, | 753 | { "Current","Aktuelle" }, |
754 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, | 754 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, |
755 | { "All","Alle" }, | 755 | { "All","Alle" }, |
756 | { "Data Loss Warning","Datenverlust Warnung" }, | 756 | { "Data Loss Warning","Datenverlust Warnung" }, |
757 | { "Proceed","Weitermachen" }, | 757 | { "Proceed","Weitermachen" }, |
758 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, | 758 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, |
759 | { "Filter disabled ","Filter abgeschaltet" }, | 759 | { "Filter disabled ","Filter abgeschaltet" }, |
760 | { "Filter selected: ","Gewählter Filter: " }, | 760 | { "Filter selected: ","Gewählter Filter: " }, |
761 | { "Toggle Cancel","Gecancelt ändern" }, | 761 | { "Toggle Cancel","Gecancelt ändern" }, |
762 | { "&Toggle Cancel","Gecancel&t ändern" }, | 762 | { "&Toggle Cancel","Gecancel&t ändern" }, |
763 | { "Configure Toolbar","Konfiguriere Toolbar" }, | 763 | { "Configure Toolbar","Konfiguriere Toolbar" }, |
764 | { "Stretched TB","Gedehnte TB" }, | 764 | { "Stretched TB","Gedehnte TB" }, |
765 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, | 765 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, |
766 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, | 766 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, |
767 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, | 767 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, |
768 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, | 768 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, |
769 | { "Imported file successfully","Datei erfolgreich importiert" }, | 769 | { "Imported file successfully","Datei erfolgreich importiert" }, |
770 | { "Error importing file","Fehler beim Importieren der Datei" }, | 770 | { "Error importing file","Fehler beim Importieren der Datei" }, |
771 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, | 771 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, |
772 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, | 772 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, |
773 | { "Overwrite!","Überschreiben!" }, | 773 | { "Overwrite!","Überschreiben!" }, |
774 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, | 774 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, |
775 | { "Load backup filename","Lade Backup Dateiname" }, | 775 | { "Load backup filename","Lade Backup Dateiname" }, |
776 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, | 776 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, |
777 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, | 777 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, |
778 | { "Save backup filename","Speichere Backup Dateiname" }, | 778 | { "Save backup filename","Speichere Backup Dateiname" }, |
779 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, | 779 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, |
780 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 780 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
781 | { "Details of attendee","Teilnehmerdetails" }, | 781 | { "Details of attendee","Teilnehmerdetails" }, |
782 | { "Work phone:\n","Telefon Arbeit:\n" }, | 782 | { "Work phone:\n","Telefon Arbeit:\n" }, |
783 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, | 783 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, |
784 | { "Home phone:\n","Telefon privat:\n" }, | 784 | { "Home phone:\n","Telefon privat:\n" }, |
785 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, | 785 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, |
786 | { "Email:\n","Email:\n" }, | 786 | { "Email:\n","Email:\n" }, |
787 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, | 787 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, |
788 | { "Audio Al.: ","Audio Al.: " }, | 788 | { "Audio Al.: ","Audio Al.: " }, |
789 | { "Proc.Al.: ","Proz.Al.: " }, | 789 | { "Proc.Al.: ","Proz.Al.: " }, |
790 | { "No sound set","Kein Sound definiert" }, | 790 | { "No sound set","Kein Sound definiert" }, |
791 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, | 791 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, |
792 | { "No program set","Kein Programm definiert" }, | 792 | { "No program set","Kein Programm definiert" }, |
793 | { "Running '%1'","Ausführen '%1'" }, | 793 | { "Running '%1'","Ausführen '%1'" }, |
794 | { "Playing '%1'","Abspielen '%1'" }, | 794 | { "Playing '%1'","Abspielen '%1'" }, |
795 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 795 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, |
796 | { "Load!","Laden!" }, | 796 | { "Load!","Laden!" }, |
797 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, | 797 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, |
798 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, | 798 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, |
799 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, | 799 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, |
800 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, | 800 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, |
801 | { "Features + hints...","Eigenschaften + Tipps..." }, | 801 | { "Features + hints...","Eigenschaften + Tipps..." }, |
802 | { "User translation...","Benutzer Übersetzung..." }, | 802 | { "User translation...","Benutzer Übersetzung..." }, |
803 | { "Sync HowTo...","Synchronisation HowTo..." }, | 803 | { "Sync HowTo...","Synchronisation HowTo..." }, |
804 | { "Print calendar...","Drucke Kalender..." }, | 804 | { "Print calendar...","Drucke Kalender..." }, |
805 | { "Anniversary","Jahrestag" }, | 805 | { "Anniversary","Jahrestag" }, |
806 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, | 806 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, |
807 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, | 807 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, |
808 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, | 808 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, |
809 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, | 809 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, |
810 | { "<b>Access: </b>","<b>Zugriff: </b>" }, | 810 | { "<b>Access: </b>","<b>Zugriff: </b>" }, |
811 | { "(%1 min before)","(%1 min vorher)" }, | 811 | { "(%1 min before)","(%1 min vorher)" }, |
812 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, | 812 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, |
813 | { "Save Journal/Description...","Speichere Journal/Details..." }, | 813 | { "Save Journal/Description...","Speichere Journal/Details..." }, |
814 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, | 814 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, |
815 | { "Continue","Weitermachen" }, | 815 | { "Continue","Weitermachen" }, |
816 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, | 816 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, |
817 | { "Attendee:","Teilnehmer:" }, | 817 | { "Attendee:","Teilnehmer:" }, |
818 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, | 818 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, |
819 | { "On day ","Am Tag " }, | 819 | { "On day ","Am Tag " }, |
820 | { "%1 of ","%1 des Monats" }, | 820 | { "%1 of ","%1 des Monats" }, |
821 | { "%1 of the year","%1 des Jahres" }, | 821 | { "%1 of the year","%1 des Jahres" }, |
822 | { "Anonymous","Anonymo" }, | 822 | { "Anonymous","Anonymo" }, |
823 | { "nobody@nowhere","niemand@nirgendwo" }, | 823 | { "nobody@nowhere","niemand@nirgendwo" }, |
824 | { "calendar.html","calendar.html" }, | 824 | { "calendar.html","calendar.html" }, |
825 | { " Local Time"," Lokale Zeit" }, | 825 | { " Local Time"," Lokale Zeit" }, |
826 | { "Unknown Name","Unbekannter Name" }, | 826 | { "Unknown Name","Unbekannter Name" }, |
827 | { "unknown@nowhere","unbekannt@nirgendwo" }, | 827 | { "unknown@nowhere","unbekannt@nirgendwo" }, |
828 | { "Beam via IR!","Beam via IR!" }, | 828 | { "Beam via IR!","Beam via IR!" }, |
829 | { "Next Month","Nächster Monat" }, | 829 | { "Next Month","Nächster Monat" }, |
830 | { "Prio","Prio" }, | 830 | { "Prio","Prio" }, |
831 | { "Reparent Todo","Mache Sub-Todo" }, | 831 | { "Reparent Todo","Mache Sub-Todo" }, |
832 | { "tomorrow","morgen" }, | 832 | { "tomorrow","morgen" }, |
833 | { "today","heute" }, | 833 | { "today","heute" }, |
834 | { "yesterday","gestern" }, | 834 | { "yesterday","gestern" }, |
835 | { "Ok","Ok" }, | 835 | { "Ok","Ok" }, |
836 | { "Ok+Agenda","Ok+Agenda" }, | 836 | { "Ok+Agenda","Ok+Agenda" }, |
837 | { "Email","Email" }, | 837 | { "Email","Email" }, |
838 | { "RSVP","RSVP" }, | 838 | { "RSVP","RSVP" }, |
839 | { "Email:","Email:" }, | 839 | { "Email:","Email:" }, |
840 | { "Appointment Time ","Termin Zeit " }, | 840 | { "Appointment Time ","Termin Zeit " }, |
841 | { "2","2" }, | 841 | { "2","2" }, |
842 | { "3","3" }, | 842 | { "3","3" }, |
843 | { "4","4" }, | 843 | { "4","4" }, |
844 | { " 0 %"," 0 %" }, | 844 | { " 0 %"," 0 %" }, |
845 | { " 20 %"," 20 %" }, | 845 | { " 20 %"," 20 %" }, |
846 | { " 40 %"," 40 %" }, | 846 | { " 40 %"," 40 %" }, |
847 | { " 60 %"," 60 %" }, | 847 | { " 60 %"," 60 %" }, |
848 | { " 80 %"," 80 %" }, | 848 | { " 80 %"," 80 %" }, |
849 | { "100 %","100 %" }, | 849 | { "100 %","100 %" }, |
850 | { "Filter","Filter" }, | 850 | { "Filter","Filter" }, |
851 | { "Configure","Konfiguriere" }, | 851 | { "Configure","Konfiguriere" }, |
852 | { "What's Next","What's Next" }, | 852 | { "What's Next","What's Next" }, |
853 | { "Complete calendar...","Kompletten Kalender..." }, | 853 | { "Complete calendar...","Kompletten Kalender..." }, |
854 | { "Filtered calendar...","Gefilterten Kalender..." }, | 854 | { "Filtered calendar...","Gefilterten Kalender..." }, |
855 | { "Export to phone","Exportiere zum Handy" }, | 855 | { "Export to phone","Exportiere zum Handy" }, |
856 | { "Beam receive enabled","Beam Empfang an" }, | 856 | { "Beam receive enabled","Beam Empfang an" }, |
857 | { "What's new?","Was ist neu?" }, | 857 | { "What's new?","Was ist neu?" }, |
858 | { "FAQ...","FAQ..." }, | 858 | { "FAQ...","FAQ..." }, |
859 | { "Licence...","Licence..." }, | 859 | { "Licence...","Licence..." }, |
860 | { "What's This?","What's This?" }, | 860 | { "What's This?","What's This?" }, |
861 | { "&Edit...","Bearbeite..." }, | 861 | { "&Edit...","Bearbeite..." }, |
862 | { "Oktober","Oktober" }, | 862 | { "Oktober","Oktober" }, |
863 | { "Title","Titel" }, | 863 | { "Title","Titel" }, |
864 | { "%1 %","%1 %" }, | 864 | { "%1 %","%1 %" }, |
865 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, | 865 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, |
866 | { "Import!","Importiere!" }, | 866 | { "Import!","Importiere!" }, |
867 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, | 867 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, |
868 | { "Export to phone options","Export ans Handy Optionen" }, | 868 | { "Export to phone options","Export ans Handy Optionen" }, |
869 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, | 869 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, |
870 | { "I/O device: ","I/O device: " }, | 870 | { "I/O device: ","I/O device: " }, |
871 | { "Connection: ","Connection: " }, | 871 | { "Connection: ","Connection: " }, |
872 | { "Model(opt.): ","Model(opt.): " }, | 872 | { "Model(opt.): ","Model(opt.): " }, |
873 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, | 873 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, |
874 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, | 874 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, |
875 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, | 875 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, |
876 | { "Export to mobile phone!","Exportiere auf das Handy!" }, | 876 | { "Export to mobile phone!","Exportiere auf das Handy!" }, |
877 | { "Export complete calendar","Exportiere kompletten Kalender" }, | 877 | { "Export complete calendar","Exportiere kompletten Kalender" }, |
878 | { "Writing to phone...","Sende Daten ans Handy..." }, | 878 | { "Writing to phone...","Sende Daten ans Handy..." }, |
879 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, | 879 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, |
880 | { "Retry","Nochmal versuchen" }, | 880 | { "Retry","Nochmal versuchen" }, |
881 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, | 881 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, |
882 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, | 882 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, |
883 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, | 883 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, |
884 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, | 884 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, |
885 | { "Preferences","Vorlieben" }, | 885 | { "Preferences","Vorlieben" }, |
886 | { "Global","Global" }, | 886 | { "Global","Global" }, |
887 | { "Phone","Phone" }, | 887 | { "Phone","Phone" }, |
888 | { "SMS","SMS" }, | 888 | { "SMS","SMS" }, |
889 | { "Fax","Fax" }, | 889 | { "Fax","Fax" }, |
890 | { "Pager","Pager" }, | 890 | { "Pager","Pager" }, |
891 | { "SIP","SIP" }, | 891 | { "SIP","SIP" }, |
892 | { "Italian","Italienisch" }, | 892 | { "Italian","Italienisch" }, |
893 | { "24:00","24:00" }, | 893 | { "24:00","24:00" }, |
894 | { "12:00am","12:00am" }, | 894 | { "12:00am","12:00am" }, |
895 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 895 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
896 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 896 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
897 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 897 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
898 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 898 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
899 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 899 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
900 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, | 900 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
901 | { "Used Mail Client","Benutzter Mail Client" }, | 901 | { "Used Mail Client","Benutzter Mail Client" }, |
902 | { "Channel:","Channel:" }, | 902 | { "Channel:","Channel:" }, |
903 | { "Message:","Message:" }, | 903 | { "Message:","Message:" }, |
904 | { "Parameters:","Parameter:" }, | 904 | { "Parameters:","Parameter:" }, |
905 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 905 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
906 | { "extra Message:","extra Message:" }, | 906 | { "extra Message:","extra Message:" }, |
907 | { "extra Parameters:","extra Parameter:" }, | 907 | { "extra Parameters:","extra Parameter:" }, |
908 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 908 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
909 | { "External Apps.","Externe Appl." }, | 909 | { "External Apps.","Externe Appl." }, |
910 | { "24 hours","24 Std." }, | 910 | { "24 hours","24 Std." }, |
911 | { "3 hours","3 Std." }, | 911 | { "3 hours","3 Std." }, |
912 | { "1 hour","1 Std." }, | 912 | { "1 hour","1 Std." }, |
913 | { "15 minutes","15 Min." }, | 913 | { "15 minutes","15 Min." }, |
914 | { "5 minutes","5 Min." }, | 914 | { "5 minutes","5 Min." }, |
915 | { "1 minute","1 Min." }, | 915 | { "1 minute","1 Min." }, |
916 | { "23","23" }, | 916 | { "23","23" }, |
917 | { "Mon 15","Mon 15" }, | 917 | { "Mon 15","Mon 15" }, |
918 | { "Configure KO","Konfiguriere KO" }, | 918 | { "Configure KO","Konfiguriere KO" }, |
919 | { "Event text","Termin Text" }, | 919 | { "Event text","Termin Text" }, |
920 | { "ToDo","Todo" }, | 920 | { "ToDo","Todo" }, |
921 | { "Today","Heute" }, | 921 | { "Today","Heute" }, |
922 | { "What's Next View","What's Next Ansicht" }, | 922 | { "What's Next View","What's Next Ansicht" }, |
923 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, | 923 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, |
924 | { "Alarm","Alarm" }, | 924 | { "Alarm","Alarm" }, |
925 | { "Used %1 Client","Benutzter %1 Client" }, | 925 | { "Used %1 Client","Benutzter %1 Client" }, |
926 | { "No email client installed","Kein Email Klient installiert" }, | 926 | { "No email client installed","Kein Email Klient installiert" }, |
927 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 927 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
928 | { "OM/Pi email client","OM/Pi Email Klient" }, | 928 | { "OM/Pi email client","OM/Pi Email Klient" }, |
929 | { "Include in multiple ","Beziehe in multiple " }, | 929 | { "Include in multiple ","Beziehe in multiple " }, |
930 | { "calendar ","Kalender " }, | 930 | { "calendar ","Kalender " }, |
931 | { "addressbook ","Adressbuch " }, | 931 | { "addressbook ","Adressbuch " }, |
932 | { "pwmanager","PWmanager" }, | 932 | { "pwmanager","PWmanager" }, |
933 | { " sync"," Sync ein" }, | 933 | { " sync"," Sync ein" }, |
934 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, | 934 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, |
935 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, | 935 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, |
936 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, | 936 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, |
937 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, | 937 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, |
938 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, | 938 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, |
939 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, | 939 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, |
940 | { "Help...","Hilfe..." }, | 940 | { "Help...","Hilfe..." }, |
941 | { "Local file Cal:","Lokale Datei Kal:" }, | 941 | { "Local file Cal:","Lokale Datei Kal:" }, |
942 | { "Local file ABook:","Lokale Datei ABuch:" }, | 942 | { "Local file ABook:","Lokale Datei ABuch:" }, |
943 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, | 943 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, |
944 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, | 944 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, |
945 | { "Calendar:","Kalender:" }, | 945 | { "Calendar:","Kalender:" }, |
946 | { "AddressBook:","AdressBuch:" }, | 946 | { "AddressBook:","AdressBuch:" }, |
947 | { "PWManager:","PWManager:" }, | 947 | { "PWManager:","PWManager:" }, |
948 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, | 948 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, |
949 | { "ssh/scp","ssh/scp" }, | 949 | { "ssh/scp","ssh/scp" }, |
950 | { "ftp","ftp" }, | 950 | { "ftp","ftp" }, |
951 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, | 951 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, |
952 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, | 952 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, |
953 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, | 953 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, |
954 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, | 954 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, |
955 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, | 955 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, |
956 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, | 956 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, |
957 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, | 957 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, |
958 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, | 958 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, |
959 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, | 959 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, |
960 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 960 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
961 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, | 961 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, |
962 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, | 962 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, |
963 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, | 963 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, |
964 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, | 964 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, |
965 | { "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!" }, | 965 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen "Multi-Syncen"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, |
966 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 966 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
967 | { "Multiple profiles","Multi-Sync Profile" }, | 967 | { "Multiple profiles","Multi-Sync Profile" }, |
968 | { "Device: ","Gerät: " }, | 968 | { "Device: ","Gerät: " }, |
969 | { "Multiple sync started.","Multi-Sync gestartet." }, | 969 | { "Multiple sync started.","Multi-Sync gestartet." }, |
970 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 970 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
971 | { "Turn filter on","Schalte Filter an" }, | 971 | { "Turn filter on","Schalte Filter an" }, |
972 | { "Turn filter off","Schalte Filter aus" }, | 972 | { "Turn filter off","Schalte Filter aus" }, |
973 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 973 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
974 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 974 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
975 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 975 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
976 | { "<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" }, | 976 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, |
977 | { "<p><b>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" }, | 977 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, |
978 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, | 978 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, |
979 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, | 979 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, |
980 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, | 980 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, |
981 | { "<p><b>(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" }, | 981 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, |
982 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 982 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
983 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 983 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
984 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 984 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
985 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 985 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
986 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 986 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, |
987 | { "<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" }, | 987 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, |
988 | { "<p><b>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" }, | 988 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, |
989 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 989 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
990 | { "<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" }, | 990 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, |
991 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 991 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
992 | { "<p><b>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" }, | 992 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, |
993 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 993 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
994 | { "<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" }, | 994 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, |
995 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, | 995 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, |
996 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 996 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
997 | { "<p><b>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" }, | 997 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, |
998 | { "<p><b>shift+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" }, | 998 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, |
999 | { "<p><b>shift+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" }, | 999 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, |
1000 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1000 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1001 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1001 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1002 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1002 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1003 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1003 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1004 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1004 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1005 | { "<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" }, | 1005 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, |
1006 | { "<p><b>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" }, | 1006 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, |
1007 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1007 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1008 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1008 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1009 | { "<p><b>+,-</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" }, | 1009 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, |
1010 | { "<p><b>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" }, | 1010 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, |
1011 | { "<p><b>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" }, | 1011 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, |
1012 | { "<p><b>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" }, | 1012 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, |
1013 | { "<p><b>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" }, | 1013 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, |
1014 | { "<p><b>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" }, | 1014 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, |
1015 | { "<p><b>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" }, | 1015 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, |
1016 | { "<p><b>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 " }, | 1016 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, |
1017 | { "<p><b>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" }, | 1017 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, |
1018 | { "<p><b>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" }, | 1018 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, |
1019 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1019 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, |
1020 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1020 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, |
1021 | { "<p><b>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" }, | 1021 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, |
1022 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1022 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1023 | { "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" }, | 1023 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, |
1024 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1024 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1025 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1025 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1026 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1026 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1027 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, | 1027 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, |
1028 | { "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" }, | 1028 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, |
1029 | { "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" }, | 1029 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, |
1030 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1030 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1031 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1031 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1032 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1032 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1033 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1033 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1034 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1034 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1035 | { "From: ","Von: " }, | 1035 | { "From: ","Von: " }, |
1036 | { "Remove sync info","Entferne Sync Info" }, | 1036 | { "Remove sync info","Entferne Sync Info" }, |
1037 | { "For all profiles","Für alle Profile" }, | 1037 | { "For all profiles","Für alle Profile" }, |
1038 | { "Hide not Running","Verstecke nicht Laufende" }, | 1038 | { "Hide not Running","Verstecke nicht Laufende" }, |
1039 | { "ME","ME" }, | 1039 | { "ME","ME" }, |
1040 | { "Toolbar","Toolbar" }, | 1040 | { "Toolbar","Toolbar" }, |
1041 | { "Undo Delete...","UNDO Löschen..." }, | 1041 | { "Undo Delete...","UNDO Löschen..." }, |
1042 | { "Undo Delete","Löschen rückgängig machen" }, | 1042 | { "Undo Delete","Löschen rückgängig machen" }, |
1043 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1043 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1044 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1044 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1045 | { "Januar","Januar" }, | 1045 | { "Januar","Januar" }, |
1046 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1046 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1047 | { "No Filter","Kein Filter" }, | 1047 | { "No Filter","Kein Filter" }, |
1048 | { "Multiple Sync options","Multi Sync Optionen" }, | 1048 | { "Multiple Sync options","Multi Sync Optionen" }, |
1049 | { "Sync algo options","Sync Ablauf Optionen" }, | 1049 | { "Sync algo options","Sync Ablauf Optionen" }, |
1050 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1050 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1051 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1051 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1052 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1052 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1053 | { "Write back options","Optionen zum Zurückschreiben" }, | 1053 | { "Write back options","Optionen zum Zurückschreiben" }, |
1054 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1054 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1055 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1055 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1056 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1056 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1057 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1057 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1058 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1058 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1059 | { "Time period","Zeitspanne" }, | 1059 | { "Time period","Zeitspanne" }, |
1060 | { "From ","Von " }, | 1060 | { "From ","Von " }, |
1061 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1061 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1062 | { " weeks in the future "," Wochen in der Zukunft " }, | 1062 | { " weeks in the future "," Wochen in der Zukunft " }, |
1063 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1063 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1064 | { "Local temp file:","Lokale temp Datei:" }, | 1064 | { "Local temp file:","Lokale temp Datei:" }, |
1065 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1065 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1066 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1066 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1067 | { "Language","Sprache" }, | 1067 | { "Language","Sprache" }, |
1068 | { "Time Format","Zeit Format" }, | 1068 | { "Time Format","Zeit Format" }, |
1069 | { "Time Zone","Zeit Zone" }, | 1069 | { "Time Zone","Zeit Zone" }, |
1070 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1070 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1071 | { "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" }, | 1071 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, |
1072 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1072 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1073 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1073 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1074 | { "Save settings","Speichere Einstellungen" }, | 1074 | { "Save settings","Speichere Einstellungen" }, |
1075 | { "Save standard","Speichere Standard" }, | 1075 | { "Save standard","Speichere Standard" }, |
1076 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1076 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1077 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1077 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1078 | { "Data storage path","Daten Speicherpfad" }, | 1078 | { "Data storage path","Daten Speicherpfad" }, |
1079 | { "Language","Sprache" }, | 1079 | { "Language","Sprache" }, |
1080 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1080 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1081 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1081 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1082 | { "Show events that are done","Zeige abgelaufene Termine" }, | 1082 | { "Show events that are done","Zeige abgelaufene Termine" }, |
1083 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1083 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1084 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1084 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1085 | { "KO/Pi","KO/Pi" }, | 1085 | { "KO/Pi","KO/Pi" }, |
1086 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1086 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1087 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1087 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1088 | { "Sound.Al.: ","Sound.Al.: " }, | 1088 | { "Sound.Al.: ","Sound.Al.: " }, |
1089 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1089 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1090 | { "Restore","Wiederherstellen" }, | 1090 | { "Restore","Wiederherstellen" }, |
1091 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklich\nwiederherstellen?" }, | 1091 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklich\nwiederherstellen?" }, |
1092 | { "% completed","% erledigt" }, | 1092 | { "% completed","% erledigt" }, |
1093 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1093 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1094 | { "Set complete","Setze auf erledigt" }, | 1094 | { "Set complete","Setze auf erledigt" }, |
1095 | { "(cancelled)","(gecancelt)" }, | 1095 | { "(cancelled)","(gecancelt)" }, |
1096 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1096 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1097 | { " Local time "," Lokale Zeit " }, | 1097 | { " Local time "," Lokale Zeit " }, |
1098 | { "Form2","Form2" }, | 1098 | { "Form2","Form2" }, |
1099 | { "Filter enabled","Filter angeschaltet" }, | 1099 | { "Filter enabled","Filter angeschaltet" }, |
1100 | { "Edit Filters","Ändere Filter" }, | 1100 | { "Edit Filters","Ändere Filter" }, |
1101 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1101 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1102 | { "Agenda","Agenda" }, | 1102 | { "Agenda","Agenda" }, |
1103 | { " ("," (" }, | 1103 | { " ("," (" }, |
1104 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1104 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1105 | { "Print","Print" }, | 1105 | { "Print","Print" }, |
1106 | { "&Setup Printer...","Drucker &Setup..." }, | 1106 | { "&Setup Printer...","Drucker &Setup..." }, |
1107 | { "View Type","Zeige Typ" }, | 1107 | { "View Type","Zeige Typ" }, |
1108 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1108 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1109 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1109 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1110 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1110 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1111 | { "Portrait","Portrait" }, | 1111 | { "Portrait","Portrait" }, |
1112 | { "Landscape","Landschaft" }, | 1112 | { "Landscape","Landschaft" }, |
1113 | { "Print day","Drucke Tag" }, | 1113 | { "Print day","Drucke Tag" }, |
1114 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1114 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1115 | { "Date && Time Range","Datum && Zeitspanne" }, | 1115 | { "Date && Time Range","Datum && Zeitspanne" }, |
1116 | { "&End date:","&Enddatum:" }, | 1116 | { "&End date:","&Enddatum:" }, |
1117 | { "&Start date:","&Startdatum:" }, | 1117 | { "&Start date:","&Startdatum:" }, |
1118 | { "Start &time:","Startzeit:" }, | 1118 | { "Start &time:","Startzeit:" }, |
1119 | { "End ti&me:","Endzeit:" }, | 1119 | { "End ti&me:","Endzeit:" }, |
1120 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1120 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1121 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1121 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1122 | { "Alt+D","Alt+D" }, | 1122 | { "Alt+D","Alt+D" }, |
1123 | { "&Use colors","Nutze Farben" }, | 1123 | { "&Use colors","Nutze Farben" }, |
1124 | { "Alt+U","Alt+U" }, | 1124 | { "Alt+U","Alt+U" }, |
1125 | { "Print week","Drucke Woche" }, | 1125 | { "Print week","Drucke Woche" }, |
1126 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1126 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1127 | { "Use &colors","Nutze Farben" }, | 1127 | { "Use &colors","Nutze Farben" }, |
1128 | { "Type of View","Typ der Ansicht" }, | 1128 | { "Type of View","Typ der Ansicht" }, |
1129 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1129 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1130 | { "Alt+F","Alt+F" }, | 1130 | { "Alt+F","Alt+F" }, |
1131 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1131 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1132 | { "Alt+T","Alt+T" }, | 1132 | { "Alt+T","Alt+T" }, |
1133 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1133 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1134 | { "Print month","Drucke Monat" }, | 1134 | { "Print month","Drucke Monat" }, |
1135 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1135 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1136 | { "&Start month:","&Startmonat:" }, | 1136 | { "&Start month:","&Startmonat:" }, |
1137 | { "&End month:","&Endmonat:" }, | 1137 | { "&End month:","&Endmonat:" }, |
1138 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1138 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1139 | { "Print todos","Drucke Todos" }, | 1139 | { "Print todos","Drucke Todos" }, |
1140 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1140 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1141 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1141 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1142 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1142 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1143 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1143 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1144 | { "Items to Print","Zu druckende Items" }, | 1144 | { "Items to Print","Zu druckende Items" }, |
1145 | { "&From:","Von:" }, | 1145 | { "&From:","Von:" }, |
1146 | { "&To:","Bis:" }, | 1146 | { "&To:","Bis:" }, |
1147 | { "Print &all todo items","Drucke alle Todo Items" }, | 1147 | { "Print &all todo items","Drucke alle Todo Items" }, |
1148 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1148 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1149 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1149 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1150 | { "Todo List","Todo Liste" }, | 1150 | { "Todo List","Todo Liste" }, |
1151 | { "&Title:","&Titel:" }, | 1151 | { "&Title:","&Titel:" }, |
1152 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, | 1152 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, |
1153 | { "Todo list","Todo Liste" }, | 1153 | { "Todo list","Todo Liste" }, |
1154 | { "&Print...","Drucke..." }, | 1154 | { "&Print...","Drucke..." }, |
1155 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1155 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1156 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1156 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1157 | { "OK","OK" }, | 1157 | { "OK","OK" }, |
1158 | { "FilterEditor","FilterEditor" }, | 1158 | { "FilterEditor","FilterEditor" }, |
1159 | { "Include","Inclusive" }, | 1159 | { "Include","Inclusive" }, |
1160 | { "Exclude","Exclusive" }, | 1160 | { "Exclude","Exclusive" }, |
1161 | { "Edit Selection...","Editiere Auswahl" }, | 1161 | { "Edit Selection...","Editiere Auswahl" }, |
1162 | { "recurring events","wiederholende Termine" }, | 1162 | { "recurring events","wiederholende Termine" }, |
1163 | { "recurr. events","wiederh.Termine" }, | 1163 | { "recurr. events","wiederh.Termine" }, |
1164 | { "completed to-dos","erledigte Todos" }, | 1164 | { "completed to-dos","erledigte Todos" }, |
1165 | { "events","Termine" }, | 1165 | { "events","Termine" }, |
1166 | { "todos","Todos" }, | 1166 | { "todos","Todos" }, |
1167 | { "journals","Journale" }, | 1167 | { "journals","Journale" }, |
1168 | { "public","öffentl." }, | 1168 | { "public","öffentl." }, |
1169 | { "private","privat" }, | 1169 | { "private","privat" }, |
1170 | { "confidential","vertraul." }, | 1170 | { "confidential","vertraul." }, |
1171 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, | 1171 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, |
1172 | { "Yesterday","Gestern" }, | 1172 | { "Yesterday","Gestern" }, |
1173 | { "Day after tomorrow","Übermorgen" }, | 1173 | { "Day after tomorrow","Übermorgen" }, |
1174 | { "Tomorrow","Morgen" }, | 1174 | { "Tomorrow","Morgen" }, |
1175 | { "Day before yesterday","Vorgestern" }, | 1175 | { "Day before yesterday","Vorgestern" }, |
1176 | { "Size %1","Größe %1" }, | 1176 | { "Size %1","Größe %1" }, |
1177 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1177 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1178 | { " (%1 y.)"," (%1 J.)" }, | 1178 | { " (%1 y.)"," (%1 J.)" }, |
1179 | { "Allday:","Ganztägig:" }, | 1179 | { "Allday:","Ganztägig:" }, |
1180 | { "compl.todos","erled.Todos" }, | 1180 | { "compl.todos","erled.Todos" }, |
1181 | { "Day view","Tagesansicht" }, | 1181 | { "Day view","Tagesansicht" }, |
1182 | { "Next days","Nächste Tage" }, | 1182 | { "Next days","Nächste Tage" }, |
1183 | { "Next week","Nächste Woche" }, | 1183 | { "Next week","Nächste Woche" }, |
1184 | { "Next two weeks","Nächste zwei Wochen" }, | 1184 | { "Next two weeks","Nächste zwei Wochen" }, |
1185 | { "This month","Dieser Monat" }, | 1185 | { "This month","Dieser Monat" }, |
1186 | { "Journal view","Journal" }, | 1186 | { "Journal view","Journal" }, |
1187 | { "Display all opened","Zeige alle geöffnet" }, | 1187 | { "Display all opened","Zeige alle geöffnet" }, |
1188 | { "Display all closed","Zeige alle geschlossen" }, | 1188 | { "Display all closed","Zeige alle geschlossen" }, |
1189 | { "Display all flat","Zeige alle flach" }, | 1189 | { "Display all flat","Zeige alle flach" }, |
1190 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1190 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1191 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1191 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1192 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1192 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1193 | { "Select Week","Wähle Woche" }, | 1193 | { "Select Week","Wähle Woche" }, |
1194 | { "Set alarm...","Setze Alarm..." }, | 1194 | { "Set alarm...","Setze Alarm..." }, |
1195 | { "Set Alarm!","Setze Alarm!" }, | 1195 | { "Set Alarm!","Setze Alarm!" }, |
1196 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, | 1196 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, |
1197 | { " and "," und " }, | 1197 | { " and "," und " }, |
1198 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1198 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1199 | { "Mail to selected","Mail an Ausgewählte" }, | 1199 | { "Mail to selected","Mail an Ausgewählte" }, |
1200 | { "Mail to all","Mail an Alle" }, | 1200 | { "Mail to all","Mail an Alle" }, |
1201 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1201 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1202 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1202 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1203 | { " on"," am" }, | 1203 | { " on"," am" }, |
1204 | { " completed on "," erledigt am " }, | 1204 | { " completed on "," erledigt am " }, |
1205 | { "Save as Event template","Speichere als Vorlage" }, | 1205 | { "Save as Event template","Speichere als Vorlage" }, |
1206 | { "Load Event template","Lade Termin Vorlage" }, | 1206 | { "Load Event template","Lade Termin Vorlage" }, |
1207 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1207 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1208 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1208 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1209 | { "Sub todos:<br>","Unter-Todos:<br>" }, | 1209 | { "Sub todos:<br>","Unter-Todos:<br>" }, |
1210 | { "Parent todo:<br>","Über-Todo:<br>" }, | 1210 | { "Parent todo:<br>","Über-Todo:<br>" }, |
1211 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1211 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1212 | { " completed"," erledigt" }, | 1212 | { " completed"," erledigt" }, |
1213 | { "(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!" }, | 1213 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, |
1214 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1214 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1215 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1215 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1216 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1216 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1217 | { "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?" }, | 1217 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, |
1218 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1218 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1219 | { "Error","Fehler" }, | 1219 | { "Error","Fehler" }, |
1220 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1220 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1221 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1221 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1222 | { "Warning","Warnung" }, | 1222 | { "Warning","Warnung" }, |
1223 | { "Select week number","Wähle Wochen Nummer" }, | 1223 | { "Select week number","Wähle Wochen Nummer" }, |
1224 | { "Februar","Februar" }, | 1224 | { "Februar","Februar" }, |
1225 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1225 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1226 | { "W","W" }, | 1226 | { "W","W" }, |
1227 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1227 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1228 | { "T: %1","T: %1" }, | 1228 | { "T: %1","T: %1" }, |
1229 | { "Start: ","Start: " }, | 1229 | { "Start: ","Start: " }, |
1230 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1230 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1231 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1231 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1232 | { "Remote IP address:","Ferne IP Adresse:" }, | 1232 | { "Remote IP address:","Ferne IP Adresse:" }, |
1233 | { "Remote port number:","Ferne Port Nummer:" }, | 1233 | { "Remote port number:","Ferne Port Nummer:" }, |
1234 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1234 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1235 | { "Remote from: ","Fern von: " }, | 1235 | { "Remote from: ","Fern von: " }, |
1236 | { "Local from: ","Lokal von: " }, | 1236 | { "Local from: ","Lokal von: " }, |
1237 | { "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" }, | 1237 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, |
1238 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1238 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1239 | { "Write back","Schreibe zurück" }, | 1239 | { "Write back","Schreibe zurück" }, |
1240 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1240 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1241 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1241 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1242 | { "Received sync request","Sync Anfrage erhalten" }, | 1242 | { "Received sync request","Sync Anfrage erhalten" }, |
1243 | { "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." }, | 1243 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, |
1244 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1244 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1245 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1245 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1246 | { "Sending file...","Sende Datei..." }, | 1246 | { "Sending file...","Sende Datei..." }, |
1247 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1247 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1248 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1248 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1249 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1249 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1250 | { "Writing file to disk...","Speichere Datei..." }, | 1250 | { "Writing file to disk...","Speichere Datei..." }, |
1251 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1251 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1252 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1252 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1253 | { "Synchronize!","Synchronisiere!" }, | 1253 | { "Synchronize!","Synchronisiere!" }, |
1254 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1254 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1255 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1255 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1256 | { "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!" }, | 1256 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, |
1257 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1257 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1258 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1258 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1259 | { "List week view","Listenwochenansicht" }, | 1259 | { "List week view","Listenwochenansicht" }, |
1260 | { "List week","Listenwochenansicht" }, | 1260 | { "List week","Listenwochenansicht" }, |
1261 | { "Next Week","Nächste Woche" }, | 1261 | { "Next Week","Nächste Woche" }, |
1262 | { "Previous Week","Vorherige Woche" }, | 1262 | { "Previous Week","Vorherige Woche" }, |
1263 | { "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." }, | 1263 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, |
1264 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1264 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1265 | { "Details","Details" }, | 1265 | { "Details","Details" }, |
1266 | { "Created time","Erstellt Zeit" }, | 1266 | { "Created time","Erstellt Zeit" }, |
1267 | { "Last modified time","Geändert Zeit" }, | 1267 | { "Last modified time","Geändert Zeit" }, |
1268 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1268 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1269 | { "View Options","Anzeige Optionen" }, | 1269 | { "View Options","Anzeige Optionen" }, |
1270 | { "<b>Created: ","<b>Erstellt am: " }, | 1270 | { "<b>Created: ","<b>Erstellt am: " }, |
1271 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1271 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1272 | { "Journal: ","Journal: " }, | 1272 | { "Journal: ","Journal: " }, |
1273 | { "yearly","jährlich" }, | 1273 | { "yearly","jährlich" }, |
1274 | { "(%1) ","%1-" }, | 1274 | { "(%1) ","%1-" }, |
1275 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1275 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1276 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1276 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1277 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1277 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1278 | { "Summary/Loc.","Titel/Ort" }, | 1278 | { "Summary/Loc.","Titel/Ort" }, |
1279 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1279 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1280 | { "Week Number","Wochennummer" }, | 1280 | { "Week Number","Wochennummer" }, |
1281 | { "Import","Importiere" }, | 1281 | { "Import","Importiere" }, |
1282 | { "Export","Exportiere" }, | 1282 | { "Export","Exportiere" }, |
1283 | { "Beam","Beame" }, | 1283 | { "Beam","Beame" }, |
1284 | { "Export","Exportiere" }, | 1284 | { "Export","Exportiere" }, |
1285 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1285 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1286 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1286 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1287 | { "Journal/Details...","Journale/Details..." }, | 1287 | { "Journal/Details...","Journale/Details..." }, |
1288 | { "Agenda View","Agenda Ansicht" }, | 1288 | { "Agenda View","Agenda Ansicht" }, |
1289 | { "Show current time","Zeige aktuelle Zeit" }, | 1289 | { "Show current time","Zeige aktuelle Zeit" }, |
1290 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1290 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1291 | { "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" }, | 1291 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, |
1292 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1292 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1293 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1293 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1294 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1294 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1295 | { "%1 days\n","%1 Tagen\n" }, | 1295 | { "%1 days\n","%1 Tagen\n" }, |
1296 | { "1 day\n","1 Tag\n" }, | 1296 | { "1 day\n","1 Tag\n" }, |
1297 | { "%1 hours\n","%1 Stunden\n" }, | 1297 | { "%1 hours\n","%1 Stunden\n" }, |
1298 | { "1 hour\n","1 Stunde\n" }, | 1298 | { "1 hour\n","1 Stunde\n" }, |
1299 | { "%1 minutes\n","%1 Minuten\n" }, | 1299 | { "%1 minutes\n","%1 Minuten\n" }, |
1300 | { "1 minute\n","1 Minute\n" }, | 1300 | { "1 minute\n","1 Minute\n" }, |
1301 | { "Only one toolbar","Nur eine Toolbar" }, | 1301 | { "Only one toolbar","Nur eine Toolbar" }, |
1302 | { "Print","Drucke" }, | 1302 | { "Print","Drucke" }, |
1303 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | 1303 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, |
1304 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | 1304 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, |
1305 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | 1305 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, |
1306 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | 1306 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, |
1307 | { "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" }, | 1307 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, |
1308 | { "KO/Pi Printout","KO/Pi Ausdruck" }, | 1308 | { "KO/Pi Printout","KO/Pi Ausdruck" }, |
1309 | { "Print unscaled","Drucke unskaliert" }, | 1309 | { "Print unscaled","Drucke unskaliert" }, |
1310 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, | 1310 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, |
1311 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, | 1311 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, |
1312 | { "Printout Mode","Druck Modus" }, | 1312 | { "Printout Mode","Druck Modus" }, |
1313 | { "Filter menu icon","Filtermenu Icon" }, | 1313 | { "Filter menu icon","Filtermenu Icon" }, |
1314 | { "<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" }, | 1314 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, |
1315 | { "<p><b>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" }, | 1315 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, |
1316 | { "%1d","%1t" }, | 1316 | { "%1d","%1t" }, |
1317 | { "%1h","%1std" }, | 1317 | { "%1h","%1std" }, |
1318 | { "%1min","%1min" }, | 1318 | { "%1min","%1min" }, |
1319 | { "( %1 before )","( %1 vorher )" }, | 1319 | { "( %1 before )","( %1 vorher )" }, |
1320 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, | 1320 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, |
1321 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, | 1321 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, |
1322 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, | 1322 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, |
1323 | { "Show Sync Events","Zeige Sync-Ereignisse" }, | 1323 | { "Show Sync Events","Zeige Sync-Ereignisse" }, |
1324 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, | 1324 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, |
1325 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, | 1325 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, |
1326 | { " on "," am " }, | 1326 | { " on "," am " }, |
1327 | { "On: ","Am: " }, | 1327 | { "On: ","Am: " }, |
1328 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, | 1328 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, |
1329 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, | 1329 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, |
1330 | { "Color for running todos:","Farbe für laufende Todos:" }, | 1330 | { "Color for running todos:","Farbe für laufende Todos:" }, |
1331 | { "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?" }, | 1331 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, |
1332 | { "Todo is started","Todo ist gestartet" }, | 1332 | { "Todo is started","Todo ist gestartet" }, |
1333 | { "Stop todo","Stoppe Todo" }, | 1333 | { "Stop todo","Stoppe Todo" }, |
1334 | { "Todo is stopped","Todo ist gestoppt" }, | 1334 | { "Todo is stopped","Todo ist gestoppt" }, |
1335 | { "Start todo","Starte Todo" }, | 1335 | { "Start todo","Starte Todo" }, |
1336 | { "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?" }, | 1336 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, |
1337 | { "The todo\n%1\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?" }, | 1337 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, |
1338 | { "Todo has subtodos","Todo hat Untertodos" }, | 1338 | { "Todo has subtodos","Todo hat Untertodos" }, |
1339 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, | 1339 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, |
1340 | { "Colors","Farben" }, | 1340 | { "Colors","Farben" }, |
1341 | { "Click on new parent item","Klicke auf neues Übertodo" }, | 1341 | { "Click on new parent item","Klicke auf neues Übertodo" }, |
1342 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, | 1342 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, |
1343 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, | 1343 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, |
1344 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, | 1344 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, |
1345 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, | 1345 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, |
1346 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 1346 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
1347 | { "times","Zeiten" }, | 1347 | { "times","Zeiten" }, |
1348 | { "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?" }, | 1348 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, |
1349 | { "Backup enabled","Backup angeschaltet" }, | 1349 | { "Backup enabled","Backup angeschaltet" }, |
1350 | { "Use standard backup dir","Standard Backupverzeichnis" }, | 1350 | { "Use standard backup dir","Standard Backupverzeichnis" }, |
1351 | { "Number of Backups:","Anzahl der Backups" }, | 1351 | { "Number of Backups:","Anzahl der Backups" }, |
1352 | { "Make backup every ","Mache ein Backup alle " }, | 1352 | { "Make backup every ","Mache ein Backup alle " }, |
1353 | { " days"," Tage" }, | 1353 | { " days"," Tage" }, |
1354 | { "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, | 1354 | { "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, |
1355 | { "Backup Failed!","Backup Problem!" }, | 1355 | { "Backup Failed!","Backup Problem!" }, |
1356 | { "Try again now","Versuche jetzt nochmal" }, | 1356 | { "Try again now","Versuche jetzt nochmal" }, |
1357 | { "Try again later","Versuche später nochmal" }, | 1357 | { "Try again later","Versuche später nochmal" }, |
1358 | { "Try again tomorrow","Versuche morgen nochmal" }, | 1358 | { "Try again tomorrow","Versuche morgen nochmal" }, |
1359 | { "Disable backup","Schalte Backup ab" }, | 1359 | { "Disable backup","Schalte Backup ab" }, |
1360 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, | 1360 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, |
1361 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, | 1361 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, |
1362 | { "Choose action","Wähle Aktion" }, | 1362 | { "Choose action","Wähle Aktion" }, |
1363 | { "Comment for todo:","Kommentar zum Todo:" }, | 1363 | { "Comment for todo:","Kommentar zum Todo:" }, |
1364 | { "Stop+note","Stop+Notiz" }, | 1364 | { "Stop+note","Stop+Notiz" }, |
1365 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, | 1365 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, |
1366 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, | 1366 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, |
1367 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, | 1367 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, |
1368 | { "Print complete list...","Drucke komplette Liste..." }, | 1368 | { "Print complete list...","Drucke komplette Liste..." }, |
1369 | { "Hide all selected","Verstecke Ausgewählte" }, | 1369 | { "Hide all selected","Verstecke Ausgewählte" }, |
1370 | { "Add items","hinzufügen" }, | 1370 | { "Add items","hinzufügen" }, |
1371 | { "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?" }, | 1371 | { "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, |
1372 | { "Print List View...","Drucke Listenansicht..." }, | 1372 | { "Print List View...","Drucke Listenansicht..." }, |
1373 | { "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." }, | 1373 | { "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, |
1374 | { "Configure KO/Pi...","Konfiguriere KO/Pi..." }, | 1374 | { "Configure KO/Pi...","Konfiguriere KO/Pi..." }, |
1375 | { "Global Settings...","Globale Einstellungen..." }, | 1375 | { "Global Settings...","Globale Einstellungen..." }, |
1376 | { "<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" }, | 1376 | { "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, |
1377 | { "(disabled)","(abgeschaltet)" }, | 1377 | { "(disabled)","(abgeschaltet)" }, |
1378 | { "New Calendar","Neuer Kalender" }, | 1378 | { "New Calendar","Neuer Kalender" }, |
1379 | { "Calendar","Kalender" }, | 1379 | { "Calendar","Kalender" }, |
1380 | { "Filter selector","Filterauswahl" }, | 1380 | { "Filter selector","Filterauswahl" }, |
1381 | { "Filtermenu","Filtermenu" }, | 1381 | { "Filtermenu","Filtermenu" }, |
1382 | { "Toggle Fullscreen","Vollbild umschalten" }, | 1382 | { "Toggle Fullscreen","Vollbild umschalten" }, |
1383 | { "Toggle Resource View","Resourcenansicht umschalten" }, | 1383 | { "Toggle Resource View","Resourcenansicht umschalten" }, |
1384 | { "Storage HowTo...","Speicherort HowTo..." }, | 1384 | { "Storage HowTo...","Speicherort HowTo..." }, |
1385 | { "Timetracking HowTo...","Timetracking HowTo..." }, | 1385 | { "Timetracking HowTo...","Timetracking HowTo..." }, |
1386 | { "Juni","Juni" }, | 1386 | { "Juni","Juni" }, |
1387 | { "Juli","Juli" }, | 1387 | { "Juli","Juli" }, |
1388 | { "ToDo:","ToDo:" }, | 1388 | { "ToDo:","ToDo:" }, |
1389 | { "Set Calendar","Setze Kalender" }, | 1389 | { "Set Calendar","Setze Kalender" }, |
1390 | { "Todo: %1","Todo: %1" }, | 1390 | { "Todo: %1","Todo: %1" }, |
1391 | { ": (Prio ",": (Prio " }, | 1391 | { ": (Prio ",": (Prio " }, |
1392 | { "Todos","Todos" }, | 1392 | { "Todos","Todos" }, |
1393 | { "Todo Viewer","Todo Anzeige" }, | 1393 | { "Todo Viewer","Todo Anzeige" }, |
1394 | { "Todo ","Todo " }, | 1394 | { "Todo ","Todo " }, |
1395 | { " Calendar \n Resource "," Kalender \n Resource " }, | 1395 | { " Calendar \n Resource "," Kalender \n Resource " }, |
1396 | { " Color "," Farbe " }, | 1396 | { " Color "," Farbe " }, |
1397 | { "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!)" }, | 1397 | { "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, |
1398 | { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, | 1398 | { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, |
1399 | { "Add new Calendar","Füge Kalender hinzu" }, | 1399 | { "Add new Calendar","Füge Kalender hinzu" }, |
1400 | { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, | 1400 | { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, |
1401 | { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, | 1401 | { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, |
1402 | { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, | 1402 | { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, |
1403 | { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, | 1403 | { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, |
1404 | { "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>" }, | 1404 | { "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>" }, |
1405 | { "Global application font for all apps:","Globale Schriftart:" }, | 1405 | { "Global application font for all apps:","Globale Schriftart:" }, |
1406 | { "Application Font","Applikationsschriftart" }, | 1406 | { "Application Font","Applikationsschriftart" }, |
1407 | { "Kx/Pi","Kx/Pi" }, | 1407 | { "Kx/Pi","Kx/Pi" }, |
1408 | { "Backup","Backup" }, | 1408 | { "Backup","Backup" }, |
1409 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, | 1409 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, |
1410 | { "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!" }, | 1410 | { "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!" }, |
1411 | { "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!" }, | 1411 | { "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!" }, |
1412 | { "Choose Color","Wähle Farbe" }, | 1412 | { "Choose Color","Wähle Farbe" }, |
1413 | { " OK "," OK " }, | 1413 | { " OK "," OK " }, |
1414 | { " Cancel "," Abbrechen " }, | 1414 | { " Cancel "," Abbrechen " }, |
1415 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, | 1415 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, |
1416 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, | 1416 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, |
1417 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, | 1417 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, |
1418 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, | 1418 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, |
1419 | { "<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>" }, | 1419 | { "<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>" }, |
1420 | { "%1\nis running!","%1\nist am Laufen!" }, | 1420 | { "%1\nis running!","%1\nist am Laufen!" }, |
1421 | { "Additional Comment:","Zusätzlicher Kommentar:" }, | 1421 | { "Additional Comment:","Zusätzlicher Kommentar:" }, |
1422 | { "Stop and save","Stopp und Speichern" }, | 1422 | { "Stop and save","Stopp und Speichern" }, |
1423 | { "Continue running","Weiter laufen lassen" }, | 1423 | { "Continue running","Weiter laufen lassen" }, |
1424 | { "Stop - do not save","Stopp - nicht Speichern" }, | 1424 | { "Stop - do not save","Stopp - nicht Speichern" }, |
1425 | { "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?" }, | 1425 | { "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?" }, |
1426 | { "Time mismatch!","Zeiten stimmen nicht!" }, | 1426 | { "Time mismatch!","Zeiten stimmen nicht!" }, |
1427 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, | 1427 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, |
1428 | { "Yes, stop todo","Ja, stoppe Todo" }, | 1428 | { "Yes, stop todo","Ja, stoppe Todo" }, |
1429 | { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, | 1429 | { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, |
1430 | { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, | 1430 | { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, |
1431 | { "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." }, | 1431 | { "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." }, |
1432 | { "Spouse","Ehegatte" }, | 1432 | { "Spouse","Ehegatte" }, |
1433 | { "Notes","Notizen" }, | 1433 | { "Notes","Notizen" }, |
1434 | { "Messanger","Messanger" }, | 1434 | { "Messanger","Messanger" }, |
1435 | { "Assistant","Assistent" }, | 1435 | { "Assistant","Assistent" }, |
1436 | { "Manager","Manager" }, | 1436 | { "Manager","Manager" }, |
1437 | { "Secrecy","Sichtbar" }, | 1437 | { "Secrecy","Sichtbar" }, |
1438 | { "male","männlich" }, | 1438 | { "male","männlich" }, |
1439 | { "female","weiblich" }, | 1439 | { "female","weiblich" }, |
1440 | { "Hide!","Verbergen!" }, | 1440 | { "Hide!","Verbergen!" }, |
1441 | { "Show!","Anzeigen!" }, | 1441 | { "Show!","Anzeigen!" }, |
1442 | { "Details","Details" }, | 1442 | { "Details","Details" }, |
1443 | { "Profession","Beruf" }, | 1443 | { "Profession","Beruf" }, |
1444 | { "Children","Kinder" }, | 1444 | { "Children","Kinder" }, |
1445 | { "Department","Abteilung" }, | 1445 | { "Department","Abteilung" }, |
1446 | { "Backup cancelled","Backup abgebrochen" }, | 1446 | { "Backup cancelled","Backup abgebrochen" }, |
1447 | { "Backup globally disabled","Backup global abgeschaltet" }, | 1447 | { "Backup globally disabled","Backup global abgeschaltet" }, |
1448 | { "Backup succesfully finished","Backup erfolgreich beendet" }, | 1448 | { "Backup succesfully finished","Backup erfolgreich beendet" }, |
1449 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, | 1449 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, |
1450 | { "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" }, | 1450 | { "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" }, |
1451 | { "Birthdays","Geburtstage" }, | 1451 | { "Birthdays","Geburtstage" }, |
1452 | { "KO/Pi import information!","KO/Pi Import Information!" }, | 1452 | { "KO/Pi import information!","KO/Pi Import Information!" }, |
1453 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, | 1453 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, |
1454 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, | 1454 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, |
1455 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, | 1455 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, |
1456 | { "Reload","Neu laden" }, | 1456 | { "Reload","Neu laden" }, |
1457 | { "Timezone settings","Zeitzoneneinstellung" }, | 1457 | { "Timezone settings","Zeitzoneneinstellung" }, |
1458 | { "Title: ","Titel: " }, | 1458 | { "Title: ","Titel: " }, |
1459 | { "Journal from: ","Journal vom: " }, | 1459 | { "Journal from: ","Journal vom: " }, |
1460 | { "Journal: %1 from ","Journal: %1 vom " }, | 1460 | { "Journal: %1 from ","Journal: %1 vom " }, |
1461 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, | 1461 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, |
1462 | { "Selected Item","Ausgewähltes Item" }, | 1462 | { "Selected Item","Ausgewähltes Item" }, |
1463 | { "Select Date...","Wähle Datum..." }, | 1463 | { "Select Date...","Wähle Datum..." }, |
1464 | { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, | 1464 | { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, |
1465 | { "Change category list now!","Ändere Kategorieliste jetzt!" }, | 1465 | { "Change category list now!","Ändere Kategorieliste jetzt!" }, |
1466 | { "Edit category list...","Ändere Kategorieliste..." }, | 1466 | { "Edit category list...","Ändere Kategorieliste..." }, |
1467 | { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, | 1467 | { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, |
1468 | { "Filepath: ","Dateipfad: " }, | 1468 | { "Filepath: ","Dateipfad: " }, |
1469 | { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, | 1469 | { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, |
1470 | { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, | 1470 | { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, |
1471 | { "Pending Suspend Alarm","Laufender Suspend Alarm" }, | 1471 | { "Pending Suspend Alarm","Laufender Suspend Alarm" }, |
1472 | { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, | 1472 | { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, |
1473 | { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, | 1473 | { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, |
1474 | { "Loading of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, | 1474 | { "Loading of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, |
1475 | { "Alarm Options","Alarm Einstellungen" }, | 1475 | { "Alarm Options","Alarm Einstellungen" }, |
1476 | { "Delete selected...","Lösche Ausgewählte..." }, | 1476 | { "Delete selected...","Lösche Ausgewählte..." }, |
1477 | { "None","Nichts" }, | 1477 | { "None","Nichts" }, |
1478 | { "Selection","Auswahl" }, | 1478 | { "Selection","Auswahl" }, |
1479 | { "Set categories","Setze Kategorien" }, | 1479 | { "Set categories","Setze Kategorien" }, |
1480 | { "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, | 1480 | { "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, |
1481 | { "Reset","Neu setzen" }, | 1481 | { "Reset","Neu setzen" }, |
1482 | { "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, | 1482 | { "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, |
1483 | { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, | 1483 | { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, |
1484 | { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, | 1484 | { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, |
1485 | { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, | 1485 | { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, |
1486 | { "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 1486 | { "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
1487 | { "Edit","Edit" }, | 1487 | { "Edit","Edit" }, |
1488 | { "Last Modified","Zuletzt geändert" }, | 1488 | { "Last Modified","Zuletzt geändert" }, |
1489 | { "Journal viewer","Journal Anzeige" }, | 1489 | { "Journal viewer","Journal Anzeige" }, |
1490 | { "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, | 1490 | { "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, |
1491 | { "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, | 1491 | { "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, |
1492 | { "Hide Completed","Verstecke erledigte Todos" }, | 1492 | { "Hide Completed","Verstecke erledigte Todos" }, |
1493 | { "Show not Running","Zeige nicht Laufende" }, | 1493 | { "Show not Running","Zeige nicht Laufende" }, |
1494 | { "Click to add new Todo","Klick für neues Todo!" }, | 1494 | { "Click to add new Todo","Klick für neues Todo!" }, |
1495 | { "Show next conflict for","Zeige nächsten Konflikt für" }, | 1495 | { "Show next conflict for","Zeige nächsten Konflikt für" }, |
1496 | { "All events","Alle Termine" }, | 1496 | { "All events","Alle Termine" }, |
1497 | { "Allday events","Ganztagestermine" }, | 1497 | { "Allday events","Ganztagestermine" }, |
1498 | { "Events with time","Termine mit Zeit" }, | 1498 | { "Events with time","Termine mit Zeit" }, |
1499 | { "No conflict found","Kein Konflikt gefunden" }, | 1499 | { "No conflict found","Kein Konflikt gefunden" }, |
1500 | { "Conflict %1 <-> %2","Konflikt %1 <-> %2" }, | 1500 | { "Conflict %1 <-> %2","Konflikt %1 <-> %2" }, |
1501 | { "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " }, | 1501 | { "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " }, |
1502 | { "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" }, | 1502 | { "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" }, |
1503 | { "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" }, | 1503 | { "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" }, |
1504 | { "KO/Pi Conflict delected","KO/Pi Konflikt erkannt" }, | 1504 | { "KO/Pi Conflict detected","KO/Pi Konflikt erkannt" }, |
1505 | { "Show date","Zeige Datum" }, | 1505 | { "Show date","Zeige Datum" }, |
1506 | { "No problem!","Null Problemo!" }, | 1506 | { "No problem!","Null Problemo!" }, |
1507 | { "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, | 1507 | { "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, |
1508 | { "Pi-Sync Port Error","Pi-Sync Port Fehler" }, | 1508 | { "Pi-Sync Port Error","Pi-Sync Port Fehler" }, |
1509 | { "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, | 1509 | { "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, |
1510 | { "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, | 1510 | { "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, |
1511 | { "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, | 1511 | { "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, |
1512 | { "Pi-Sync Error","Pi-Sync Fehler" }, | 1512 | { "Pi-Sync Error","Pi-Sync Fehler" }, |
1513 | { "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, | 1513 | { "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, |
1514 | { "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, | 1514 | { "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, |
1515 | { "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, | 1515 | { "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, |
1516 | { "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, | 1516 | { "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, |
1517 | { "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, | 1517 | { "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, |
1518 | { "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, | 1518 | { "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, |
1519 | { "Receiving file from remote...","Empfange entfernte Datei..." }, | 1519 | { "Receiving file from remote...","Empfange entfernte Datei..." }, |
1520 | { "Sending back synced file...","Sende synchronisierte Datei zurück..." }, | 1520 | { "Sending back synced file...","Sende synchronisierte Datei zurück..." }, |
1521 | { "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, | 1521 | { "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, |
1522 | { "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, | 1522 | { "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, |
1523 | { "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, | 1523 | { "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, |
1524 | { "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, | 1524 | { "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, |
1525 | { "Writing back file ...","Schreibe Datei zurück..." }, | 1525 | { "Writing back file ...","Schreibe Datei zurück..." }, |
1526 | { "Sending back file ...","Sende Datei zurück..." }, | 1526 | { "Sending back file ...","Sende Datei zurück..." }, |
1527 | { "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, | 1527 | { "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, |
1528 | { "Created","Angelegt" }, | 1528 | { "Created","Angelegt" }, |
1529 | { "Last Modified Sub","Zuletzt geändertes Sub" }, | 1529 | { "Last Modified Sub","Zuletzt geändertes Sub" }, |
1530 | { "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" }, | 1530 | { "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" }, |
1531 | { "Show times on two lines","Zeige Zeiten auf zwei Zeilen" }, | 1531 | { "Show times on two lines","Zeige Zeiten auf zwei Zeilen" }, |
1532 | { "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, | 1532 | { "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, |
1533 | { "Duration","Dauer" }, | 1533 | { "Duration","Dauer" }, |
1534 | { " day"," Tag" }, | 1534 | { " day"," Tag" }, |
1535 | { "Click this button to display all todos in a <b>flat</b> hierarchy","Klicke diesen Knopf um alle Todos in einer <b>flachen</b> Hierarchie darzustellen" }, | 1535 | { "Click this button to display all todos in a <b>flat</b> hierarchy","Klicke diesen Knopf um alle Todos in einer <b>flachen</b> Hierarchie darzustellen" }, |
1536 | { "Click this button to display all todos <b>openend</b>","Klicke diesen Knopf um alle Todos <b>geöffnet</b> darzustellen" }, | 1536 | { "Click this button to display all todos <b>openend</b>","Klicke diesen Knopf um alle Todos <b>geöffnet</b> darzustellen" }, |
1537 | { "Click this button to display all todos <b>closed</b>","Klicke diesen Knopf um alle Todos <b>geschlossen</b> darzustellen" }, | 1537 | { "Click this button to display all todos <b>closed</b>","Klicke diesen Knopf um alle Todos <b>geschlossen</b> darzustellen" }, |
1538 | { "Click this button to toggle show/hide <b>running</b> todos","Klicke diesen Knopf um <b>zeige Laufende</b> umzuschalten" }, | 1538 | { "Click this button to toggle show/hide <b>running</b> todos","Klicke diesen Knopf um <b>zeige Laufende</b> umzuschalten" }, |
1539 | { "Click this button to toggle show/hide <b>completed</b> todos","Klicke diesen Knopf um <b>zeige Erledigte</b> umzuschalten" }, | 1539 | { "Click this button to toggle show/hide <b>completed</b> todos","Klicke diesen Knopf um <b>zeige Erledigte</b> umzuschalten" }, |
1540 | { "Click this button to add a new subtodo to the currently selected todo","Klicke diesen Knopf um ein Untertodo zu dem gerade selektierten Todo hinzuzufügen" }, | 1540 | { "Click this button to add a new subtodo to the currently selected todo","Klicke diesen Knopf um ein Untertodo zu dem gerade selektierten Todo hinzuzufügen" }, |
1541 | { "In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.","In dieser Spalte kann man einen <b>Kalender auf sichtbar schalten</b>. Wenn ein Kalender nicht sichtbar ist werden seine Einträge nicht in den Ansichten angezeigt. Man kann Einträge hinzufügen und laden/speichern wie gewöhnlich." }, | 1541 | { "In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.","In dieser Spalte kann man einen <b>Kalender auf sichtbar schalten</b>. Wenn ein Kalender nicht sichtbar ist werden seine Einträge nicht in den Ansichten angezeigt. Man kann Einträge hinzufügen und laden/speichern wie gewöhnlich." }, |
1542 | { "In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.","In dieser Spalte wird der <b>Name des Kalenders</b> angezeigt. Wenn Sie auf den Namen klicken wird Information über die Kalenderdatei angezeigt. Wenn die Datei beim Start nicht geladen wurde können Sie hier erneut versuchen sie zu laden." }, | 1542 | { "In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.","In dieser Spalte wird der <b>Name des Kalenders</b> angezeigt. Wenn Sie auf den Namen klicken wird Information über die Kalenderdatei angezeigt. Wenn die Datei beim Start nicht geladen wurde können Sie hier erneut versuchen sie zu laden." }, |
1543 | { "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." }, | 1543 | { "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." }, |
1544 | { "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." }, | 1544 | { "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." }, |
1545 | { "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." }, | 1545 | { "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." }, |
1546 | { "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" }, | 1546 | { "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" }, |
1547 | { "Error saving data","Fehler beim Abspeichern" }, | 1547 | { "Error saving data","Fehler beim Abspeichern" }, |
1548 | { "Calendar(s) not saved:","Nicht gespeicherte Kalender:" }, | 1548 | { "Calendar(s) not saved:","Nicht gespeicherte Kalender:" }, |
1549 | { "","" }, | 1549 | { "Enable conflict detection","Schalte Konflikterkennung an" }, |
1550 | { "","" }, | 1550 | { "Conflict detection checks an <b>edited event</b> with other <b>existing events</b> for overlapping. You can define which events are checked:","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>. Sie können einstellen welche Termine überprüft werden:" }, |
1551 | { "","" }, | 1551 | { "Filter for the edited event","Filter für den bearbeiteten Termin" }, |
1552 | { "Filter for other existing events","Filter für die anderen Termine" }, | ||
1553 | { "Check Allday with Allday","Prüfe GanzTag mit GanzTag" }, | ||
1554 | { "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" }, | ||
1555 | { "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, | ||
1556 | { "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, | ||
1557 | { "Conflict detection","Konflikterkennung" }, | ||
1552 | { "","" }, | 1558 | { "","" }, |
1553 | { "","" }, | 1559 | { "","" }, |
1554 | { "","" }, | 1560 | { "","" }, |
1555 | { "","" }, | 1561 | { "","" }, |
1556 | { "","" }, | 1562 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 26323b1..898da6c 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1,5111 +1,5150 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | 3 | ||
4 | Requires the Qt and KDE widget libraries, available at no cost at | 4 | Requires the Qt and KDE widget libraries, available at no cost at |
5 | http://www.troll.no and http://www.kde.org respectively | 5 | http://www.troll.no and http://www.kde.org respectively |
6 | 6 | ||
7 | Copyright (c) 1997, 1998, 1999 | 7 | Copyright (c) 1997, 1998, 1999 |
8 | Preston Brown (preton.brown@yale.edu) | 8 | Preston Brown (preton.brown@yale.edu) |
9 | Fester Zigterman (F.J.F.ZigtermanRustenburg@student.utwente.nl) | 9 | Fester Zigterman (F.J.F.ZigtermanRustenburg@student.utwente.nl) |
10 | Ian Dawes (iadawes@globalserve.net) | 10 | Ian Dawes (iadawes@globalserve.net) |
11 | Laszlo Boloni (boloni@cs.purdue.edu) | 11 | Laszlo Boloni (boloni@cs.purdue.edu) |
12 | 12 | ||
13 | Copyright (c) 2000, 2001, 2002 | 13 | Copyright (c) 2000, 2001, 2002 |
14 | Cornelius Schumacher <schumacher@kde.org> | 14 | Cornelius Schumacher <schumacher@kde.org> |
15 | 15 | ||
16 | This program is free software; you can redistribute it and/or modify | 16 | This program is free software; you can redistribute it and/or modify |
17 | it under the terms of the GNU General Public License as published by | 17 | it under the terms of the GNU General Public License as published by |
18 | the Free Software Foundation; either version 2 of the License, or | 18 | the Free Software Foundation; either version 2 of the License, or |
19 | (at your option) any later version. | 19 | (at your option) any later version. |
20 | 20 | ||
21 | This program is distributed in the hope that it will be useful, | 21 | This program is distributed in the hope that it will be useful, |
22 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 22 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | 23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the |
24 | GNU General Public License for more details. | 24 | GNU General Public License for more details. |
25 | 25 | ||
26 | You should have received a copy of the GNU General Public License | 26 | You should have received a copy of the GNU General Public License |
27 | along with this program; if not, write to the Free Software | 27 | along with this program; if not, write to the Free Software |
28 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 28 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <stdlib.h> | 31 | #include <stdlib.h> |
32 | 32 | ||
33 | #include <qapplication.h> | 33 | #include <qapplication.h> |
34 | #include <qradiobutton.h> | 34 | #include <qradiobutton.h> |
35 | #include <qbuttongroup.h> | 35 | #include <qbuttongroup.h> |
36 | #include <qlayout.h> | 36 | #include <qlayout.h> |
37 | #include <qclipboard.h> | 37 | #include <qclipboard.h> |
38 | #include <qcursor.h> | 38 | #include <qcursor.h> |
39 | #include <qmessagebox.h> | 39 | #include <qmessagebox.h> |
40 | #include <qprogressbar.h> | 40 | #include <qprogressbar.h> |
41 | #include <qmultilineedit.h> | 41 | #include <qmultilineedit.h> |
42 | #include <qtimer.h> | 42 | #include <qtimer.h> |
43 | #include <qwidgetstack.h> | 43 | #include <qwidgetstack.h> |
44 | #include <qptrlist.h> | 44 | #include <qptrlist.h> |
45 | #include <qregexp.h> | 45 | #include <qregexp.h> |
46 | #include <qgroupbox.h> | 46 | #include <qgroupbox.h> |
47 | #include <qfile.h> | 47 | #include <qfile.h> |
48 | #include <qdir.h> | 48 | #include <qdir.h> |
49 | #ifndef KORG_NOSPLITTER | 49 | #ifndef KORG_NOSPLITTER |
50 | #include <qsplitter.h> | 50 | #include <qsplitter.h> |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #include <kglobal.h> | 53 | #include <kglobal.h> |
54 | #include <kdebug.h> | 54 | #include <kdebug.h> |
55 | #include <kstandarddirs.h> | 55 | #include <kstandarddirs.h> |
56 | #include <kfiledialog.h> | 56 | #include <kfiledialog.h> |
57 | #include <kmessagebox.h> | 57 | #include <kmessagebox.h> |
58 | #include <knotifyclient.h> | 58 | #include <knotifyclient.h> |
59 | #include <kconfig.h> | 59 | #include <kconfig.h> |
60 | 60 | ||
61 | #include <libkdepim/ksyncprefsdialog.h> | 61 | #include <libkdepim/ksyncprefsdialog.h> |
62 | #include <krun.h> | 62 | #include <krun.h> |
63 | #include <kdirwatch.h> | 63 | #include <kdirwatch.h> |
64 | #include <libkdepim/kdatepicker.h> | 64 | #include <libkdepim/kdatepicker.h> |
65 | #include <libkdepim/ksyncprofile.h> | 65 | #include <libkdepim/ksyncprofile.h> |
66 | #include <libkdepim/kpimglobalprefs.h> | 66 | #include <libkdepim/kpimglobalprefs.h> |
67 | 67 | ||
68 | #include <libkcal/vcaldrag.h> | 68 | #include <libkcal/vcaldrag.h> |
69 | #include <libkcal/icaldrag.h> | 69 | #include <libkcal/icaldrag.h> |
70 | #include <libkcal/icalformat.h> | 70 | #include <libkcal/icalformat.h> |
71 | #include <libkcal/vcalformat.h> | 71 | #include <libkcal/vcalformat.h> |
72 | #include <libkcal/scheduler.h> | 72 | #include <libkcal/scheduler.h> |
73 | #include <libkcal/calendarlocal.h> | 73 | #include <libkcal/calendarlocal.h> |
74 | #include <libkcal/journal.h> | 74 | #include <libkcal/journal.h> |
75 | #include <libkcal/calfilter.h> | 75 | #include <libkcal/calfilter.h> |
76 | #include <libkcal/attendee.h> | 76 | #include <libkcal/attendee.h> |
77 | #include <libkcal/dndfactory.h> | 77 | #include <libkcal/dndfactory.h> |
78 | #include <libkcal/freebusy.h> | 78 | #include <libkcal/freebusy.h> |
79 | #include <libkcal/filestorage.h> | 79 | #include <libkcal/filestorage.h> |
80 | #include <libkcal/calendarresources.h> | 80 | #include <libkcal/calendarresources.h> |
81 | #include <libkcal/qtopiaformat.h> | 81 | #include <libkcal/qtopiaformat.h> |
82 | #include "../kalarmd/alarmdialog.h" | 82 | #include "../kalarmd/alarmdialog.h" |
83 | 83 | ||
84 | #ifndef DESKTOP_VERSION | 84 | #ifndef DESKTOP_VERSION |
85 | #include <libkcal/sharpformat.h> | 85 | #include <libkcal/sharpformat.h> |
86 | #include <externalapphandler.h> | 86 | #include <externalapphandler.h> |
87 | #endif | 87 | #endif |
88 | #include <libkcal/phoneformat.h> | 88 | #include <libkcal/phoneformat.h> |
89 | #ifndef KORG_NOMAIL | 89 | #ifndef KORG_NOMAIL |
90 | #include "komailclient.h" | 90 | #include "komailclient.h" |
91 | #endif | 91 | #endif |
92 | #ifndef KORG_NOPRINTER | 92 | #ifndef KORG_NOPRINTER |
93 | #include "calprinter.h" | 93 | #include "calprinter.h" |
94 | #endif | 94 | #endif |
95 | #ifndef KORG_NOPLUGINS | 95 | #ifndef KORG_NOPLUGINS |
96 | #include "kocore.h" | 96 | #include "kocore.h" |
97 | #endif | 97 | #endif |
98 | #include "koeventeditor.h" | 98 | #include "koeventeditor.h" |
99 | #include "kotodoeditor.h" | 99 | #include "kotodoeditor.h" |
100 | #include "koprefs.h" | 100 | #include "koprefs.h" |
101 | #include "koeventviewerdialog.h" | 101 | #include "koeventviewerdialog.h" |
102 | #include "publishdialog.h" | 102 | #include "publishdialog.h" |
103 | #include "kofilterview.h" | 103 | #include "kofilterview.h" |
104 | #include "koglobals.h" | 104 | #include "koglobals.h" |
105 | #include "koviewmanager.h" | 105 | #include "koviewmanager.h" |
106 | #include "koagendaview.h" | 106 | #include "koagendaview.h" |
107 | #include "koagenda.h" | 107 | #include "koagenda.h" |
108 | #include "kodialogmanager.h" | 108 | #include "kodialogmanager.h" |
109 | #include "outgoingdialog.h" | 109 | #include "outgoingdialog.h" |
110 | #include "incomingdialog.h" | 110 | #include "incomingdialog.h" |
111 | #include "datenavigatorcontainer.h" | 111 | #include "datenavigatorcontainer.h" |
112 | #include "statusdialog.h" | 112 | #include "statusdialog.h" |
113 | #include "kdatenavigator.h" | 113 | #include "kdatenavigator.h" |
114 | #include "kotodoview.h" | 114 | #include "kotodoview.h" |
115 | #include "datenavigator.h" | 115 | #include "datenavigator.h" |
116 | #include "resourceview.h" | 116 | #include "resourceview.h" |
117 | #include "navigatorbar.h" | 117 | #include "navigatorbar.h" |
118 | #include "searchdialog.h" | 118 | #include "searchdialog.h" |
119 | #include "mainwindow.h" | 119 | #include "mainwindow.h" |
120 | #include "categoryeditdialog.h" | 120 | #include "categoryeditdialog.h" |
121 | 121 | ||
122 | #include "calendarview.h" | 122 | #include "calendarview.h" |
123 | #ifndef DESKTOP_VERSION | 123 | #ifndef DESKTOP_VERSION |
124 | #include <qtopia/alarmserver.h> | 124 | #include <qtopia/alarmserver.h> |
125 | #endif | 125 | #endif |
126 | #ifndef _WIN32_ | 126 | #ifndef _WIN32_ |
127 | #include <stdlib.h> | 127 | #include <stdlib.h> |
128 | #include <stdio.h> | 128 | #include <stdio.h> |
129 | #include <unistd.h> | 129 | #include <unistd.h> |
130 | #else | 130 | #else |
131 | #include <qprocess.h> | 131 | #include <qprocess.h> |
132 | #endif | 132 | #endif |
133 | 133 | ||
134 | #ifdef DESKTOP_VERSION | 134 | #ifdef DESKTOP_VERSION |
135 | #include <kabc/stdaddressbook.h> | 135 | #include <kabc/stdaddressbook.h> |
136 | #endif | 136 | #endif |
137 | using namespace KOrg; | 137 | using namespace KOrg; |
138 | using namespace KCal; | 138 | using namespace KCal; |
139 | extern int globalFlagBlockAgenda; | 139 | extern int globalFlagBlockAgenda; |
140 | extern int globalFlagBlockStartup; | 140 | extern int globalFlagBlockStartup; |
141 | 141 | ||
142 | 142 | ||
143 | MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent) | 143 | MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent) |
144 | 144 | ||
145 | { | 145 | { |
146 | mAlarms = alarms; | 146 | mAlarms = alarms; |
147 | viewport()->setBackgroundColor( QColor( 255, 255, 255 ) ); | 147 | viewport()->setBackgroundColor( QColor( 255, 255, 255 ) ); |
148 | QString mText = "<table width=\"100%\">\n"; | 148 | QString mText = "<table width=\"100%\">\n"; |
149 | //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; | 149 | //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; |
150 | #ifdef DESKTOP_VERSION | 150 | #ifdef DESKTOP_VERSION |
151 | mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>"; | 151 | mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>"; |
152 | #else | 152 | #else |
153 | mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h3>"; | 153 | mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h3>"; |
154 | #endif | 154 | #endif |
155 | // mText += "<img src=\""; | 155 | // mText += "<img src=\""; |
156 | // mText += ipath; | 156 | // mText += ipath; |
157 | // mText += "\">"; | 157 | // mText += "\">"; |
158 | //mEventDate = QDate::currentDate(); | 158 | //mEventDate = QDate::currentDate(); |
159 | #ifdef DESKTOP_VERSION | 159 | #ifdef DESKTOP_VERSION |
160 | mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h2>"; | 160 | mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h2>"; |
161 | #else | 161 | #else |
162 | mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h3>"; | 162 | mText += "<font color=\"#FFFFFF\"> <em>" + i18n("You missed the alarms for the following events or todos:")+"</em></font></h3>"; |
163 | #endif | 163 | #endif |
164 | //mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; | 164 | //mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; |
165 | 165 | ||
166 | Incidence * inc = getNextInc( start ); | 166 | Incidence * inc = getNextInc( start ); |
167 | int time = 0; | 167 | int time = 0; |
168 | //mText += "<table>"; | 168 | //mText += "<table>"; |
169 | while ( inc ) { | 169 | while ( inc ) { |
170 | QDateTime dt ; | 170 | QDateTime dt ; |
171 | QString tempText = "<a "; | 171 | QString tempText = "<a "; |
172 | bool ok; | 172 | bool ok; |
173 | dt = inc->getNextOccurence( start, &ok ); | 173 | dt = inc->getNextOccurence( start, &ok ); |
174 | if ( !ok ) continue; | 174 | if ( !ok ) continue; |
175 | if ( inc->typeID() == eventID ) { | 175 | if ( inc->typeID() == eventID ) { |
176 | tempText += "href=\"event:"; | 176 | tempText += "href=\"event:"; |
177 | } else if ( inc->typeID() == todoID ) { | 177 | } else if ( inc->typeID() == todoID ) { |
178 | tempText += "href=\"todo:"; | 178 | tempText += "href=\"todo:"; |
179 | } | 179 | } |
180 | tempText += inc->uid() + "\">"; | 180 | tempText += inc->uid() + "\">"; |
181 | if ( inc->typeID() == todoID ) | 181 | if ( inc->typeID() == todoID ) |
182 | tempText += i18n("Todo: "); | 182 | tempText += i18n("Todo: "); |
183 | if ( inc->summary().length() > 0 ) | 183 | if ( inc->summary().length() > 0 ) |
184 | tempText += inc->summary(); | 184 | tempText += inc->summary(); |
185 | else | 185 | else |
186 | tempText += i18n("-no summary-"); | 186 | tempText += i18n("-no summary-"); |
187 | QString timestr; | 187 | QString timestr; |
188 | if (!inc->doesFloat()) | 188 | if (!inc->doesFloat()) |
189 | timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": "; | 189 | timestr = KGlobal::locale()->formatDateTime( dt, KOPrefs::instance()->mShortDateInViewer) +": "; |
190 | else | 190 | else |
191 | timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": "; | 191 | timestr = KGlobal::locale()->formatDate( dt.date() , KOPrefs::instance()->mShortDateInViewer) +": "; |
192 | if ( dt.date() < QDate::currentDate() && time == 0 ) { | 192 | if ( dt.date() < QDate::currentDate() && time == 0 ) { |
193 | mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; | 193 | mText += "</td></tr>\n<tr bgcolor=\"#FF997D\"><td>"; |
194 | mText += "<table>"; | 194 | mText += "<table>"; |
195 | time = 1; | 195 | time = 1; |
196 | } | 196 | } |
197 | if ( dt.date() == QDate::currentDate() && time <= 1 ) { | 197 | if ( dt.date() == QDate::currentDate() && time <= 1 ) { |
198 | if ( time > 0 ) | 198 | if ( time > 0 ) |
199 | mText +="</table>"; | 199 | mText +="</table>"; |
200 | mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>"; | 200 | mText += "</td></tr>\n<tr bgcolor=\"#FFDC64\"><td>"; |
201 | mText += "<table>"; | 201 | mText += "<table>"; |
202 | time = 2; | 202 | time = 2; |
203 | 203 | ||
204 | } | 204 | } |
205 | if ( dt.date() > QDate::currentDate() && time <= 2 ) { | 205 | if ( dt.date() > QDate::currentDate() && time <= 2 ) { |
206 | if ( time > 0 ) | 206 | if ( time > 0 ) |
207 | mText +="</table>"; | 207 | mText +="</table>"; |
208 | mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>"; | 208 | mText += "</td></tr>\n<tr bgcolor=\"#6AFF6A\"><td>"; |
209 | mText += "<table>"; | 209 | mText += "<table>"; |
210 | time = 3; | 210 | time = 3; |
211 | } | 211 | } |
212 | mText +="<tr><td><b>"; | 212 | mText +="<tr><td><b>"; |
213 | mText += timestr; | 213 | mText += timestr; |
214 | mText += "</b></td><td>"; | 214 | mText += "</b></td><td>"; |
215 | mText += tempText; | 215 | mText += tempText; |
216 | mText += "</td></tr>\n"; | 216 | mText += "</td></tr>\n"; |
217 | inc = getNextInc( start ); | 217 | inc = getNextInc( start ); |
218 | } | 218 | } |
219 | mText +="</table>"; | 219 | mText +="</table>"; |
220 | setText( mText ); | 220 | setText( mText ); |
221 | } | 221 | } |
222 | 222 | ||
223 | MissedAlarmTextBrowser::~MissedAlarmTextBrowser() | 223 | MissedAlarmTextBrowser::~MissedAlarmTextBrowser() |
224 | { | 224 | { |
225 | //qDebug("delete MissedAlarmTextBrowser::~MissedAlarmTextBrowser() "); | 225 | //qDebug("delete MissedAlarmTextBrowser::~MissedAlarmTextBrowser() "); |
226 | } | 226 | } |
227 | Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start ) | 227 | Incidence * MissedAlarmTextBrowser::getNextInc( QDateTime start ) |
228 | { | 228 | { |
229 | QDateTime dt ; | 229 | QDateTime dt ; |
230 | Incidence * retInc; | 230 | Incidence * retInc; |
231 | Incidence * inc = mAlarms.first(); | 231 | Incidence * inc = mAlarms.first(); |
232 | if ( inc == 0 ) | 232 | if ( inc == 0 ) |
233 | return 0; | 233 | return 0; |
234 | bool ok; | 234 | bool ok; |
235 | dt = inc->getNextOccurence( start, &ok ); | 235 | dt = inc->getNextOccurence( start, &ok ); |
236 | if ( ! ok ) return 0; | 236 | if ( ! ok ) return 0; |
237 | QDateTime dtn ; | 237 | QDateTime dtn ; |
238 | retInc = inc; | 238 | retInc = inc; |
239 | inc = mAlarms.next(); | 239 | inc = mAlarms.next(); |
240 | while ( inc ) { | 240 | while ( inc ) { |
241 | dtn = inc->getNextOccurence( start, &ok ); | 241 | dtn = inc->getNextOccurence( start, &ok ); |
242 | if ( ! ok ) return 0; | 242 | if ( ! ok ) return 0; |
243 | if ( dtn < dt ) { | 243 | if ( dtn < dt ) { |
244 | dt = dtn; | 244 | dt = dtn; |
245 | retInc = inc; | 245 | retInc = inc; |
246 | } | 246 | } |
247 | inc = mAlarms.next(); | 247 | inc = mAlarms.next(); |
248 | } | 248 | } |
249 | mAlarms.remove( retInc ); | 249 | mAlarms.remove( retInc ); |
250 | return retInc; | 250 | return retInc; |
251 | 251 | ||
252 | } | 252 | } |
253 | void MissedAlarmTextBrowser::setSource(const QString & n) | 253 | void MissedAlarmTextBrowser::setSource(const QString & n) |
254 | { | 254 | { |
255 | if (n.startsWith("event:")) { | 255 | if (n.startsWith("event:")) { |
256 | #ifdef DESKTOP_VERSION | 256 | #ifdef DESKTOP_VERSION |
257 | emit showIncidence(n.mid(8)); | 257 | emit showIncidence(n.mid(8)); |
258 | #else | 258 | #else |
259 | emit showIncidence(n.mid(6)); | 259 | emit showIncidence(n.mid(6)); |
260 | #endif | 260 | #endif |
261 | return; | 261 | return; |
262 | } else if (n.startsWith("todo:")) { | 262 | } else if (n.startsWith("todo:")) { |
263 | #ifdef DESKTOP_VERSION | 263 | #ifdef DESKTOP_VERSION |
264 | emit showIncidence(n.mid(7)); | 264 | emit showIncidence(n.mid(7)); |
265 | #else | 265 | #else |
266 | emit showIncidence(n.mid(5)); | 266 | emit showIncidence(n.mid(5)); |
267 | #endif | 267 | #endif |
268 | return; | 268 | return; |
269 | } | 269 | } |
270 | } | 270 | } |
271 | 271 | ||
272 | 272 | ||
273 | class KOBeamPrefs : public QDialog | 273 | class KOBeamPrefs : public QDialog |
274 | { | 274 | { |
275 | public: | 275 | public: |
276 | KOBeamPrefs( QWidget *parent=0, const char *name=0 ) : | 276 | KOBeamPrefs( QWidget *parent=0, const char *name=0 ) : |
277 | QDialog( parent, name, true ) | 277 | QDialog( parent, name, true ) |
278 | { | 278 | { |
279 | setCaption( i18n("Beam Options") ); | 279 | setCaption( i18n("Beam Options") ); |
280 | QVBoxLayout* lay = new QVBoxLayout( this ); | 280 | QVBoxLayout* lay = new QVBoxLayout( this ); |
281 | lay->setSpacing( 3 ); | 281 | lay->setSpacing( 3 ); |
282 | lay->setMargin( 3 ); | 282 | lay->setMargin( 3 ); |
283 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); | 283 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); |
284 | lay->addWidget( format ); | 284 | lay->addWidget( format ); |
285 | format->setExclusive ( true ) ; | 285 | format->setExclusive ( true ) ; |
286 | QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); | 286 | QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); |
287 | lay->addWidget( time ); time->setExclusive ( true ) ; | 287 | lay->addWidget( time ); time->setExclusive ( true ) ; |
288 | vcal = new QRadioButton(" vCalendar ", format ); | 288 | vcal = new QRadioButton(" vCalendar ", format ); |
289 | ical = new QRadioButton(" iCalendar ", format ); | 289 | ical = new QRadioButton(" iCalendar ", format ); |
290 | vcal->setChecked( true ); | 290 | vcal->setChecked( true ); |
291 | tz = new QRadioButton(i18n(" With timezone "), time ); | 291 | tz = new QRadioButton(i18n(" With timezone "), time ); |
292 | local = new QRadioButton(i18n(" Local time "), time ); | 292 | local = new QRadioButton(i18n(" Local time "), time ); |
293 | tz->setChecked( true ); | 293 | tz->setChecked( true ); |
294 | QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this ); | 294 | QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this ); |
295 | lay->addWidget( ok ); | 295 | lay->addWidget( ok ); |
296 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 296 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
297 | lay->addWidget( cancel ); | 297 | lay->addWidget( cancel ); |
298 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 298 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
299 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 299 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
300 | resize( 200, 200 ); | 300 | resize( 200, 200 ); |
301 | } | 301 | } |
302 | 302 | ||
303 | bool beamVcal() { return vcal->isChecked(); } | 303 | bool beamVcal() { return vcal->isChecked(); } |
304 | bool beamLocal() { return local->isChecked(); } | 304 | bool beamLocal() { return local->isChecked(); } |
305 | private: | 305 | private: |
306 | QRadioButton* vcal, *ical, *local, *tz; | 306 | QRadioButton* vcal, *ical, *local, *tz; |
307 | }; | 307 | }; |
308 | class KOCatPrefs : public QDialog | 308 | class KOCatPrefs : public QDialog |
309 | { | 309 | { |
310 | public: | 310 | public: |
311 | KOCatPrefs( QWidget *parent=0, const char *name=0 ) : | 311 | KOCatPrefs( QWidget *parent=0, const char *name=0 ) : |
312 | QDialog( parent, name, true ) | 312 | QDialog( parent, name, true ) |
313 | { | 313 | { |
314 | setCaption( i18n("Manage new Categories") ); | 314 | setCaption( i18n("Manage new Categories") ); |
315 | QVBoxLayout* lay = new QVBoxLayout( this ); | 315 | QVBoxLayout* lay = new QVBoxLayout( this ); |
316 | lay->setSpacing( 3 ); | 316 | lay->setSpacing( 3 ); |
317 | lay->setMargin( 3 ); | 317 | lay->setMargin( 3 ); |
318 | QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this ); | 318 | QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this ); |
319 | lay->addWidget( lab ); | 319 | lay->addWidget( lab ); |
320 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); | 320 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); |
321 | lay->addWidget( format ); | 321 | lay->addWidget( format ); |
322 | format->setExclusive ( true ) ; | 322 | format->setExclusive ( true ) ; |
323 | addCatBut = new QRadioButton(i18n("Add to category list"), format ); | 323 | addCatBut = new QRadioButton(i18n("Add to category list"), format ); |
324 | new QRadioButton(i18n("Remove from Events/Todos"), format ); | 324 | new QRadioButton(i18n("Remove from Events/Todos"), format ); |
325 | addCatBut->setChecked( true ); | 325 | addCatBut->setChecked( true ); |
326 | QPushButton * ok = new QPushButton( i18n("Change category list now!"), this ); | 326 | QPushButton * ok = new QPushButton( i18n("Change category list now!"), this ); |
327 | lay->addWidget( ok ); | 327 | lay->addWidget( ok ); |
328 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 328 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
329 | lay->addWidget( cancel ); | 329 | lay->addWidget( cancel ); |
330 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 330 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
331 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 331 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
332 | resize( 200, 200 ); | 332 | resize( 200, 200 ); |
333 | } | 333 | } |
334 | 334 | ||
335 | bool addCat() { return addCatBut->isChecked(); } | 335 | bool addCat() { return addCatBut->isChecked(); } |
336 | private: | 336 | private: |
337 | QRadioButton* addCatBut; | 337 | QRadioButton* addCatBut; |
338 | }; | 338 | }; |
339 | 339 | ||
340 | 340 | ||
341 | 341 | ||
342 | CalendarView::CalendarView( CalendarResources *calendar, | 342 | CalendarView::CalendarView( CalendarResources *calendar, |
343 | QWidget *parent, const char *name ) | 343 | QWidget *parent, const char *name ) |
344 | : CalendarViewBase( parent, name ), | 344 | : CalendarViewBase( parent, name ), |
345 | mCalendar( calendar ), | 345 | mCalendar( calendar ), |
346 | mResourceManager( calendar->resourceManager() ) | 346 | mResourceManager( calendar->resourceManager() ) |
347 | { | 347 | { |
348 | 348 | ||
349 | mEventEditor = 0; | 349 | mEventEditor = 0; |
350 | mTodoEditor = 0; | 350 | mTodoEditor = 0; |
351 | 351 | ||
352 | init(); | 352 | init(); |
353 | } | 353 | } |
354 | 354 | ||
355 | CalendarView::CalendarView( Calendar *calendar, | 355 | CalendarView::CalendarView( Calendar *calendar, |
356 | QWidget *parent, const char *name ) | 356 | QWidget *parent, const char *name ) |
357 | : CalendarViewBase( parent, name ), | 357 | : CalendarViewBase( parent, name ), |
358 | mCalendar( calendar ), | 358 | mCalendar( calendar ), |
359 | mResourceManager( 0 ) | 359 | mResourceManager( 0 ) |
360 | { | 360 | { |
361 | 361 | ||
362 | mEventEditor = 0; | 362 | mEventEditor = 0; |
363 | mTodoEditor = 0; | 363 | mTodoEditor = 0; |
364 | init(); | 364 | init(); |
365 | } | 365 | } |
366 | 366 | ||
367 | void CalendarView::init() | 367 | void CalendarView::init() |
368 | { | 368 | { |
369 | mNextAlarmDateTime = QDateTime::currentDateTime(); | 369 | mNextAlarmDateTime = QDateTime::currentDateTime(); |
370 | setFocusPolicy (NoFocus ); | 370 | setFocusPolicy (NoFocus ); |
371 | mViewerCallerIsSearchDialog = false; | 371 | mViewerCallerIsSearchDialog = false; |
372 | mBlockShowDates = false; | 372 | mBlockShowDates = false; |
373 | mConflictingEvent = 0; | 373 | mConflictingEvent = 0; |
374 | mDatePickerMode = 0; | 374 | mDatePickerMode = 0; |
375 | mCurrentSyncDevice = ""; | 375 | mCurrentSyncDevice = ""; |
376 | mViewManager = new KOViewManager( this ); | 376 | mViewManager = new KOViewManager( this ); |
377 | mDialogManager = new KODialogManager( this ); | 377 | mDialogManager = new KODialogManager( this ); |
378 | mEventViewerDialog = 0; | 378 | mEventViewerDialog = 0; |
379 | mModified = false; | 379 | mModified = false; |
380 | mReadOnly = false; | 380 | mReadOnly = false; |
381 | mSelectedIncidence = 0; | 381 | mSelectedIncidence = 0; |
382 | mCalPrinter = 0; | 382 | mCalPrinter = 0; |
383 | mFilters.setAutoDelete(true); | 383 | mFilters.setAutoDelete(true); |
384 | 384 | ||
385 | mCalendar->registerObserver( this ); | 385 | mCalendar->registerObserver( this ); |
386 | // TODO: Make sure that view is updated, when calendar is changed. | 386 | // TODO: Make sure that view is updated, when calendar is changed. |
387 | 387 | ||
388 | mStorage = new FileStorage( mCalendar ); | 388 | mStorage = new FileStorage( mCalendar ); |
389 | mNavigator = new DateNavigator( this, "datevav", mViewManager ); | 389 | mNavigator = new DateNavigator( this, "datevav", mViewManager ); |
390 | 390 | ||
391 | QBoxLayout *topLayout = (QBoxLayout*)layout(); | 391 | QBoxLayout *topLayout = (QBoxLayout*)layout(); |
392 | #ifndef KORG_NOSPLITTER | 392 | #ifndef KORG_NOSPLITTER |
393 | // create the main layout frames. | 393 | // create the main layout frames. |
394 | mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); | 394 | mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); |
395 | topLayout->addWidget(mPanner); | 395 | topLayout->addWidget(mPanner); |
396 | 396 | ||
397 | mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, | 397 | mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, |
398 | "CalendarView::LeftFrame"); | 398 | "CalendarView::LeftFrame"); |
399 | mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); | 399 | mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); |
400 | 400 | ||
401 | mDateNavigator = new DateNavigatorContainer( mLeftSplitter, | 401 | mDateNavigator = new DateNavigatorContainer( mLeftSplitter, |
402 | "CalendarView::DateNavigator" ); | 402 | "CalendarView::DateNavigator" ); |
403 | 403 | ||
404 | mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); | 404 | mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); |
405 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); | 405 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); |
406 | mTodoList->setNavigator( mNavigator ); | 406 | mTodoList->setNavigator( mNavigator ); |
407 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); | 407 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); |
408 | 408 | ||
409 | #ifdef KORG_NORESOURCEVIEW | 409 | #ifdef KORG_NORESOURCEVIEW |
410 | mResourceView = 0; | 410 | mResourceView = 0; |
411 | #else | 411 | #else |
412 | if ( mResourceManager ) { | 412 | if ( mResourceManager ) { |
413 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); | 413 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); |
414 | mResourceView->updateView(); | 414 | mResourceView->updateView(); |
415 | connect( mResourceView, SIGNAL( resourcesChanged() ), | 415 | connect( mResourceView, SIGNAL( resourcesChanged() ), |
416 | SLOT( updateView() ) ); | 416 | SLOT( updateView() ) ); |
417 | } else { | 417 | } else { |
418 | mResourceView = 0; | 418 | mResourceView = 0; |
419 | } | 419 | } |
420 | #endif | 420 | #endif |
421 | QWidget *rightBox = new QWidget( mPanner ); | 421 | QWidget *rightBox = new QWidget( mPanner ); |
422 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 422 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
423 | 423 | ||
424 | mRightFrame = new QWidgetStack( rightBox ); | 424 | mRightFrame = new QWidgetStack( rightBox ); |
425 | rightLayout->addWidget( mRightFrame, 1 ); | 425 | rightLayout->addWidget( mRightFrame, 1 ); |
426 | 426 | ||
427 | mLeftFrame = mLeftSplitter; | 427 | mLeftFrame = mLeftSplitter; |
428 | #else | 428 | #else |
429 | //QWidget *mainBox = new QWidget( this ); | 429 | //QWidget *mainBox = new QWidget( this ); |
430 | //QWidget *leftFrame = new QWidget( mainBox ); | 430 | //QWidget *leftFrame = new QWidget( mainBox ); |
431 | //QBoxLayout * mainBoxLayout; | 431 | //QBoxLayout * mainBoxLayout; |
432 | if ( KOPrefs::instance()->mVerticalScreen ) { | 432 | if ( KOPrefs::instance()->mVerticalScreen ) { |
433 | //mainBoxLayout = new QVBoxLayout(mainBox); | 433 | //mainBoxLayout = new QVBoxLayout(mainBox); |
434 | //leftFrameLayout = new QHBoxLayout(leftFrame ); | 434 | //leftFrameLayout = new QHBoxLayout(leftFrame ); |
435 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); | 435 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); |
436 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 436 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
437 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; | 437 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; |
438 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 438 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
439 | } else { | 439 | } else { |
440 | //mainBoxLayout = new QHBoxLayout(mainBox); | 440 | //mainBoxLayout = new QHBoxLayout(mainBox); |
441 | //leftFrameLayout = new QVBoxLayout(leftFrame ); | 441 | //leftFrameLayout = new QVBoxLayout(leftFrame ); |
442 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 442 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
443 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); | 443 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); |
444 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); | 444 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); |
445 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 445 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
446 | } | 446 | } |
447 | mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); | 447 | mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); |
448 | //QBoxLayout * leftFrameLayout; | 448 | //QBoxLayout * leftFrameLayout; |
449 | topLayout->addWidget( mMainFrame ); | 449 | topLayout->addWidget( mMainFrame ); |
450 | #ifdef DESKTOP_VERSION | 450 | #ifdef DESKTOP_VERSION |
451 | mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this ); | 451 | mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this ); |
452 | topLayout->addWidget( mDateScrollBar ); | 452 | topLayout->addWidget( mDateScrollBar ); |
453 | connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); | 453 | connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); |
454 | if ( QApplication::desktop()->width() < 800 ) | 454 | if ( QApplication::desktop()->width() < 800 ) |
455 | mDateScrollBar->hide(); | 455 | mDateScrollBar->hide(); |
456 | #endif | 456 | #endif |
457 | //mainBoxLayout->addWidget (mLeftFrame); | 457 | //mainBoxLayout->addWidget (mLeftFrame); |
458 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, | 458 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, |
459 | "CalendarView::DateNavigator" ); | 459 | "CalendarView::DateNavigator" ); |
460 | #if 0 | 460 | #if 0 |
461 | // FIXME | 461 | // FIXME |
462 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, | 462 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, |
463 | "CalendarView::DateNavigator", QDate::currentDate()); | 463 | "CalendarView::DateNavigator", QDate::currentDate()); |
464 | #endif | 464 | #endif |
465 | // mDateNavigator->blockSignals( true ); | 465 | // mDateNavigator->blockSignals( true ); |
466 | //leftFrameLayout->addWidget( mDateNavigator ); | 466 | //leftFrameLayout->addWidget( mDateNavigator ); |
467 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); | 467 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); |
468 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); | 468 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); |
469 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); | 469 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); |
470 | connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); | 470 | connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); |
471 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); | 471 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); |
472 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); | 472 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); |
473 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); | 473 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); |
474 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); | 474 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); |
475 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); | 475 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); |
476 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); | 476 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); |
477 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); | 477 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); |
478 | connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); | 478 | connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); |
479 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); | 479 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); |
480 | 480 | ||
481 | mTodoList->setNavigator( mNavigator ); | 481 | mTodoList->setNavigator( mNavigator ); |
482 | #if 0 | 482 | #if 0 |
483 | if ( QApplication::desktop()->width() < 480 ) { | 483 | if ( QApplication::desktop()->width() < 480 ) { |
484 | leftFrameLayout->addWidget(mFilterView); | 484 | leftFrameLayout->addWidget(mFilterView); |
485 | leftFrameLayout->addWidget(mTodoList, 2 ); | 485 | leftFrameLayout->addWidget(mTodoList, 2 ); |
486 | 486 | ||
487 | } else { | 487 | } else { |
488 | leftFrameLayout->addWidget(mTodoList,2 ); | 488 | leftFrameLayout->addWidget(mTodoList,2 ); |
489 | leftFrameLayout->addWidget(mFilterView ); | 489 | leftFrameLayout->addWidget(mFilterView ); |
490 | } | 490 | } |
491 | #endif | 491 | #endif |
492 | mFilterView->hide(); | 492 | mFilterView->hide(); |
493 | mCalEditView->hide(); | 493 | mCalEditView->hide(); |
494 | QWidget *rightBox = new QWidget( mMainFrame ); | 494 | QWidget *rightBox = new QWidget( mMainFrame ); |
495 | //mainBoxLayout->addWidget ( rightBox, 10 ); | 495 | //mainBoxLayout->addWidget ( rightBox, 10 ); |
496 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 496 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
497 | mRightFrame = new QWidgetStack( rightBox ); | 497 | mRightFrame = new QWidgetStack( rightBox ); |
498 | rightLayout->addWidget( mRightFrame, 10 ); | 498 | rightLayout->addWidget( mRightFrame, 10 ); |
499 | 499 | ||
500 | //mLeftFrame = (QWidget *)leftFrame; | 500 | //mLeftFrame = (QWidget *)leftFrame; |
501 | if ( KOPrefs::instance()->mVerticalScreen ) { | 501 | if ( KOPrefs::instance()->mVerticalScreen ) { |
502 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); | 502 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); |
503 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); | 503 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); |
504 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); | 504 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); |
505 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); | 505 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); |
506 | } else { | 506 | } else { |
507 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); | 507 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); |
508 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); | 508 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); |
509 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); | 509 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); |
510 | } | 510 | } |
511 | if ( !KOPrefs::instance()->mShowDateNavigator) | 511 | if ( !KOPrefs::instance()->mShowDateNavigator) |
512 | mDateNavigator->hide(); | 512 | mDateNavigator->hide(); |
513 | //qDebug("Calendarview Size %d %d ", width(), height()); | 513 | //qDebug("Calendarview Size %d %d ", width(), height()); |
514 | #endif | 514 | #endif |
515 | 515 | ||
516 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 516 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
517 | SLOT( showDates( const KCal::DateList & ) ) ); | 517 | SLOT( showDates( const KCal::DateList & ) ) ); |
518 | 518 | ||
519 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 519 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
520 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 520 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
521 | 521 | ||
522 | 522 | ||
523 | 523 | ||
524 | connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), | 524 | connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), |
525 | mViewManager, SLOT( showMonth( const QDate & ) ) ); | 525 | mViewManager, SLOT( showMonth( const QDate & ) ) ); |
526 | 526 | ||
527 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), | 527 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), |
528 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); | 528 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); |
529 | 529 | ||
530 | connect( mDateNavigator, SIGNAL( goPrevYear() ), | 530 | connect( mDateNavigator, SIGNAL( goPrevYear() ), |
531 | mNavigator, SLOT( selectPreviousYear() ) ); | 531 | mNavigator, SLOT( selectPreviousYear() ) ); |
532 | connect( mDateNavigator, SIGNAL( goNextYear() ), | 532 | connect( mDateNavigator, SIGNAL( goNextYear() ), |
533 | mNavigator, SLOT( selectNextYear() ) ); | 533 | mNavigator, SLOT( selectNextYear() ) ); |
534 | connect( mDateNavigator, SIGNAL( goPrevMonth() ), | 534 | connect( mDateNavigator, SIGNAL( goPrevMonth() ), |
535 | mNavigator, SLOT( selectPreviousMonth() ) ); | 535 | mNavigator, SLOT( selectPreviousMonth() ) ); |
536 | connect( mDateNavigator, SIGNAL( goNextMonth() ), | 536 | connect( mDateNavigator, SIGNAL( goNextMonth() ), |
537 | mNavigator, SLOT( selectNextMonth() ) ); | 537 | mNavigator, SLOT( selectNextMonth() ) ); |
538 | 538 | ||
539 | connect( mDateNavigator, SIGNAL( goPrevious() ), | 539 | connect( mDateNavigator, SIGNAL( goPrevious() ), |
540 | mNavigator, SLOT( selectPrevious() ) ); | 540 | mNavigator, SLOT( selectPrevious() ) ); |
541 | connect( mDateNavigator, SIGNAL( goNext() ), | 541 | connect( mDateNavigator, SIGNAL( goNext() ), |
542 | mNavigator, SLOT( selectNext() ) ); | 542 | mNavigator, SLOT( selectNext() ) ); |
543 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), | 543 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), |
544 | mNavigator, SLOT( slotMonthSelect( int ) ) ); | 544 | mNavigator, SLOT( slotMonthSelect( int ) ) ); |
545 | 545 | ||
546 | connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 546 | connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
547 | mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 547 | mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
548 | #if 0 | 548 | #if 0 |
549 | connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), | 549 | connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), |
550 | SLOT( incidenceAdded( Incidence *) ) ); | 550 | SLOT( incidenceAdded( Incidence *) ) ); |
551 | #endif | 551 | #endif |
552 | // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); | 552 | // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); |
553 | 553 | ||
554 | connect( this, SIGNAL( configChanged() ), | 554 | connect( this, SIGNAL( configChanged() ), |
555 | mDateNavigator, SLOT( updateConfig() ) ); | 555 | mDateNavigator, SLOT( updateConfig() ) ); |
556 | 556 | ||
557 | connect( mTodoList, SIGNAL( newTodoSignal() ), | 557 | connect( mTodoList, SIGNAL( newTodoSignal() ), |
558 | SLOT( newTodo() ) ); | 558 | SLOT( newTodo() ) ); |
559 | connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), | 559 | connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), |
560 | SLOT( newSubTodo( Todo * ) ) ); | 560 | SLOT( newSubTodo( Todo * ) ) ); |
561 | connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), | 561 | connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), |
562 | SLOT( editTodo( Todo * ) ) ); | 562 | SLOT( editTodo( Todo * ) ) ); |
563 | connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), | 563 | connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), |
564 | SLOT( showTodo( Todo *) ) ); | 564 | SLOT( showTodo( Todo *) ) ); |
565 | connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), | 565 | connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), |
566 | SLOT( deleteTodo( Todo *) ) ); | 566 | SLOT( deleteTodo( Todo *) ) ); |
567 | connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); | 567 | connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); |
568 | connect( mTodoList, SIGNAL( purgeCompletedSignal() ), | 568 | connect( mTodoList, SIGNAL( purgeCompletedSignal() ), |
569 | SLOT( purgeCompleted() ) ); | 569 | SLOT( purgeCompleted() ) ); |
570 | connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), | 570 | connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), |
571 | SIGNAL( todoModified( Todo *, int ) ) ); | 571 | SIGNAL( todoModified( Todo *, int ) ) ); |
572 | 572 | ||
573 | connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), | 573 | connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), |
574 | this, SLOT ( cloneIncidence( Incidence * ) ) ); | 574 | this, SLOT ( cloneIncidence( Incidence * ) ) ); |
575 | connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), | 575 | connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), |
576 | this, SLOT (cancelIncidence( Incidence * ) ) ); | 576 | this, SLOT (cancelIncidence( Incidence * ) ) ); |
577 | 577 | ||
578 | connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), | 578 | connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), |
579 | this, SLOT ( moveIncidence( Incidence * ) ) ); | 579 | this, SLOT ( moveIncidence( Incidence * ) ) ); |
580 | connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), | 580 | connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), |
581 | this, SLOT ( beamIncidence( Incidence * ) ) ); | 581 | this, SLOT ( beamIncidence( Incidence * ) ) ); |
582 | 582 | ||
583 | connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), | 583 | connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), |
584 | this, SLOT ( todo_unsub( Todo * ) ) ); | 584 | this, SLOT ( todo_unsub( Todo * ) ) ); |
585 | 585 | ||
586 | connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), | 586 | connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), |
587 | this, SLOT ( todo_resub( Todo *,Todo * ) ) ); | 587 | this, SLOT ( todo_resub( Todo *,Todo * ) ) ); |
588 | connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, | 588 | connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, |
589 | SLOT( updateTodo( Todo *, int ) ) ); | 589 | SLOT( updateTodo( Todo *, int ) ) ); |
590 | connect( this, SIGNAL( todoModified( Todo *, int )), this, | 590 | connect( this, SIGNAL( todoModified( Todo *, int )), this, |
591 | SLOT( changeTodoDisplay( Todo *, int ) ) ); | 591 | SLOT( changeTodoDisplay( Todo *, int ) ) ); |
592 | 592 | ||
593 | 593 | ||
594 | connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); | 594 | connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); |
595 | connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); | 595 | connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); |
596 | connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); | 596 | connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); |
597 | connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); | 597 | connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); |
598 | 598 | ||
599 | 599 | ||
600 | 600 | ||
601 | 601 | ||
602 | 602 | ||
603 | connect(QApplication::clipboard(),SIGNAL(dataChanged()), | 603 | connect(QApplication::clipboard(),SIGNAL(dataChanged()), |
604 | SLOT(checkClipboard())); | 604 | SLOT(checkClipboard())); |
605 | connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), | 605 | connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), |
606 | SLOT( processTodoListSelection( Incidence * ) ) ); | 606 | SLOT( processTodoListSelection( Incidence * ) ) ); |
607 | connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); | 607 | connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); |
608 | 608 | ||
609 | // kdDebug() << "CalendarView::CalendarView() done" << endl; | 609 | // kdDebug() << "CalendarView::CalendarView() done" << endl; |
610 | 610 | ||
611 | mDateFrame = new QVBox(0,0,WType_Popup); | 611 | mDateFrame = new QVBox(0,0,WType_Popup); |
612 | //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); | 612 | //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); |
613 | mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); | 613 | mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); |
614 | mDateFrame->setLineWidth(3); | 614 | mDateFrame->setLineWidth(3); |
615 | mDateFrame->hide(); | 615 | mDateFrame->hide(); |
616 | mDateFrame->setCaption( i18n( "Pick a date to display")); | 616 | mDateFrame->setCaption( i18n( "Pick a date to display")); |
617 | mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); | 617 | mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); |
618 | 618 | ||
619 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); | 619 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); |
620 | 620 | ||
621 | mEventEditor = mDialogManager->getEventEditor(); | 621 | mEventEditor = mDialogManager->getEventEditor(); |
622 | mTodoEditor = mDialogManager->getTodoEditor(); | 622 | mTodoEditor = mDialogManager->getTodoEditor(); |
623 | 623 | ||
624 | mFlagEditDescription = false; | 624 | mFlagEditDescription = false; |
625 | 625 | ||
626 | mSuspendTimer = new QTimer( this ); | 626 | mSuspendTimer = new QTimer( this ); |
627 | mAlarmTimer = new QTimer( this ); | 627 | mAlarmTimer = new QTimer( this ); |
628 | mRecheckAlarmTimer = new QTimer( this ); | 628 | mRecheckAlarmTimer = new QTimer( this ); |
629 | connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); | 629 | connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); |
630 | connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); | 630 | connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); |
631 | connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); | 631 | connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); |
632 | mAlarmDialog = new AlarmDialog( this ); | 632 | mAlarmDialog = new AlarmDialog( this ); |
633 | connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); | 633 | connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); |
634 | mAlarmDialog->setServerNotification( false ); | 634 | mAlarmDialog->setServerNotification( false ); |
635 | mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); | 635 | mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); |
636 | 636 | ||
637 | 637 | ||
638 | #ifndef DESKTOP_VERSION | 638 | #ifndef DESKTOP_VERSION |
639 | //US listen for arriving address resultsets | 639 | //US listen for arriving address resultsets |
640 | connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), | 640 | connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), |
641 | this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); | 641 | this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); |
642 | #endif | 642 | #endif |
643 | mDateNavigator->setCalendar( mCalendar ); | 643 | mDateNavigator->setCalendar( mCalendar ); |
644 | } | 644 | } |
645 | 645 | ||
646 | 646 | ||
647 | CalendarView::~CalendarView() | 647 | CalendarView::~CalendarView() |
648 | { | 648 | { |
649 | // kdDebug() << "~CalendarView()" << endl; | 649 | // kdDebug() << "~CalendarView()" << endl; |
650 | //qDebug("CalendarView::~CalendarView() "); | 650 | //qDebug("CalendarView::~CalendarView() "); |
651 | delete mDialogManager; | 651 | delete mDialogManager; |
652 | delete mViewManager; | 652 | delete mViewManager; |
653 | delete mStorage; | 653 | delete mStorage; |
654 | delete mDateFrame ; | 654 | delete mDateFrame ; |
655 | delete mEventViewerDialog; | 655 | delete mEventViewerDialog; |
656 | //kdDebug() << "~CalendarView() done" << endl; | 656 | //kdDebug() << "~CalendarView() done" << endl; |
657 | } | 657 | } |
658 | 658 | ||
659 | 659 | ||
660 | void CalendarView::nextConflict( bool all, bool allday ) | 660 | void CalendarView::nextConflict( bool all, bool allday ) |
661 | { | 661 | { |
662 | static bool block = false; | 662 | static bool block = false; |
663 | if ( block ) return; | 663 | if ( block ) return; |
664 | block = true; | 664 | block = true; |
665 | QPtrList<Event> testlist = mCalendar->events(); | 665 | QPtrList<Event> testlist = mCalendar->events(); |
666 | Event * test = testlist.first(); | 666 | Event * test = testlist.first(); |
667 | while ( test ) { | 667 | while ( test ) { |
668 | test->setTagged( false ); | 668 | test->setTagged( false ); |
669 | test = testlist.next(); | 669 | test = testlist.next(); |
670 | } | 670 | } |
671 | QTime st ( 0,0,0); | 671 | QTime st ( 0,0,0); |
672 | if ( mViewManager->currentView() == mViewManager->agendaView() ) | 672 | if ( mViewManager->currentView() == mViewManager->agendaView() ) |
673 | st = mViewManager->agendaView()->agenda()->getEndTime(); | 673 | st = mViewManager->agendaView()->agenda()->getEndTime(); |
674 | //qDebug("time %s ", st.toString().latin1()); | 674 | //qDebug("time %s ", st.toString().latin1()); |
675 | QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st); | 675 | QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st); |
676 | QDateTime conflict; | 676 | QDateTime conflict; |
677 | QDateTime retVal; | 677 | QDateTime retVal; |
678 | bool found = false; | 678 | bool found = false; |
679 | Event * cE = 0; | 679 | Event * cE = 0; |
680 | Event * cE2 = 0; | 680 | Event * cE2 = 0; |
681 | QPtrList<Event> testlist2 = testlist; | 681 | QPtrList<Event> testlist2 = testlist; |
682 | test = testlist.first(); | 682 | test = testlist.first(); |
683 | bool skip = false; | 683 | bool skip = false; |
684 | topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); | 684 | topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); |
685 | //QTime tm; | 685 | //QTime tm; |
686 | //tm.start(); | 686 | //tm.start(); |
687 | while ( test ) { | 687 | while ( test ) { |
688 | qApp->processEvents(); | 688 | qApp->processEvents(); |
689 | skip = false; | 689 | skip = false; |
690 | if ( !all ) skip = ( allday != test->doesFloat() ); | 690 | if ( !all ) skip = ( allday != test->doesFloat() ); |
691 | if ( !skip ) { | 691 | if ( !skip ) { |
692 | if ( found ) | 692 | if ( found ) |
693 | skip = !test->matchTime( &startDT, &conflict ); | 693 | skip = !test->matchTime( &startDT, &conflict ); |
694 | else | 694 | else |
695 | skip = !test->matchTime( &startDT, 0 ); | 695 | skip = !test->matchTime( &startDT, 0 ); |
696 | } | 696 | } |
697 | if ( !skip ) { | 697 | if ( !skip ) { |
698 | Event * test2 = testlist2.first(); | 698 | Event * test2 = testlist2.first(); |
699 | while ( test2 ) { | 699 | while ( test2 ) { |
700 | skip = test2->isTagged(); | 700 | skip = test2->isTagged(); |
701 | if ( !skip && !all ) skip = ( allday != test2->doesFloat() ); | 701 | if ( !skip && !all ) skip = ( allday != test2->doesFloat() ); |
702 | if ( !skip ) { | 702 | if ( !skip ) { |
703 | if ( found ) | 703 | if ( found ) |
704 | skip = !test2->matchTime( &startDT, &conflict ); | 704 | skip = !test2->matchTime( &startDT, &conflict ); |
705 | else | 705 | else |
706 | skip = !test2->matchTime( &startDT, 0 ); | 706 | skip = !test2->matchTime( &startDT, 0 ); |
707 | } | 707 | } |
708 | if ( !skip ) { | 708 | if ( !skip ) { |
709 | if ( test->isOverlapping ( test2, &retVal, &startDT ) ) { | 709 | if ( test->isOverlapping ( test2, &retVal, &startDT ) ) { |
710 | //qDebug("overlap "); | 710 | //qDebug("overlap "); |
711 | if ( ! found ) { | 711 | if ( ! found ) { |
712 | if ( retVal >= startDT ) { | 712 | if ( retVal >= startDT ) { |
713 | conflict = retVal; | 713 | conflict = retVal; |
714 | cE = test; | 714 | cE = test; |
715 | cE2 = test2; | 715 | cE2 = test2; |
716 | found = true; | 716 | found = true; |
717 | } | 717 | } |
718 | } else { | 718 | } else { |
719 | if ( retVal >= startDT && retVal < conflict ) { | 719 | if ( retVal >= startDT && retVal < conflict ) { |
720 | conflict = retVal; | 720 | conflict = retVal; |
721 | cE = test; | 721 | cE = test; |
722 | cE2 = test2; | 722 | cE2 = test2; |
723 | } | 723 | } |
724 | } | 724 | } |
725 | } | 725 | } |
726 | } | 726 | } |
727 | test2 = testlist2.next(); | 727 | test2 = testlist2.next(); |
728 | } | 728 | } |
729 | } | 729 | } |
730 | test->setTagged( true ); | 730 | test->setTagged( true ); |
731 | test = testlist.next(); | 731 | test = testlist.next(); |
732 | } | 732 | } |
733 | //qDebug("Search time : %d", tm.elapsed()); | 733 | //qDebug("Search time : %d", tm.elapsed()); |
734 | if ( found ) { | 734 | if ( found ) { |
735 | if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) | 735 | if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) |
736 | mViewManager->showDayView(); | 736 | mViewManager->showDayView(); |
737 | mNavigator->slotDaySelect( conflict.date() ); | 737 | mNavigator->slotDaySelect( conflict.date() ); |
738 | int hour = conflict.time().hour(); | 738 | int hour = conflict.time().hour(); |
739 | mViewManager->agendaView()->setStartHour( hour ); | 739 | mViewManager->agendaView()->setStartHour( hour ); |
740 | topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( cE->summary().left( 20 ) ).arg( cE2->summary().left( 20 ) ) ); | 740 | topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( cE->summary().left( 20 ) ).arg( cE2->summary().left( 20 ) ) ); |
741 | block = false; | 741 | block = false; |
742 | return; | 742 | return; |
743 | } | 743 | } |
744 | 744 | ||
745 | topLevelWidget()->setCaption( i18n("No conflict found") ); | 745 | topLevelWidget()->setCaption( i18n("No conflict found") ); |
746 | //qDebug("No conflict found "); | 746 | //qDebug("No conflict found "); |
747 | block = false; | 747 | block = false; |
748 | return; | 748 | return; |
749 | } | 749 | } |
750 | 750 | ||
751 | void CalendarView::conflictAll() | 751 | void CalendarView::conflictAll() |
752 | { | 752 | { |
753 | nextConflict ( true, true ); | 753 | nextConflict ( true, true ); |
754 | } | 754 | } |
755 | void CalendarView::conflictAllday() | 755 | void CalendarView::conflictAllday() |
756 | { | 756 | { |
757 | nextConflict ( false, true ); | 757 | nextConflict ( false, true ); |
758 | } | 758 | } |
759 | void CalendarView::conflictNotAll() | 759 | void CalendarView::conflictNotAll() |
760 | { | 760 | { |
761 | nextConflict ( false, false ); | 761 | nextConflict ( false, false ); |
762 | } | 762 | } |
763 | 763 | ||
764 | void CalendarView::setCalReadOnly( int id, bool readO ) | 764 | void CalendarView::setCalReadOnly( int id, bool readO ) |
765 | { | 765 | { |
766 | if ( readO ) { | 766 | if ( readO ) { |
767 | emit save(); | 767 | emit save(); |
768 | } | 768 | } |
769 | mCalendar->setReadOnly( id, readO ); | 769 | mCalendar->setReadOnly( id, readO ); |
770 | } | 770 | } |
771 | void CalendarView::setScrollBarStep(int val ) | 771 | void CalendarView::setScrollBarStep(int val ) |
772 | { | 772 | { |
773 | #ifdef DESKTOP_VERSION | 773 | #ifdef DESKTOP_VERSION |
774 | mDateScrollBar->setLineStep ( val ); | 774 | mDateScrollBar->setLineStep ( val ); |
775 | #endif | 775 | #endif |
776 | } | 776 | } |
777 | void CalendarView::scrollBarValue(int val ) | 777 | void CalendarView::scrollBarValue(int val ) |
778 | { | 778 | { |
779 | #ifdef DESKTOP_VERSION | 779 | #ifdef DESKTOP_VERSION |
780 | if ( QApplication::desktop()->width() < 800 ) return; | 780 | if ( QApplication::desktop()->width() < 800 ) return; |
781 | static bool block = false; | 781 | static bool block = false; |
782 | if ( block ) return; | 782 | if ( block ) return; |
783 | block = true; | 783 | block = true; |
784 | int count = mNavigator->selectedDates().count(); | 784 | int count = mNavigator->selectedDates().count(); |
785 | int day = mNavigator->selectedDates().first().dayOfYear(); | 785 | int day = mNavigator->selectedDates().first().dayOfYear(); |
786 | int stepdays = val; | 786 | int stepdays = val; |
787 | if ( mDateScrollBar->lineStep () <= count ) { | 787 | if ( mDateScrollBar->lineStep () <= count ) { |
788 | //val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); | 788 | //val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); |
789 | //qDebug("VAL %d ",val ); | 789 | //qDebug("VAL %d ",val ); |
790 | stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); | 790 | stepdays = (val-day)/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); |
791 | stepdays = day+stepdays; | 791 | stepdays = day+stepdays; |
792 | if ( stepdays < 0 ) stepdays = 0; | 792 | if ( stepdays < 0 ) stepdays = 0; |
793 | } | 793 | } |
794 | if ( stepdays == day ) { | 794 | if ( stepdays == day ) { |
795 | block = false; | 795 | block = false; |
796 | return; | 796 | return; |
797 | } | 797 | } |
798 | int year = mNavigator->selectedDates().first().year(); | 798 | int year = mNavigator->selectedDates().first().year(); |
799 | QDate d ( year,1,1 ); | 799 | QDate d ( year,1,1 ); |
800 | mNavigator->selectDates( d.addDays( stepdays-1) , count ); | 800 | mNavigator->selectDates( d.addDays( stepdays-1) , count ); |
801 | block = false; | 801 | block = false; |
802 | #endif | 802 | #endif |
803 | 803 | ||
804 | } | 804 | } |
805 | void CalendarView::updateView(const QDate &start, const QDate &end) | 805 | void CalendarView::updateView(const QDate &start, const QDate &end) |
806 | { | 806 | { |
807 | #ifdef DESKTOP_VERSION | 807 | #ifdef DESKTOP_VERSION |
808 | if ( ! mDateScrollBar->draggingSlider () ) { | 808 | if ( ! mDateScrollBar->draggingSlider () ) { |
809 | int dof = start.dayOfYear(); | 809 | int dof = start.dayOfYear(); |
810 | //qDebug("dof %d day %d val %d ", dof, start.dayOfYear(),mDateScrollBar->value() ); | 810 | //qDebug("dof %d day %d val %d ", dof, start.dayOfYear(),mDateScrollBar->value() ); |
811 | if ( dof != mDateScrollBar->value() ) { | 811 | if ( dof != mDateScrollBar->value() ) { |
812 | mDateScrollBar->blockSignals( true ); | 812 | mDateScrollBar->blockSignals( true ); |
813 | mDateScrollBar->setValue( start.dayOfYear()); | 813 | mDateScrollBar->setValue( start.dayOfYear()); |
814 | mDateScrollBar->blockSignals( false ); | 814 | mDateScrollBar->blockSignals( false ); |
815 | } | 815 | } |
816 | } | 816 | } |
817 | #endif | 817 | #endif |
818 | mTodoList->updateView(); | 818 | mTodoList->updateView(); |
819 | mViewManager->updateView(start, end); | 819 | mViewManager->updateView(start, end); |
820 | //mDateNavigator->updateView(); | 820 | //mDateNavigator->updateView(); |
821 | } | 821 | } |
822 | 822 | ||
823 | 823 | ||
824 | 824 | ||
825 | void CalendarView::checkFiles() | 825 | void CalendarView::checkFiles() |
826 | { | 826 | { |
827 | QString message; | 827 | QString message; |
828 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 828 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
829 | KopiCalendarFile * cal = calendars.first(); | 829 | KopiCalendarFile * cal = calendars.first(); |
830 | while ( cal ) { | 830 | while ( cal ) { |
831 | if ( cal->mErrorOnLoad ) { | 831 | if ( cal->mErrorOnLoad ) { |
832 | message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n"; | 832 | message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n"; |
833 | } | 833 | } |
834 | cal = calendars.next(); | 834 | cal = calendars.next(); |
835 | } | 835 | } |
836 | if ( !message.isEmpty() ) { | 836 | if ( !message.isEmpty() ) { |
837 | message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); | 837 | message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); |
838 | KMessageBox::error(this,message, i18n("Loading of calendar(s) failed")); | 838 | KMessageBox::error(this,message, i18n("Loading of calendar(s) failed")); |
839 | } | 839 | } |
840 | static bool firstTime = true; | 840 | static bool firstTime = true; |
841 | if ( firstTime ) { | 841 | if ( firstTime ) { |
842 | firstTime = false; | 842 | firstTime = false; |
843 | QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); | 843 | QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); |
844 | } | 844 | } |
845 | } | 845 | } |
846 | void CalendarView::checkAlarms() | 846 | void CalendarView::checkAlarms() |
847 | { | 847 | { |
848 | KConfig *config = KOGlobals::config(); | 848 | KConfig *config = KOGlobals::config(); |
849 | config->setGroup( "AppRun" ); | 849 | config->setGroup( "AppRun" ); |
850 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); | 850 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); |
851 | int daysto = dt.daysTo( QDate::currentDate() ); | 851 | int daysto = dt.daysTo( QDate::currentDate() ); |
852 | int days = config->readNumEntry( "LatestProgramStopDays" , daysto); | 852 | int days = config->readNumEntry( "LatestProgramStopDays" , daysto); |
853 | dt = dt.addDays( days ); | 853 | dt = dt.addDays( days ); |
854 | int secto = dt.secsTo( QDateTime::currentDateTime() ); | 854 | int secto = dt.secsTo( QDateTime::currentDateTime() ); |
855 | int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; | 855 | int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; |
856 | //qDebug("KO: Reading program stop %d ", secs); | 856 | //qDebug("KO: Reading program stop %d ", secs); |
857 | //secs -= ( 3600 * 24*3 ); // debug only | 857 | //secs -= ( 3600 * 24*3 ); // debug only |
858 | QDateTime latest = dt.addSecs ( secs ); | 858 | QDateTime latest = dt.addSecs ( secs ); |
859 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); | 859 | qDebug("KO: Last termination on %s ", latest.toString().latin1()); |
860 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); | 860 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); |
861 | QPtrList<Incidence> el = mCalendar->rawIncidences(); | 861 | QPtrList<Incidence> el = mCalendar->rawIncidences(); |
862 | QPtrList<Incidence> al; | 862 | QPtrList<Incidence> al; |
863 | Incidence* inL = el.first(); | 863 | Incidence* inL = el.first(); |
864 | QDateTime cur = QDateTime::currentDateTime().addSecs(-59); | 864 | QDateTime cur = QDateTime::currentDateTime().addSecs(-59); |
865 | qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); | 865 | qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); |
866 | while ( inL ) { | 866 | while ( inL ) { |
867 | bool ok = false; | 867 | bool ok = false; |
868 | int offset = 0; | 868 | int offset = 0; |
869 | QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; | 869 | QDateTime next = inL->getNextAlarmDateTime(& ok, &offset, latest ) ; |
870 | if ( ok ) { | 870 | if ( ok ) { |
871 | //qDebug("OK %s",next.toString().latin1()); | 871 | //qDebug("OK %s",next.toString().latin1()); |
872 | if ( next < cur ) { | 872 | if ( next < cur ) { |
873 | al.append( inL ); | 873 | al.append( inL ); |
874 | //qDebug("found missed alarm: %s ", inL->summary().latin1() ); | 874 | //qDebug("found missed alarm: %s ", inL->summary().latin1() ); |
875 | } | 875 | } |
876 | } | 876 | } |
877 | inL = el.next(); | 877 | inL = el.next(); |
878 | } | 878 | } |
879 | if ( al.count() ) { | 879 | if ( al.count() ) { |
880 | QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); | 880 | QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); |
881 | dia->setCaption( i18n("KO/Pi: Missing alarms!") ); | 881 | dia->setCaption( i18n("KO/Pi: Missing alarms!") ); |
882 | QVBoxLayout* lay = new QVBoxLayout( dia ); | 882 | QVBoxLayout* lay = new QVBoxLayout( dia ); |
883 | lay->setSpacing( 0 ); | 883 | lay->setSpacing( 0 ); |
884 | lay->setMargin( 0 ); | 884 | lay->setMargin( 0 ); |
885 | MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); | 885 | MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); |
886 | connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); | 886 | connect( matb, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); |
887 | lay->addWidget( matb ); | 887 | lay->addWidget( matb ); |
888 | if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) { | 888 | if ( QApplication::desktop()->width() == 480 || QApplication::desktop()->width() == 640 ) { |
889 | int wid = 210; | 889 | int wid = 210; |
890 | int x = QApplication::desktop()->width() - wid - 7; | 890 | int x = QApplication::desktop()->width() - wid - 7; |
891 | int y = QApplication::desktop()->height() - wid - 70; | 891 | int y = QApplication::desktop()->height() - wid - 70; |
892 | dia->setGeometry ( x,y,wid,wid); | 892 | dia->setGeometry ( x,y,wid,wid); |
893 | } else { | 893 | } else { |
894 | int si = 220; | 894 | int si = 220; |
895 | if ( QApplication::desktop()->width() > 470 ) | 895 | if ( QApplication::desktop()->width() > 470 ) |
896 | si = 400; | 896 | si = 400; |
897 | dia->resize(si,si/2); | 897 | dia->resize(si,si/2); |
898 | } | 898 | } |
899 | dia->setBackgroundColor( QColor( 255, 255, 255 ) ); | 899 | dia->setBackgroundColor( QColor( 255, 255, 255 ) ); |
900 | dia->show(); | 900 | dia->show(); |
901 | 901 | ||
902 | } | 902 | } |
903 | #if 0 | 903 | #if 0 |
904 | // for creating timetracker test data | 904 | // for creating timetracker test data |
905 | qDebug("CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc "); | 905 | qDebug("CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc "); |
906 | Todo * nt; | 906 | Todo * nt; |
907 | mCalendar->close(); | 907 | mCalendar->close(); |
908 | { | 908 | { |
909 | Todo * root1 = new Todo; | 909 | Todo * root1 = new Todo; |
910 | mCalendar->addTodo( root1 ); | 910 | mCalendar->addTodo( root1 ); |
911 | root1->setSummary( "Project1"); | 911 | root1->setSummary( "Project1"); |
912 | root1->setPriority( 1 ); | 912 | root1->setPriority( 1 ); |
913 | root1->setCategories( QString( "Cat_Pro1") ); | 913 | root1->setCategories( QString( "Cat_Pro1") ); |
914 | root1->setDescription( "This is a test description of a root Project" ); | 914 | root1->setDescription( "This is a test description of a root Project" ); |
915 | root1->setPercentComplete( 20 ); | 915 | root1->setPercentComplete( 20 ); |
916 | updateView(); | 916 | updateView(); |
917 | QDateTime start = QDateTime ( QDate( 2004,11,1), QTime ( 7,30,0) ); | 917 | QDateTime start = QDateTime ( QDate( 2004,11,1), QTime ( 7,30,0) ); |
918 | QDateTime end = QDateTime ( QDate( 2005,8,5), QTime ( 0,0,0) ); | 918 | QDateTime end = QDateTime ( QDate( 2005,8,5), QTime ( 0,0,0) ); |
919 | 919 | ||
920 | nt = new Todo; | 920 | nt = new Todo; |
921 | mCalendar->addTodo( nt ); | 921 | mCalendar->addTodo( nt ); |
922 | nt->setSummary( "Planning Project1"); | 922 | nt->setSummary( "Planning Project1"); |
923 | nt->setPriority( 1 ); | 923 | nt->setPriority( 1 ); |
924 | nt->setDescription( "This is a test description of Planning Project1" ); | 924 | nt->setDescription( "This is a test description of Planning Project1" ); |
925 | nt->setPercentComplete( 20 ); | 925 | nt->setPercentComplete( 20 ); |
926 | nt->setCategories( QString( "Cat_Pro1,Cat_Plan_Pro1") ); | 926 | nt->setCategories( QString( "Cat_Pro1,Cat_Plan_Pro1") ); |
927 | 927 | ||
928 | 928 | ||
929 | Todo * sub1 = nt; | 929 | Todo * sub1 = nt; |
930 | sub1->setRelatedTo( root1 ); | 930 | sub1->setRelatedTo( root1 ); |
931 | 931 | ||
932 | nt = new Todo; | 932 | nt = new Todo; |
933 | mCalendar->addTodo( nt ); | 933 | mCalendar->addTodo( nt ); |
934 | nt->setSummary( "Planning Project1: Lutz"); | 934 | nt->setSummary( "Planning Project1: Lutz"); |
935 | nt->setPriority( 1 ); | 935 | nt->setPriority( 1 ); |
936 | nt->setDescription( "This todo counts the actual work of a person on a project" ); | 936 | nt->setDescription( "This todo counts the actual work of a person on a project" ); |
937 | nt->setPercentComplete( 20 ); | 937 | nt->setPercentComplete( 20 ); |
938 | nt->setCategories( QString( "Cat_Pro1,Cat_Plan_Pro1,Cat_Work_Lutz") ); | 938 | nt->setCategories( QString( "Cat_Pro1,Cat_Plan_Pro1,Cat_Work_Lutz") ); |
939 | Todo * workLutz11 = nt; | 939 | Todo * workLutz11 = nt; |
940 | workLutz11->setRelatedTo( sub1 ); | 940 | workLutz11->setRelatedTo( sub1 ); |
941 | 941 | ||
942 | nt = new Todo; | 942 | nt = new Todo; |
943 | mCalendar->addTodo( nt ); | 943 | mCalendar->addTodo( nt ); |
944 | nt->setSummary( "Planning Project1: Norbert"); | 944 | nt->setSummary( "Planning Project1: Norbert"); |
945 | nt->setPriority( 1 ); | 945 | nt->setPriority( 1 ); |
946 | nt->setDescription( "This todo counts the actual work of a person on a project" ); | 946 | nt->setDescription( "This todo counts the actual work of a person on a project" ); |
947 | nt->setPercentComplete( 20 ); | 947 | nt->setPercentComplete( 20 ); |
948 | nt->setCategories( QString( "Cat_Pro1,Cat_Plan_Pro1,Cat_Work_Norbert") ); | 948 | nt->setCategories( QString( "Cat_Pro1,Cat_Plan_Pro1,Cat_Work_Norbert") ); |
949 | Todo * workNorbert11 = nt; | 949 | Todo * workNorbert11 = nt; |
950 | workNorbert11->setRelatedTo( sub1 ); | 950 | workNorbert11->setRelatedTo( sub1 ); |
951 | 951 | ||
952 | nt = new Todo; | 952 | nt = new Todo; |
953 | mCalendar->addTodo( nt ); | 953 | mCalendar->addTodo( nt ); |
954 | nt->setSummary( "Work on 1"); | 954 | nt->setSummary( "Work on 1"); |
955 | nt->setPriority( 1 ); | 955 | nt->setPriority( 1 ); |
956 | nt->setDescription( "This is a test description of Work Project_1" ); | 956 | nt->setDescription( "This is a test description of Work Project_1" ); |
957 | nt->setCategories( QString( "Cat_Pro1,Cat_Work_Pro1") ); | 957 | nt->setCategories( QString( "Cat_Pro1,Cat_Work_Pro1") ); |
958 | nt->setPercentComplete( 20 ); | 958 | nt->setPercentComplete( 20 ); |
959 | 959 | ||
960 | Todo * sub2 = nt; | 960 | Todo * sub2 = nt; |
961 | sub2->setRelatedTo( root1 ); | 961 | sub2->setRelatedTo( root1 ); |
962 | 962 | ||
963 | 963 | ||
964 | nt = new Todo; | 964 | nt = new Todo; |
965 | mCalendar->addTodo( nt ); | 965 | mCalendar->addTodo( nt ); |
966 | nt->setSummary( "Work on 1: Lutz"); | 966 | nt->setSummary( "Work on 1: Lutz"); |
967 | nt->setPriority( 1 ); | 967 | nt->setPriority( 1 ); |
968 | nt->setDescription( "This todo counts the actual work of a person on a project" ); | 968 | nt->setDescription( "This todo counts the actual work of a person on a project" ); |
969 | nt->setCategories( QString( "Cat_Pro1,Cat_Work_Pro1,Cat_Work_Lutz") ); | 969 | nt->setCategories( QString( "Cat_Pro1,Cat_Work_Pro1,Cat_Work_Lutz") ); |
970 | nt->setPercentComplete( 20 ); | 970 | nt->setPercentComplete( 20 ); |
971 | Todo * workLutz12 = nt; | 971 | Todo * workLutz12 = nt; |
972 | workLutz12->setRelatedTo( sub2 ); | 972 | workLutz12->setRelatedTo( sub2 ); |
973 | 973 | ||
974 | nt = new Todo; | 974 | nt = new Todo; |
975 | mCalendar->addTodo( nt ); | 975 | mCalendar->addTodo( nt ); |
976 | nt->setSummary( "Work on 1: Norbert"); | 976 | nt->setSummary( "Work on 1: Norbert"); |
977 | nt->setPriority( 1 ); | 977 | nt->setPriority( 1 ); |
978 | nt->setDescription( "This todo counts the actual work of a person on a project" ); | 978 | nt->setDescription( "This todo counts the actual work of a person on a project" ); |
979 | nt->setCategories( QString( "Cat_Pro1,Cat_Work_Pro1,Cat_Work_Norbert") ); | 979 | nt->setCategories( QString( "Cat_Pro1,Cat_Work_Pro1,Cat_Work_Norbert") ); |
980 | nt->setPercentComplete( 20 ); | 980 | nt->setPercentComplete( 20 ); |
981 | Todo * workNorbert12 = nt; | 981 | Todo * workNorbert12 = nt; |
982 | workNorbert12->setRelatedTo( sub2 ); | 982 | workNorbert12->setRelatedTo( sub2 ); |
983 | 983 | ||
984 | int secLenRunning = 7200; | 984 | int secLenRunning = 7200; |
985 | int secLenPausing = 3600 * 3; | 985 | int secLenPausing = 3600 * 3; |
986 | int dayInterval = 1; | 986 | int dayInterval = 1; |
987 | //createRunningDate4Todo( root1, start, end, secLenRunning, secLenPausing, dayInterval ); | 987 | //createRunningDate4Todo( root1, start, end, secLenRunning, secLenPausing, dayInterval ); |
988 | createRunningDate4Todo( root1, start, end, secLenRunning*24, secLenPausing, 14 ); | 988 | createRunningDate4Todo( root1, start, end, secLenRunning*24, secLenPausing, 14 ); |
989 | createRunningDate4Todo( sub1, start.addSecs( secLenRunning ), start.addDays( 10 ), secLenRunning*4, secLenPausing, 1); | 989 | createRunningDate4Todo( sub1, start.addSecs( secLenRunning ), start.addDays( 10 ), secLenRunning*4, secLenPausing, 1); |
990 | createRunningDate4Todo( sub2, start.addDays( 8 ), end, secLenRunning*4, secLenPausing, 3); | 990 | createRunningDate4Todo( sub2, start.addDays( 8 ), end, secLenRunning*4, secLenPausing, 3); |
991 | createRunningDate4Todo( workLutz11, start, start.addDays( 8 ), secLenRunning, secLenPausing, 0); | 991 | createRunningDate4Todo( workLutz11, start, start.addDays( 8 ), secLenRunning, secLenPausing, 0); |
992 | createRunningDate4Todo( workNorbert11, start, start.addDays( 8 ), secLenRunning*2, secLenPausing, 1); | 992 | createRunningDate4Todo( workNorbert11, start, start.addDays( 8 ), secLenRunning*2, secLenPausing, 1); |
993 | createRunningDate4Todo( workLutz12, start.addDays( 8 ),end, secLenRunning*5, secLenPausing, 3); | 993 | createRunningDate4Todo( workLutz12, start.addDays( 8 ),end, secLenRunning*5, secLenPausing, 3); |
994 | createRunningDate4Todo( workNorbert12, start.addDays( 8 ), end, secLenRunning, secLenPausing*3, 0); | 994 | createRunningDate4Todo( workNorbert12, start.addDays( 8 ), end, secLenRunning, secLenPausing*3, 0); |
995 | 995 | ||
996 | } | 996 | } |
997 | 997 | ||
998 | { | 998 | { |
999 | Todo * root1 = new Todo; | 999 | Todo * root1 = new Todo; |
1000 | mCalendar->addTodo( root1 ); | 1000 | mCalendar->addTodo( root1 ); |
1001 | root1->setSummary( "Project2"); | 1001 | root1->setSummary( "Project2"); |
1002 | root1->setPriority( 1 ); | 1002 | root1->setPriority( 1 ); |
1003 | root1->setDescription( "This is a test description of a root Project 2" ); | 1003 | root1->setDescription( "This is a test description of a root Project 2" ); |
1004 | root1->setPercentComplete( 20 ); | 1004 | root1->setPercentComplete( 20 ); |
1005 | root1->setCategories( QString( "Cat_Pro2") ); | 1005 | root1->setCategories( QString( "Cat_Pro2") ); |
1006 | updateView(); | 1006 | updateView(); |
1007 | QDateTime start = QDateTime ( QDate( 2004,11,1), QTime ( 7,30,0) ); | 1007 | QDateTime start = QDateTime ( QDate( 2004,11,1), QTime ( 7,30,0) ); |
1008 | QDateTime end = QDateTime ( QDate( 2005,8,5), QTime ( 0,0,0) ); | 1008 | QDateTime end = QDateTime ( QDate( 2005,8,5), QTime ( 0,0,0) ); |
1009 | int secLenRunning = 7200; | 1009 | int secLenRunning = 7200; |
1010 | int secLenPausing = 3600 * 3; | 1010 | int secLenPausing = 3600 * 3; |
1011 | int dayInterval = 1; | 1011 | int dayInterval = 1; |
1012 | 1012 | ||
1013 | nt = new Todo; | 1013 | nt = new Todo; |
1014 | mCalendar->addTodo( nt ); | 1014 | mCalendar->addTodo( nt ); |
1015 | nt->setSummary( "Planning Project2"); | 1015 | nt->setSummary( "Planning Project2"); |
1016 | nt->setPriority( 1 ); | 1016 | nt->setPriority( 1 ); |
1017 | nt->setDescription( "This is a test description of Planning_Project_2" ); | 1017 | nt->setDescription( "This is a test description of Planning_Project_2" ); |
1018 | nt->setCategories( QString( "Cat_Pro2,Cat_Plan_Pro2") ); | 1018 | nt->setCategories( QString( "Cat_Pro2,Cat_Plan_Pro2") ); |
1019 | nt->setPercentComplete( 20 ); | 1019 | nt->setPercentComplete( 20 ); |
1020 | 1020 | ||
1021 | 1021 | ||
1022 | Todo * sub1 = nt; | 1022 | Todo * sub1 = nt; |
1023 | sub1->setRelatedTo( root1 ); | 1023 | sub1->setRelatedTo( root1 ); |
1024 | 1024 | ||
1025 | nt = new Todo; | 1025 | nt = new Todo; |
1026 | mCalendar->addTodo( nt ); | 1026 | mCalendar->addTodo( nt ); |
1027 | nt->setSummary( "Planning Project2: Lutz"); | 1027 | nt->setSummary( "Planning Project2: Lutz"); |
1028 | nt->setPriority( 1 ); | 1028 | nt->setPriority( 1 ); |
1029 | nt->setDescription( "This todo counts the actual work of a person on a project" ); | 1029 | nt->setDescription( "This todo counts the actual work of a person on a project" ); |
1030 | nt->setCategories( QString( "Cat_Pro2,Cat_Plan_Pro2,Cat_Work_Lutz") ); | 1030 | nt->setCategories( QString( "Cat_Pro2,Cat_Plan_Pro2,Cat_Work_Lutz") ); |
1031 | nt->setPercentComplete( 20 ); | 1031 | nt->setPercentComplete( 20 ); |
1032 | Todo * workLutz11 = nt; | 1032 | Todo * workLutz11 = nt; |
1033 | workLutz11->setRelatedTo( sub1 ); | 1033 | workLutz11->setRelatedTo( sub1 ); |
1034 | 1034 | ||
1035 | nt = new Todo; | 1035 | nt = new Todo; |
1036 | mCalendar->addTodo( nt ); | 1036 | mCalendar->addTodo( nt ); |
1037 | nt->setSummary( "Planning Project2: Norbert"); | 1037 | nt->setSummary( "Planning Project2: Norbert"); |
1038 | nt->setPriority( 1 ); | 1038 | nt->setPriority( 1 ); |
1039 | nt->setDescription( "This todo counts the actual work of a person on a project" ); | 1039 | nt->setDescription( "This todo counts the actual work of a person on a project" ); |
1040 | nt->setCategories( QString( "Cat_Pro2,Cat_Plan_Pro2,Cat_Work_Norbert") ); | 1040 | nt->setCategories( QString( "Cat_Pro2,Cat_Plan_Pro2,Cat_Work_Norbert") ); |
1041 | nt->setPercentComplete( 20 ); | 1041 | nt->setPercentComplete( 20 ); |
1042 | Todo * workNorbert11 = nt; | 1042 | Todo * workNorbert11 = nt; |
1043 | workNorbert11->setRelatedTo( sub1 ); | 1043 | workNorbert11->setRelatedTo( sub1 ); |
1044 | 1044 | ||
1045 | nt = new Todo; | 1045 | nt = new Todo; |
1046 | mCalendar->addTodo( nt ); | 1046 | mCalendar->addTodo( nt ); |
1047 | nt->setSummary( "Work on 2"); | 1047 | nt->setSummary( "Work on 2"); |
1048 | nt->setPriority( 1 ); | 1048 | nt->setPriority( 1 ); |
1049 | nt->setDescription( "This is a test description of Work Project_2" ); | 1049 | nt->setDescription( "This is a test description of Work Project_2" ); |
1050 | nt->setCategories( QString( "Cat_Pro2,Cat_Work_Pro2") ); | 1050 | nt->setCategories( QString( "Cat_Pro2,Cat_Work_Pro2") ); |
1051 | nt->setPercentComplete( 20 ); | 1051 | nt->setPercentComplete( 20 ); |
1052 | 1052 | ||
1053 | Todo * sub2 = nt; | 1053 | Todo * sub2 = nt; |
1054 | sub2->setRelatedTo( root1 ); | 1054 | sub2->setRelatedTo( root1 ); |
1055 | 1055 | ||
1056 | 1056 | ||
1057 | nt = new Todo; | 1057 | nt = new Todo; |
1058 | mCalendar->addTodo( nt ); | 1058 | mCalendar->addTodo( nt ); |
1059 | nt->setSummary( "Work on 2: Lutz"); | 1059 | nt->setSummary( "Work on 2: Lutz"); |
1060 | nt->setPriority( 1 ); | 1060 | nt->setPriority( 1 ); |
1061 | nt->setDescription( "This todo counts the actual work of a person on a project" ); | 1061 | nt->setDescription( "This todo counts the actual work of a person on a project" ); |
1062 | nt->setCategories( QString( "Cat_Pro2,Cat_Work_Pro2,Cat_Work_Lutz") ); | 1062 | nt->setCategories( QString( "Cat_Pro2,Cat_Work_Pro2,Cat_Work_Lutz") ); |
1063 | nt->setPercentComplete( 20 ); | 1063 | nt->setPercentComplete( 20 ); |
1064 | Todo * workLutz12 = nt; | 1064 | Todo * workLutz12 = nt; |
1065 | workLutz12->setRelatedTo( sub2 ); | 1065 | workLutz12->setRelatedTo( sub2 ); |
1066 | 1066 | ||
1067 | nt = new Todo; | 1067 | nt = new Todo; |
1068 | mCalendar->addTodo( nt ); | 1068 | mCalendar->addTodo( nt ); |
1069 | nt->setSummary( "Work on 2: Norbert"); | 1069 | nt->setSummary( "Work on 2: Norbert"); |
1070 | nt->setPriority( 1 ); | 1070 | nt->setPriority( 1 ); |
1071 | nt->setDescription( "This todo counts the actual work of a person on a project" ); | 1071 | nt->setDescription( "This todo counts the actual work of a person on a project" ); |
1072 | nt->setCategories( QString( "Cat_Pro2,Cat_Work_Pro2,Cat_Work_Norbert") ); | 1072 | nt->setCategories( QString( "Cat_Pro2,Cat_Work_Pro2,Cat_Work_Norbert") ); |
1073 | nt->setPercentComplete( 20 ); | 1073 | nt->setPercentComplete( 20 ); |
1074 | Todo * workNorbert12 = nt; | 1074 | Todo * workNorbert12 = nt; |
1075 | workNorbert12->setRelatedTo( sub2 ); | 1075 | workNorbert12->setRelatedTo( sub2 ); |
1076 | createRunningDate4Todo( root1, start, end, secLenRunning, secLenPausing, 10 ); | 1076 | createRunningDate4Todo( root1, start, end, secLenRunning, secLenPausing, 10 ); |
1077 | createRunningDate4Todo( sub1, start.addSecs( secLenRunning*3 ), start.addDays( 20 ), secLenRunning*2, secLenPausing, 2); | 1077 | createRunningDate4Todo( sub1, start.addSecs( secLenRunning*3 ), start.addDays( 20 ), secLenRunning*2, secLenPausing, 2); |
1078 | createRunningDate4Todo( sub2, start.addDays( 8 ), end, secLenRunning*3, secLenPausing, 7); | 1078 | createRunningDate4Todo( sub2, start.addDays( 8 ), end, secLenRunning*3, secLenPausing, 7); |
1079 | createRunningDate4Todo( workLutz11, start, start.addDays( 18 ), secLenRunning/2, secLenPausing*5, 0); | 1079 | createRunningDate4Todo( workLutz11, start, start.addDays( 18 ), secLenRunning/2, secLenPausing*5, 0); |
1080 | createRunningDate4Todo( workNorbert11, start.addDays( 8 ), start.addDays( 18 ), secLenRunning*5, secLenPausing*5, 1); | 1080 | createRunningDate4Todo( workNorbert11, start.addDays( 8 ), start.addDays( 18 ), secLenRunning*5, secLenPausing*5, 1); |
1081 | createRunningDate4Todo( workLutz12, start.addDays( 8 ),end, secLenRunning, secLenPausing*8, 0); | 1081 | createRunningDate4Todo( workLutz12, start.addDays( 8 ),end, secLenRunning, secLenPausing*8, 0); |
1082 | createRunningDate4Todo( workNorbert12, start.addDays( 28 ), end, secLenRunning/8, secLenPausing*6, 0); | 1082 | createRunningDate4Todo( workNorbert12, start.addDays( 28 ), end, secLenRunning/8, secLenPausing*6, 0); |
1083 | } | 1083 | } |
1084 | updateView(); | 1084 | updateView(); |
1085 | #endif | 1085 | #endif |
1086 | 1086 | ||
1087 | } | 1087 | } |
1088 | void CalendarView::createRunningDate4Todo( Todo * runT, QDateTime start , QDateTime end, int secLenRunning, int secLenPausing,int dayInterval ) | 1088 | void CalendarView::createRunningDate4Todo( Todo * runT, QDateTime start , QDateTime end, int secLenRunning, int secLenPausing,int dayInterval ) |
1089 | { | 1089 | { |
1090 | static int ccc = 0; | 1090 | static int ccc = 0; |
1091 | ++ccc; | 1091 | ++ccc; |
1092 | QDateTime t_start = start; | 1092 | QDateTime t_start = start; |
1093 | runT->setPriority( 5 ); | 1093 | runT->setPriority( 5 ); |
1094 | runT->setPercentComplete( 0 ); | 1094 | runT->setPercentComplete( 0 ); |
1095 | int count = 0; | 1095 | int count = 0; |
1096 | int prio = 5; | 1096 | int prio = 5; |
1097 | int complete = 0; | 1097 | int complete = 0; |
1098 | while ( t_start < end ) { | 1098 | while ( t_start < end ) { |
1099 | ++count; | 1099 | ++count; |
1100 | if ( count > ccc ) { | 1100 | if ( count > ccc ) { |
1101 | count = 0; | 1101 | count = 0; |
1102 | --prio; | 1102 | --prio; |
1103 | if ( prio == 0 ) prio = 5; | 1103 | if ( prio == 0 ) prio = 5; |
1104 | complete += 20; | 1104 | complete += 20; |
1105 | if ( complete > 100 ) complete = 0; | 1105 | if ( complete > 100 ) complete = 0; |
1106 | runT->setPriority( prio ); | 1106 | runT->setPriority( prio ); |
1107 | runT->setPercentComplete( complete ); | 1107 | runT->setPercentComplete( complete ); |
1108 | } | 1108 | } |
1109 | runT->setRunning( true ); | 1109 | runT->setRunning( true ); |
1110 | runT->saveRunningInfo( "Additional tt comment: running on "+ t_start.toString(), t_start, t_start.addSecs( secLenRunning ) ); | 1110 | runT->saveRunningInfo( "Additional tt comment: running on "+ t_start.toString(), t_start, t_start.addSecs( secLenRunning ) ); |
1111 | if ( dayInterval ) | 1111 | if ( dayInterval ) |
1112 | t_start = t_start.addDays( dayInterval ); | 1112 | t_start = t_start.addDays( dayInterval ); |
1113 | else { | 1113 | else { |
1114 | t_start = t_start.addSecs( secLenRunning + secLenPausing ); | 1114 | t_start = t_start.addSecs( secLenRunning + secLenPausing ); |
1115 | } | 1115 | } |
1116 | } | 1116 | } |
1117 | } | 1117 | } |
1118 | 1118 | ||
1119 | void CalendarView::showDay( QDate d ) | 1119 | void CalendarView::showDay( QDate d ) |
1120 | { | 1120 | { |
1121 | dateNavigator()->blockSignals( true ); | 1121 | dateNavigator()->blockSignals( true ); |
1122 | dateNavigator()->selectDate( d ); | 1122 | dateNavigator()->selectDate( d ); |
1123 | dateNavigator()->blockSignals( false ); | 1123 | dateNavigator()->blockSignals( false ); |
1124 | mViewManager->showDayView(); | 1124 | mViewManager->showDayView(); |
1125 | //dateNavigator()->selectDate( d ); | 1125 | //dateNavigator()->selectDate( d ); |
1126 | } | 1126 | } |
1127 | void CalendarView::timerAlarm() | 1127 | void CalendarView::timerAlarm() |
1128 | { | 1128 | { |
1129 | //qDebug("CalendarView::timerAlarm() "); | 1129 | //qDebug("CalendarView::timerAlarm() "); |
1130 | computeAlarm(mAlarmNotification ); | 1130 | computeAlarm(mAlarmNotification ); |
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | void CalendarView::suspendAlarm() | 1133 | void CalendarView::suspendAlarm() |
1134 | { | 1134 | { |
1135 | //qDebug(" CalendarView::suspendAlarm() "); | 1135 | //qDebug(" CalendarView::suspendAlarm() "); |
1136 | computeAlarm(mSuspendAlarmNotification ); | 1136 | computeAlarm(mSuspendAlarmNotification ); |
1137 | 1137 | ||
1138 | } | 1138 | } |
1139 | 1139 | ||
1140 | void CalendarView::startAlarm( QString mess , QString filename) | 1140 | void CalendarView::startAlarm( QString mess , QString filename) |
1141 | { | 1141 | { |
1142 | 1142 | ||
1143 | topLevelWidget()->showNormal(); | 1143 | topLevelWidget()->showNormal(); |
1144 | topLevelWidget()->setActiveWindow(); | 1144 | topLevelWidget()->setActiveWindow(); |
1145 | topLevelWidget()->raise(); | 1145 | topLevelWidget()->raise(); |
1146 | 1146 | ||
1147 | mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); | 1147 | mAlarmDialog->eventNotification( mess, KOPrefs::instance()->mAlarmPlayBeeps, filename, true,KOPrefs::instance()->mAlarmBeepInterval ,KOPrefs::instance()->mAlarmSuspendCount ); |
1148 | QTimer::singleShot( 2000, this, SLOT( checkNextTimerAlarm() ) ); | 1148 | QTimer::singleShot( 2000, this, SLOT( checkNextTimerAlarm() ) ); |
1149 | 1149 | ||
1150 | } | 1150 | } |
1151 | 1151 | ||
1152 | void CalendarView::checkNextTimerAlarm() | 1152 | void CalendarView::checkNextTimerAlarm() |
1153 | { | 1153 | { |
1154 | mCalendar->checkAlarmForIncidence( 0, true ); | 1154 | mCalendar->checkAlarmForIncidence( 0, true ); |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | void CalendarView::computeAlarm( QString msg ) | 1157 | void CalendarView::computeAlarm( QString msg ) |
1158 | { | 1158 | { |
1159 | 1159 | ||
1160 | QString mess = msg; | 1160 | QString mess = msg; |
1161 | QString mAlarmMessage = mess.mid( 9 ); | 1161 | QString mAlarmMessage = mess.mid( 9 ); |
1162 | QString filename = MainWindow::resourcePath(); | 1162 | QString filename = MainWindow::resourcePath(); |
1163 | filename += "koalarm.wav"; | 1163 | filename += "koalarm.wav"; |
1164 | QString tempfilename; | 1164 | QString tempfilename; |
1165 | if ( mess.left( 13 ) == "suspend_alarm") { | 1165 | if ( mess.left( 13 ) == "suspend_alarm") { |
1166 | bool error = false; | 1166 | bool error = false; |
1167 | int len = mess.mid( 13 ).find("+++"); | 1167 | int len = mess.mid( 13 ).find("+++"); |
1168 | if ( len < 2 ) | 1168 | if ( len < 2 ) |
1169 | error = true; | 1169 | error = true; |
1170 | else { | 1170 | else { |
1171 | tempfilename = mess.mid( 13, len ); | 1171 | tempfilename = mess.mid( 13, len ); |
1172 | if ( !QFile::exists( tempfilename ) ) | 1172 | if ( !QFile::exists( tempfilename ) ) |
1173 | error = true; | 1173 | error = true; |
1174 | } | 1174 | } |
1175 | if ( ! error ) { | 1175 | if ( ! error ) { |
1176 | filename = tempfilename; | 1176 | filename = tempfilename; |
1177 | } | 1177 | } |
1178 | mAlarmMessage = mess.mid( 13+len+3 ); | 1178 | mAlarmMessage = mess.mid( 13+len+3 ); |
1179 | //qDebug("suspend file %s ",tempfilename.latin1() ); | 1179 | //qDebug("suspend file %s ",tempfilename.latin1() ); |
1180 | startAlarm( mAlarmMessage, filename); | 1180 | startAlarm( mAlarmMessage, filename); |
1181 | return; | 1181 | return; |
1182 | } | 1182 | } |
1183 | if ( mess.left( 11 ) == "timer_alarm") { | 1183 | if ( mess.left( 11 ) == "timer_alarm") { |
1184 | //mTimerTime = 0; | 1184 | //mTimerTime = 0; |
1185 | startAlarm( mess.mid( 11 ), filename ); | 1185 | startAlarm( mess.mid( 11 ), filename ); |
1186 | return; | 1186 | return; |
1187 | } | 1187 | } |
1188 | if ( mess.left( 10 ) == "proc_alarm") { | 1188 | if ( mess.left( 10 ) == "proc_alarm") { |
1189 | bool error = false; | 1189 | bool error = false; |
1190 | int len = mess.mid( 10 ).find("+++"); | 1190 | int len = mess.mid( 10 ).find("+++"); |
1191 | if ( len < 2 ) | 1191 | if ( len < 2 ) |
1192 | error = true; | 1192 | error = true; |
1193 | else { | 1193 | else { |
1194 | tempfilename = mess.mid( 10, len ); | 1194 | tempfilename = mess.mid( 10, len ); |
1195 | if ( !QFile::exists( tempfilename ) ) | 1195 | if ( !QFile::exists( tempfilename ) ) |
1196 | error = true; | 1196 | error = true; |
1197 | } | 1197 | } |
1198 | if ( error ) { | 1198 | if ( error ) { |
1199 | mAlarmMessage = "Procedure Alarm\nError - File not found\n"; | 1199 | mAlarmMessage = "Procedure Alarm\nError - File not found\n"; |
1200 | mAlarmMessage += mess.mid( 10+len+3+9 ); | 1200 | mAlarmMessage += mess.mid( 10+len+3+9 ); |
1201 | } else { | 1201 | } else { |
1202 | //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); | 1202 | //QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); |
1203 | //qDebug("-----system command %s ",tempfilename.latin1() ); | 1203 | //qDebug("-----system command %s ",tempfilename.latin1() ); |
1204 | #ifndef _WIN32_ | 1204 | #ifndef _WIN32_ |
1205 | if ( vfork () == 0 ) { | 1205 | if ( vfork () == 0 ) { |
1206 | execl ( tempfilename.latin1(), 0 ); | 1206 | execl ( tempfilename.latin1(), 0 ); |
1207 | return; | 1207 | return; |
1208 | } | 1208 | } |
1209 | #else | 1209 | #else |
1210 | QProcess* p = new QProcess(); | 1210 | QProcess* p = new QProcess(); |
1211 | p->addArgument( tempfilename.latin1() ); | 1211 | p->addArgument( tempfilename.latin1() ); |
1212 | p->start(); | 1212 | p->start(); |
1213 | return; | 1213 | return; |
1214 | #endif | 1214 | #endif |
1215 | 1215 | ||
1216 | return; | 1216 | return; |
1217 | } | 1217 | } |
1218 | 1218 | ||
1219 | //qDebug("+++++++system command %s ",tempfilename.latin1() ); | 1219 | //qDebug("+++++++system command %s ",tempfilename.latin1() ); |
1220 | } | 1220 | } |
1221 | if ( mess.left( 11 ) == "audio_alarm") { | 1221 | if ( mess.left( 11 ) == "audio_alarm") { |
1222 | bool error = false; | 1222 | bool error = false; |
1223 | int len = mess.mid( 11 ).find("+++"); | 1223 | int len = mess.mid( 11 ).find("+++"); |
1224 | if ( len < 2 ) | 1224 | if ( len < 2 ) |
1225 | error = true; | 1225 | error = true; |
1226 | else { | 1226 | else { |
1227 | tempfilename = mess.mid( 11, len ); | 1227 | tempfilename = mess.mid( 11, len ); |
1228 | if ( !QFile::exists( tempfilename ) ) | 1228 | if ( !QFile::exists( tempfilename ) ) |
1229 | error = true; | 1229 | error = true; |
1230 | } | 1230 | } |
1231 | if ( ! error ) { | 1231 | if ( ! error ) { |
1232 | filename = tempfilename; | 1232 | filename = tempfilename; |
1233 | } | 1233 | } |
1234 | mAlarmMessage = mess.mid( 11+len+3+9 ); | 1234 | mAlarmMessage = mess.mid( 11+len+3+9 ); |
1235 | //qDebug("audio file command %s ",tempfilename.latin1() ); | 1235 | //qDebug("audio file command %s ",tempfilename.latin1() ); |
1236 | } | 1236 | } |
1237 | if ( mess.left( 9 ) == "cal_alarm") { | 1237 | if ( mess.left( 9 ) == "cal_alarm") { |
1238 | mAlarmMessage = mess.mid( 9 ) ; | 1238 | mAlarmMessage = mess.mid( 9 ) ; |
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | startAlarm( mAlarmMessage, filename ); | 1241 | startAlarm( mAlarmMessage, filename ); |
1242 | 1242 | ||
1243 | 1243 | ||
1244 | } | 1244 | } |
1245 | 1245 | ||
1246 | void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString ¬i ) | 1246 | void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString ¬i ) |
1247 | { | 1247 | { |
1248 | //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); | 1248 | //qDebug("+++++addSUSPENDAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); |
1249 | 1249 | ||
1250 | mSuspendAlarmNotification = noti; | 1250 | mSuspendAlarmNotification = noti; |
1251 | int ms = QDateTime::currentDateTime().secsTo( qdt )*1000; | 1251 | int ms = QDateTime::currentDateTime().secsTo( qdt )*1000; |
1252 | //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000); | 1252 | //qDebug("Suspend Alarm timer started with secs: %d ", ms/1000); |
1253 | mSuspendTimer->start( ms , true ); | 1253 | mSuspendTimer->start( ms , true ); |
1254 | #ifdef DESKTOP_VERSION | 1254 | #ifdef DESKTOP_VERSION |
1255 | if ( QApplication::desktop()->width() < 1024 ) { | 1255 | if ( QApplication::desktop()->width() < 1024 ) { |
1256 | QString mess = qdt.toString( "yyyy-MM-dd hh:mm:ss" ) + "\n" + noti; | 1256 | QString mess = qdt.toString( "yyyy-MM-dd hh:mm:ss" ) + "\n" + noti; |
1257 | //qDebug("nextsuspendalarm = \n%s ",mess.latin1() ); | 1257 | //qDebug("nextsuspendalarm = \n%s ",mess.latin1() ); |
1258 | QString fn = QDir::homeDirPath() + "/.kopi_suspend_alarm"; | 1258 | QString fn = QDir::homeDirPath() + "/.kopi_suspend_alarm"; |
1259 | QFile file( fn ); | 1259 | QFile file( fn ); |
1260 | if (!file.open( IO_WriteOnly ) ) { | 1260 | if (!file.open( IO_WriteOnly ) ) { |
1261 | qDebug("KO: Error writing next suspend alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); | 1261 | qDebug("KO: Error writing next suspend alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); |
1262 | } else { | 1262 | } else { |
1263 | QTextStream ts( &file ); | 1263 | QTextStream ts( &file ); |
1264 | ts << mess; | 1264 | ts << mess; |
1265 | file.close(); | 1265 | file.close(); |
1266 | } | 1266 | } |
1267 | } | 1267 | } |
1268 | #endif | 1268 | #endif |
1269 | 1269 | ||
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | void CalendarView::addAlarm(const QDateTime &qdt, const QString ¬i ) | 1272 | void CalendarView::addAlarm(const QDateTime &qdt, const QString ¬i ) |
1273 | { | 1273 | { |
1274 | mNextAlarmDateTime = qdt; | 1274 | mNextAlarmDateTime = qdt; |
1275 | //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); | 1275 | //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); |
1276 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { | 1276 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { |
1277 | #ifndef DESKTOP_VERSION | 1277 | #ifndef DESKTOP_VERSION |
1278 | AlarmServer::addAlarm ( qdt,"koalarm", noti.utf8() ); | 1278 | AlarmServer::addAlarm ( qdt,"koalarm", noti.utf8() ); |
1279 | #endif | 1279 | #endif |
1280 | return; | 1280 | return; |
1281 | } | 1281 | } |
1282 | #ifdef DESKTOP_VERSION | 1282 | #ifdef DESKTOP_VERSION |
1283 | if ( QApplication::desktop()->width() < 1024 ) { | 1283 | if ( QApplication::desktop()->width() < 1024 ) { |
1284 | QString mess = qdt.toString( "yyyy-MM-dd hh:mm:ss" ) + "\n" + noti; | 1284 | QString mess = qdt.toString( "yyyy-MM-dd hh:mm:ss" ) + "\n" + noti; |
1285 | //qDebug("nextalarm = \n%s ",mess.latin1() ); | 1285 | //qDebug("nextalarm = \n%s ",mess.latin1() ); |
1286 | QString fn = QDir::homeDirPath() + "/.kopi_next_alarm"; | 1286 | QString fn = QDir::homeDirPath() + "/.kopi_next_alarm"; |
1287 | QFile file( fn ); | 1287 | QFile file( fn ); |
1288 | if (!file.open( IO_WriteOnly ) ) { | 1288 | if (!file.open( IO_WriteOnly ) ) { |
1289 | qDebug("KO: Error writing next alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); | 1289 | qDebug("KO: Error writing next alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); |
1290 | } else { | 1290 | } else { |
1291 | QTextStream ts( &file ); | 1291 | QTextStream ts( &file ); |
1292 | ts << mess; | 1292 | ts << mess; |
1293 | file.close(); | 1293 | file.close(); |
1294 | } | 1294 | } |
1295 | } | 1295 | } |
1296 | #endif | 1296 | #endif |
1297 | int maxSec; | 1297 | int maxSec; |
1298 | //maxSec = 5; //testing only | 1298 | //maxSec = 5; //testing only |
1299 | maxSec = 86400+3600; // one day+1hour | 1299 | maxSec = 86400+3600; // one day+1hour |
1300 | mAlarmNotification = noti; | 1300 | mAlarmNotification = noti; |
1301 | int sec = QDateTime::currentDateTime().secsTo( qdt ); | 1301 | int sec = QDateTime::currentDateTime().secsTo( qdt ); |
1302 | if ( sec > maxSec ) { | 1302 | if ( sec > maxSec ) { |
1303 | mRecheckAlarmTimer->start( maxSec * 1000 ); | 1303 | mRecheckAlarmTimer->start( maxSec * 1000 ); |
1304 | // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec ); | 1304 | // qDebug("recheck Alarm timer started with secs: %d next alarm in sec:%d", maxSec,sec ); |
1305 | return; | 1305 | return; |
1306 | } else { | 1306 | } else { |
1307 | mRecheckAlarmTimer->stop(); | 1307 | mRecheckAlarmTimer->stop(); |
1308 | } | 1308 | } |
1309 | //qDebug("Alarm timer started with secs: %d ", sec); | 1309 | //qDebug("Alarm timer started with secs: %d ", sec); |
1310 | mAlarmTimer->start( sec * 1000 , true ); | 1310 | mAlarmTimer->start( sec * 1000 , true ); |
1311 | 1311 | ||
1312 | } | 1312 | } |
1313 | // called by mRecheckAlarmTimer to get next alarm | 1313 | // called by mRecheckAlarmTimer to get next alarm |
1314 | // we need this, because a QTimer has only a max range of 25 days | 1314 | // we need this, because a QTimer has only a max range of 25 days |
1315 | void CalendarView::recheckTimerAlarm() | 1315 | void CalendarView::recheckTimerAlarm() |
1316 | { | 1316 | { |
1317 | mAlarmTimer->stop(); | 1317 | mAlarmTimer->stop(); |
1318 | mRecheckAlarmTimer->stop(); | 1318 | mRecheckAlarmTimer->stop(); |
1319 | mCalendar->checkAlarmForIncidence( 0, true ); | 1319 | mCalendar->checkAlarmForIncidence( 0, true ); |
1320 | } | 1320 | } |
1321 | #ifndef DESKTOP_VERSION | 1321 | #ifndef DESKTOP_VERSION |
1322 | void CalendarView::removeAlarm(const QDateTime &qdt, const QString ¬i ) | 1322 | void CalendarView::removeAlarm(const QDateTime &qdt, const QString ¬i ) |
1323 | #else | 1323 | #else |
1324 | void CalendarView::removeAlarm(const QDateTime &, const QString & ) | 1324 | void CalendarView::removeAlarm(const QDateTime &, const QString & ) |
1325 | #endif | 1325 | #endif |
1326 | { | 1326 | { |
1327 | //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); | 1327 | //qDebug("-----removeAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); |
1328 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { | 1328 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { |
1329 | #ifndef DESKTOP_VERSION | 1329 | #ifndef DESKTOP_VERSION |
1330 | AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.utf8() ); | 1330 | AlarmServer::deleteAlarm (qdt ,"koalarm" ,noti.utf8() ); |
1331 | #endif | 1331 | #endif |
1332 | return; | 1332 | return; |
1333 | } | 1333 | } |
1334 | mAlarmTimer->stop(); | 1334 | mAlarmTimer->stop(); |
1335 | } | 1335 | } |
1336 | void CalendarView::selectWeekNum ( int num ) | 1336 | void CalendarView::selectWeekNum ( int num ) |
1337 | { | 1337 | { |
1338 | dateNavigator()->blockSignals( true ); | 1338 | dateNavigator()->blockSignals( true ); |
1339 | dateNavigator()->selectWeek( num ); | 1339 | dateNavigator()->selectWeek( num ); |
1340 | dateNavigator()->blockSignals( false ); | 1340 | dateNavigator()->blockSignals( false ); |
1341 | mViewManager->showWeekView(); | 1341 | mViewManager->showWeekView(); |
1342 | } | 1342 | } |
1343 | KOViewManager *CalendarView::viewManager() | 1343 | KOViewManager *CalendarView::viewManager() |
1344 | { | 1344 | { |
1345 | return mViewManager; | 1345 | return mViewManager; |
1346 | } | 1346 | } |
1347 | 1347 | ||
1348 | KODialogManager *CalendarView::dialogManager() | 1348 | KODialogManager *CalendarView::dialogManager() |
1349 | { | 1349 | { |
1350 | return mDialogManager; | 1350 | return mDialogManager; |
1351 | } | 1351 | } |
1352 | 1352 | ||
1353 | QDate CalendarView::startDate() | 1353 | QDate CalendarView::startDate() |
1354 | { | 1354 | { |
1355 | DateList dates = mNavigator->selectedDates(); | 1355 | DateList dates = mNavigator->selectedDates(); |
1356 | 1356 | ||
1357 | return dates.first(); | 1357 | return dates.first(); |
1358 | } | 1358 | } |
1359 | 1359 | ||
1360 | QDate CalendarView::endDate() | 1360 | QDate CalendarView::endDate() |
1361 | { | 1361 | { |
1362 | DateList dates = mNavigator->selectedDates(); | 1362 | DateList dates = mNavigator->selectedDates(); |
1363 | 1363 | ||
1364 | return dates.last(); | 1364 | return dates.last(); |
1365 | } | 1365 | } |
1366 | 1366 | ||
1367 | 1367 | ||
1368 | void CalendarView::createPrinter() | 1368 | void CalendarView::createPrinter() |
1369 | { | 1369 | { |
1370 | #ifndef KORG_NOPRINTER | 1370 | #ifndef KORG_NOPRINTER |
1371 | if (!mCalPrinter) { | 1371 | if (!mCalPrinter) { |
1372 | mCalPrinter = new CalPrinter(this, mCalendar); | 1372 | mCalPrinter = new CalPrinter(this, mCalendar); |
1373 | connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig())); | 1373 | connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig())); |
1374 | } | 1374 | } |
1375 | #endif | 1375 | #endif |
1376 | } | 1376 | } |
1377 | 1377 | ||
1378 | 1378 | ||
1379 | //KOPrefs::instance()->mWriteBackFile | 1379 | //KOPrefs::instance()->mWriteBackFile |
1380 | //KOPrefs::instance()->mWriteBackExistingOnly | 1380 | //KOPrefs::instance()->mWriteBackExistingOnly |
1381 | 1381 | ||
1382 | // 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 1382 | // 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
1383 | // 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 1383 | // 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
1384 | // 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 1384 | // 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
1385 | // 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 1385 | // 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
1386 | // 4 syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 1386 | // 4 syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
1387 | // 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 1387 | // 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
1388 | 1388 | ||
1389 | int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full ) | 1389 | int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full ) |
1390 | { | 1390 | { |
1391 | 1391 | ||
1392 | // 0 equal | 1392 | // 0 equal |
1393 | // 1 take local | 1393 | // 1 take local |
1394 | // 2 take remote | 1394 | // 2 take remote |
1395 | // 3 cancel | 1395 | // 3 cancel |
1396 | QDateTime lastSync = mLastCalendarSync; | 1396 | QDateTime lastSync = mLastCalendarSync; |
1397 | QDateTime localMod = local->lastModified(); | 1397 | QDateTime localMod = local->lastModified(); |
1398 | QDateTime remoteMod = remote->lastModified(); | 1398 | QDateTime remoteMod = remote->lastModified(); |
1399 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1399 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1400 | bool remCh, locCh; | 1400 | bool remCh, locCh; |
1401 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); | 1401 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); |
1402 | //if ( remCh ) | 1402 | //if ( remCh ) |
1403 | //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); | 1403 | //qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); |
1404 | locCh = ( localMod > mLastCalendarSync ); | 1404 | locCh = ( localMod > mLastCalendarSync ); |
1405 | if ( !remCh && ! locCh ) { | 1405 | if ( !remCh && ! locCh ) { |
1406 | //qDebug("both not changed "); | 1406 | //qDebug("both not changed "); |
1407 | lastSync = localMod.addDays(1); | 1407 | lastSync = localMod.addDays(1); |
1408 | if ( mode <= SYNC_PREF_ASK ) | 1408 | if ( mode <= SYNC_PREF_ASK ) |
1409 | return 0; | 1409 | return 0; |
1410 | } else { | 1410 | } else { |
1411 | if ( locCh ) { | 1411 | if ( locCh ) { |
1412 | //qDebug("loc changed %d %s %s", local->revision() , localMod.toString().latin1(), mLastCalendarSync.toString().latin1()); | 1412 | //qDebug("loc changed %d %s %s", local->revision() , localMod.toString().latin1(), mLastCalendarSync.toString().latin1()); |
1413 | lastSync = localMod.addDays( -1 ); | 1413 | lastSync = localMod.addDays( -1 ); |
1414 | if ( !remCh ) | 1414 | if ( !remCh ) |
1415 | remoteMod = ( lastSync.addDays( -1 ) ); | 1415 | remoteMod = ( lastSync.addDays( -1 ) ); |
1416 | } else { | 1416 | } else { |
1417 | //qDebug(" not loc changed "); | 1417 | //qDebug(" not loc changed "); |
1418 | lastSync = localMod.addDays( 1 ); | 1418 | lastSync = localMod.addDays( 1 ); |
1419 | if ( remCh ) | 1419 | if ( remCh ) |
1420 | remoteMod =( lastSync.addDays( 1 ) ); | 1420 | remoteMod =( lastSync.addDays( 1 ) ); |
1421 | 1421 | ||
1422 | } | 1422 | } |
1423 | } | 1423 | } |
1424 | full = true; | 1424 | full = true; |
1425 | if ( mode < SYNC_PREF_ASK ) | 1425 | if ( mode < SYNC_PREF_ASK ) |
1426 | mode = SYNC_PREF_ASK; | 1426 | mode = SYNC_PREF_ASK; |
1427 | } else { | 1427 | } else { |
1428 | if ( localMod == remoteMod ) | 1428 | if ( localMod == remoteMod ) |
1429 | // if ( local->revision() == remote->revision() ) | 1429 | // if ( local->revision() == remote->revision() ) |
1430 | return 0; | 1430 | return 0; |
1431 | 1431 | ||
1432 | } | 1432 | } |
1433 | // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); | 1433 | // qDebug(" %d %d conflict on %s %s ", mode, full, local->summary().latin1(), remote->summary().latin1() ); |
1434 | 1434 | ||
1435 | //qDebug("%s %d %s %d", localMod.toString().latin1() , local->revision(), remoteMod.toString().latin1(), remote->revision()); | 1435 | //qDebug("%s %d %s %d", localMod.toString().latin1() , local->revision(), remoteMod.toString().latin1(), remote->revision()); |
1436 | //qDebug("%d %d %d %d ", localMod.time().second(), localMod.time().msec(), remoteMod.time().second(), remoteMod.time().msec() ); | 1436 | //qDebug("%d %d %d %d ", localMod.time().second(), localMod.time().msec(), remoteMod.time().second(), remoteMod.time().msec() ); |
1437 | //full = true; //debug only | 1437 | //full = true; //debug only |
1438 | if ( full ) { | 1438 | if ( full ) { |
1439 | bool equ = false; | 1439 | bool equ = false; |
1440 | if ( local->typeID() == eventID ) { | 1440 | if ( local->typeID() == eventID ) { |
1441 | equ = (*((Event*) local) == *((Event*) remote)); | 1441 | equ = (*((Event*) local) == *((Event*) remote)); |
1442 | } | 1442 | } |
1443 | else if ( local->typeID() == todoID ) | 1443 | else if ( local->typeID() == todoID ) |
1444 | equ = (*((Todo*) local) == (*(Todo*) remote)); | 1444 | equ = (*((Todo*) local) == (*(Todo*) remote)); |
1445 | else if ( local->typeID() == journalID ) | 1445 | else if ( local->typeID() == journalID ) |
1446 | equ = (*((Journal*) local) == *((Journal*) remote)); | 1446 | equ = (*((Journal*) local) == *((Journal*) remote)); |
1447 | if ( equ ) { | 1447 | if ( equ ) { |
1448 | //qDebug("equal "); | 1448 | //qDebug("equal "); |
1449 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1449 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1450 | local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); | 1450 | local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); |
1451 | } | 1451 | } |
1452 | if ( mode < SYNC_PREF_FORCE_LOCAL ) | 1452 | if ( mode < SYNC_PREF_FORCE_LOCAL ) |
1453 | return 0; | 1453 | return 0; |
1454 | 1454 | ||
1455 | }//else //debug only | 1455 | }//else //debug only |
1456 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); | 1456 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); |
1457 | } | 1457 | } |
1458 | int result; | 1458 | int result; |
1459 | bool localIsNew; | 1459 | bool localIsNew; |
1460 | //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() ); | 1460 | //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() ); |
1461 | 1461 | ||
1462 | 1462 | ||
1463 | // ************************************************ | 1463 | // ************************************************ |
1464 | // ************************************************ | 1464 | // ************************************************ |
1465 | // ************************************************ | 1465 | // ************************************************ |
1466 | // We may have that lastSync > remoteMod AND lastSync > localMod | 1466 | // We may have that lastSync > remoteMod AND lastSync > localMod |
1467 | // BUT remoteMod != localMod | 1467 | // BUT remoteMod != localMod |
1468 | 1468 | ||
1469 | 1469 | ||
1470 | if ( full && mode < SYNC_PREF_NEWEST ) | 1470 | if ( full && mode < SYNC_PREF_NEWEST ) |
1471 | mode = SYNC_PREF_ASK; | 1471 | mode = SYNC_PREF_ASK; |
1472 | 1472 | ||
1473 | switch( mode ) { | 1473 | switch( mode ) { |
1474 | case SYNC_PREF_LOCAL: | 1474 | case SYNC_PREF_LOCAL: |
1475 | if ( lastSync > remoteMod ) | 1475 | if ( lastSync > remoteMod ) |
1476 | return 1; | 1476 | return 1; |
1477 | if ( lastSync > localMod ) | 1477 | if ( lastSync > localMod ) |
1478 | return 2; | 1478 | return 2; |
1479 | return 1; | 1479 | return 1; |
1480 | break; | 1480 | break; |
1481 | case SYNC_PREF_REMOTE: | 1481 | case SYNC_PREF_REMOTE: |
1482 | if ( lastSync > localMod ) | 1482 | if ( lastSync > localMod ) |
1483 | return 2; | 1483 | return 2; |
1484 | if ( lastSync > remoteMod ) | 1484 | if ( lastSync > remoteMod ) |
1485 | return 1; | 1485 | return 1; |
1486 | return 2; | 1486 | return 2; |
1487 | break; | 1487 | break; |
1488 | case SYNC_PREF_NEWEST: | 1488 | case SYNC_PREF_NEWEST: |
1489 | if ( localMod >= remoteMod ) | 1489 | if ( localMod >= remoteMod ) |
1490 | return 1; | 1490 | return 1; |
1491 | else | 1491 | else |
1492 | return 2; | 1492 | return 2; |
1493 | break; | 1493 | break; |
1494 | case SYNC_PREF_ASK: | 1494 | case SYNC_PREF_ASK: |
1495 | qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 1495 | qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
1496 | if ( lastSync > remoteMod && lastSync > localMod) | 1496 | if ( lastSync > remoteMod && lastSync > localMod) |
1497 | return 0; | 1497 | return 0; |
1498 | if ( lastSync > remoteMod ) | 1498 | if ( lastSync > remoteMod ) |
1499 | return 1; | 1499 | return 1; |
1500 | if ( lastSync > localMod ) | 1500 | if ( lastSync > localMod ) |
1501 | return 2; | 1501 | return 2; |
1502 | qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 1502 | qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
1503 | localIsNew = localMod >= remoteMod; | 1503 | localIsNew = localMod >= remoteMod; |
1504 | if ( localIsNew ) | 1504 | if ( localIsNew ) |
1505 | getEventViewerDialog()->setColorMode( 1 ); | 1505 | getEventViewerDialog()->setColorMode( 1 ); |
1506 | else | 1506 | else |
1507 | getEventViewerDialog()->setColorMode( 2 ); | 1507 | getEventViewerDialog()->setColorMode( 2 ); |
1508 | getEventViewerDialog()->setIncidence(local); | 1508 | getEventViewerDialog()->setIncidence(local); |
1509 | if ( localIsNew ) | 1509 | if ( localIsNew ) |
1510 | getEventViewerDialog()->setColorMode( 2 ); | 1510 | getEventViewerDialog()->setColorMode( 2 ); |
1511 | else | 1511 | else |
1512 | getEventViewerDialog()->setColorMode( 1 ); | 1512 | getEventViewerDialog()->setColorMode( 1 ); |
1513 | getEventViewerDialog()->addIncidence(remote); | 1513 | getEventViewerDialog()->addIncidence(remote); |
1514 | getEventViewerDialog()->setColorMode( 0 ); | 1514 | getEventViewerDialog()->setColorMode( 0 ); |
1515 | //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() ); | 1515 | //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() ); |
1516 | getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!")); | 1516 | getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!")); |
1517 | getEventViewerDialog()->showMe(); | 1517 | getEventViewerDialog()->showMe(); |
1518 | result = getEventViewerDialog()->executeS( localIsNew ); | 1518 | result = getEventViewerDialog()->executeS( localIsNew ); |
1519 | return result; | 1519 | return result; |
1520 | 1520 | ||
1521 | break; | 1521 | break; |
1522 | case SYNC_PREF_FORCE_LOCAL: | 1522 | case SYNC_PREF_FORCE_LOCAL: |
1523 | return 1; | 1523 | return 1; |
1524 | break; | 1524 | break; |
1525 | case SYNC_PREF_FORCE_REMOTE: | 1525 | case SYNC_PREF_FORCE_REMOTE: |
1526 | return 2; | 1526 | return 2; |
1527 | break; | 1527 | break; |
1528 | 1528 | ||
1529 | default: | 1529 | default: |
1530 | // SYNC_PREF_TAKE_BOTH not implemented | 1530 | // SYNC_PREF_TAKE_BOTH not implemented |
1531 | break; | 1531 | break; |
1532 | } | 1532 | } |
1533 | return 0; | 1533 | return 0; |
1534 | } | 1534 | } |
1535 | Event* CalendarView::getLastSyncEvent() | 1535 | Event* CalendarView::getLastSyncEvent() |
1536 | { | 1536 | { |
1537 | Event* lse; | 1537 | Event* lse; |
1538 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); | 1538 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); |
1539 | lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); | 1539 | lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); |
1540 | if (!lse) { | 1540 | if (!lse) { |
1541 | lse = new Event(); | 1541 | lse = new Event(); |
1542 | lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); | 1542 | lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); |
1543 | QString sum = ""; | 1543 | QString sum = ""; |
1544 | if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) | 1544 | if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) |
1545 | sum = "E: "; | 1545 | sum = "E: "; |
1546 | lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); | 1546 | lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); |
1547 | lse->setDtStart( mLastCalendarSync ); | 1547 | lse->setDtStart( mLastCalendarSync ); |
1548 | lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); | 1548 | lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); |
1549 | lse->setCategories( i18n("SyncEvent") ); | 1549 | lse->setCategories( i18n("SyncEvent") ); |
1550 | lse->setReadOnly( true ); | 1550 | lse->setReadOnly( true ); |
1551 | mCalendar->addEvent( lse ); | 1551 | mCalendar->addEvent( lse ); |
1552 | } | 1552 | } |
1553 | 1553 | ||
1554 | return lse; | 1554 | return lse; |
1555 | 1555 | ||
1556 | } | 1556 | } |
1557 | 1557 | ||
1558 | // we check, if the to delete event has a id for a profile | 1558 | // we check, if the to delete event has a id for a profile |
1559 | // if yes, we set this id in the profile to delete | 1559 | // if yes, we set this id in the profile to delete |
1560 | void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) | 1560 | void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) |
1561 | { | 1561 | { |
1562 | if ( lastSync.count() == 0 ) { | 1562 | if ( lastSync.count() == 0 ) { |
1563 | //qDebug(" lastSync.count() == 0"); | 1563 | //qDebug(" lastSync.count() == 0"); |
1564 | return; | 1564 | return; |
1565 | } | 1565 | } |
1566 | if ( toDelete->typeID() == journalID ) | 1566 | if ( toDelete->typeID() == journalID ) |
1567 | return; | 1567 | return; |
1568 | 1568 | ||
1569 | Event* eve = lastSync.first(); | 1569 | Event* eve = lastSync.first(); |
1570 | 1570 | ||
1571 | while ( eve ) { | 1571 | while ( eve ) { |
1572 | QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name | 1572 | QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name |
1573 | if ( !id.isEmpty() ) { | 1573 | if ( !id.isEmpty() ) { |
1574 | QString des = eve->description(); | 1574 | QString des = eve->description(); |
1575 | QString pref = "e"; | 1575 | QString pref = "e"; |
1576 | if ( toDelete->typeID() == todoID ) | 1576 | if ( toDelete->typeID() == todoID ) |
1577 | pref = "t"; | 1577 | pref = "t"; |
1578 | des += pref+ id + ","; | 1578 | des += pref+ id + ","; |
1579 | eve->setReadOnly( false ); | 1579 | eve->setReadOnly( false ); |
1580 | eve->setDescription( des ); | 1580 | eve->setDescription( des ); |
1581 | //qDebug("setdes %s ", des.latin1()); | 1581 | //qDebug("setdes %s ", des.latin1()); |
1582 | eve->setReadOnly( true ); | 1582 | eve->setReadOnly( true ); |
1583 | } | 1583 | } |
1584 | eve = lastSync.next(); | 1584 | eve = lastSync.next(); |
1585 | } | 1585 | } |
1586 | 1586 | ||
1587 | } | 1587 | } |
1588 | void CalendarView::checkExternalId( Incidence * inc ) | 1588 | void CalendarView::checkExternalId( Incidence * inc ) |
1589 | { | 1589 | { |
1590 | QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; | 1590 | QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; |
1591 | checkExternSyncEvent( lastSync, inc ); | 1591 | checkExternSyncEvent( lastSync, inc ); |
1592 | 1592 | ||
1593 | } | 1593 | } |
1594 | bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) | 1594 | bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) |
1595 | { | 1595 | { |
1596 | bool syncOK = true; | 1596 | bool syncOK = true; |
1597 | int addedEvent = 0; | 1597 | int addedEvent = 0; |
1598 | int addedEventR = 0; | 1598 | int addedEventR = 0; |
1599 | int deletedEventR = 0; | 1599 | int deletedEventR = 0; |
1600 | int deletedEventL = 0; | 1600 | int deletedEventL = 0; |
1601 | int changedLocal = 0; | 1601 | int changedLocal = 0; |
1602 | int changedRemote = 0; | 1602 | int changedRemote = 0; |
1603 | int filteredIN = 0; | 1603 | int filteredIN = 0; |
1604 | int filteredOUT = 0; | 1604 | int filteredOUT = 0; |
1605 | //QPtrList<Event> el = local->rawEvents(); | 1605 | //QPtrList<Event> el = local->rawEvents(); |
1606 | Event* eventR; | 1606 | Event* eventR; |
1607 | QString uid; | 1607 | QString uid; |
1608 | int take; | 1608 | int take; |
1609 | Event* eventRSync; | 1609 | Event* eventRSync; |
1610 | Event* eventLSync; | 1610 | Event* eventLSync; |
1611 | clearAllViews(); | 1611 | clearAllViews(); |
1612 | QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); | 1612 | QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); |
1613 | QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); | 1613 | QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); |
1614 | bool fullDateRange = false; | 1614 | bool fullDateRange = false; |
1615 | local->resetTempSyncStat(); | 1615 | local->resetTempSyncStat(); |
1616 | mLastCalendarSync = QDateTime::currentDateTime(); | 1616 | mLastCalendarSync = QDateTime::currentDateTime(); |
1617 | if ( mSyncManager->syncWithDesktop() ) { | 1617 | if ( mSyncManager->syncWithDesktop() ) { |
1618 | remote->resetPilotStat(1); | 1618 | remote->resetPilotStat(1); |
1619 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { | 1619 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { |
1620 | mLastCalendarSync = KSyncManager::mRequestedSyncEvent; | 1620 | mLastCalendarSync = KSyncManager::mRequestedSyncEvent; |
1621 | qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); | 1621 | qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); |
1622 | } else { | 1622 | } else { |
1623 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); | 1623 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); |
1624 | } | 1624 | } |
1625 | } | 1625 | } |
1626 | QDateTime modifiedCalendar = mLastCalendarSync; | 1626 | QDateTime modifiedCalendar = mLastCalendarSync; |
1627 | eventLSync = getLastSyncEvent(); | 1627 | eventLSync = getLastSyncEvent(); |
1628 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); | 1628 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); |
1629 | if ( eventR ) { | 1629 | if ( eventR ) { |
1630 | qDebug("last-syncEvent on remote found "); | 1630 | qDebug("last-syncEvent on remote found "); |
1631 | eventRSync = (Event*) eventR->clone(); | 1631 | eventRSync = (Event*) eventR->clone(); |
1632 | remote->deleteEvent(eventR ); | 1632 | remote->deleteEvent(eventR ); |
1633 | 1633 | ||
1634 | } else { | 1634 | } else { |
1635 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { | 1635 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { |
1636 | eventRSync = (Event*)eventLSync->clone(); | 1636 | eventRSync = (Event*)eventLSync->clone(); |
1637 | } else { | 1637 | } else { |
1638 | fullDateRange = true; | 1638 | fullDateRange = true; |
1639 | eventRSync = new Event(); | 1639 | eventRSync = new Event(); |
1640 | eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); | 1640 | eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); |
1641 | eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); | 1641 | eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); |
1642 | eventRSync->setDtStart( mLastCalendarSync ); | 1642 | eventRSync->setDtStart( mLastCalendarSync ); |
1643 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); | 1643 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); |
1644 | eventRSync->setCategories( i18n("SyncEvent") ); | 1644 | eventRSync->setCategories( i18n("SyncEvent") ); |
1645 | } | 1645 | } |
1646 | } | 1646 | } |
1647 | if ( eventLSync->dtStart() == mLastCalendarSync ) | 1647 | if ( eventLSync->dtStart() == mLastCalendarSync ) |
1648 | fullDateRange = true; | 1648 | fullDateRange = true; |
1649 | 1649 | ||
1650 | if ( ! fullDateRange ) { | 1650 | if ( ! fullDateRange ) { |
1651 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { | 1651 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { |
1652 | 1652 | ||
1653 | qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); | 1653 | qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); |
1654 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); | 1654 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); |
1655 | fullDateRange = true; | 1655 | fullDateRange = true; |
1656 | } | 1656 | } |
1657 | } | 1657 | } |
1658 | if ( mSyncManager->syncWithDesktop() ) { | 1658 | if ( mSyncManager->syncWithDesktop() ) { |
1659 | fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); | 1659 | fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); |
1660 | } | 1660 | } |
1661 | if ( fullDateRange ) | 1661 | if ( fullDateRange ) |
1662 | mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); | 1662 | mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); |
1663 | else | 1663 | else |
1664 | mLastCalendarSync = eventLSync->dtStart(); | 1664 | mLastCalendarSync = eventLSync->dtStart(); |
1665 | // for resyncing if own file has changed | 1665 | // for resyncing if own file has changed |
1666 | if ( mCurrentSyncDevice == "deleteaftersync" ) { | 1666 | if ( mCurrentSyncDevice == "deleteaftersync" ) { |
1667 | mLastCalendarSync = loadedFileVersion; | 1667 | mLastCalendarSync = loadedFileVersion; |
1668 | //qDebug("setting mLastCalendarSync "); | 1668 | //qDebug("setting mLastCalendarSync "); |
1669 | } | 1669 | } |
1670 | //qDebug("*************************** "); | 1670 | //qDebug("*************************** "); |
1671 | qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); | 1671 | qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); |
1672 | QPtrList<Incidence> er = remote->rawIncidences(); | 1672 | QPtrList<Incidence> er = remote->rawIncidences(); |
1673 | Incidence* inR = er.first(); | 1673 | Incidence* inR = er.first(); |
1674 | Incidence* inL; | 1674 | Incidence* inL; |
1675 | QProgressBar bar( er.count(),0 ); | 1675 | QProgressBar bar( er.count(),0 ); |
1676 | bar.setCaption (i18n("Syncing - close to abort!") ); | 1676 | bar.setCaption (i18n("Syncing - close to abort!") ); |
1677 | 1677 | ||
1678 | // ************** setting up filter ************* | 1678 | // ************** setting up filter ************* |
1679 | CalFilter *filterIN = 0; | 1679 | CalFilter *filterIN = 0; |
1680 | CalFilter *filterOUT = 0; | 1680 | CalFilter *filterOUT = 0; |
1681 | CalFilter *filter = mFilters.first(); | 1681 | CalFilter *filter = mFilters.first(); |
1682 | while(filter) { | 1682 | while(filter) { |
1683 | if ( filter->name() == mSyncManager->mFilterInCal ) | 1683 | if ( filter->name() == mSyncManager->mFilterInCal ) |
1684 | filterIN = filter; | 1684 | filterIN = filter; |
1685 | if ( filter->name() == mSyncManager->mFilterOutCal ) | 1685 | if ( filter->name() == mSyncManager->mFilterOutCal ) |
1686 | filterOUT = filter; | 1686 | filterOUT = filter; |
1687 | filter = mFilters.next(); | 1687 | filter = mFilters.next(); |
1688 | } | 1688 | } |
1689 | int w = 300; | 1689 | int w = 300; |
1690 | if ( QApplication::desktop()->width() < 320 ) | 1690 | if ( QApplication::desktop()->width() < 320 ) |
1691 | w = 220; | 1691 | w = 220; |
1692 | int h = bar.sizeHint().height() ; | 1692 | int h = bar.sizeHint().height() ; |
1693 | int dw = QApplication::desktop()->width(); | 1693 | int dw = QApplication::desktop()->width(); |
1694 | int dh = QApplication::desktop()->height(); | 1694 | int dh = QApplication::desktop()->height(); |
1695 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1695 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1696 | bar.show(); | 1696 | bar.show(); |
1697 | int modulo = (er.count()/10)+1; | 1697 | int modulo = (er.count()/10)+1; |
1698 | int incCounter = 0; | 1698 | int incCounter = 0; |
1699 | while ( inR ) { | 1699 | while ( inR ) { |
1700 | if ( ! bar.isVisible() ) | 1700 | if ( ! bar.isVisible() ) |
1701 | return false; | 1701 | return false; |
1702 | if ( incCounter % modulo == 0 ) | 1702 | if ( incCounter % modulo == 0 ) |
1703 | bar.setProgress( incCounter ); | 1703 | bar.setProgress( incCounter ); |
1704 | ++incCounter; | 1704 | ++incCounter; |
1705 | uid = inR->uid(); | 1705 | uid = inR->uid(); |
1706 | bool skipIncidence = false; | 1706 | bool skipIncidence = false; |
1707 | if ( uid.left(15) == QString("last-syncEvent-") ) | 1707 | if ( uid.left(15) == QString("last-syncEvent-") ) |
1708 | skipIncidence = true; | 1708 | skipIncidence = true; |
1709 | QString idS; | 1709 | QString idS; |
1710 | qApp->processEvents(); | 1710 | qApp->processEvents(); |
1711 | if ( !skipIncidence ) { | 1711 | if ( !skipIncidence ) { |
1712 | inL = local->incidenceForUid( uid , false ); | 1712 | inL = local->incidenceForUid( uid , false ); |
1713 | if ( inL ) { // maybe conflict - same uid in both calendars | 1713 | if ( inL ) { // maybe conflict - same uid in both calendars |
1714 | if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { | 1714 | if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { |
1715 | //qDebug("take %d %s ", take, inL->summary().latin1()); | 1715 | //qDebug("take %d %s ", take, inL->summary().latin1()); |
1716 | if ( take == 3 ) | 1716 | if ( take == 3 ) |
1717 | return false; | 1717 | return false; |
1718 | if ( take == 1 ) {// take local ********************** | 1718 | if ( take == 1 ) {// take local ********************** |
1719 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) | 1719 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) |
1720 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1720 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1721 | else | 1721 | else |
1722 | idS = inR->IDStr(); | 1722 | idS = inR->IDStr(); |
1723 | int calID = inR->calID(); | 1723 | int calID = inR->calID(); |
1724 | remote->deleteIncidence( inR ); | 1724 | remote->deleteIncidence( inR ); |
1725 | inR = inL->clone(); | 1725 | inR = inL->clone(); |
1726 | inR->setCalID( calID ); | 1726 | inR->setCalID( calID ); |
1727 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1727 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1728 | if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) | 1728 | if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) |
1729 | inR->setIDStr( idS ); | 1729 | inR->setIDStr( idS ); |
1730 | remote->addIncidence( inR ); | 1730 | remote->addIncidence( inR ); |
1731 | if ( mSyncManager->syncWithDesktop() ) | 1731 | if ( mSyncManager->syncWithDesktop() ) |
1732 | inR->setPilotId( 2 ); | 1732 | inR->setPilotId( 2 ); |
1733 | ++changedRemote; | 1733 | ++changedRemote; |
1734 | } else {// take remote ********************** | 1734 | } else {// take remote ********************** |
1735 | if ( !inL->isReadOnly() ) { | 1735 | if ( !inL->isReadOnly() ) { |
1736 | idS = inL->IDStr(); | 1736 | idS = inL->IDStr(); |
1737 | int pid = inL->pilotId(); | 1737 | int pid = inL->pilotId(); |
1738 | int calID = inL->calID(); | 1738 | int calID = inL->calID(); |
1739 | local->deleteIncidence( inL ); | 1739 | local->deleteIncidence( inL ); |
1740 | inL = inR->clone(); | 1740 | inL = inR->clone(); |
1741 | inL->setCalID( calID ); | 1741 | inL->setCalID( calID ); |
1742 | if ( mSyncManager->syncWithDesktop() ) | 1742 | if ( mSyncManager->syncWithDesktop() ) |
1743 | inL->setPilotId( pid ); | 1743 | inL->setPilotId( pid ); |
1744 | inL->setIDStr( idS ); | 1744 | inL->setIDStr( idS ); |
1745 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1745 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1746 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1746 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1747 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); | 1747 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); |
1748 | } | 1748 | } |
1749 | local->addIncidence( inL ); | 1749 | local->addIncidence( inL ); |
1750 | ++changedLocal; | 1750 | ++changedLocal; |
1751 | } | 1751 | } |
1752 | } | 1752 | } |
1753 | } | 1753 | } |
1754 | } else { // no conflict ********** add or delete remote | 1754 | } else { // no conflict ********** add or delete remote |
1755 | if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ | 1755 | if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ |
1756 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1756 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1757 | QString des = eventLSync->description(); | 1757 | QString des = eventLSync->description(); |
1758 | QString pref = "e"; | 1758 | QString pref = "e"; |
1759 | if ( inR->typeID() == todoID ) | 1759 | if ( inR->typeID() == todoID ) |
1760 | pref = "t"; | 1760 | pref = "t"; |
1761 | if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it | 1761 | if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it |
1762 | inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); | 1762 | inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); |
1763 | //remote->deleteIncidence( inR ); | 1763 | //remote->deleteIncidence( inR ); |
1764 | ++deletedEventR; | 1764 | ++deletedEventR; |
1765 | } else { | 1765 | } else { |
1766 | inR->setLastModified( modifiedCalendar ); | 1766 | inR->setLastModified( modifiedCalendar ); |
1767 | inL = inR->clone(); | 1767 | inL = inR->clone(); |
1768 | inL->setIDStr( ":" ); | 1768 | inL->setIDStr( ":" ); |
1769 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1769 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1770 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); | 1770 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); |
1771 | 1771 | ||
1772 | inL->setCalID( 0 );// add to default cal | 1772 | inL->setCalID( 0 );// add to default cal |
1773 | local->addIncidence( inL ); | 1773 | local->addIncidence( inL ); |
1774 | ++addedEvent; | 1774 | ++addedEvent; |
1775 | 1775 | ||
1776 | } | 1776 | } |
1777 | } else { | 1777 | } else { |
1778 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { | 1778 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { |
1779 | inR->setLastModified( modifiedCalendar ); | 1779 | inR->setLastModified( modifiedCalendar ); |
1780 | inL = inR->clone(); | 1780 | inL = inR->clone(); |
1781 | inL->setIDStr( ":" ); | 1781 | inL->setIDStr( ":" ); |
1782 | inL->setCalID( 0 );// add to default cal | 1782 | inL->setCalID( 0 );// add to default cal |
1783 | local->addIncidence( inL ); | 1783 | local->addIncidence( inL ); |
1784 | ++addedEvent; | 1784 | ++addedEvent; |
1785 | 1785 | ||
1786 | } else { | 1786 | } else { |
1787 | checkExternSyncEvent(eventRSyncSharp, inR); | 1787 | checkExternSyncEvent(eventRSyncSharp, inR); |
1788 | remote->deleteIncidence( inR ); | 1788 | remote->deleteIncidence( inR ); |
1789 | ++deletedEventR; | 1789 | ++deletedEventR; |
1790 | } | 1790 | } |
1791 | } | 1791 | } |
1792 | } else { | 1792 | } else { |
1793 | ++filteredIN; | 1793 | ++filteredIN; |
1794 | } | 1794 | } |
1795 | } | 1795 | } |
1796 | } | 1796 | } |
1797 | inR = er.next(); | 1797 | inR = er.next(); |
1798 | } | 1798 | } |
1799 | QPtrList<Incidence> el = local->rawIncidences(); | 1799 | QPtrList<Incidence> el = local->rawIncidences(); |
1800 | inL = el.first(); | 1800 | inL = el.first(); |
1801 | modulo = (el.count()/10)+1; | 1801 | modulo = (el.count()/10)+1; |
1802 | bar.setCaption (i18n("Add / remove events") ); | 1802 | bar.setCaption (i18n("Add / remove events") ); |
1803 | bar.setTotalSteps ( el.count() ) ; | 1803 | bar.setTotalSteps ( el.count() ) ; |
1804 | bar.show(); | 1804 | bar.show(); |
1805 | incCounter = 0; | 1805 | incCounter = 0; |
1806 | 1806 | ||
1807 | while ( inL ) { | 1807 | while ( inL ) { |
1808 | 1808 | ||
1809 | qApp->processEvents(); | 1809 | qApp->processEvents(); |
1810 | if ( ! bar.isVisible() ) | 1810 | if ( ! bar.isVisible() ) |
1811 | return false; | 1811 | return false; |
1812 | if ( incCounter % modulo == 0 ) | 1812 | if ( incCounter % modulo == 0 ) |
1813 | bar.setProgress( incCounter ); | 1813 | bar.setProgress( incCounter ); |
1814 | ++incCounter; | 1814 | ++incCounter; |
1815 | uid = inL->uid(); | 1815 | uid = inL->uid(); |
1816 | bool skipIncidence = false; | 1816 | bool skipIncidence = false; |
1817 | if ( uid.left(15) == QString("last-syncEvent-") ) | 1817 | if ( uid.left(15) == QString("last-syncEvent-") ) |
1818 | skipIncidence = true; | 1818 | skipIncidence = true; |
1819 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID ) | 1819 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID ) |
1820 | skipIncidence = true; | 1820 | skipIncidence = true; |
1821 | if ( !skipIncidence ) { | 1821 | if ( !skipIncidence ) { |
1822 | inR = remote->incidenceForUid( uid , true ); | 1822 | inR = remote->incidenceForUid( uid , true ); |
1823 | if ( ! inR ) { | 1823 | if ( ! inR ) { |
1824 | if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ | 1824 | if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ |
1825 | // no conflict ********** add or delete local | 1825 | // no conflict ********** add or delete local |
1826 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1826 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1827 | if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 1827 | if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
1828 | checkExternSyncEvent(eventLSyncSharp, inL); | 1828 | checkExternSyncEvent(eventLSyncSharp, inL); |
1829 | local->deleteIncidence( inL ); | 1829 | local->deleteIncidence( inL ); |
1830 | ++deletedEventL; | 1830 | ++deletedEventL; |
1831 | } else { | 1831 | } else { |
1832 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1832 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1833 | inL->removeID(mCurrentSyncDevice ); | 1833 | inL->removeID(mCurrentSyncDevice ); |
1834 | ++addedEventR; | 1834 | ++addedEventR; |
1835 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); | 1835 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); |
1836 | inL->setLastModified( modifiedCalendar ); | 1836 | inL->setLastModified( modifiedCalendar ); |
1837 | inR = inL->clone(); | 1837 | inR = inL->clone(); |
1838 | inR->setIDStr( ":" ); | 1838 | inR->setIDStr( ":" ); |
1839 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1839 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1840 | inR->setCalID( 0 );// add to default cal | 1840 | inR->setCalID( 0 );// add to default cal |
1841 | remote->addIncidence( inR ); | 1841 | remote->addIncidence( inR ); |
1842 | } | 1842 | } |
1843 | } | 1843 | } |
1844 | } else { | 1844 | } else { |
1845 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { | 1845 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { |
1846 | checkExternSyncEvent(eventLSyncSharp, inL); | 1846 | checkExternSyncEvent(eventLSyncSharp, inL); |
1847 | local->deleteIncidence( inL ); | 1847 | local->deleteIncidence( inL ); |
1848 | ++deletedEventL; | 1848 | ++deletedEventL; |
1849 | } else { | 1849 | } else { |
1850 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1850 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1851 | ++addedEventR; | 1851 | ++addedEventR; |
1852 | inL->setLastModified( modifiedCalendar ); | 1852 | inL->setLastModified( modifiedCalendar ); |
1853 | inR = inL->clone(); | 1853 | inR = inL->clone(); |
1854 | inR->setIDStr( ":" ); | 1854 | inR->setIDStr( ":" ); |
1855 | inR->setCalID( 0 );// add to default cal | 1855 | inR->setCalID( 0 );// add to default cal |
1856 | remote->addIncidence( inR ); | 1856 | remote->addIncidence( inR ); |
1857 | } | 1857 | } |
1858 | } | 1858 | } |
1859 | } | 1859 | } |
1860 | } else { | 1860 | } else { |
1861 | ++filteredOUT; | 1861 | ++filteredOUT; |
1862 | } | 1862 | } |
1863 | } | 1863 | } |
1864 | } | 1864 | } |
1865 | inL = el.next(); | 1865 | inL = el.next(); |
1866 | } | 1866 | } |
1867 | int delFut = 0; | 1867 | int delFut = 0; |
1868 | int remRem = 0; | 1868 | int remRem = 0; |
1869 | if ( mSyncManager->mWriteBackInFuture ) { | 1869 | if ( mSyncManager->mWriteBackInFuture ) { |
1870 | er = remote->rawIncidences(); | 1870 | er = remote->rawIncidences(); |
1871 | remRem = er.count(); | 1871 | remRem = er.count(); |
1872 | inR = er.first(); | 1872 | inR = er.first(); |
1873 | QDateTime dt; | 1873 | QDateTime dt; |
1874 | QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); | 1874 | QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); |
1875 | QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); | 1875 | QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); |
1876 | while ( inR ) { | 1876 | while ( inR ) { |
1877 | if ( inR->typeID() == todoID ) { | 1877 | if ( inR->typeID() == todoID ) { |
1878 | Todo * t = (Todo*)inR; | 1878 | Todo * t = (Todo*)inR; |
1879 | if ( t->hasDueDate() ) | 1879 | if ( t->hasDueDate() ) |
1880 | dt = t->dtDue(); | 1880 | dt = t->dtDue(); |
1881 | else | 1881 | else |
1882 | dt = cur.addSecs( 62 ); | 1882 | dt = cur.addSecs( 62 ); |
1883 | } | 1883 | } |
1884 | else if (inR->typeID() == eventID ) { | 1884 | else if (inR->typeID() == eventID ) { |
1885 | bool ok; | 1885 | bool ok; |
1886 | dt = inR->getNextOccurence( cur, &ok ); | 1886 | dt = inR->getNextOccurence( cur, &ok ); |
1887 | if ( !ok ) | 1887 | if ( !ok ) |
1888 | dt = cur.addSecs( -62 ); | 1888 | dt = cur.addSecs( -62 ); |
1889 | } | 1889 | } |
1890 | else | 1890 | else |
1891 | dt = inR->dtStart(); | 1891 | dt = inR->dtStart(); |
1892 | if ( dt < cur || dt > end ) { | 1892 | if ( dt < cur || dt > end ) { |
1893 | remote->deleteIncidence( inR ); | 1893 | remote->deleteIncidence( inR ); |
1894 | ++delFut; | 1894 | ++delFut; |
1895 | } | 1895 | } |
1896 | inR = er.next(); | 1896 | inR = er.next(); |
1897 | } | 1897 | } |
1898 | } | 1898 | } |
1899 | bar.hide(); | 1899 | bar.hide(); |
1900 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); | 1900 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); |
1901 | eventLSync->setReadOnly( false ); | 1901 | eventLSync->setReadOnly( false ); |
1902 | eventLSync->setDtStart( mLastCalendarSync ); | 1902 | eventLSync->setDtStart( mLastCalendarSync ); |
1903 | eventRSync->setDtStart( mLastCalendarSync ); | 1903 | eventRSync->setDtStart( mLastCalendarSync ); |
1904 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1904 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1905 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1905 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1906 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; | 1906 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; |
1907 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); | 1907 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); |
1908 | eventLSync->setReadOnly( true ); | 1908 | eventLSync->setReadOnly( true ); |
1909 | qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); | 1909 | qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); |
1910 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... | 1910 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... |
1911 | remote->addEvent( eventRSync ); | 1911 | remote->addEvent( eventRSync ); |
1912 | else | 1912 | else |
1913 | delete eventRSync; | 1913 | delete eventRSync; |
1914 | qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); | 1914 | qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); |
1915 | QString mes; | 1915 | QString mes; |
1916 | 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 ); | 1916 | 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 ); |
1917 | QString delmess; | 1917 | QString delmess; |
1918 | if ( delFut ) { | 1918 | if ( delFut ) { |
1919 | 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); | 1919 | 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); |
1920 | mes += delmess; | 1920 | mes += delmess; |
1921 | } | 1921 | } |
1922 | mes = i18n("Local calendar changed!\n") +mes; | 1922 | mes = i18n("Local calendar changed!\n") +mes; |
1923 | mCalendar->checkAlarmForIncidence( 0, true ); | 1923 | mCalendar->checkAlarmForIncidence( 0, true ); |
1924 | qDebug( mes ); | 1924 | qDebug( mes ); |
1925 | if ( mSyncManager->mShowSyncSummary ) { | 1925 | if ( mSyncManager->mShowSyncSummary ) { |
1926 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, | 1926 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, |
1927 | i18n("KO/Pi Synchronization"),i18n("Write back"))) { | 1927 | i18n("KO/Pi Synchronization"),i18n("Write back"))) { |
1928 | qDebug("KO: WB cancelled "); | 1928 | qDebug("KO: WB cancelled "); |
1929 | mSyncManager->mWriteBackFile = false; | 1929 | mSyncManager->mWriteBackFile = false; |
1930 | return syncOK; | 1930 | return syncOK; |
1931 | } | 1931 | } |
1932 | } | 1932 | } |
1933 | return syncOK; | 1933 | return syncOK; |
1934 | } | 1934 | } |
1935 | 1935 | ||
1936 | void CalendarView::setSyncDevice( QString s ) | 1936 | void CalendarView::setSyncDevice( QString s ) |
1937 | { | 1937 | { |
1938 | mCurrentSyncDevice= s; | 1938 | mCurrentSyncDevice= s; |
1939 | } | 1939 | } |
1940 | void CalendarView::setSyncName( QString s ) | 1940 | void CalendarView::setSyncName( QString s ) |
1941 | { | 1941 | { |
1942 | mCurrentSyncName= s; | 1942 | mCurrentSyncName= s; |
1943 | } | 1943 | } |
1944 | bool CalendarView::syncCalendar(QString filename, int mode) | 1944 | bool CalendarView::syncCalendar(QString filename, int mode) |
1945 | { | 1945 | { |
1946 | //qDebug("syncCalendar %s ", filename.latin1()); | 1946 | //qDebug("syncCalendar %s ", filename.latin1()); |
1947 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 1947 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
1948 | CalendarLocal* calendar = new CalendarLocal(); | 1948 | CalendarLocal* calendar = new CalendarLocal(); |
1949 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1949 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1950 | FileStorage* storage = new FileStorage( calendar ); | 1950 | FileStorage* storage = new FileStorage( calendar ); |
1951 | bool syncOK = false; | 1951 | bool syncOK = false; |
1952 | storage->setFileName( filename ); | 1952 | storage->setFileName( filename ); |
1953 | // qDebug("loading ... "); | 1953 | // qDebug("loading ... "); |
1954 | if ( storage->load() ) { | 1954 | if ( storage->load() ) { |
1955 | getEventViewerDialog()->setSyncMode( true ); | 1955 | getEventViewerDialog()->setSyncMode( true ); |
1956 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); | 1956 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); |
1957 | getEventViewerDialog()->setSyncMode( false ); | 1957 | getEventViewerDialog()->setSyncMode( false ); |
1958 | if ( syncOK ) { | 1958 | if ( syncOK ) { |
1959 | if ( mSyncManager->mWriteBackFile ) | 1959 | if ( mSyncManager->mWriteBackFile ) |
1960 | { | 1960 | { |
1961 | storage->setSaveFormat( new ICalFormat() ); | 1961 | storage->setSaveFormat( new ICalFormat() ); |
1962 | storage->save(); | 1962 | storage->save(); |
1963 | } | 1963 | } |
1964 | } | 1964 | } |
1965 | setModified( true ); | 1965 | setModified( true ); |
1966 | } | 1966 | } |
1967 | delete storage; | 1967 | delete storage; |
1968 | delete calendar; | 1968 | delete calendar; |
1969 | if ( syncOK ) | 1969 | if ( syncOK ) |
1970 | updateView(); | 1970 | updateView(); |
1971 | return syncOK; | 1971 | return syncOK; |
1972 | } | 1972 | } |
1973 | 1973 | ||
1974 | void CalendarView::syncExternal( int mode ) | 1974 | void CalendarView::syncExternal( int mode ) |
1975 | { | 1975 | { |
1976 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 1976 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
1977 | 1977 | ||
1978 | qApp->processEvents(); | 1978 | qApp->processEvents(); |
1979 | CalendarLocal* calendar = new CalendarLocal(); | 1979 | CalendarLocal* calendar = new CalendarLocal(); |
1980 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1980 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1981 | bool syncOK = false; | 1981 | bool syncOK = false; |
1982 | bool loadSuccess = false; | 1982 | bool loadSuccess = false; |
1983 | PhoneFormat* phoneFormat = 0; | 1983 | PhoneFormat* phoneFormat = 0; |
1984 | emit tempDisableBR(true); | 1984 | emit tempDisableBR(true); |
1985 | #ifndef DESKTOP_VERSION | 1985 | #ifndef DESKTOP_VERSION |
1986 | SharpFormat* sharpFormat = 0; | 1986 | SharpFormat* sharpFormat = 0; |
1987 | if ( mode == 0 ) { // sharp | 1987 | if ( mode == 0 ) { // sharp |
1988 | sharpFormat = new SharpFormat () ; | 1988 | sharpFormat = new SharpFormat () ; |
1989 | loadSuccess = sharpFormat->load( calendar, mCalendar ); | 1989 | loadSuccess = sharpFormat->load( calendar, mCalendar ); |
1990 | 1990 | ||
1991 | } else | 1991 | } else |
1992 | #endif | 1992 | #endif |
1993 | if ( mode == 1 ) { // phone | 1993 | if ( mode == 1 ) { // phone |
1994 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, | 1994 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, |
1995 | mSyncManager->mPhoneDevice, | 1995 | mSyncManager->mPhoneDevice, |
1996 | mSyncManager->mPhoneConnection, | 1996 | mSyncManager->mPhoneConnection, |
1997 | mSyncManager->mPhoneModel); | 1997 | mSyncManager->mPhoneModel); |
1998 | loadSuccess = phoneFormat->load( calendar,mCalendar); | 1998 | loadSuccess = phoneFormat->load( calendar,mCalendar); |
1999 | 1999 | ||
2000 | } else { | 2000 | } else { |
2001 | emit tempDisableBR(false); | 2001 | emit tempDisableBR(false); |
2002 | return; | 2002 | return; |
2003 | } | 2003 | } |
2004 | if ( loadSuccess ) { | 2004 | if ( loadSuccess ) { |
2005 | getEventViewerDialog()->setSyncMode( true ); | 2005 | getEventViewerDialog()->setSyncMode( true ); |
2006 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 2006 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
2007 | getEventViewerDialog()->setSyncMode( false ); | 2007 | getEventViewerDialog()->setSyncMode( false ); |
2008 | qApp->processEvents(); | 2008 | qApp->processEvents(); |
2009 | if ( syncOK ) { | 2009 | if ( syncOK ) { |
2010 | if ( mSyncManager->mWriteBackFile ) | 2010 | if ( mSyncManager->mWriteBackFile ) |
2011 | { | 2011 | { |
2012 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); | 2012 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); |
2013 | Incidence* inc = iL.first(); | 2013 | Incidence* inc = iL.first(); |
2014 | if ( phoneFormat ) { | 2014 | if ( phoneFormat ) { |
2015 | while ( inc ) { | 2015 | while ( inc ) { |
2016 | inc->removeID(mCurrentSyncDevice); | 2016 | inc->removeID(mCurrentSyncDevice); |
2017 | inc = iL.next(); | 2017 | inc = iL.next(); |
2018 | } | 2018 | } |
2019 | } | 2019 | } |
2020 | #ifndef DESKTOP_VERSION | 2020 | #ifndef DESKTOP_VERSION |
2021 | if ( sharpFormat ) | 2021 | if ( sharpFormat ) |
2022 | sharpFormat->save(calendar); | 2022 | sharpFormat->save(calendar); |
2023 | #endif | 2023 | #endif |
2024 | if ( phoneFormat ) | 2024 | if ( phoneFormat ) |
2025 | phoneFormat->save(calendar); | 2025 | phoneFormat->save(calendar); |
2026 | iL = calendar->rawIncidences(); | 2026 | iL = calendar->rawIncidences(); |
2027 | inc = iL.first(); | 2027 | inc = iL.first(); |
2028 | Incidence* loc; | 2028 | Incidence* loc; |
2029 | while ( inc ) { | 2029 | while ( inc ) { |
2030 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { | 2030 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { |
2031 | loc = mCalendar->incidence(inc->uid() ); | 2031 | loc = mCalendar->incidence(inc->uid() ); |
2032 | if ( loc ) { | 2032 | if ( loc ) { |
2033 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); | 2033 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); |
2034 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); | 2034 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); |
2035 | } | 2035 | } |
2036 | } | 2036 | } |
2037 | inc = iL.next(); | 2037 | inc = iL.next(); |
2038 | } | 2038 | } |
2039 | Incidence* lse = getLastSyncEvent(); | 2039 | Incidence* lse = getLastSyncEvent(); |
2040 | if ( lse ) { | 2040 | if ( lse ) { |
2041 | lse->setReadOnly( false ); | 2041 | lse->setReadOnly( false ); |
2042 | lse->setDescription( "" ); | 2042 | lse->setDescription( "" ); |
2043 | lse->setReadOnly( true ); | 2043 | lse->setReadOnly( true ); |
2044 | } | 2044 | } |
2045 | } | 2045 | } |
2046 | } else { | 2046 | } else { |
2047 | topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); | 2047 | topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); |
2048 | } | 2048 | } |
2049 | setModified( true ); | 2049 | setModified( true ); |
2050 | } else { | 2050 | } else { |
2051 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; | 2051 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; |
2052 | QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), | 2052 | QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), |
2053 | question, i18n("Ok")) ; | 2053 | question, i18n("Ok")) ; |
2054 | 2054 | ||
2055 | } | 2055 | } |
2056 | delete calendar; | 2056 | delete calendar; |
2057 | updateView(); | 2057 | updateView(); |
2058 | emit tempDisableBR(false); | 2058 | emit tempDisableBR(false); |
2059 | return ;//syncOK; | 2059 | return ;//syncOK; |
2060 | 2060 | ||
2061 | } | 2061 | } |
2062 | 2062 | ||
2063 | bool CalendarView::importBday() | 2063 | bool CalendarView::importBday() |
2064 | { | 2064 | { |
2065 | #ifndef KORG_NOKABC | 2065 | #ifndef KORG_NOKABC |
2066 | 2066 | ||
2067 | #ifdef DESKTOP_VERSION | 2067 | #ifdef DESKTOP_VERSION |
2068 | int curCal = mCalendar->defaultCalendar(); | 2068 | int curCal = mCalendar->defaultCalendar(); |
2069 | int bd = mCalEditView->getBirtdayID(); | 2069 | int bd = mCalEditView->getBirtdayID(); |
2070 | if ( bd == 0 ) | 2070 | if ( bd == 0 ) |
2071 | return false; | 2071 | return false; |
2072 | mCalendar->setDefaultCalendar( bd ); | 2072 | mCalendar->setDefaultCalendar( bd ); |
2073 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 2073 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
2074 | KABC::AddressBook::Iterator it; | 2074 | KABC::AddressBook::Iterator it; |
2075 | int count = 0; | 2075 | int count = 0; |
2076 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 2076 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
2077 | ++count; | 2077 | ++count; |
2078 | } | 2078 | } |
2079 | QProgressBar bar(count,0 ); | 2079 | QProgressBar bar(count,0 ); |
2080 | int w = 300; | 2080 | int w = 300; |
2081 | if ( QApplication::desktop()->width() < 320 ) | 2081 | if ( QApplication::desktop()->width() < 320 ) |
2082 | w = 220; | 2082 | w = 220; |
2083 | int h = bar.sizeHint().height() ; | 2083 | int h = bar.sizeHint().height() ; |
2084 | int dw = QApplication::desktop()->width(); | 2084 | int dw = QApplication::desktop()->width(); |
2085 | int dh = QApplication::desktop()->height(); | 2085 | int dh = QApplication::desktop()->height(); |
2086 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2086 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2087 | bar.show(); | 2087 | bar.show(); |
2088 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); | 2088 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); |
2089 | qApp->processEvents(); | 2089 | qApp->processEvents(); |
2090 | count = 0; | 2090 | count = 0; |
2091 | int addCount = 0; | 2091 | int addCount = 0; |
2092 | KCal::Attendee* a = 0; | 2092 | KCal::Attendee* a = 0; |
2093 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 2093 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
2094 | if ( ! bar.isVisible() ) | 2094 | if ( ! bar.isVisible() ) |
2095 | return false; | 2095 | return false; |
2096 | bar.setProgress( count++ ); | 2096 | bar.setProgress( count++ ); |
2097 | qApp->processEvents(); | 2097 | qApp->processEvents(); |
2098 | //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); | 2098 | //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); |
2099 | if ( (*it).birthday().date().isValid() ){ | 2099 | if ( (*it).birthday().date().isValid() ){ |
2100 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; | 2100 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; |
2101 | if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) | 2101 | if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) |
2102 | ++addCount; | 2102 | ++addCount; |
2103 | } | 2103 | } |
2104 | QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); | 2104 | QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); |
2105 | if ( anni.isValid() ){ | 2105 | if ( anni.isValid() ){ |
2106 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; | 2106 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; |
2107 | if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) | 2107 | if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) |
2108 | ++addCount; | 2108 | ++addCount; |
2109 | } | 2109 | } |
2110 | } | 2110 | } |
2111 | mCalendar->setDefaultCalendar( curCal ); | 2111 | mCalendar->setDefaultCalendar( curCal ); |
2112 | updateView(); | 2112 | updateView(); |
2113 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 2113 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
2114 | #else //DESKTOP_VERSION | 2114 | #else //DESKTOP_VERSION |
2115 | 2115 | ||
2116 | ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); | 2116 | ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); |
2117 | // the result should now arrive through method insertBirthdays | 2117 | // the result should now arrive through method insertBirthdays |
2118 | 2118 | ||
2119 | #endif //DESKTOP_VERSION | 2119 | #endif //DESKTOP_VERSION |
2120 | 2120 | ||
2121 | #endif //KORG_NOKABC | 2121 | #endif //KORG_NOKABC |
2122 | 2122 | ||
2123 | 2123 | ||
2124 | return true; | 2124 | return true; |
2125 | } | 2125 | } |
2126 | 2126 | ||
2127 | // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI | 2127 | // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI |
2128 | void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, | 2128 | void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, |
2129 | const QStringList& anniversaryList, const QStringList& realNameList, | 2129 | const QStringList& anniversaryList, const QStringList& realNameList, |
2130 | const QStringList& emailList, const QStringList& assembledNameList, | 2130 | const QStringList& emailList, const QStringList& assembledNameList, |
2131 | const QStringList& uidList) | 2131 | const QStringList& uidList) |
2132 | { | 2132 | { |
2133 | 2133 | ||
2134 | //qDebug("KO::CalendarView::insertBirthdays"); | 2134 | //qDebug("KO::CalendarView::insertBirthdays"); |
2135 | if (uid == this->name()) | 2135 | if (uid == this->name()) |
2136 | { | 2136 | { |
2137 | int curCal = mCalendar->defaultCalendar(); | 2137 | int curCal = mCalendar->defaultCalendar(); |
2138 | int bd = mCalEditView->getBirtdayID(); | 2138 | int bd = mCalEditView->getBirtdayID(); |
2139 | if ( bd == 0 ) | 2139 | if ( bd == 0 ) |
2140 | return; | 2140 | return; |
2141 | mCalendar->setDefaultCalendar( bd ); | 2141 | mCalendar->setDefaultCalendar( bd ); |
2142 | 2142 | ||
2143 | 2143 | ||
2144 | int count = birthdayList.count(); | 2144 | int count = birthdayList.count(); |
2145 | int addCount = 0; | 2145 | int addCount = 0; |
2146 | KCal::Attendee* a = 0; | 2146 | KCal::Attendee* a = 0; |
2147 | 2147 | ||
2148 | //qDebug("CalView 1 %i", count); | 2148 | //qDebug("CalView 1 %i", count); |
2149 | 2149 | ||
2150 | QProgressBar bar(count,0 ); | 2150 | QProgressBar bar(count,0 ); |
2151 | int w = 300; | 2151 | int w = 300; |
2152 | if ( QApplication::desktop()->width() < 320 ) | 2152 | if ( QApplication::desktop()->width() < 320 ) |
2153 | w = 220; | 2153 | w = 220; |
2154 | int h = bar.sizeHint().height() ; | 2154 | int h = bar.sizeHint().height() ; |
2155 | int dw = QApplication::desktop()->width(); | 2155 | int dw = QApplication::desktop()->width(); |
2156 | int dh = QApplication::desktop()->height(); | 2156 | int dh = QApplication::desktop()->height(); |
2157 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2157 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2158 | bar.show(); | 2158 | bar.show(); |
2159 | bar.setCaption (i18n("inserting birthdays - close to abort!") ); | 2159 | bar.setCaption (i18n("inserting birthdays - close to abort!") ); |
2160 | qApp->processEvents(); | 2160 | qApp->processEvents(); |
2161 | 2161 | ||
2162 | QDate birthday; | 2162 | QDate birthday; |
2163 | QDate anniversary; | 2163 | QDate anniversary; |
2164 | QString realName; | 2164 | QString realName; |
2165 | QString email; | 2165 | QString email; |
2166 | QString assembledName; | 2166 | QString assembledName; |
2167 | QString uid; | 2167 | QString uid; |
2168 | bool ok = true; | 2168 | bool ok = true; |
2169 | for ( int i = 0; i < count; i++) | 2169 | for ( int i = 0; i < count; i++) |
2170 | { | 2170 | { |
2171 | if ( ! bar.isVisible() ) | 2171 | if ( ! bar.isVisible() ) |
2172 | return; | 2172 | return; |
2173 | bar.setProgress( i ); | 2173 | bar.setProgress( i ); |
2174 | qApp->processEvents(); | 2174 | qApp->processEvents(); |
2175 | 2175 | ||
2176 | birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); | 2176 | birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); |
2177 | if (!ok) { | 2177 | if (!ok) { |
2178 | ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); | 2178 | ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); |
2179 | } | 2179 | } |
2180 | 2180 | ||
2181 | anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); | 2181 | anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); |
2182 | if (!ok) { | 2182 | if (!ok) { |
2183 | ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); | 2183 | ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); |
2184 | } | 2184 | } |
2185 | realName = realNameList[i]; | 2185 | realName = realNameList[i]; |
2186 | email = emailList[i]; | 2186 | email = emailList[i]; |
2187 | assembledName = assembledNameList[i]; | 2187 | assembledName = assembledNameList[i]; |
2188 | uid = uidList[i]; | 2188 | uid = uidList[i]; |
2189 | //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() ); | 2189 | //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() ); |
2190 | 2190 | ||
2191 | if ( birthday.isValid() ){ | 2191 | if ( birthday.isValid() ){ |
2192 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 2192 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
2193 | KCal::Attendee::ReqParticipant,uid) ; | 2193 | KCal::Attendee::ReqParticipant,uid) ; |
2194 | if ( addAnniversary( birthday, assembledName, a, true ) ) | 2194 | if ( addAnniversary( birthday, assembledName, a, true ) ) |
2195 | ++addCount; | 2195 | ++addCount; |
2196 | } | 2196 | } |
2197 | 2197 | ||
2198 | if ( anniversary.isValid() ){ | 2198 | if ( anniversary.isValid() ){ |
2199 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 2199 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
2200 | KCal::Attendee::ReqParticipant,uid) ; | 2200 | KCal::Attendee::ReqParticipant,uid) ; |
2201 | if ( addAnniversary( anniversary, assembledName, a, false ) ) | 2201 | if ( addAnniversary( anniversary, assembledName, a, false ) ) |
2202 | ++addCount; | 2202 | ++addCount; |
2203 | } | 2203 | } |
2204 | } | 2204 | } |
2205 | 2205 | ||
2206 | mCalendar->setDefaultCalendar( curCal ); | 2206 | mCalendar->setDefaultCalendar( curCal ); |
2207 | updateView(); | 2207 | updateView(); |
2208 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 2208 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
2209 | 2209 | ||
2210 | } | 2210 | } |
2211 | 2211 | ||
2212 | } | 2212 | } |
2213 | 2213 | ||
2214 | 2214 | ||
2215 | 2215 | ||
2216 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) | 2216 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) |
2217 | { | 2217 | { |
2218 | //qDebug("addAnni "); | 2218 | //qDebug("addAnni "); |
2219 | Event * ev = new Event(); | 2219 | Event * ev = new Event(); |
2220 | ev->setOrganizer(KOPrefs::instance()->email()); | 2220 | ev->setOrganizer(KOPrefs::instance()->email()); |
2221 | if ( a ) { | 2221 | if ( a ) { |
2222 | ev->addAttendee( a ); | 2222 | ev->addAttendee( a ); |
2223 | } | 2223 | } |
2224 | QString kind; | 2224 | QString kind; |
2225 | if ( birthday ) { | 2225 | if ( birthday ) { |
2226 | kind = i18n( "Birthday" ); | 2226 | kind = i18n( "Birthday" ); |
2227 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); | 2227 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); |
2228 | } | 2228 | } |
2229 | else { | 2229 | else { |
2230 | kind = i18n( "Anniversary" ); | 2230 | kind = i18n( "Anniversary" ); |
2231 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); | 2231 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); |
2232 | } | 2232 | } |
2233 | ev->setCategories( kind ); | 2233 | ev->setCategories( kind ); |
2234 | ev->setDtStart( QDateTime(date) ); | 2234 | ev->setDtStart( QDateTime(date) ); |
2235 | ev->setDtEnd( QDateTime(date) ); | 2235 | ev->setDtEnd( QDateTime(date) ); |
2236 | ev->setFloats( true ); | 2236 | ev->setFloats( true ); |
2237 | Recurrence * rec = ev->recurrence(); | 2237 | Recurrence * rec = ev->recurrence(); |
2238 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); | 2238 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); |
2239 | rec->addYearlyNum( date.month() ); | 2239 | rec->addYearlyNum( date.month() ); |
2240 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { | 2240 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { |
2241 | delete ev; | 2241 | delete ev; |
2242 | return false; | 2242 | return false; |
2243 | } | 2243 | } |
2244 | return true; | 2244 | return true; |
2245 | 2245 | ||
2246 | } | 2246 | } |
2247 | bool CalendarView::importQtopia( const QString &categories, | 2247 | bool CalendarView::importQtopia( const QString &categories, |
2248 | const QString &datebook, | 2248 | const QString &datebook, |
2249 | const QString &todolist ) | 2249 | const QString &todolist ) |
2250 | { | 2250 | { |
2251 | 2251 | ||
2252 | QtopiaFormat qtopiaFormat; | 2252 | QtopiaFormat qtopiaFormat; |
2253 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 2253 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
2254 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); | 2254 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); |
2255 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); | 2255 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); |
2256 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); | 2256 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); |
2257 | 2257 | ||
2258 | updateView(); | 2258 | updateView(); |
2259 | return true; | 2259 | return true; |
2260 | 2260 | ||
2261 | #if 0 | 2261 | #if 0 |
2262 | mGlobalSyncMode = SYNC_MODE_QTOPIA; | 2262 | mGlobalSyncMode = SYNC_MODE_QTOPIA; |
2263 | mCurrentSyncDevice = "qtopia-XML"; | 2263 | mCurrentSyncDevice = "qtopia-XML"; |
2264 | if ( mSyncManager->mAskForPreferences ) | 2264 | if ( mSyncManager->mAskForPreferences ) |
2265 | edit_sync_options(); | 2265 | edit_sync_options(); |
2266 | qApp->processEvents(); | 2266 | qApp->processEvents(); |
2267 | CalendarLocal* calendar = new CalendarLocal(); | 2267 | CalendarLocal* calendar = new CalendarLocal(); |
2268 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 2268 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
2269 | bool syncOK = false; | 2269 | bool syncOK = false; |
2270 | QtopiaFormat qtopiaFormat; | 2270 | QtopiaFormat qtopiaFormat; |
2271 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 2271 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
2272 | bool loadOk = true; | 2272 | bool loadOk = true; |
2273 | if ( !categories.isEmpty() ) | 2273 | if ( !categories.isEmpty() ) |
2274 | loadOk = qtopiaFormat.load( calendar, categories ); | 2274 | loadOk = qtopiaFormat.load( calendar, categories ); |
2275 | if ( loadOk && !datebook.isEmpty() ) | 2275 | if ( loadOk && !datebook.isEmpty() ) |
2276 | loadOk = qtopiaFormat.load( calendar, datebook ); | 2276 | loadOk = qtopiaFormat.load( calendar, datebook ); |
2277 | if ( loadOk && !todolist.isEmpty() ) | 2277 | if ( loadOk && !todolist.isEmpty() ) |
2278 | loadOk = qtopiaFormat.load( calendar, todolist ); | 2278 | loadOk = qtopiaFormat.load( calendar, todolist ); |
2279 | 2279 | ||
2280 | if ( loadOk ) { | 2280 | if ( loadOk ) { |
2281 | getEventViewerDialog()->setSyncMode( true ); | 2281 | getEventViewerDialog()->setSyncMode( true ); |
2282 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 2282 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
2283 | getEventViewerDialog()->setSyncMode( false ); | 2283 | getEventViewerDialog()->setSyncMode( false ); |
2284 | qApp->processEvents(); | 2284 | qApp->processEvents(); |
2285 | if ( syncOK ) { | 2285 | if ( syncOK ) { |
2286 | if ( mSyncManager->mWriteBackFile ) | 2286 | if ( mSyncManager->mWriteBackFile ) |
2287 | { | 2287 | { |
2288 | // write back XML file | 2288 | // write back XML file |
2289 | 2289 | ||
2290 | } | 2290 | } |
2291 | setModified( true ); | 2291 | setModified( true ); |
2292 | } | 2292 | } |
2293 | } else { | 2293 | } else { |
2294 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; | 2294 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; |
2295 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), | 2295 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), |
2296 | question, i18n("Ok")) ; | 2296 | question, i18n("Ok")) ; |
2297 | } | 2297 | } |
2298 | delete calendar; | 2298 | delete calendar; |
2299 | updateView(); | 2299 | updateView(); |
2300 | return syncOK; | 2300 | return syncOK; |
2301 | 2301 | ||
2302 | 2302 | ||
2303 | #endif | 2303 | #endif |
2304 | 2304 | ||
2305 | } | 2305 | } |
2306 | 2306 | ||
2307 | void CalendarView::setSyncEventsReadOnly() | 2307 | void CalendarView::setSyncEventsReadOnly() |
2308 | { | 2308 | { |
2309 | mCalendar->setSyncEventsReadOnly(); | 2309 | mCalendar->setSyncEventsReadOnly(); |
2310 | } | 2310 | } |
2311 | 2311 | ||
2312 | bool CalendarView::loadCalendars() | 2312 | bool CalendarView::loadCalendars() |
2313 | { | 2313 | { |
2314 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 2314 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
2315 | KopiCalendarFile * cal = calendars.first(); | 2315 | KopiCalendarFile * cal = calendars.first(); |
2316 | mCalendar->setDefaultCalendar( 1 ); | 2316 | mCalendar->setDefaultCalendar( 1 ); |
2317 | openCalendar( MainWindow::defaultFileName(), false ); | 2317 | openCalendar( MainWindow::defaultFileName(), false ); |
2318 | cal = calendars.next(); | 2318 | cal = calendars.next(); |
2319 | while ( cal ) { | 2319 | while ( cal ) { |
2320 | addCalendar( cal ); | 2320 | addCalendar( cal ); |
2321 | cal = calendars.next(); | 2321 | cal = calendars.next(); |
2322 | } | 2322 | } |
2323 | restoreCalendarSettings(); | 2323 | restoreCalendarSettings(); |
2324 | return true; | 2324 | return true; |
2325 | } | 2325 | } |
2326 | bool CalendarView::restoreCalendarSettings() | 2326 | bool CalendarView::restoreCalendarSettings() |
2327 | { | 2327 | { |
2328 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 2328 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
2329 | KopiCalendarFile * cal = calendars.first(); | 2329 | KopiCalendarFile * cal = calendars.first(); |
2330 | while ( cal ) { | 2330 | while ( cal ) { |
2331 | mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); | 2331 | mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); |
2332 | mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled ); | 2332 | mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled ); |
2333 | mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly ); | 2333 | mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly ); |
2334 | if ( cal->isStandard ) | 2334 | if ( cal->isStandard ) |
2335 | mCalendar->setDefaultCalendar( cal->mCalNumber ); | 2335 | mCalendar->setDefaultCalendar( cal->mCalNumber ); |
2336 | cal = calendars.next(); | 2336 | cal = calendars.next(); |
2337 | } | 2337 | } |
2338 | setSyncEventsReadOnly(); | 2338 | setSyncEventsReadOnly(); |
2339 | mCalendar->reInitAlarmSettings(); | 2339 | mCalendar->reInitAlarmSettings(); |
2340 | updateUnmanagedViews(); | 2340 | updateUnmanagedViews(); |
2341 | updateView(); | 2341 | updateView(); |
2342 | return true; | 2342 | return true; |
2343 | } | 2343 | } |
2344 | void CalendarView::addCalendarId( int id ) | 2344 | void CalendarView::addCalendarId( int id ) |
2345 | { | 2345 | { |
2346 | KopiCalendarFile * cal = KOPrefs::instance()->getCalendar( id ); | 2346 | KopiCalendarFile * cal = KOPrefs::instance()->getCalendar( id ); |
2347 | if ( cal ) | 2347 | if ( cal ) |
2348 | addCalendar( cal ); | 2348 | addCalendar( cal ); |
2349 | } | 2349 | } |
2350 | bool CalendarView::addCalendar( KopiCalendarFile * cal ) | 2350 | bool CalendarView::addCalendar( KopiCalendarFile * cal ) |
2351 | { | 2351 | { |
2352 | cal->mErrorOnLoad = false; | 2352 | cal->mErrorOnLoad = false; |
2353 | if ( mCalendar->addCalendarFile( cal->mFileName, cal->mCalNumber )) { | 2353 | if ( mCalendar->addCalendarFile( cal->mFileName, cal->mCalNumber )) { |
2354 | cal->mLoadDt = QDateTime::currentDateTime(); | 2354 | cal->mLoadDt = QDateTime::currentDateTime(); |
2355 | return true; | 2355 | return true; |
2356 | } | 2356 | } |
2357 | qDebug("KO: Error adding calendar file %s ",cal->mFileName.latin1() ); | 2357 | qDebug("KO: Error adding calendar file %s ",cal->mFileName.latin1() ); |
2358 | cal->mErrorOnLoad = true; | 2358 | cal->mErrorOnLoad = true; |
2359 | return false; | 2359 | return false; |
2360 | } | 2360 | } |
2361 | bool CalendarView::openCalendar(QString filename, bool merge) | 2361 | bool CalendarView::openCalendar(QString filename, bool merge) |
2362 | { | 2362 | { |
2363 | 2363 | ||
2364 | if (filename.isEmpty()) { | 2364 | if (filename.isEmpty()) { |
2365 | return false; | 2365 | return false; |
2366 | } | 2366 | } |
2367 | 2367 | ||
2368 | if (!QFile::exists(filename)) { | 2368 | if (!QFile::exists(filename)) { |
2369 | KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); | 2369 | KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); |
2370 | return false; | 2370 | return false; |
2371 | } | 2371 | } |
2372 | 2372 | ||
2373 | globalFlagBlockAgenda = 1; | 2373 | globalFlagBlockAgenda = 1; |
2374 | clearAllViews(); | 2374 | clearAllViews(); |
2375 | if (!merge) { | 2375 | if (!merge) { |
2376 | mViewManager->setDocumentId( filename ); | 2376 | mViewManager->setDocumentId( filename ); |
2377 | mCalendar->close(); | 2377 | mCalendar->close(); |
2378 | } | 2378 | } |
2379 | mStorage->setFileName( filename ); | 2379 | mStorage->setFileName( filename ); |
2380 | 2380 | ||
2381 | if ( mStorage->load() ) { | 2381 | if ( mStorage->load() ) { |
2382 | if ( merge ) ;//setModified( true ); | 2382 | if ( merge ) ;//setModified( true ); |
2383 | else { | 2383 | else { |
2384 | //setModified( true ); | 2384 | //setModified( true ); |
2385 | mViewManager->setDocumentId( filename ); | 2385 | mViewManager->setDocumentId( filename ); |
2386 | mDialogManager->setDocumentId( filename ); | 2386 | mDialogManager->setDocumentId( filename ); |
2387 | mTodoList->setDocumentId( filename ); | 2387 | mTodoList->setDocumentId( filename ); |
2388 | } | 2388 | } |
2389 | globalFlagBlockAgenda = 2; | 2389 | globalFlagBlockAgenda = 2; |
2390 | // if ( getLastSyncEvent() ) | 2390 | // if ( getLastSyncEvent() ) |
2391 | // getLastSyncEvent()->setReadOnly( true ); | 2391 | // getLastSyncEvent()->setReadOnly( true ); |
2392 | mCalendar->reInitAlarmSettings(); | 2392 | mCalendar->reInitAlarmSettings(); |
2393 | setSyncEventsReadOnly(); | 2393 | setSyncEventsReadOnly(); |
2394 | updateUnmanagedViews(); | 2394 | updateUnmanagedViews(); |
2395 | updateView(); | 2395 | updateView(); |
2396 | if ( filename != MainWindow::defaultFileName() ) { | 2396 | if ( filename != MainWindow::defaultFileName() ) { |
2397 | saveCalendar( MainWindow::defaultFileName() ); | 2397 | saveCalendar( MainWindow::defaultFileName() ); |
2398 | } else { | 2398 | } else { |
2399 | QFileInfo finf ( MainWindow::defaultFileName()); | 2399 | QFileInfo finf ( MainWindow::defaultFileName()); |
2400 | if ( finf.exists() ) { | 2400 | if ( finf.exists() ) { |
2401 | setLoadedFileVersion( finf.lastModified () ); | 2401 | setLoadedFileVersion( finf.lastModified () ); |
2402 | } | 2402 | } |
2403 | } | 2403 | } |
2404 | return true; | 2404 | return true; |
2405 | } else { | 2405 | } else { |
2406 | // while failing to load, the calendar object could | 2406 | // while failing to load, the calendar object could |
2407 | // have become partially populated. Clear it out. | 2407 | // have become partially populated. Clear it out. |
2408 | if ( !merge ) { | 2408 | if ( !merge ) { |
2409 | mCalendar->close(); | 2409 | mCalendar->close(); |
2410 | mViewManager->setDocumentId( filename ); | 2410 | mViewManager->setDocumentId( filename ); |
2411 | mDialogManager->setDocumentId( filename ); | 2411 | mDialogManager->setDocumentId( filename ); |
2412 | mTodoList->setDocumentId( filename ); | 2412 | mTodoList->setDocumentId( filename ); |
2413 | } | 2413 | } |
2414 | 2414 | ||
2415 | //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); | 2415 | //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); |
2416 | 2416 | ||
2417 | QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); | 2417 | QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); |
2418 | globalFlagBlockAgenda = 2; | 2418 | globalFlagBlockAgenda = 2; |
2419 | mCalendar->reInitAlarmSettings(); | 2419 | mCalendar->reInitAlarmSettings(); |
2420 | setSyncEventsReadOnly(); | 2420 | setSyncEventsReadOnly(); |
2421 | updateUnmanagedViews(); | 2421 | updateUnmanagedViews(); |
2422 | updateView(); | 2422 | updateView(); |
2423 | } | 2423 | } |
2424 | return false; | 2424 | return false; |
2425 | } | 2425 | } |
2426 | void CalendarView::mergeFile( QString fn ) | 2426 | void CalendarView::mergeFile( QString fn ) |
2427 | { | 2427 | { |
2428 | clearAllViews(); | 2428 | clearAllViews(); |
2429 | mCalendar->mergeCalendarFile( fn ); | 2429 | mCalendar->mergeCalendarFile( fn ); |
2430 | mCalendar->reInitAlarmSettings(); | 2430 | mCalendar->reInitAlarmSettings(); |
2431 | setSyncEventsReadOnly(); | 2431 | setSyncEventsReadOnly(); |
2432 | updateUnmanagedViews(); | 2432 | updateUnmanagedViews(); |
2433 | updateView(); | 2433 | updateView(); |
2434 | } | 2434 | } |
2435 | void CalendarView::showOpenError() | 2435 | void CalendarView::showOpenError() |
2436 | { | 2436 | { |
2437 | KMessageBox::error(this,i18n("Couldn't load calendar\n.")); | 2437 | KMessageBox::error(this,i18n("Couldn't load calendar\n.")); |
2438 | } | 2438 | } |
2439 | void CalendarView::setLoadedFileVersion(QDateTime dt) | 2439 | void CalendarView::setLoadedFileVersion(QDateTime dt) |
2440 | { | 2440 | { |
2441 | loadedFileVersion = dt; | 2441 | loadedFileVersion = dt; |
2442 | } | 2442 | } |
2443 | bool CalendarView::checkFileChanged(QString fn) | 2443 | bool CalendarView::checkFileChanged(QString fn) |
2444 | { | 2444 | { |
2445 | QFileInfo finf ( fn ); | 2445 | QFileInfo finf ( fn ); |
2446 | if ( !finf.exists() ) | 2446 | if ( !finf.exists() ) |
2447 | return true; | 2447 | return true; |
2448 | QDateTime dt = finf.lastModified (); | 2448 | QDateTime dt = finf.lastModified (); |
2449 | if ( dt <= loadedFileVersion ) | 2449 | if ( dt <= loadedFileVersion ) |
2450 | return false; | 2450 | return false; |
2451 | return true; | 2451 | return true; |
2452 | 2452 | ||
2453 | } | 2453 | } |
2454 | void CalendarView::watchSavedFile() | 2454 | void CalendarView::watchSavedFile() |
2455 | { | 2455 | { |
2456 | QFileInfo finf ( MainWindow::defaultFileName()); | 2456 | QFileInfo finf ( MainWindow::defaultFileName()); |
2457 | if ( !finf.exists() ) | 2457 | if ( !finf.exists() ) |
2458 | return; | 2458 | return; |
2459 | QDateTime dt = finf.lastModified (); | 2459 | QDateTime dt = finf.lastModified (); |
2460 | if ( dt < loadedFileVersion ) { | 2460 | if ( dt < loadedFileVersion ) { |
2461 | //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); | 2461 | //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); |
2462 | QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); | 2462 | QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); |
2463 | return; | 2463 | return; |
2464 | } | 2464 | } |
2465 | loadedFileVersion = dt; | 2465 | loadedFileVersion = dt; |
2466 | } | 2466 | } |
2467 | bool CalendarView::checkAllFileVersions() | 2467 | bool CalendarView::checkAllFileVersions() |
2468 | { | 2468 | { |
2469 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 2469 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
2470 | KopiCalendarFile * cal = calendars.first(); | 2470 | KopiCalendarFile * cal = calendars.first(); |
2471 | mCalendar->setDefaultCalendar( 1 ); | 2471 | mCalendar->setDefaultCalendar( 1 ); |
2472 | mCalendar->setDefaultCalendarEnabledOnly(); | 2472 | mCalendar->setDefaultCalendarEnabledOnly(); |
2473 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { | 2473 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { |
2474 | if ( !checkFileVersion(MainWindow::defaultFileName())) { | 2474 | if ( !checkFileVersion(MainWindow::defaultFileName())) { |
2475 | restoreCalendarSettings(); | 2475 | restoreCalendarSettings(); |
2476 | return false; | 2476 | return false; |
2477 | } | 2477 | } |
2478 | } | 2478 | } |
2479 | cal = calendars.next(); | 2479 | cal = calendars.next(); |
2480 | QDateTime storeTemp = loadedFileVersion; | 2480 | QDateTime storeTemp = loadedFileVersion; |
2481 | while ( cal ) { | 2481 | while ( cal ) { |
2482 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { | 2482 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { |
2483 | mCalendar->setDefaultCalendar( cal->mCalNumber ); | 2483 | mCalendar->setDefaultCalendar( cal->mCalNumber ); |
2484 | mCalendar->setDefaultCalendarEnabledOnly(); | 2484 | mCalendar->setDefaultCalendarEnabledOnly(); |
2485 | loadedFileVersion = cal->mLoadDt.addSecs( 15 ); | 2485 | loadedFileVersion = cal->mLoadDt.addSecs( 15 ); |
2486 | if ( !checkFileVersion(cal->mFileName )) { | 2486 | if ( !checkFileVersion(cal->mFileName )) { |
2487 | loadedFileVersion = storeTemp; | 2487 | loadedFileVersion = storeTemp; |
2488 | restoreCalendarSettings(); | 2488 | restoreCalendarSettings(); |
2489 | return false; | 2489 | return false; |
2490 | } | 2490 | } |
2491 | } | 2491 | } |
2492 | cal = calendars.next(); | 2492 | cal = calendars.next(); |
2493 | } | 2493 | } |
2494 | loadedFileVersion = storeTemp; | 2494 | loadedFileVersion = storeTemp; |
2495 | return true; | 2495 | return true; |
2496 | } | 2496 | } |
2497 | bool CalendarView::checkFileVersion(QString fn) | 2497 | bool CalendarView::checkFileVersion(QString fn) |
2498 | { | 2498 | { |
2499 | QFileInfo finf ( fn ); | 2499 | QFileInfo finf ( fn ); |
2500 | if ( !finf.exists() ) | 2500 | if ( !finf.exists() ) |
2501 | return true; | 2501 | return true; |
2502 | QDateTime dt = finf.lastModified (); | 2502 | QDateTime dt = finf.lastModified (); |
2503 | qDebug("loaded file version %s %s", fn.latin1(), loadedFileVersion.toString().latin1()); | 2503 | qDebug("loaded file version %s %s", fn.latin1(), loadedFileVersion.toString().latin1()); |
2504 | qDebug("file on disk version %s %s", fn.latin1(),dt.toString().latin1()); | 2504 | qDebug("file on disk version %s %s", fn.latin1(),dt.toString().latin1()); |
2505 | if ( dt <= loadedFileVersion ) | 2505 | if ( dt <= loadedFileVersion ) |
2506 | return true; | 2506 | return true; |
2507 | int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg(KGlobal::formatMessage(fn,0)).arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , | 2507 | int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg(KGlobal::formatMessage(fn,0)).arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , |
2508 | i18n("KO/Pi Warning"),i18n("Overwrite"), | 2508 | i18n("KO/Pi Warning"),i18n("Overwrite"), |
2509 | i18n("Sync+save")); | 2509 | i18n("Sync+save")); |
2510 | 2510 | ||
2511 | if ( km == KMessageBox::Cancel ) | 2511 | if ( km == KMessageBox::Cancel ) |
2512 | return false; | 2512 | return false; |
2513 | if ( km == KMessageBox::Yes ) | 2513 | if ( km == KMessageBox::Yes ) |
2514 | return true; | 2514 | return true; |
2515 | 2515 | ||
2516 | setSyncDevice("deleteaftersync" ); | 2516 | setSyncDevice("deleteaftersync" ); |
2517 | mSyncManager->mAskForPreferences = true; | 2517 | mSyncManager->mAskForPreferences = true; |
2518 | mSyncManager->mSyncAlgoPrefs = 3; | 2518 | mSyncManager->mSyncAlgoPrefs = 3; |
2519 | mSyncManager->mWriteBackFile = false; | 2519 | mSyncManager->mWriteBackFile = false; |
2520 | mSyncManager->mWriteBackExistingOnly = false; | 2520 | mSyncManager->mWriteBackExistingOnly = false; |
2521 | mSyncManager->mShowSyncSummary = false; | 2521 | mSyncManager->mShowSyncSummary = false; |
2522 | syncCalendar( fn, 3 ); | 2522 | syncCalendar( fn, 3 ); |
2523 | Event * e = getLastSyncEvent(); | 2523 | Event * e = getLastSyncEvent(); |
2524 | if ( e ) | 2524 | if ( e ) |
2525 | mCalendar->deleteEvent( e ); | 2525 | mCalendar->deleteEvent( e ); |
2526 | return true; | 2526 | return true; |
2527 | } | 2527 | } |
2528 | bool CalendarView::saveCalendars() | 2528 | bool CalendarView::saveCalendars() |
2529 | { | 2529 | { |
2530 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 2530 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
2531 | KopiCalendarFile * cal = calendars.first(); | 2531 | KopiCalendarFile * cal = calendars.first(); |
2532 | mCalendar->setDefaultCalendar( 1 ); | 2532 | mCalendar->setDefaultCalendar( 1 ); |
2533 | mCalendar->setDefaultCalendarEnabledOnly(); | 2533 | mCalendar->setDefaultCalendarEnabledOnly(); |
2534 | QString saveError; | 2534 | QString saveError; |
2535 | if ( !saveCalendar( MainWindow::defaultFileName() ) ) | 2535 | if ( !saveCalendar( MainWindow::defaultFileName() ) ) |
2536 | saveError = cal->mName +"\n"; | 2536 | saveError = cal->mName +"\n"; |
2537 | cal = calendars.next(); | 2537 | cal = calendars.next(); |
2538 | while ( cal ) { | 2538 | while ( cal ) { |
2539 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { | 2539 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { |
2540 | mCalendar->setDefaultCalendar( cal->mCalNumber ); | 2540 | mCalendar->setDefaultCalendar( cal->mCalNumber ); |
2541 | mCalendar->setDefaultCalendarEnabledOnly(); | 2541 | mCalendar->setDefaultCalendarEnabledOnly(); |
2542 | if ( saveCalendar( cal->mFileName ) ) | 2542 | if ( saveCalendar( cal->mFileName ) ) |
2543 | cal->mLoadDt = QDateTime::currentDateTime(); | 2543 | cal->mLoadDt = QDateTime::currentDateTime(); |
2544 | else | 2544 | else |
2545 | saveError += cal->mName + "\n"; | 2545 | saveError += cal->mName + "\n"; |
2546 | } | 2546 | } |
2547 | cal = calendars.next(); | 2547 | cal = calendars.next(); |
2548 | } | 2548 | } |
2549 | restoreCalendarSettings(); | 2549 | restoreCalendarSettings(); |
2550 | if ( !saveError.isEmpty() ) { | 2550 | if ( !saveError.isEmpty() ) { |
2551 | saveError = KGlobal::formatMessage( i18n("Calendar(s) not saved:"),0 )+"\n" + saveError; | 2551 | saveError = KGlobal::formatMessage( i18n("Calendar(s) not saved:"),0 )+"\n" + saveError; |
2552 | KMessageBox::error(this, saveError, i18n("Error saving data")); | 2552 | KMessageBox::error(this, saveError, i18n("Error saving data")); |
2553 | return false; | 2553 | return false; |
2554 | } | 2554 | } |
2555 | return true; | 2555 | return true; |
2556 | } | 2556 | } |
2557 | bool CalendarView::saveCalendar( QString filename ) | 2557 | bool CalendarView::saveCalendar( QString filename ) |
2558 | { | 2558 | { |
2559 | 2559 | ||
2560 | // Store back all unsaved data into calendar object | 2560 | // Store back all unsaved data into calendar object |
2561 | // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); | 2561 | // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); |
2562 | if ( mViewManager->currentView() ) | 2562 | if ( mViewManager->currentView() ) |
2563 | mViewManager->currentView()->flushView(); | 2563 | mViewManager->currentView()->flushView(); |
2564 | 2564 | ||
2565 | 2565 | ||
2566 | QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); | 2566 | QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); |
2567 | mStorage->setSaveFormat( new ICalFormat() ); | 2567 | mStorage->setSaveFormat( new ICalFormat() ); |
2568 | mStorage->setFileName( filename ); | 2568 | mStorage->setFileName( filename ); |
2569 | bool success; | 2569 | bool success; |
2570 | success = mStorage->save(); | 2570 | success = mStorage->save(); |
2571 | if ( !success ) { | 2571 | if ( !success ) { |
2572 | return false; | 2572 | return false; |
2573 | } | 2573 | } |
2574 | if ( filename == MainWindow::defaultFileName() ) { | 2574 | if ( filename == MainWindow::defaultFileName() ) { |
2575 | setLoadedFileVersion( lfv ); | 2575 | setLoadedFileVersion( lfv ); |
2576 | watchSavedFile(); | 2576 | watchSavedFile(); |
2577 | } | 2577 | } |
2578 | return true; | 2578 | return true; |
2579 | } | 2579 | } |
2580 | 2580 | ||
2581 | void CalendarView::closeCalendar() | 2581 | void CalendarView::closeCalendar() |
2582 | { | 2582 | { |
2583 | 2583 | ||
2584 | // child windows no longer valid | 2584 | // child windows no longer valid |
2585 | clearAllViews(); | 2585 | clearAllViews(); |
2586 | emit closingDown(); | 2586 | emit closingDown(); |
2587 | 2587 | ||
2588 | mCalendar->close(); | 2588 | mCalendar->close(); |
2589 | setModified(false); | 2589 | setModified(false); |
2590 | updateView(); | 2590 | updateView(); |
2591 | } | 2591 | } |
2592 | 2592 | ||
2593 | void CalendarView::archiveCalendar() | 2593 | void CalendarView::archiveCalendar() |
2594 | { | 2594 | { |
2595 | mDialogManager->showArchiveDialog(); | 2595 | mDialogManager->showArchiveDialog(); |
2596 | } | 2596 | } |
2597 | 2597 | ||
2598 | 2598 | ||
2599 | void CalendarView::readSettings() | 2599 | void CalendarView::readSettings() |
2600 | { | 2600 | { |
2601 | 2601 | ||
2602 | 2602 | ||
2603 | // mViewManager->showAgendaView(); | 2603 | // mViewManager->showAgendaView(); |
2604 | QString str; | 2604 | QString str; |
2605 | //qDebug("CalendarView::readSettings() "); | 2605 | //qDebug("CalendarView::readSettings() "); |
2606 | // read settings from the KConfig, supplying reasonable | 2606 | // read settings from the KConfig, supplying reasonable |
2607 | // defaults where none are to be found | 2607 | // defaults where none are to be found |
2608 | KConfig *config = KOGlobals::config(); | 2608 | KConfig *config = KOGlobals::config(); |
2609 | #ifndef KORG_NOSPLITTER | 2609 | #ifndef KORG_NOSPLITTER |
2610 | config->setGroup("KOrganizer Geometry"); | 2610 | config->setGroup("KOrganizer Geometry"); |
2611 | 2611 | ||
2612 | QValueList<int> sizes = config->readIntListEntry("Separator1"); | 2612 | QValueList<int> sizes = config->readIntListEntry("Separator1"); |
2613 | if (sizes.count() != 2) { | 2613 | if (sizes.count() != 2) { |
2614 | sizes << mDateNavigator->minimumSizeHint().width(); | 2614 | sizes << mDateNavigator->minimumSizeHint().width(); |
2615 | sizes << 300; | 2615 | sizes << 300; |
2616 | } | 2616 | } |
2617 | mPanner->setSizes(sizes); | 2617 | mPanner->setSizes(sizes); |
2618 | 2618 | ||
2619 | sizes = config->readIntListEntry("Separator2"); | 2619 | sizes = config->readIntListEntry("Separator2"); |
2620 | if ( ( mResourceView && sizes.count() == 4 ) || | 2620 | if ( ( mResourceView && sizes.count() == 4 ) || |
2621 | ( !mResourceView && sizes.count() == 3 ) ) { | 2621 | ( !mResourceView && sizes.count() == 3 ) ) { |
2622 | mLeftSplitter->setSizes(sizes); | 2622 | mLeftSplitter->setSizes(sizes); |
2623 | } | 2623 | } |
2624 | #endif | 2624 | #endif |
2625 | globalFlagBlockAgenda = 1; | 2625 | globalFlagBlockAgenda = 1; |
2626 | mViewManager->showAgendaView(); | 2626 | mViewManager->showAgendaView(); |
2627 | //mViewManager->readSettings( config ); | 2627 | //mViewManager->readSettings( config ); |
2628 | mTodoList->restoreLayout(config,QString("Todo Layout")); | 2628 | mTodoList->restoreLayout(config,QString("Todo Layout")); |
2629 | readFilterSettings(config); | 2629 | readFilterSettings(config); |
2630 | 2630 | ||
2631 | #ifdef DESKTOP_VERSION | 2631 | #ifdef DESKTOP_VERSION |
2632 | config->setGroup("WidgetLayout"); | 2632 | config->setGroup("WidgetLayout"); |
2633 | QStringList list; | 2633 | QStringList list; |
2634 | list = config->readListEntry("MainLayout"); | 2634 | list = config->readListEntry("MainLayout"); |
2635 | int x,y,w,h; | 2635 | int x,y,w,h; |
2636 | if ( ! list.isEmpty() ) { | 2636 | if ( ! list.isEmpty() ) { |
2637 | x = list[0].toInt(); | 2637 | x = list[0].toInt(); |
2638 | y = list[1].toInt(); | 2638 | y = list[1].toInt(); |
2639 | w = list[2].toInt(); | 2639 | w = list[2].toInt(); |
2640 | h = list[3].toInt(); | 2640 | h = list[3].toInt(); |
2641 | KApplication::testCoords( &x,&y,&w,&h ); | 2641 | KApplication::testCoords( &x,&y,&w,&h ); |
2642 | topLevelWidget()->setGeometry(x,y,w,h); | 2642 | topLevelWidget()->setGeometry(x,y,w,h); |
2643 | 2643 | ||
2644 | } else { | 2644 | } else { |
2645 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); | 2645 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); |
2646 | } | 2646 | } |
2647 | list = config->readListEntry("EditEventLayout"); | 2647 | list = config->readListEntry("EditEventLayout"); |
2648 | if ( ! list.isEmpty() ) { | 2648 | if ( ! list.isEmpty() ) { |
2649 | x = list[0].toInt(); | 2649 | x = list[0].toInt(); |
2650 | y = list[1].toInt(); | 2650 | y = list[1].toInt(); |
2651 | w = list[2].toInt(); | 2651 | w = list[2].toInt(); |
2652 | h = list[3].toInt(); | 2652 | h = list[3].toInt(); |
2653 | KApplication::testCoords( &x,&y,&w,&h ); | 2653 | KApplication::testCoords( &x,&y,&w,&h ); |
2654 | mEventEditor->setGeometry(x,y,w,h); | 2654 | mEventEditor->setGeometry(x,y,w,h); |
2655 | 2655 | ||
2656 | } | 2656 | } |
2657 | list = config->readListEntry("EditTodoLayout"); | 2657 | list = config->readListEntry("EditTodoLayout"); |
2658 | if ( ! list.isEmpty() ) { | 2658 | if ( ! list.isEmpty() ) { |
2659 | x = list[0].toInt(); | 2659 | x = list[0].toInt(); |
2660 | y = list[1].toInt(); | 2660 | y = list[1].toInt(); |
2661 | w = list[2].toInt(); | 2661 | w = list[2].toInt(); |
2662 | h = list[3].toInt(); | 2662 | h = list[3].toInt(); |
2663 | KApplication::testCoords( &x,&y,&w,&h ); | 2663 | KApplication::testCoords( &x,&y,&w,&h ); |
2664 | mTodoEditor->setGeometry(x,y,w,h); | 2664 | mTodoEditor->setGeometry(x,y,w,h); |
2665 | 2665 | ||
2666 | } | 2666 | } |
2667 | list = config->readListEntry("ViewerLayout"); | 2667 | list = config->readListEntry("ViewerLayout"); |
2668 | if ( ! list.isEmpty() ) { | 2668 | if ( ! list.isEmpty() ) { |
2669 | x = list[0].toInt(); | 2669 | x = list[0].toInt(); |
2670 | y = list[1].toInt(); | 2670 | y = list[1].toInt(); |
2671 | w = list[2].toInt(); | 2671 | w = list[2].toInt(); |
2672 | h = list[3].toInt(); | 2672 | h = list[3].toInt(); |
2673 | KApplication::testCoords( &x,&y,&w,&h ); | 2673 | KApplication::testCoords( &x,&y,&w,&h ); |
2674 | getEventViewerDialog()->setGeometry(x,y,w,h); | 2674 | getEventViewerDialog()->setGeometry(x,y,w,h); |
2675 | } | 2675 | } |
2676 | #endif | 2676 | #endif |
2677 | config->setGroup( "Views" ); | 2677 | config->setGroup( "Views" ); |
2678 | int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); | 2678 | int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); |
2679 | 2679 | ||
2680 | QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); | 2680 | QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); |
2681 | 2681 | ||
2682 | int resetval = 0; | 2682 | int resetval = 0; |
2683 | int maxVal = 0; | 2683 | int maxVal = 0; |
2684 | if (sizes.count() != 3) { | 2684 | if (sizes.count() != 3) { |
2685 | if ( KOPrefs::instance()->mVerticalScreen ) { | 2685 | if ( KOPrefs::instance()->mVerticalScreen ) { |
2686 | resetval = mDateNavigator->sizeHint().width()+2; | 2686 | resetval = mDateNavigator->sizeHint().width()+2; |
2687 | } else { | 2687 | } else { |
2688 | resetval = mDateNavigator->sizeHint().height()+2; | 2688 | resetval = mDateNavigator->sizeHint().height()+2; |
2689 | } | 2689 | } |
2690 | } | 2690 | } |
2691 | if ( resetval ) { | 2691 | if ( resetval ) { |
2692 | sizes.clear(); | 2692 | sizes.clear(); |
2693 | if ( KOPrefs::instance()->mVerticalScreen ) { | 2693 | if ( KOPrefs::instance()->mVerticalScreen ) { |
2694 | maxVal = QApplication::desktop()->width() -10; | 2694 | maxVal = QApplication::desktop()->width() -10; |
2695 | } else { | 2695 | } else { |
2696 | maxVal = QApplication::desktop()->height()-10; | 2696 | maxVal = QApplication::desktop()->height()-10; |
2697 | } | 2697 | } |
2698 | sizes << resetval; | 2698 | sizes << resetval; |
2699 | if ( maxVal < resetval + resetval) | 2699 | if ( maxVal < resetval + resetval) |
2700 | resetval = maxVal - resetval; | 2700 | resetval = maxVal - resetval; |
2701 | sizes << resetval; | 2701 | sizes << resetval; |
2702 | sizes << 100; | 2702 | sizes << 100; |
2703 | } | 2703 | } |
2704 | mLeftFrame->setSizes(sizes); | 2704 | mLeftFrame->setSizes(sizes); |
2705 | sizes = config->readIntListEntry("Main Splitter Frame"); | 2705 | sizes = config->readIntListEntry("Main Splitter Frame"); |
2706 | resetval = 0; | 2706 | resetval = 0; |
2707 | maxVal = 0; | 2707 | maxVal = 0; |
2708 | if (sizes.count() != 2) { | 2708 | if (sizes.count() != 2) { |
2709 | if ( !KOPrefs::instance()->mVerticalScreen ) { | 2709 | if ( !KOPrefs::instance()->mVerticalScreen ) { |
2710 | resetval = mDateNavigator->sizeHint().width()+2; | 2710 | resetval = mDateNavigator->sizeHint().width()+2; |
2711 | } else { | 2711 | } else { |
2712 | resetval = mDateNavigator->sizeHint().height()+2; | 2712 | resetval = mDateNavigator->sizeHint().height()+2; |
2713 | } | 2713 | } |
2714 | } | 2714 | } |
2715 | if ( resetval ) { | 2715 | if ( resetval ) { |
2716 | sizes.clear(); | 2716 | sizes.clear(); |
2717 | if ( !KOPrefs::instance()->mVerticalScreen ) { | 2717 | if ( !KOPrefs::instance()->mVerticalScreen ) { |
2718 | maxVal = QApplication::desktop()->width() -10; | 2718 | maxVal = QApplication::desktop()->width() -10; |
2719 | } else { | 2719 | } else { |
2720 | maxVal = QApplication::desktop()->height()-10; | 2720 | maxVal = QApplication::desktop()->height()-10; |
2721 | } | 2721 | } |
2722 | sizes << resetval; | 2722 | sizes << resetval; |
2723 | if ( maxVal < resetval + resetval) | 2723 | if ( maxVal < resetval + resetval) |
2724 | resetval = maxVal - resetval; | 2724 | resetval = maxVal - resetval; |
2725 | sizes << resetval; | 2725 | sizes << resetval; |
2726 | } | 2726 | } |
2727 | mMainFrame->setSizes(sizes); | 2727 | mMainFrame->setSizes(sizes); |
2728 | if ( dateCount == 5 ) mNavigator->selectWorkWeek(); | 2728 | if ( dateCount == 5 ) mNavigator->selectWorkWeek(); |
2729 | else if ( dateCount == 7 ) mNavigator->selectWeek(); | 2729 | else if ( dateCount == 7 ) mNavigator->selectWeek(); |
2730 | else mNavigator->selectDates( dateCount ); | 2730 | else mNavigator->selectDates( dateCount ); |
2731 | // mViewManager->readSettings( config ); | 2731 | // mViewManager->readSettings( config ); |
2732 | updateConfig(); | 2732 | updateConfig(); |
2733 | globalFlagBlockAgenda = 2; | 2733 | globalFlagBlockAgenda = 2; |
2734 | mViewManager->readSettings( config ); | 2734 | mViewManager->readSettings( config ); |
2735 | QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); | 2735 | QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); |
2736 | } | 2736 | } |
2737 | 2737 | ||
2738 | void CalendarView::checkSuspendAlarm() | 2738 | void CalendarView::checkSuspendAlarm() |
2739 | { | 2739 | { |
2740 | if ( mSuspendTimer->isActive() ) { | 2740 | if ( mSuspendTimer->isActive() ) { |
2741 | KMessageBox::information( this, i18n("<b>WARNING:</b> There is a pending suspended alarm!"), i18n("Pending Suspend Alarm")); | 2741 | KMessageBox::information( this, i18n("<b>WARNING:</b> There is a pending suspended alarm!"), i18n("Pending Suspend Alarm")); |
2742 | } | 2742 | } |
2743 | } | 2743 | } |
2744 | void CalendarView::writeSettings() | 2744 | void CalendarView::writeSettings() |
2745 | { | 2745 | { |
2746 | // kdDebug() << "CalendarView::writeSettings" << endl; | 2746 | // kdDebug() << "CalendarView::writeSettings" << endl; |
2747 | 2747 | ||
2748 | KConfig *config = KOGlobals::config(); | 2748 | KConfig *config = KOGlobals::config(); |
2749 | 2749 | ||
2750 | mViewManager->writeSettings( config ); | 2750 | mViewManager->writeSettings( config ); |
2751 | mTodoList->saveLayout(config,QString("Todo Layout")); | 2751 | mTodoList->saveLayout(config,QString("Todo Layout")); |
2752 | mDialogManager->writeSettings( config ); | 2752 | mDialogManager->writeSettings( config ); |
2753 | //KOPrefs::instance()->usrWriteConfig(); | 2753 | //KOPrefs::instance()->usrWriteConfig(); |
2754 | KOPrefs::instance()->writeConfig(); | 2754 | KOPrefs::instance()->writeConfig(); |
2755 | 2755 | ||
2756 | writeFilterSettings(config); | 2756 | writeFilterSettings(config); |
2757 | config->setGroup( "AppRun" ); | 2757 | config->setGroup( "AppRun" ); |
2758 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); | 2758 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); |
2759 | int days = dt.daysTo( QDate::currentDate() ); | 2759 | int days = dt.daysTo( QDate::currentDate() ); |
2760 | dt = dt.addDays( days ); | 2760 | dt = dt.addDays( days ); |
2761 | int secs = dt.secsTo( QDateTime::currentDateTime() ); | 2761 | int secs = dt.secsTo( QDateTime::currentDateTime() ); |
2762 | config->writeEntry( "LatestProgramStopDays", days ); | 2762 | config->writeEntry( "LatestProgramStopDays", days ); |
2763 | config->writeEntry( "LatestProgramStopSecs", secs ); | 2763 | config->writeEntry( "LatestProgramStopSecs", secs ); |
2764 | //qDebug("KO: Writing stop time: %d ", secs); | 2764 | //qDebug("KO: Writing stop time: %d ", secs); |
2765 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); | 2765 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); |
2766 | //QDateTime latest = dt.addSecs ( secs ); | 2766 | //QDateTime latest = dt.addSecs ( secs ); |
2767 | //qDebug("KO: Termination on %s ", latest.toString().latin1()); | 2767 | //qDebug("KO: Termination on %s ", latest.toString().latin1()); |
2768 | config->setGroup( "Views" ); | 2768 | config->setGroup( "Views" ); |
2769 | config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); | 2769 | config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); |
2770 | 2770 | ||
2771 | #if 0 | 2771 | #if 0 |
2772 | qDebug("********************* "); | 2772 | qDebug("********************* "); |
2773 | qDebug("Testcode secsto "); | 2773 | qDebug("Testcode secsto "); |
2774 | QDateTime dt_nodaylight ( QDate (2005,3,26), QTime( 0,0,0 ) ); | 2774 | QDateTime dt_nodaylight ( QDate (2005,3,26), QTime( 0,0,0 ) ); |
2775 | QDateTime dt_daylight ( QDate (2005,3,29), QTime( 0,0,0 ) ); | 2775 | QDateTime dt_daylight ( QDate (2005,3,29), QTime( 0,0,0 ) ); |
2776 | int secsto = dt_nodaylight.secsTo( dt_daylight ); | 2776 | int secsto = dt_nodaylight.secsTo( dt_daylight ); |
2777 | QDateTime dt_daylight_wrong = dt_nodaylight.addSecs( secsto ); | 2777 | QDateTime dt_daylight_wrong = dt_nodaylight.addSecs( secsto ); |
2778 | qDebug("dt nodaylight %s ",dt_nodaylight.toString().latin1() ); | 2778 | qDebug("dt nodaylight %s ",dt_nodaylight.toString().latin1() ); |
2779 | qDebug("dt daylight %s ",dt_daylight.toString().latin1() ); | 2779 | qDebug("dt daylight %s ",dt_daylight.toString().latin1() ); |
2780 | qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() ); | 2780 | qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() ); |
2781 | qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600); | 2781 | qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600); |
2782 | qDebug("********************* testcode end"); | 2782 | qDebug("********************* testcode end"); |
2783 | 2783 | ||
2784 | #endif | 2784 | #endif |
2785 | 2785 | ||
2786 | QValueList<int> listINT = mLeftFrame->sizes(); | 2786 | QValueList<int> listINT = mLeftFrame->sizes(); |
2787 | config->writeEntry("Left Splitter Frame",listINT); | 2787 | config->writeEntry("Left Splitter Frame",listINT); |
2788 | QValueList<int> listINT2 = mMainFrame->sizes(); | 2788 | QValueList<int> listINT2 = mMainFrame->sizes(); |
2789 | config->writeEntry("Main Splitter Frame",listINT2); | 2789 | config->writeEntry("Main Splitter Frame",listINT2); |
2790 | #ifdef DESKTOP_VERSION | 2790 | #ifdef DESKTOP_VERSION |
2791 | config->setGroup("WidgetLayout"); | 2791 | config->setGroup("WidgetLayout"); |
2792 | QStringList list ;//= config->readListEntry("MainLayout"); | 2792 | QStringList list ;//= config->readListEntry("MainLayout"); |
2793 | int x,y,w,h; | 2793 | int x,y,w,h; |
2794 | QWidget* wid; | 2794 | QWidget* wid; |
2795 | wid = topLevelWidget(); | 2795 | wid = topLevelWidget(); |
2796 | x = wid->geometry().x(); | 2796 | x = wid->geometry().x(); |
2797 | y = wid->geometry().y(); | 2797 | y = wid->geometry().y(); |
2798 | w = wid->width(); | 2798 | w = wid->width(); |
2799 | h = wid->height(); | 2799 | h = wid->height(); |
2800 | list.clear(); | 2800 | list.clear(); |
2801 | list << QString::number( x ); | 2801 | list << QString::number( x ); |
2802 | list << QString::number( y ); | 2802 | list << QString::number( y ); |
2803 | list << QString::number( w ); | 2803 | list << QString::number( w ); |
2804 | list << QString::number( h ); | 2804 | list << QString::number( h ); |
2805 | config->writeEntry("MainLayout",list ); | 2805 | config->writeEntry("MainLayout",list ); |
2806 | 2806 | ||
2807 | wid = mEventEditor; | 2807 | wid = mEventEditor; |
2808 | x = wid->geometry().x(); | 2808 | x = wid->geometry().x(); |
2809 | y = wid->geometry().y(); | 2809 | y = wid->geometry().y(); |
2810 | w = wid->width(); | 2810 | w = wid->width(); |
2811 | h = wid->height(); | 2811 | h = wid->height(); |
2812 | list.clear(); | 2812 | list.clear(); |
2813 | list << QString::number( x ); | 2813 | list << QString::number( x ); |
2814 | list << QString::number( y ); | 2814 | list << QString::number( y ); |
2815 | list << QString::number( w ); | 2815 | list << QString::number( w ); |
2816 | list << QString::number( h ); | 2816 | list << QString::number( h ); |
2817 | config->writeEntry("EditEventLayout",list ); | 2817 | config->writeEntry("EditEventLayout",list ); |
2818 | 2818 | ||
2819 | wid = mTodoEditor; | 2819 | wid = mTodoEditor; |
2820 | x = wid->geometry().x(); | 2820 | x = wid->geometry().x(); |
2821 | y = wid->geometry().y(); | 2821 | y = wid->geometry().y(); |
2822 | w = wid->width(); | 2822 | w = wid->width(); |
2823 | h = wid->height(); | 2823 | h = wid->height(); |
2824 | list.clear(); | 2824 | list.clear(); |
2825 | list << QString::number( x ); | 2825 | list << QString::number( x ); |
2826 | list << QString::number( y ); | 2826 | list << QString::number( y ); |
2827 | list << QString::number( w ); | 2827 | list << QString::number( w ); |
2828 | list << QString::number( h ); | 2828 | list << QString::number( h ); |
2829 | config->writeEntry("EditTodoLayout",list ); | 2829 | config->writeEntry("EditTodoLayout",list ); |
2830 | wid = getEventViewerDialog(); | 2830 | wid = getEventViewerDialog(); |
2831 | x = wid->geometry().x(); | 2831 | x = wid->geometry().x(); |
2832 | y = wid->geometry().y(); | 2832 | y = wid->geometry().y(); |
2833 | w = wid->width(); | 2833 | w = wid->width(); |
2834 | h = wid->height(); | 2834 | h = wid->height(); |
2835 | list.clear(); | 2835 | list.clear(); |
2836 | list << QString::number( x ); | 2836 | list << QString::number( x ); |
2837 | list << QString::number( y ); | 2837 | list << QString::number( y ); |
2838 | list << QString::number( w ); | 2838 | list << QString::number( w ); |
2839 | list << QString::number( h ); | 2839 | list << QString::number( h ); |
2840 | config->writeEntry("ViewerLayout",list ); | 2840 | config->writeEntry("ViewerLayout",list ); |
2841 | wid = mDialogManager->getSearchDialog(); | 2841 | wid = mDialogManager->getSearchDialog(); |
2842 | if ( wid ) { | 2842 | if ( wid ) { |
2843 | x = wid->geometry().x(); | 2843 | x = wid->geometry().x(); |
2844 | y = wid->geometry().y(); | 2844 | y = wid->geometry().y(); |
2845 | w = wid->width(); | 2845 | w = wid->width(); |
2846 | h = wid->height(); | 2846 | h = wid->height(); |
2847 | list.clear(); | 2847 | list.clear(); |
2848 | list << QString::number( x ); | 2848 | list << QString::number( x ); |
2849 | list << QString::number( y ); | 2849 | list << QString::number( y ); |
2850 | list << QString::number( w ); | 2850 | list << QString::number( w ); |
2851 | list << QString::number( h ); | 2851 | list << QString::number( h ); |
2852 | config->writeEntry("SearchLayout",list ); | 2852 | config->writeEntry("SearchLayout",list ); |
2853 | } | 2853 | } |
2854 | #endif | 2854 | #endif |
2855 | 2855 | ||
2856 | 2856 | ||
2857 | config->sync(); | 2857 | config->sync(); |
2858 | } | 2858 | } |
2859 | 2859 | ||
2860 | void CalendarView::readFilterSettings(KConfig *config) | 2860 | void CalendarView::readFilterSettings(KConfig *config) |
2861 | { | 2861 | { |
2862 | // kdDebug() << "CalendarView::readFilterSettings()" << endl; | 2862 | // kdDebug() << "CalendarView::readFilterSettings()" << endl; |
2863 | 2863 | ||
2864 | mFilters.clear(); | 2864 | mFilters.clear(); |
2865 | 2865 | ||
2866 | config->setGroup("General"); | 2866 | config->setGroup("General"); |
2867 | QStringList filterList = config->readListEntry("CalendarFilters"); | 2867 | QStringList filterList = config->readListEntry("CalendarFilters"); |
2868 | 2868 | ||
2869 | QStringList::ConstIterator it = filterList.begin(); | 2869 | QStringList::ConstIterator it = filterList.begin(); |
2870 | QStringList::ConstIterator end = filterList.end(); | 2870 | QStringList::ConstIterator end = filterList.end(); |
2871 | while(it != end) { | 2871 | while(it != end) { |
2872 | // kdDebug() << " filter: " << (*it) << endl; | 2872 | // kdDebug() << " filter: " << (*it) << endl; |
2873 | 2873 | ||
2874 | CalFilter *filter; | 2874 | CalFilter *filter; |
2875 | filter = new CalFilter(*it); | 2875 | filter = new CalFilter(*it); |
2876 | config->setGroup("Filter_" + (*it).utf8()); | 2876 | config->setGroup("Filter_" + (*it).utf8()); |
2877 | //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); | 2877 | //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); |
2878 | filter->setCriteria(config->readNumEntry("Criteria",0)); | 2878 | filter->setCriteria(config->readNumEntry("Criteria",0)); |
2879 | filter->setCategoryList(config->readListEntry("CategoryList")); | 2879 | filter->setCategoryList(config->readListEntry("CategoryList")); |
2880 | mFilters.append(filter); | 2880 | mFilters.append(filter); |
2881 | 2881 | ||
2882 | ++it; | 2882 | ++it; |
2883 | } | 2883 | } |
2884 | 2884 | ||
2885 | if (mFilters.count() == 0) { | 2885 | if (mFilters.count() == 0) { |
2886 | CalFilter *filter = new CalFilter(i18n("Default")); | 2886 | CalFilter *filter = new CalFilter(i18n("Default")); |
2887 | mFilters.append(filter); | 2887 | mFilters.append(filter); |
2888 | } | 2888 | } |
2889 | mFilterView->updateFilters(); | 2889 | mFilterView->updateFilters(); |
2890 | config->setGroup("FilterView"); | 2890 | config->setGroup("FilterView"); |
2891 | 2891 | ||
2892 | mFilterView->blockSignals(true); | 2892 | mFilterView->blockSignals(true); |
2893 | mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled")); | 2893 | mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled")); |
2894 | mFilterView->setSelectedFilter(config->readEntry("Current Filter")); | 2894 | mFilterView->setSelectedFilter(config->readEntry("Current Filter")); |
2895 | mFilterView->blockSignals(false); | 2895 | mFilterView->blockSignals(false); |
2896 | // We do it manually to avoid it being done twice by the above calls | 2896 | // We do it manually to avoid it being done twice by the above calls |
2897 | updateFilter(); | 2897 | updateFilter(); |
2898 | } | 2898 | } |
2899 | 2899 | ||
2900 | void CalendarView::writeFilterSettings(KConfig *config) | 2900 | void CalendarView::writeFilterSettings(KConfig *config) |
2901 | { | 2901 | { |
2902 | // kdDebug() << "CalendarView::writeFilterSettings()" << endl; | 2902 | // kdDebug() << "CalendarView::writeFilterSettings()" << endl; |
2903 | 2903 | ||
2904 | QStringList filterList; | 2904 | QStringList filterList; |
2905 | 2905 | ||
2906 | CalFilter *filter = mFilters.first(); | 2906 | CalFilter *filter = mFilters.first(); |
2907 | while(filter) { | 2907 | while(filter) { |
2908 | // kdDebug() << " fn: " << filter->name() << endl; | 2908 | // kdDebug() << " fn: " << filter->name() << endl; |
2909 | filterList << filter->name(); | 2909 | filterList << filter->name(); |
2910 | config->setGroup("Filter_" + filter->name().utf8()); | 2910 | config->setGroup("Filter_" + filter->name().utf8()); |
2911 | config->writeEntry("Criteria",filter->criteria()); | 2911 | config->writeEntry("Criteria",filter->criteria()); |
2912 | config->writeEntry("CategoryList",filter->categoryList()); | 2912 | config->writeEntry("CategoryList",filter->categoryList()); |
2913 | filter = mFilters.next(); | 2913 | filter = mFilters.next(); |
2914 | } | 2914 | } |
2915 | config->setGroup("General"); | 2915 | config->setGroup("General"); |
2916 | config->writeEntry("CalendarFilters",filterList); | 2916 | config->writeEntry("CalendarFilters",filterList); |
2917 | 2917 | ||
2918 | config->setGroup("FilterView"); | 2918 | config->setGroup("FilterView"); |
2919 | config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); | 2919 | config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); |
2920 | config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); | 2920 | config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); |
2921 | } | 2921 | } |
2922 | 2922 | ||
2923 | 2923 | ||
2924 | void CalendarView::goToday() | 2924 | void CalendarView::goToday() |
2925 | { | 2925 | { |
2926 | if ( mViewManager->currentView()->isMonthView() ) | 2926 | if ( mViewManager->currentView()->isMonthView() ) |
2927 | mNavigator->selectTodayMonth(); | 2927 | mNavigator->selectTodayMonth(); |
2928 | else | 2928 | else |
2929 | mNavigator->selectToday(); | 2929 | mNavigator->selectToday(); |
2930 | } | 2930 | } |
2931 | 2931 | ||
2932 | void CalendarView::goNext() | 2932 | void CalendarView::goNext() |
2933 | { | 2933 | { |
2934 | mNavigator->selectNext(); | 2934 | mNavigator->selectNext(); |
2935 | } | 2935 | } |
2936 | 2936 | ||
2937 | void CalendarView::goPrevious() | 2937 | void CalendarView::goPrevious() |
2938 | { | 2938 | { |
2939 | mNavigator->selectPrevious(); | 2939 | mNavigator->selectPrevious(); |
2940 | } | 2940 | } |
2941 | void CalendarView::goNextMonth() | 2941 | void CalendarView::goNextMonth() |
2942 | { | 2942 | { |
2943 | mNavigator->selectNextMonth(); | 2943 | mNavigator->selectNextMonth(); |
2944 | } | 2944 | } |
2945 | 2945 | ||
2946 | void CalendarView::goPreviousMonth() | 2946 | void CalendarView::goPreviousMonth() |
2947 | { | 2947 | { |
2948 | mNavigator->selectPreviousMonth(); | 2948 | mNavigator->selectPreviousMonth(); |
2949 | } | 2949 | } |
2950 | 2950 | ||
2951 | void CalendarView::updateConfig() | 2951 | void CalendarView::updateConfig() |
2952 | { | 2952 | { |
2953 | if ( KOPrefs::instance()->mUseAppColors ) | 2953 | if ( KOPrefs::instance()->mUseAppColors ) |
2954 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 2954 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
2955 | emit configChanged(); | 2955 | emit configChanged(); |
2956 | mTodoList->updateConfig(); | 2956 | mTodoList->updateConfig(); |
2957 | // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); | 2957 | // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); |
2958 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 2958 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
2959 | // To make the "fill window" configurations work | 2959 | // To make the "fill window" configurations work |
2960 | //mViewManager->raiseCurrentView(); | 2960 | //mViewManager->raiseCurrentView(); |
2961 | } | 2961 | } |
2962 | 2962 | ||
2963 | 2963 | ||
2964 | void CalendarView::eventChanged(Event *event) | 2964 | void CalendarView::eventChanged(Event *event) |
2965 | { | 2965 | { |
2966 | changeEventDisplay(event,KOGlobals::EVENTEDITED); | 2966 | changeEventDisplay(event,KOGlobals::EVENTEDITED); |
2967 | //updateUnmanagedViews(); | 2967 | //updateUnmanagedViews(); |
2968 | } | 2968 | } |
2969 | 2969 | ||
2970 | void CalendarView::eventAdded(Event *event) | 2970 | void CalendarView::eventAdded(Event *event) |
2971 | { | 2971 | { |
2972 | changeEventDisplay(event,KOGlobals::EVENTADDED); | 2972 | changeEventDisplay(event,KOGlobals::EVENTADDED); |
2973 | } | 2973 | } |
2974 | 2974 | ||
2975 | void CalendarView::eventToBeDeleted(Event *) | 2975 | void CalendarView::eventToBeDeleted(Event *) |
2976 | { | 2976 | { |
2977 | kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; | 2977 | kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; |
2978 | } | 2978 | } |
2979 | 2979 | ||
2980 | void CalendarView::eventDeleted() | 2980 | void CalendarView::eventDeleted() |
2981 | { | 2981 | { |
2982 | changeEventDisplay(0,KOGlobals::EVENTDELETED); | 2982 | changeEventDisplay(0,KOGlobals::EVENTDELETED); |
2983 | } | 2983 | } |
2984 | void CalendarView::changeTodoDisplay(Todo *which, int action) | 2984 | void CalendarView::changeTodoDisplay(Todo *which, int action) |
2985 | { | 2985 | { |
2986 | changeIncidenceDisplay((Incidence *)which, action); | 2986 | changeIncidenceDisplay((Incidence *)which, action); |
2987 | mDateNavigator->updateView(); //LR | 2987 | mDateNavigator->updateView(); //LR |
2988 | //mDialogManager->updateSearchDialog(); | 2988 | //mDialogManager->updateSearchDialog(); |
2989 | 2989 | ||
2990 | if (which) { | 2990 | if (which) { |
2991 | mViewManager->updateWNview(); | 2991 | mViewManager->updateWNview(); |
2992 | //mTodoList->updateView(); | 2992 | //mTodoList->updateView(); |
2993 | } | 2993 | } |
2994 | 2994 | ||
2995 | } | 2995 | } |
2996 | 2996 | ||
2997 | void CalendarView::changeIncidenceDisplay(Incidence *which, int action) | 2997 | void CalendarView::changeIncidenceDisplay(Incidence *which, int action) |
2998 | { | 2998 | { |
2999 | updateUnmanagedViews(); | 2999 | updateUnmanagedViews(); |
3000 | //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); | 3000 | //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); |
3001 | if ( action == KOGlobals::EVENTDELETED ) { //delete | 3001 | if ( action == KOGlobals::EVENTDELETED ) { //delete |
3002 | mCalendar->checkAlarmForIncidence( 0, true ); | 3002 | mCalendar->checkAlarmForIncidence( 0, true ); |
3003 | if ( mEventViewerDialog ) | 3003 | if ( mEventViewerDialog ) |
3004 | mEventViewerDialog->hide(); | 3004 | mEventViewerDialog->hide(); |
3005 | } | 3005 | } |
3006 | else | 3006 | else |
3007 | mCalendar->checkAlarmForIncidence( which , false ); | 3007 | mCalendar->checkAlarmForIncidence( which , false ); |
3008 | } | 3008 | } |
3009 | 3009 | ||
3010 | // most of the changeEventDisplays() right now just call the view's | 3010 | // most of the changeEventDisplays() right now just call the view's |
3011 | // total update mode, but they SHOULD be recoded to be more refresh-efficient. | 3011 | // total update mode, but they SHOULD be recoded to be more refresh-efficient. |
3012 | void CalendarView::changeEventDisplay(Event *which, int action) | 3012 | void CalendarView::changeEventDisplay(Event *which, int action) |
3013 | { | 3013 | { |
3014 | // kdDebug() << "CalendarView::changeEventDisplay" << endl; | 3014 | // kdDebug() << "CalendarView::changeEventDisplay" << endl; |
3015 | changeIncidenceDisplay((Incidence *)which, action); | 3015 | changeIncidenceDisplay((Incidence *)which, action); |
3016 | static bool clearallviews = false; | 3016 | static bool clearallviews = false; |
3017 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { | 3017 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { |
3018 | if ( clearallviews ) { | 3018 | if ( clearallviews ) { |
3019 | clearAllViews(); | 3019 | clearAllViews(); |
3020 | clearallviews = false; | 3020 | clearallviews = false; |
3021 | } | 3021 | } |
3022 | return; | 3022 | return; |
3023 | } | 3023 | } |
3024 | clearallviews = true; | 3024 | clearallviews = true; |
3025 | mDateNavigator->updateView(); | 3025 | mDateNavigator->updateView(); |
3026 | //mDialogManager->updateSearchDialog(); | 3026 | //mDialogManager->updateSearchDialog(); |
3027 | if (which) { | 3027 | if (which) { |
3028 | // If there is an event view visible update the display | 3028 | // If there is an event view visible update the display |
3029 | mViewManager->currentView()->changeEventDisplay(which,action); | 3029 | mViewManager->currentView()->changeEventDisplay(which,action); |
3030 | // TODO: check, if update needed | 3030 | // TODO: check, if update needed |
3031 | // if (which->getTodoStatus()) { | 3031 | // if (which->getTodoStatus()) { |
3032 | mTodoList->updateView(); | 3032 | mTodoList->updateView(); |
3033 | if ( action != KOGlobals::EVENTDELETED ) { | 3033 | if ( action != KOGlobals::EVENTDELETED ) { |
3034 | mConflictingEvent = which ; | 3034 | mConflictingEvent = which ; |
3035 | int time = 1000; | 3035 | int time = 1000; |
3036 | #ifdef DESKTOP_VERSION | 3036 | #ifdef DESKTOP_VERSION |
3037 | time = 500; | 3037 | time = 500; |
3038 | #endif | 3038 | #endif |
3039 | QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) ); | 3039 | bool checkC = false; |
3040 | if ( mConflictingEvent->doesFloat() ) { | ||
3041 | checkC = KOPrefs::instance()->mCheckConflictsAllDayAllDay | ||
3042 | || KOPrefs::instance()->mCheckConflictsAllDayNonAD; | ||
3043 | } else { | ||
3044 | checkC = KOPrefs::instance()->mCheckConflictsNonADAllDay | ||
3045 | || KOPrefs::instance()->mCheckConflictsNonADNonAD; | ||
3046 | } | ||
3047 | if ( checkC ) | ||
3048 | QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) ); | ||
3040 | } | 3049 | } |
3041 | // } | 3050 | // } |
3042 | } else { | 3051 | } else { |
3043 | mViewManager->currentView()->updateView(); | 3052 | mViewManager->currentView()->updateView(); |
3044 | } | 3053 | } |
3045 | } | 3054 | } |
3046 | void CalendarView::checkConflictForEvent() | 3055 | void CalendarView::checkConflictForEvent() |
3047 | { | 3056 | { |
3048 | 3057 | ||
3049 | if (!KOPrefs::instance()->mConfirm) | 3058 | if (!KOPrefs::instance()->mConfirm) |
3050 | return; | 3059 | return; |
3051 | if ( ! mConflictingEvent ) return; | 3060 | if ( ! mConflictingEvent ) return; |
3052 | Event * conflictingEvent = mConflictingEvent; | 3061 | Event * conflictingEvent = mConflictingEvent; |
3053 | mConflictingEvent = 0; | 3062 | mConflictingEvent = 0; |
3054 | QDateTime current = QDateTime::currentDateTime(); | 3063 | QDateTime current = QDateTime::currentDateTime(); |
3055 | if ( ! conflictingEvent->matchTime( ¤t, 0 ) ) { | 3064 | if ( ! conflictingEvent->matchTime( ¤t, 0 ) ) { |
3056 | return; | 3065 | return; |
3057 | } | 3066 | } |
3067 | CalFilter *filterIN = 0; | ||
3068 | CalFilter *filterALL = 0; | ||
3069 | CalFilter *filter = mFilters.first(); | ||
3070 | while(filter) { | ||
3071 | if ( filter->name() == KOPrefs::instance()->mFilterConflictEditItem) | ||
3072 | filterIN = filter; | ||
3073 | if ( filter->name() == KOPrefs::instance()->mFilterConflictAllItem ) | ||
3074 | filterALL = filter; | ||
3075 | filter = mFilters.next(); | ||
3076 | } | ||
3077 | if ( filterIN ) { | ||
3078 | if ( !filterIN->filterCalendarItem( conflictingEvent ) ) { | ||
3079 | return; | ||
3080 | } | ||
3081 | } | ||
3058 | QPtrList<Event> testlist = mCalendar->events(); | 3082 | QPtrList<Event> testlist = mCalendar->events(); |
3059 | Event * test = testlist.first(); | 3083 | Event * test = testlist.first(); |
3060 | QDateTime conflict; | 3084 | QDateTime conflict; |
3061 | QDateTime retVal; | 3085 | QDateTime retVal; |
3062 | bool found = false; | 3086 | bool found = false; |
3063 | Event * cE = 0; | 3087 | Event * cE = 0; |
3088 | bool chAD = KOPrefs::instance()->mCheckConflictsAllDayAllDay; | ||
3089 | bool chNad = KOPrefs::instance()->mCheckConflictsAllDayNonAD; | ||
3090 | if ( !conflictingEvent->doesFloat() ) { | ||
3091 | chAD = KOPrefs::instance()->mCheckConflictsNonADAllDay; | ||
3092 | chNad = KOPrefs::instance()->mCheckConflictsNonADNonAD; | ||
3093 | } | ||
3064 | topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); | 3094 | topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); |
3065 | while ( test ) { | 3095 | while ( test ) { |
3066 | qApp->processEvents(); | 3096 | qApp->processEvents(); |
3067 | bool skip = false; | 3097 | bool skip = ( test->doesFloat() && !chAD ) || ( !test->doesFloat() && !chNad ); |
3068 | if ( found ) | 3098 | if ( !skip ) { |
3069 | skip = !test->matchTime( ¤t, &conflict ); | 3099 | if ( filterALL ) { |
3070 | else | 3100 | if ( !filterALL->filterCalendarItem( test ) ) { |
3071 | skip = !test->matchTime( ¤t, 0 ); | 3101 | skip = true; |
3072 | if ( !skip && !test->doesFloat() ) { | 3102 | } |
3073 | if ( conflictingEvent->isOverlapping ( test, &retVal, ¤t ) ) { | 3103 | } |
3074 | if ( ! found ) { | 3104 | if ( !skip ) { |
3075 | conflict = retVal; | 3105 | if ( found ) |
3076 | cE = test; | 3106 | skip = !test->matchTime( ¤t, &conflict ); |
3077 | } else { | 3107 | else |
3078 | if ( retVal < conflict ) { | 3108 | skip = !test->matchTime( ¤t, 0 ); |
3079 | conflict = retVal; | 3109 | if ( !skip ) { |
3080 | cE = test; | 3110 | if ( conflictingEvent->isOverlapping ( test, &retVal, ¤t ) ) { |
3111 | if ( ! found ) { | ||
3112 | conflict = retVal; | ||
3113 | cE = test; | ||
3114 | } else { | ||
3115 | if ( retVal < conflict ) { | ||
3116 | conflict = retVal; | ||
3117 | cE = test; | ||
3118 | } | ||
3119 | } | ||
3120 | found = true; | ||
3081 | } | 3121 | } |
3082 | } | 3122 | } |
3083 | found = true; | ||
3084 | } | 3123 | } |
3085 | } | 3124 | } |
3086 | test = testlist.next(); | 3125 | test = testlist.next(); |
3087 | } | 3126 | } |
3088 | topLevelWidget()->setCaption( i18n("KO/Pi") ); | 3127 | topLevelWidget()->setCaption( i18n("KO/Pi") ); |
3089 | if ( found ) { | 3128 | if ( found ) { |
3090 | QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( conflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ; | 3129 | QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( conflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ; |
3091 | qApp->processEvents(); | 3130 | qApp->processEvents(); |
3092 | int km = KMessageBox::warningContinueCancel(this,mess, | 3131 | int km = KMessageBox::warningContinueCancel(this,mess, |
3093 | i18n("KO/Pi Conflict delected"),i18n("Show date"),i18n("No problem!")); | 3132 | i18n("KO/Pi Conflict detected"),i18n("Show date"),i18n("No problem!")); |
3094 | if ( km != KMessageBox::Continue ) { | 3133 | if ( km != KMessageBox::Continue ) { |
3095 | return; | 3134 | return; |
3096 | } | 3135 | } |
3097 | if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) | 3136 | if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) |
3098 | mViewManager->showDayView(); | 3137 | mViewManager->showDayView(); |
3099 | mNavigator->slotDaySelect( conflict.date() ); | 3138 | mNavigator->slotDaySelect( conflict.date() ); |
3100 | int hour = conflict.time().hour(); | 3139 | int hour = conflict.time().hour(); |
3101 | mViewManager->agendaView()->setStartHour( hour ); | 3140 | mViewManager->agendaView()->setStartHour( hour ); |
3102 | topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( conflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) ); | 3141 | topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( conflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) ); |
3103 | } else | 3142 | } else |
3104 | topLevelWidget()->setCaption( i18n("No conflict found") ); | 3143 | topLevelWidget()->setCaption( i18n("No conflict found") ); |
3105 | return; | 3144 | return; |
3106 | 3145 | ||
3107 | } | 3146 | } |
3108 | 3147 | ||
3109 | void CalendarView::updateTodoViews() | 3148 | void CalendarView::updateTodoViews() |
3110 | { | 3149 | { |
3111 | mTodoList->updateView(); | 3150 | mTodoList->updateView(); |
3112 | mViewManager->currentView()->updateView(); | 3151 | mViewManager->currentView()->updateView(); |
3113 | 3152 | ||
3114 | } | 3153 | } |
3115 | 3154 | ||
3116 | 3155 | ||
3117 | 3156 | ||
3118 | void CalendarView::clearAllViews() | 3157 | void CalendarView::clearAllViews() |
3119 | { | 3158 | { |
3120 | mTodoList->clearList(); | 3159 | mTodoList->clearList(); |
3121 | mViewManager->clearAllViews(); | 3160 | mViewManager->clearAllViews(); |
3122 | SearchDialog * sd = mDialogManager->getSearchDialog(); | 3161 | SearchDialog * sd = mDialogManager->getSearchDialog(); |
3123 | if ( sd ) { | 3162 | if ( sd ) { |
3124 | KOListView* kol = sd->listview(); | 3163 | KOListView* kol = sd->listview(); |
3125 | if ( kol ) | 3164 | if ( kol ) |
3126 | kol->clearList(); | 3165 | kol->clearList(); |
3127 | } | 3166 | } |
3128 | } | 3167 | } |
3129 | void CalendarView::updateView() | 3168 | void CalendarView::updateView() |
3130 | { | 3169 | { |
3131 | static bool clearallviews = false; | 3170 | static bool clearallviews = false; |
3132 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { | 3171 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { |
3133 | if ( clearallviews ) { | 3172 | if ( clearallviews ) { |
3134 | clearAllViews(); | 3173 | clearAllViews(); |
3135 | clearallviews = false; | 3174 | clearallviews = false; |
3136 | } | 3175 | } |
3137 | return; | 3176 | return; |
3138 | } | 3177 | } |
3139 | clearallviews = true; | 3178 | clearallviews = true; |
3140 | DateList tmpList = mNavigator->selectedDates(); | 3179 | DateList tmpList = mNavigator->selectedDates(); |
3141 | 3180 | ||
3142 | if ( KOPrefs::instance()->mHideNonStartedTodos ) | 3181 | if ( KOPrefs::instance()->mHideNonStartedTodos ) |
3143 | mTodoList->updateView(); | 3182 | mTodoList->updateView(); |
3144 | // We assume that the navigator only selects consecutive days. | 3183 | // We assume that the navigator only selects consecutive days. |
3145 | updateView( tmpList.first(), tmpList.last() ); | 3184 | updateView( tmpList.first(), tmpList.last() ); |
3146 | } | 3185 | } |
3147 | 3186 | ||
3148 | void CalendarView::updateUnmanagedViews() | 3187 | void CalendarView::updateUnmanagedViews() |
3149 | { | 3188 | { |
3150 | mDateNavigator->updateDayMatrix(); | 3189 | mDateNavigator->updateDayMatrix(); |
3151 | } | 3190 | } |
3152 | 3191 | ||
3153 | int CalendarView::msgItemDelete(const QString name) | 3192 | int CalendarView::msgItemDelete(const QString name) |
3154 | { | 3193 | { |
3155 | return KMessageBox::warningContinueCancel(this,name +"\n\n"+ | 3194 | return KMessageBox::warningContinueCancel(this,name +"\n\n"+ |
3156 | i18n("This item will be\npermanently deleted."), | 3195 | i18n("This item will be\npermanently deleted."), |
3157 | i18n("KO/Pi Confirmation"),i18n("Delete")); | 3196 | i18n("KO/Pi Confirmation"),i18n("Delete")); |
3158 | } | 3197 | } |
3159 | 3198 | ||
3160 | 3199 | ||
3161 | void CalendarView::edit_cut() | 3200 | void CalendarView::edit_cut() |
3162 | { | 3201 | { |
3163 | Event *anEvent=0; | 3202 | Event *anEvent=0; |
3164 | 3203 | ||
3165 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3204 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3166 | 3205 | ||
3167 | if (mViewManager->currentView()->isEventView()) { | 3206 | if (mViewManager->currentView()->isEventView()) { |
3168 | if ( incidence && incidence->typeID() == eventID ) { | 3207 | if ( incidence && incidence->typeID() == eventID ) { |
3169 | anEvent = static_cast<Event *>(incidence); | 3208 | anEvent = static_cast<Event *>(incidence); |
3170 | } | 3209 | } |
3171 | } | 3210 | } |
3172 | 3211 | ||
3173 | if (!anEvent) { | 3212 | if (!anEvent) { |
3174 | KNotifyClient::beep(); | 3213 | KNotifyClient::beep(); |
3175 | return; | 3214 | return; |
3176 | } | 3215 | } |
3177 | DndFactory factory( mCalendar ); | 3216 | DndFactory factory( mCalendar ); |
3178 | factory.cutIncidence(anEvent); | 3217 | factory.cutIncidence(anEvent); |
3179 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 3218 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
3180 | } | 3219 | } |
3181 | 3220 | ||
3182 | void CalendarView::edit_copy() | 3221 | void CalendarView::edit_copy() |
3183 | { | 3222 | { |
3184 | Event *anEvent=0; | 3223 | Event *anEvent=0; |
3185 | 3224 | ||
3186 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3225 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3187 | 3226 | ||
3188 | if (mViewManager->currentView()->isEventView()) { | 3227 | if (mViewManager->currentView()->isEventView()) { |
3189 | if ( incidence && incidence->typeID() == eventID ) { | 3228 | if ( incidence && incidence->typeID() == eventID ) { |
3190 | anEvent = static_cast<Event *>(incidence); | 3229 | anEvent = static_cast<Event *>(incidence); |
3191 | } | 3230 | } |
3192 | } | 3231 | } |
3193 | 3232 | ||
3194 | if (!anEvent) { | 3233 | if (!anEvent) { |
3195 | KNotifyClient::beep(); | 3234 | KNotifyClient::beep(); |
3196 | return; | 3235 | return; |
3197 | } | 3236 | } |
3198 | DndFactory factory( mCalendar ); | 3237 | DndFactory factory( mCalendar ); |
3199 | factory.copyIncidence(anEvent); | 3238 | factory.copyIncidence(anEvent); |
3200 | } | 3239 | } |
3201 | 3240 | ||
3202 | void CalendarView::edit_paste() | 3241 | void CalendarView::edit_paste() |
3203 | { | 3242 | { |
3204 | QDate date = mNavigator->selectedDates().first(); | 3243 | QDate date = mNavigator->selectedDates().first(); |
3205 | 3244 | ||
3206 | DndFactory factory( mCalendar ); | 3245 | DndFactory factory( mCalendar ); |
3207 | Event *pastedEvent = (Event *)factory.pasteIncidence( date ); | 3246 | Event *pastedEvent = (Event *)factory.pasteIncidence( date ); |
3208 | 3247 | ||
3209 | changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); | 3248 | changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); |
3210 | } | 3249 | } |
3211 | void CalendarView::edit_global_options() | 3250 | void CalendarView::edit_global_options() |
3212 | { | 3251 | { |
3213 | QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; | 3252 | QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; |
3214 | emit save(); | 3253 | emit save(); |
3215 | emit saveStopTimer(); | 3254 | emit saveStopTimer(); |
3216 | mDialogManager->showGlobalOptionsDialog(); | 3255 | mDialogManager->showGlobalOptionsDialog(); |
3217 | if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { | 3256 | if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { |
3218 | emit saveStopTimer(); | 3257 | emit saveStopTimer(); |
3219 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), | 3258 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), |
3220 | i18n("Timezone settings"),i18n("Reload"))) { | 3259 | i18n("Timezone settings"),i18n("Reload"))) { |
3221 | qDebug("KO: TZ reload cancelled "); | 3260 | qDebug("KO: TZ reload cancelled "); |
3222 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 3261 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
3223 | return; | 3262 | return; |
3224 | } | 3263 | } |
3225 | qDebug("KO: Timezone change "); | 3264 | qDebug("KO: Timezone change "); |
3226 | loadCalendars(); | 3265 | loadCalendars(); |
3227 | setModified(true); | 3266 | setModified(true); |
3228 | } | 3267 | } |
3229 | else | 3268 | else |
3230 | qDebug("KO: No tz change "); | 3269 | qDebug("KO: No tz change "); |
3231 | } | 3270 | } |
3232 | void CalendarView::edit_options() | 3271 | void CalendarView::edit_options() |
3233 | { | 3272 | { |
3234 | mDialogManager->showOptionsDialog(); | 3273 | mDialogManager->showOptionsDialog(); |
3235 | } | 3274 | } |
3236 | 3275 | ||
3237 | 3276 | ||
3238 | void CalendarView::slotSelectPickerDate( QDate d) | 3277 | void CalendarView::slotSelectPickerDate( QDate d) |
3239 | { | 3278 | { |
3240 | mDateFrame->hide(); | 3279 | mDateFrame->hide(); |
3241 | if ( mDatePickerMode == 1 ) { | 3280 | if ( mDatePickerMode == 1 ) { |
3242 | mNavigator->slotDaySelect( d ); | 3281 | mNavigator->slotDaySelect( d ); |
3243 | } else if ( mDatePickerMode == 2 ) { | 3282 | } else if ( mDatePickerMode == 2 ) { |
3244 | if ( mMoveIncidence->typeID() == todoID ) { | 3283 | if ( mMoveIncidence->typeID() == todoID ) { |
3245 | Todo * to = (Todo *) mMoveIncidence; | 3284 | Todo * to = (Todo *) mMoveIncidence; |
3246 | QTime tim; | 3285 | QTime tim; |
3247 | int len = 0; | 3286 | int len = 0; |
3248 | if ( to->hasStartDate() && to->hasDueDate() ) | 3287 | if ( to->hasStartDate() && to->hasDueDate() ) |
3249 | len = to->dtStart().secsTo( to->dtDue()); | 3288 | len = to->dtStart().secsTo( to->dtDue()); |
3250 | if ( to->hasDueDate() ) | 3289 | if ( to->hasDueDate() ) |
3251 | tim = to->dtDue().time(); | 3290 | tim = to->dtDue().time(); |
3252 | else { | 3291 | else { |
3253 | tim = QTime ( 0,0,0 ); | 3292 | tim = QTime ( 0,0,0 ); |
3254 | to->setFloats( true ); | 3293 | to->setFloats( true ); |
3255 | to->setHasDueDate( true ); | 3294 | to->setHasDueDate( true ); |
3256 | } | 3295 | } |
3257 | QDateTime dt ( d,tim ); | 3296 | QDateTime dt ( d,tim ); |
3258 | to->setDtDue( dt ); | 3297 | to->setDtDue( dt ); |
3259 | 3298 | ||
3260 | if ( to->hasStartDate() ) { | 3299 | if ( to->hasStartDate() ) { |
3261 | if ( len>0 ) | 3300 | if ( len>0 ) |
3262 | to->setDtStart(to->dtDue().addSecs( -len )); | 3301 | to->setDtStart(to->dtDue().addSecs( -len )); |
3263 | else | 3302 | else |
3264 | if (to->dtStart() > to->dtDue() ) | 3303 | if (to->dtStart() > to->dtDue() ) |
3265 | to->setDtStart(to->dtDue().addDays( -3 )); | 3304 | to->setDtStart(to->dtDue().addDays( -3 )); |
3266 | } | 3305 | } |
3267 | 3306 | ||
3268 | todoChanged( to ); | 3307 | todoChanged( to ); |
3269 | } else if ( mMoveIncidence->typeID() == eventID ) { | 3308 | } else if ( mMoveIncidence->typeID() == eventID ) { |
3270 | if ( mMoveIncidence->doesRecur() ) { | 3309 | if ( mMoveIncidence->doesRecur() ) { |
3271 | #if 0 | 3310 | #if 0 |
3272 | // PENDING implement this | 3311 | // PENDING implement this |
3273 | Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); | 3312 | Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); |
3274 | mCalendar()->addIncidence( newInc ); | 3313 | mCalendar()->addIncidence( newInc ); |
3275 | if ( mMoveIncidence->typeID() == todoID ) | 3314 | if ( mMoveIncidence->typeID() == todoID ) |
3276 | emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); | 3315 | emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); |
3277 | else | 3316 | else |
3278 | emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); | 3317 | emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); |
3279 | mMoveIncidence = newInc; | 3318 | mMoveIncidence = newInc; |
3280 | 3319 | ||
3281 | #endif | 3320 | #endif |
3282 | } | 3321 | } |
3283 | QTime tim = mMoveIncidence->dtStart().time(); | 3322 | QTime tim = mMoveIncidence->dtStart().time(); |
3284 | int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); | 3323 | int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); |
3285 | QDateTime dt ( d,tim ); | 3324 | QDateTime dt ( d,tim ); |
3286 | mMoveIncidence->setDtStart( dt ); | 3325 | mMoveIncidence->setDtStart( dt ); |
3287 | ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); | 3326 | ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); |
3288 | changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); | 3327 | changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); |
3289 | } else if ( mMoveIncidence->typeID() == journalID ) { | 3328 | } else if ( mMoveIncidence->typeID() == journalID ) { |
3290 | QTime tim = mMoveIncidence->dtStart().time(); | 3329 | QTime tim = mMoveIncidence->dtStart().time(); |
3291 | QDateTime dt ( d,tim ); | 3330 | QDateTime dt ( d,tim ); |
3292 | mMoveIncidence->setDtStart( dt ); | 3331 | mMoveIncidence->setDtStart( dt ); |
3293 | updateView(); | 3332 | updateView(); |
3294 | } | 3333 | } |
3295 | mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); | 3334 | mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); |
3296 | } | 3335 | } |
3297 | } | 3336 | } |
3298 | 3337 | ||
3299 | void CalendarView::removeCategories() | 3338 | void CalendarView::removeCategories() |
3300 | { | 3339 | { |
3301 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); | 3340 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); |
3302 | QStringList catList = KOPrefs::instance()->mCustomCategories; | 3341 | QStringList catList = KOPrefs::instance()->mCustomCategories; |
3303 | QStringList catIncList; | 3342 | QStringList catIncList; |
3304 | QStringList newCatList; | 3343 | QStringList newCatList; |
3305 | Incidence* inc = incList.first(); | 3344 | Incidence* inc = incList.first(); |
3306 | uint i; | 3345 | uint i; |
3307 | while ( inc ) { | 3346 | while ( inc ) { |
3308 | newCatList.clear(); | 3347 | newCatList.clear(); |
3309 | catIncList = inc->categories() ; | 3348 | catIncList = inc->categories() ; |
3310 | for( i = 0; i< catIncList.count(); ++i ) { | 3349 | for( i = 0; i< catIncList.count(); ++i ) { |
3311 | if ( catList.contains (catIncList[i])) | 3350 | if ( catList.contains (catIncList[i])) |
3312 | newCatList.append( catIncList[i] ); | 3351 | newCatList.append( catIncList[i] ); |
3313 | } | 3352 | } |
3314 | newCatList.sort(); | 3353 | newCatList.sort(); |
3315 | inc->setCategories( newCatList.join(",") ); | 3354 | inc->setCategories( newCatList.join(",") ); |
3316 | inc = incList.next(); | 3355 | inc = incList.next(); |
3317 | } | 3356 | } |
3318 | } | 3357 | } |
3319 | 3358 | ||
3320 | int CalendarView::addCategories() | 3359 | int CalendarView::addCategories() |
3321 | { | 3360 | { |
3322 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); | 3361 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); |
3323 | QStringList catList = KOPrefs::instance()->mCustomCategories; | 3362 | QStringList catList = KOPrefs::instance()->mCustomCategories; |
3324 | QStringList catIncList; | 3363 | QStringList catIncList; |
3325 | Incidence* inc = incList.first(); | 3364 | Incidence* inc = incList.first(); |
3326 | uint i; | 3365 | uint i; |
3327 | int count = 0; | 3366 | int count = 0; |
3328 | while ( inc ) { | 3367 | while ( inc ) { |
3329 | catIncList = inc->categories() ; | 3368 | catIncList = inc->categories() ; |
3330 | for( i = 0; i< catIncList.count(); ++i ) { | 3369 | for( i = 0; i< catIncList.count(); ++i ) { |
3331 | if ( !catList.contains (catIncList[i])) { | 3370 | if ( !catList.contains (catIncList[i])) { |
3332 | catList.append( catIncList[i] ); | 3371 | catList.append( catIncList[i] ); |
3333 | //qDebug("add cat %s ", catIncList[i].latin1()); | 3372 | //qDebug("add cat %s ", catIncList[i].latin1()); |
3334 | ++count; | 3373 | ++count; |
3335 | } | 3374 | } |
3336 | } | 3375 | } |
3337 | inc = incList.next(); | 3376 | inc = incList.next(); |
3338 | } | 3377 | } |
3339 | catList.sort(); | 3378 | catList.sort(); |
3340 | KOPrefs::instance()->mCustomCategories = catList; | 3379 | KOPrefs::instance()->mCustomCategories = catList; |
3341 | return count; | 3380 | return count; |
3342 | } | 3381 | } |
3343 | 3382 | ||
3344 | void CalendarView::editCategories() | 3383 | void CalendarView::editCategories() |
3345 | { | 3384 | { |
3346 | qDebug("CalendarView::editCategories() "); | 3385 | qDebug("CalendarView::editCategories() "); |
3347 | KPIM::CategoryEditDialog ced (KOPrefs::instance(),this ); | 3386 | KPIM::CategoryEditDialog ced (KOPrefs::instance(),this ); |
3348 | ced.exec(); | 3387 | ced.exec(); |
3349 | } | 3388 | } |
3350 | void CalendarView::manageCategories() | 3389 | void CalendarView::manageCategories() |
3351 | { | 3390 | { |
3352 | KOCatPrefs* cp = new KOCatPrefs(); | 3391 | KOCatPrefs* cp = new KOCatPrefs(); |
3353 | cp->show(); | 3392 | cp->show(); |
3354 | int w =cp->sizeHint().width() ; | 3393 | int w =cp->sizeHint().width() ; |
3355 | int h = cp->sizeHint().height() ; | 3394 | int h = cp->sizeHint().height() ; |
3356 | int dw = QApplication::desktop()->width(); | 3395 | int dw = QApplication::desktop()->width(); |
3357 | int dh = QApplication::desktop()->height(); | 3396 | int dh = QApplication::desktop()->height(); |
3358 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 3397 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
3359 | if ( !cp->exec() ) { | 3398 | if ( !cp->exec() ) { |
3360 | delete cp; | 3399 | delete cp; |
3361 | return; | 3400 | return; |
3362 | } | 3401 | } |
3363 | int count = 0; | 3402 | int count = 0; |
3364 | if ( cp->addCat() ) { | 3403 | if ( cp->addCat() ) { |
3365 | count = addCategories(); | 3404 | count = addCategories(); |
3366 | if ( count ) { | 3405 | if ( count ) { |
3367 | topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); | 3406 | topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); |
3368 | writeSettings(); | 3407 | writeSettings(); |
3369 | } else | 3408 | } else |
3370 | topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); | 3409 | topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); |
3371 | } else { | 3410 | } else { |
3372 | removeCategories(); | 3411 | removeCategories(); |
3373 | updateView(); | 3412 | updateView(); |
3374 | } | 3413 | } |
3375 | delete cp; | 3414 | delete cp; |
3376 | } | 3415 | } |
3377 | 3416 | ||
3378 | void CalendarView::beamIncidence(Incidence * Inc) | 3417 | void CalendarView::beamIncidence(Incidence * Inc) |
3379 | { | 3418 | { |
3380 | QPtrList<Incidence> delSel ; | 3419 | QPtrList<Incidence> delSel ; |
3381 | delSel.append(Inc); | 3420 | delSel.append(Inc); |
3382 | beamIncidenceList( delSel ); | 3421 | beamIncidenceList( delSel ); |
3383 | } | 3422 | } |
3384 | void CalendarView::beamCalendar() | 3423 | void CalendarView::beamCalendar() |
3385 | { | 3424 | { |
3386 | QPtrList<Incidence> delSel = mCalendar->rawIncidences(); | 3425 | QPtrList<Incidence> delSel = mCalendar->rawIncidences(); |
3387 | //qDebug("beamCalendar() "); | 3426 | //qDebug("beamCalendar() "); |
3388 | beamIncidenceList( delSel ); | 3427 | beamIncidenceList( delSel ); |
3389 | } | 3428 | } |
3390 | void CalendarView::beamFilteredCalendar() | 3429 | void CalendarView::beamFilteredCalendar() |
3391 | { | 3430 | { |
3392 | QPtrList<Incidence> delSel = mCalendar->incidences(); | 3431 | QPtrList<Incidence> delSel = mCalendar->incidences(); |
3393 | //qDebug("beamFilteredCalendar() "); | 3432 | //qDebug("beamFilteredCalendar() "); |
3394 | beamIncidenceList( delSel ); | 3433 | beamIncidenceList( delSel ); |
3395 | } | 3434 | } |
3396 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) | 3435 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) |
3397 | { | 3436 | { |
3398 | 3437 | ||
3399 | KOBeamPrefs beamDialog; | 3438 | KOBeamPrefs beamDialog; |
3400 | if ( beamDialog.exec () == QDialog::Rejected ) | 3439 | if ( beamDialog.exec () == QDialog::Rejected ) |
3401 | return; | 3440 | return; |
3402 | #ifdef DESKTOP_VERSION | 3441 | #ifdef DESKTOP_VERSION |
3403 | QString fn = locateLocal( "tmp", "kopibeamfile" ); | 3442 | QString fn = locateLocal( "tmp", "kopibeamfile" ); |
3404 | #else | 3443 | #else |
3405 | QString fn = "/tmp/kopibeamfile"; | 3444 | QString fn = "/tmp/kopibeamfile"; |
3406 | #endif | 3445 | #endif |
3407 | QString mes; | 3446 | QString mes; |
3408 | bool createbup = true; | 3447 | bool createbup = true; |
3409 | if ( createbup ) { | 3448 | if ( createbup ) { |
3410 | QString description = "\n"; | 3449 | QString description = "\n"; |
3411 | CalendarLocal* cal = new CalendarLocal(); | 3450 | CalendarLocal* cal = new CalendarLocal(); |
3412 | if ( beamDialog.beamLocal() ) | 3451 | if ( beamDialog.beamLocal() ) |
3413 | cal->setLocalTime(); | 3452 | cal->setLocalTime(); |
3414 | else | 3453 | else |
3415 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 3454 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
3416 | Incidence *incidence = delSel.first(); | 3455 | Incidence *incidence = delSel.first(); |
3417 | bool addText = false; | 3456 | bool addText = false; |
3418 | if ( delSel.count() < 10 ) | 3457 | if ( delSel.count() < 10 ) |
3419 | addText = true; | 3458 | addText = true; |
3420 | else { | 3459 | else { |
3421 | description.sprintf(i18n(" %d items?"),delSel.count() ); | 3460 | description.sprintf(i18n(" %d items?"),delSel.count() ); |
3422 | } | 3461 | } |
3423 | while ( incidence ) { | 3462 | while ( incidence ) { |
3424 | Incidence *in = incidence->clone(); | 3463 | Incidence *in = incidence->clone(); |
3425 | if ( ! in->summary().isEmpty() ) { | 3464 | if ( ! in->summary().isEmpty() ) { |
3426 | in->setDescription(""); | 3465 | in->setDescription(""); |
3427 | } else { | 3466 | } else { |
3428 | in->setSummary( in->description().left(20)); | 3467 | in->setSummary( in->description().left(20)); |
3429 | in->setDescription(""); | 3468 | in->setDescription(""); |
3430 | } | 3469 | } |
3431 | if ( addText ) | 3470 | if ( addText ) |
3432 | description += in->summary() + "\n"; | 3471 | description += in->summary() + "\n"; |
3433 | cal->addIncidence( in ); | 3472 | cal->addIncidence( in ); |
3434 | incidence = delSel.next(); | 3473 | incidence = delSel.next(); |
3435 | } | 3474 | } |
3436 | if ( beamDialog.beamVcal() ) { | 3475 | if ( beamDialog.beamVcal() ) { |
3437 | fn += ".vcs"; | 3476 | fn += ".vcs"; |
3438 | FileStorage storage( cal, fn, new VCalFormat ); | 3477 | FileStorage storage( cal, fn, new VCalFormat ); |
3439 | storage.save(); | 3478 | storage.save(); |
3440 | } else { | 3479 | } else { |
3441 | fn += ".ics"; | 3480 | fn += ".ics"; |
3442 | FileStorage storage( cal, fn, new ICalFormat( ) ); | 3481 | FileStorage storage( cal, fn, new ICalFormat( ) ); |
3443 | storage.save(); | 3482 | storage.save(); |
3444 | } | 3483 | } |
3445 | delete cal; | 3484 | delete cal; |
3446 | mes = i18n("KO/Pi: Ready for beaming"); | 3485 | mes = i18n("KO/Pi: Ready for beaming"); |
3447 | topLevelWidget()->setCaption(mes); | 3486 | topLevelWidget()->setCaption(mes); |
3448 | KApplication::convert2latin1( fn ); | 3487 | KApplication::convert2latin1( fn ); |
3449 | #ifndef DESKTOP_VERSION | 3488 | #ifndef DESKTOP_VERSION |
3450 | Ir *ir = new Ir( this ); | 3489 | Ir *ir = new Ir( this ); |
3451 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 3490 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
3452 | ir->send( fn, description, "text/x-vCalendar" ); | 3491 | ir->send( fn, description, "text/x-vCalendar" ); |
3453 | #endif | 3492 | #endif |
3454 | } | 3493 | } |
3455 | } | 3494 | } |
3456 | 3495 | ||
3457 | #ifndef DESKTOP_VERSION | 3496 | #ifndef DESKTOP_VERSION |
3458 | void CalendarView::beamDone( Ir *ir ) | 3497 | void CalendarView::beamDone( Ir *ir ) |
3459 | { | 3498 | { |
3460 | delete ir; | 3499 | delete ir; |
3461 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); | 3500 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); |
3462 | topLevelWidget()->raise(); | 3501 | topLevelWidget()->raise(); |
3463 | } | 3502 | } |
3464 | #else | 3503 | #else |
3465 | void CalendarView::beamDone( Ir *){;} | 3504 | void CalendarView::beamDone( Ir *){;} |
3466 | #endif | 3505 | #endif |
3467 | void CalendarView::moveIncidence(Incidence * inc ) | 3506 | void CalendarView::moveIncidence(Incidence * inc ) |
3468 | { | 3507 | { |
3469 | if ( !inc ) return; | 3508 | if ( !inc ) return; |
3470 | showDatePickerPopup(); | 3509 | showDatePickerPopup(); |
3471 | mDatePickerMode = 2; | 3510 | mDatePickerMode = 2; |
3472 | mMoveIncidence = inc ; | 3511 | mMoveIncidence = inc ; |
3473 | QDate da; | 3512 | QDate da; |
3474 | if ( mMoveIncidence->typeID() == todoID ) { | 3513 | if ( mMoveIncidence->typeID() == todoID ) { |
3475 | Todo * to = (Todo *) mMoveIncidence; | 3514 | Todo * to = (Todo *) mMoveIncidence; |
3476 | if ( to->hasDueDate() ) | 3515 | if ( to->hasDueDate() ) |
3477 | da = to->dtDue().date(); | 3516 | da = to->dtDue().date(); |
3478 | else | 3517 | else |
3479 | da = QDate::currentDate(); | 3518 | da = QDate::currentDate(); |
3480 | } else { | 3519 | } else { |
3481 | da = mMoveIncidence->dtStart().date(); | 3520 | da = mMoveIncidence->dtStart().date(); |
3482 | } | 3521 | } |
3483 | //PENDING set date for recurring incidence to date of recurrence | 3522 | //PENDING set date for recurring incidence to date of recurrence |
3484 | //mMoveIncidenceOldDate; | 3523 | //mMoveIncidenceOldDate; |
3485 | mDatePicker->setDate( da ); | 3524 | mDatePicker->setDate( da ); |
3486 | } | 3525 | } |
3487 | void CalendarView::showDatePickerPopup() | 3526 | void CalendarView::showDatePickerPopup() |
3488 | { | 3527 | { |
3489 | if ( mDateFrame->isVisible() ) | 3528 | if ( mDateFrame->isVisible() ) |
3490 | mDateFrame->hide(); | 3529 | mDateFrame->hide(); |
3491 | else { | 3530 | else { |
3492 | int offX = 0, offY = 0; | 3531 | int offX = 0, offY = 0; |
3493 | #ifdef DESKTOP_VERSION | 3532 | #ifdef DESKTOP_VERSION |
3494 | int w =mDatePicker->sizeHint().width() ; | 3533 | int w =mDatePicker->sizeHint().width() ; |
3495 | int h = mDatePicker->sizeHint().height() ; | 3534 | int h = mDatePicker->sizeHint().height() ; |
3496 | int dw = topLevelWidget()->width(); | 3535 | int dw = topLevelWidget()->width(); |
3497 | int dh = topLevelWidget()->height(); | 3536 | int dh = topLevelWidget()->height(); |
3498 | offX = topLevelWidget()->x(); | 3537 | offX = topLevelWidget()->x(); |
3499 | offY = topLevelWidget()->y(); | 3538 | offY = topLevelWidget()->y(); |
3500 | #else | 3539 | #else |
3501 | int w =mDatePicker->sizeHint().width() ; | 3540 | int w =mDatePicker->sizeHint().width() ; |
3502 | int h = mDatePicker->sizeHint().height() ; | 3541 | int h = mDatePicker->sizeHint().height() ; |
3503 | int dw = QApplication::desktop()->width(); | 3542 | int dw = QApplication::desktop()->width(); |
3504 | int dh = QApplication::desktop()->height(); | 3543 | int dh = QApplication::desktop()->height(); |
3505 | #endif | 3544 | #endif |
3506 | mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); | 3545 | mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); |
3507 | mDateFrame->show(); | 3546 | mDateFrame->show(); |
3508 | } | 3547 | } |
3509 | } | 3548 | } |
3510 | void CalendarView::showDatePicker( ) | 3549 | void CalendarView::showDatePicker( ) |
3511 | { | 3550 | { |
3512 | showDatePickerPopup(); | 3551 | showDatePickerPopup(); |
3513 | mDatePickerMode = 1; | 3552 | mDatePickerMode = 1; |
3514 | mDatePicker->setDate( mNavigator->selectedDates().first() ); | 3553 | mDatePicker->setDate( mNavigator->selectedDates().first() ); |
3515 | } | 3554 | } |
3516 | 3555 | ||
3517 | void CalendarView::showEventEditor() | 3556 | void CalendarView::showEventEditor() |
3518 | { | 3557 | { |
3519 | #ifdef DESKTOP_VERSION | 3558 | #ifdef DESKTOP_VERSION |
3520 | int x,y,w,h; | 3559 | int x,y,w,h; |
3521 | x = mEventEditor->geometry().x(); | 3560 | x = mEventEditor->geometry().x(); |
3522 | y = mEventEditor->geometry().y(); | 3561 | y = mEventEditor->geometry().y(); |
3523 | w = mEventEditor->width(); | 3562 | w = mEventEditor->width(); |
3524 | h = mEventEditor->height(); | 3563 | h = mEventEditor->height(); |
3525 | mEventEditor->show(); | 3564 | mEventEditor->show(); |
3526 | mEventEditor->setGeometry(x,y,w,h); | 3565 | mEventEditor->setGeometry(x,y,w,h); |
3527 | #else | 3566 | #else |
3528 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { | 3567 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { |
3529 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 3568 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
3530 | qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); | 3569 | qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); |
3531 | qApp->processEvents(); | 3570 | qApp->processEvents(); |
3532 | delete mEventEditor; | 3571 | delete mEventEditor; |
3533 | mEventEditor = mDialogManager->getEventEditor(); | 3572 | mEventEditor = mDialogManager->getEventEditor(); |
3534 | topLevelWidget()->setCaption( i18n("") ); | 3573 | topLevelWidget()->setCaption( i18n("") ); |
3535 | } | 3574 | } |
3536 | mEventEditor->showMaximized(); | 3575 | mEventEditor->showMaximized(); |
3537 | #endif | 3576 | #endif |
3538 | } | 3577 | } |
3539 | void CalendarView::showTodoEditor() | 3578 | void CalendarView::showTodoEditor() |
3540 | { | 3579 | { |
3541 | #ifdef DESKTOP_VERSION | 3580 | #ifdef DESKTOP_VERSION |
3542 | int x,y,w,h; | 3581 | int x,y,w,h; |
3543 | x = mTodoEditor->geometry().x(); | 3582 | x = mTodoEditor->geometry().x(); |
3544 | y = mTodoEditor->geometry().y(); | 3583 | y = mTodoEditor->geometry().y(); |
3545 | w = mTodoEditor->width(); | 3584 | w = mTodoEditor->width(); |
3546 | h = mTodoEditor->height(); | 3585 | h = mTodoEditor->height(); |
3547 | mTodoEditor->show(); | 3586 | mTodoEditor->show(); |
3548 | mTodoEditor->setGeometry(x,y,w,h); | 3587 | mTodoEditor->setGeometry(x,y,w,h); |
3549 | #else | 3588 | #else |
3550 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { | 3589 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { |
3551 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 3590 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
3552 | qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); | 3591 | qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); |
3553 | qApp->processEvents(); | 3592 | qApp->processEvents(); |
3554 | delete mTodoEditor; | 3593 | delete mTodoEditor; |
3555 | mTodoEditor = mDialogManager->getTodoEditor(); | 3594 | mTodoEditor = mDialogManager->getTodoEditor(); |
3556 | topLevelWidget()->setCaption( i18n("") ); | 3595 | topLevelWidget()->setCaption( i18n("") ); |
3557 | } | 3596 | } |
3558 | mTodoEditor->showMaximized(); | 3597 | mTodoEditor->showMaximized(); |
3559 | #endif | 3598 | #endif |
3560 | } | 3599 | } |
3561 | 3600 | ||
3562 | void CalendarView::cloneIncidence() | 3601 | void CalendarView::cloneIncidence() |
3563 | { | 3602 | { |
3564 | Incidence *incidence = currentSelection(); | 3603 | Incidence *incidence = currentSelection(); |
3565 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 3604 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
3566 | if ( incidence ) { | 3605 | if ( incidence ) { |
3567 | cloneIncidence(incidence); | 3606 | cloneIncidence(incidence); |
3568 | } | 3607 | } |
3569 | } | 3608 | } |
3570 | void CalendarView::moveIncidence() | 3609 | void CalendarView::moveIncidence() |
3571 | { | 3610 | { |
3572 | Incidence *incidence = currentSelection(); | 3611 | Incidence *incidence = currentSelection(); |
3573 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 3612 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
3574 | if ( incidence ) { | 3613 | if ( incidence ) { |
3575 | moveIncidence(incidence); | 3614 | moveIncidence(incidence); |
3576 | } | 3615 | } |
3577 | } | 3616 | } |
3578 | void CalendarView::beamIncidence() | 3617 | void CalendarView::beamIncidence() |
3579 | { | 3618 | { |
3580 | Incidence *incidence = currentSelection(); | 3619 | Incidence *incidence = currentSelection(); |
3581 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 3620 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
3582 | if ( incidence ) { | 3621 | if ( incidence ) { |
3583 | beamIncidence(incidence); | 3622 | beamIncidence(incidence); |
3584 | } | 3623 | } |
3585 | } | 3624 | } |
3586 | void CalendarView::toggleCancelIncidence() | 3625 | void CalendarView::toggleCancelIncidence() |
3587 | { | 3626 | { |
3588 | Incidence *incidence = currentSelection(); | 3627 | Incidence *incidence = currentSelection(); |
3589 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 3628 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
3590 | if ( incidence ) { | 3629 | if ( incidence ) { |
3591 | cancelIncidence(incidence); | 3630 | cancelIncidence(incidence); |
3592 | } | 3631 | } |
3593 | } | 3632 | } |
3594 | 3633 | ||
3595 | 3634 | ||
3596 | void CalendarView::cancelIncidence(Incidence * inc ) | 3635 | void CalendarView::cancelIncidence(Incidence * inc ) |
3597 | { | 3636 | { |
3598 | inc->setCancelled( ! inc->cancelled() ); | 3637 | inc->setCancelled( ! inc->cancelled() ); |
3599 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); | 3638 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); |
3600 | updateView(); | 3639 | updateView(); |
3601 | } | 3640 | } |
3602 | void CalendarView::cloneIncidence(Incidence * orgInc ) | 3641 | void CalendarView::cloneIncidence(Incidence * orgInc ) |
3603 | { | 3642 | { |
3604 | Incidence * newInc = orgInc->clone(); | 3643 | Incidence * newInc = orgInc->clone(); |
3605 | newInc->recreate(); | 3644 | newInc->recreate(); |
3606 | 3645 | ||
3607 | if ( newInc->typeID() == todoID ) { | 3646 | if ( newInc->typeID() == todoID ) { |
3608 | Todo* t = (Todo*) newInc; | 3647 | Todo* t = (Todo*) newInc; |
3609 | bool cloneSub = false; | 3648 | bool cloneSub = false; |
3610 | if ( orgInc->relations().count() ) { | 3649 | if ( orgInc->relations().count() ) { |
3611 | int result = KMessageBox::warningYesNoCancel(this, | 3650 | int result = KMessageBox::warningYesNoCancel(this, |
3612 | i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( KGlobal::formatMessage ( newInc->summary(),0 ) ), | 3651 | i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( KGlobal::formatMessage ( newInc->summary(),0 ) ), |
3613 | i18n("Todo has subtodos"), | 3652 | i18n("Todo has subtodos"), |
3614 | i18n("Yes"), | 3653 | i18n("Yes"), |
3615 | i18n("No")); | 3654 | i18n("No")); |
3616 | 3655 | ||
3617 | if ( result == KMessageBox::Cancel ) { | 3656 | if ( result == KMessageBox::Cancel ) { |
3618 | delete t; | 3657 | delete t; |
3619 | return; | 3658 | return; |
3620 | } | 3659 | } |
3621 | if (result == KMessageBox::Yes) cloneSub = true; | 3660 | if (result == KMessageBox::Yes) cloneSub = true; |
3622 | } | 3661 | } |
3623 | showTodoEditor(); | 3662 | showTodoEditor(); |
3624 | mTodoEditor->editTodo( t ); | 3663 | mTodoEditor->editTodo( t ); |
3625 | if ( mTodoEditor->exec() ) { | 3664 | if ( mTodoEditor->exec() ) { |
3626 | if ( cloneSub ) { | 3665 | if ( cloneSub ) { |
3627 | orgInc->cloneRelations( t ); | 3666 | orgInc->cloneRelations( t ); |
3628 | mCalendar->addIncidenceBranch( t ); | 3667 | mCalendar->addIncidenceBranch( t ); |
3629 | updateView(); | 3668 | updateView(); |
3630 | 3669 | ||
3631 | } else { | 3670 | } else { |
3632 | mCalendar->addTodo( t ); | 3671 | mCalendar->addTodo( t ); |
3633 | updateView(); | 3672 | updateView(); |
3634 | } | 3673 | } |
3635 | } else { | 3674 | } else { |
3636 | delete t; | 3675 | delete t; |
3637 | } | 3676 | } |
3638 | } | 3677 | } |
3639 | else if ( newInc->typeID() == eventID ) { | 3678 | else if ( newInc->typeID() == eventID ) { |
3640 | Event* e = (Event*) newInc; | 3679 | Event* e = (Event*) newInc; |
3641 | showEventEditor(); | 3680 | showEventEditor(); |
3642 | mEventEditor->editEvent( e ); | 3681 | mEventEditor->editEvent( e ); |
3643 | if ( mEventEditor->exec() ) { | 3682 | if ( mEventEditor->exec() ) { |
3644 | mCalendar->addEvent( e ); | 3683 | mCalendar->addEvent( e ); |
3645 | updateView(); | 3684 | updateView(); |
3646 | } else { | 3685 | } else { |
3647 | delete e; | 3686 | delete e; |
3648 | } | 3687 | } |
3649 | } else if ( newInc->typeID() == journalID ) { | 3688 | } else if ( newInc->typeID() == journalID ) { |
3650 | mCalendar->addJournal( (Journal*) newInc ); | 3689 | mCalendar->addJournal( (Journal*) newInc ); |
3651 | editJournal( (Journal*) newInc ); | 3690 | editJournal( (Journal*) newInc ); |
3652 | } | 3691 | } |
3653 | setActiveWindow(); | 3692 | setActiveWindow(); |
3654 | } | 3693 | } |
3655 | 3694 | ||
3656 | void CalendarView::newEvent() | 3695 | void CalendarView::newEvent() |
3657 | { | 3696 | { |
3658 | // TODO: Replace this code by a common eventDurationHint of KOBaseView. | 3697 | // TODO: Replace this code by a common eventDurationHint of KOBaseView. |
3659 | KOAgendaView *aView = mViewManager->agendaView(); | 3698 | KOAgendaView *aView = mViewManager->agendaView(); |
3660 | if (aView) { | 3699 | if (aView) { |
3661 | if (aView->selectionStart().isValid()) { | 3700 | if (aView->selectionStart().isValid()) { |
3662 | if (aView->selectedIsAllDay()) { | 3701 | if (aView->selectedIsAllDay()) { |
3663 | newEvent(aView->selectionStart(),aView->selectionEnd(),true); | 3702 | newEvent(aView->selectionStart(),aView->selectionEnd(),true); |
3664 | } else { | 3703 | } else { |
3665 | newEvent(aView->selectionStart(),aView->selectionEnd()); | 3704 | newEvent(aView->selectionStart(),aView->selectionEnd()); |
3666 | } | 3705 | } |
3667 | return; | 3706 | return; |
3668 | } | 3707 | } |
3669 | } | 3708 | } |
3670 | 3709 | ||
3671 | QDate date = mNavigator->selectedDates().first(); | 3710 | QDate date = mNavigator->selectedDates().first(); |
3672 | #if 0 | 3711 | #if 0 |
3673 | QDateTime current = QDateTime::currentDateTime(); | 3712 | QDateTime current = QDateTime::currentDateTime(); |
3674 | if ( date <= current.date() ) { | 3713 | if ( date <= current.date() ) { |
3675 | int hour = current.time().hour() +1; | 3714 | int hour = current.time().hour() +1; |
3676 | newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), | 3715 | newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), |
3677 | QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); | 3716 | QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); |
3678 | } else | 3717 | } else |
3679 | #endif | 3718 | #endif |
3680 | newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), | 3719 | newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), |
3681 | QDateTime( date, QTime( KOPrefs::instance()->mStartTime + | 3720 | QDateTime( date, QTime( KOPrefs::instance()->mStartTime + |
3682 | KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); | 3721 | KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); |
3683 | } | 3722 | } |
3684 | 3723 | ||
3685 | void CalendarView::newEvent(QDateTime fh) | 3724 | void CalendarView::newEvent(QDateTime fh) |
3686 | { | 3725 | { |
3687 | newEvent(fh, | 3726 | newEvent(fh, |
3688 | QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); | 3727 | QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); |
3689 | } | 3728 | } |
3690 | 3729 | ||
3691 | void CalendarView::newEvent(QDate dt) | 3730 | void CalendarView::newEvent(QDate dt) |
3692 | { | 3731 | { |
3693 | newEvent(QDateTime(dt, QTime(0,0,0)), | 3732 | newEvent(QDateTime(dt, QTime(0,0,0)), |
3694 | QDateTime(dt, QTime(0,0,0)), true); | 3733 | QDateTime(dt, QTime(0,0,0)), true); |
3695 | } | 3734 | } |
3696 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) | 3735 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) |
3697 | { | 3736 | { |
3698 | newEvent(fromHint, toHint, false); | 3737 | newEvent(fromHint, toHint, false); |
3699 | } | 3738 | } |
3700 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) | 3739 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) |
3701 | { | 3740 | { |
3702 | 3741 | ||
3703 | showEventEditor(); | 3742 | showEventEditor(); |
3704 | mEventEditor->newEvent(fromHint,toHint,allDay); | 3743 | mEventEditor->newEvent(fromHint,toHint,allDay); |
3705 | if ( mFilterView->filtersEnabled() ) { | 3744 | if ( mFilterView->filtersEnabled() ) { |
3706 | CalFilter *filter = mFilterView->selectedFilter(); | 3745 | CalFilter *filter = mFilterView->selectedFilter(); |
3707 | if (filter && filter->showCategories()) { | 3746 | if (filter && filter->showCategories()) { |
3708 | mEventEditor->setCategories(filter->categoryList().join(",") ); | 3747 | mEventEditor->setCategories(filter->categoryList().join(",") ); |
3709 | } | 3748 | } |
3710 | if ( filter ) | 3749 | if ( filter ) |
3711 | mEventEditor->setSecrecy( filter->getSecrecy() ); | 3750 | mEventEditor->setSecrecy( filter->getSecrecy() ); |
3712 | } | 3751 | } |
3713 | mEventEditor->exec(); | 3752 | mEventEditor->exec(); |
3714 | setActiveWindow(); | 3753 | setActiveWindow(); |
3715 | } | 3754 | } |
3716 | void CalendarView::todoAdded(Todo * t) | 3755 | void CalendarView::todoAdded(Todo * t) |
3717 | { | 3756 | { |
3718 | 3757 | ||
3719 | changeTodoDisplay ( t ,KOGlobals::EVENTADDED); | 3758 | changeTodoDisplay ( t ,KOGlobals::EVENTADDED); |
3720 | updateTodoViews(); | 3759 | updateTodoViews(); |
3721 | } | 3760 | } |
3722 | void CalendarView::todoChanged(Todo * t) | 3761 | void CalendarView::todoChanged(Todo * t) |
3723 | { | 3762 | { |
3724 | emit todoModified( t, 4 ); | 3763 | emit todoModified( t, 4 ); |
3725 | // updateTodoViews(); | 3764 | // updateTodoViews(); |
3726 | } | 3765 | } |
3727 | void CalendarView::todoToBeDeleted(Todo *) | 3766 | void CalendarView::todoToBeDeleted(Todo *) |
3728 | { | 3767 | { |
3729 | //qDebug("todoToBeDeleted(Todo *) "); | 3768 | //qDebug("todoToBeDeleted(Todo *) "); |
3730 | updateTodoViews(); | 3769 | updateTodoViews(); |
3731 | } | 3770 | } |
3732 | void CalendarView::todoDeleted() | 3771 | void CalendarView::todoDeleted() |
3733 | { | 3772 | { |
3734 | //qDebug(" todoDeleted()"); | 3773 | //qDebug(" todoDeleted()"); |
3735 | updateTodoViews(); | 3774 | updateTodoViews(); |
3736 | } | 3775 | } |
3737 | 3776 | ||
3738 | 3777 | ||
3739 | void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) | 3778 | void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) |
3740 | { | 3779 | { |
3741 | showTodoEditor(); | 3780 | showTodoEditor(); |
3742 | mTodoEditor->newTodo(dt,0,allday); | 3781 | mTodoEditor->newTodo(dt,0,allday); |
3743 | if ( mFilterView->filtersEnabled() ) { | 3782 | if ( mFilterView->filtersEnabled() ) { |
3744 | CalFilter *filter = mFilterView->selectedFilter(); | 3783 | CalFilter *filter = mFilterView->selectedFilter(); |
3745 | if (filter && filter->showCategories()) { | 3784 | if (filter && filter->showCategories()) { |
3746 | mTodoEditor->setCategories(filter->categoryList().join(",") ); | 3785 | mTodoEditor->setCategories(filter->categoryList().join(",") ); |
3747 | } | 3786 | } |
3748 | if ( filter ) | 3787 | if ( filter ) |
3749 | mTodoEditor->setSecrecy( filter->getSecrecy() ); | 3788 | mTodoEditor->setSecrecy( filter->getSecrecy() ); |
3750 | } | 3789 | } |
3751 | mTodoEditor->exec(); | 3790 | mTodoEditor->exec(); |
3752 | setActiveWindow(); | 3791 | setActiveWindow(); |
3753 | } | 3792 | } |
3754 | 3793 | ||
3755 | void CalendarView::newTodo() | 3794 | void CalendarView::newTodo() |
3756 | { | 3795 | { |
3757 | newTodoDateTime( QDateTime(),true ); | 3796 | newTodoDateTime( QDateTime(),true ); |
3758 | } | 3797 | } |
3759 | 3798 | ||
3760 | void CalendarView::newSubTodo() | 3799 | void CalendarView::newSubTodo() |
3761 | { | 3800 | { |
3762 | Todo *todo = selectedTodo(); | 3801 | Todo *todo = selectedTodo(); |
3763 | if ( todo ) newSubTodo( todo ); | 3802 | if ( todo ) newSubTodo( todo ); |
3764 | } | 3803 | } |
3765 | 3804 | ||
3766 | void CalendarView::newSubTodo(Todo *parentEvent) | 3805 | void CalendarView::newSubTodo(Todo *parentEvent) |
3767 | { | 3806 | { |
3768 | 3807 | ||
3769 | showTodoEditor(); | 3808 | showTodoEditor(); |
3770 | mTodoEditor->newTodo(QDateTime(),parentEvent,true); | 3809 | mTodoEditor->newTodo(QDateTime(),parentEvent,true); |
3771 | mTodoEditor->exec(); | 3810 | mTodoEditor->exec(); |
3772 | setActiveWindow(); | 3811 | setActiveWindow(); |
3773 | } | 3812 | } |
3774 | 3813 | ||
3775 | void CalendarView::newFloatingEvent() | 3814 | void CalendarView::newFloatingEvent() |
3776 | { | 3815 | { |
3777 | DateList tmpList = mNavigator->selectedDates(); | 3816 | DateList tmpList = mNavigator->selectedDates(); |
3778 | QDate date = tmpList.first(); | 3817 | QDate date = tmpList.first(); |
3779 | 3818 | ||
3780 | newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), | 3819 | newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), |
3781 | QDateTime( date, QTime( 12, 0, 0 ) ), true ); | 3820 | QDateTime( date, QTime( 12, 0, 0 ) ), true ); |
3782 | } | 3821 | } |
3783 | 3822 | ||
3784 | 3823 | ||
3785 | void CalendarView::editEvent( Event *event ) | 3824 | void CalendarView::editEvent( Event *event ) |
3786 | { | 3825 | { |
3787 | 3826 | ||
3788 | if ( !event ) return; | 3827 | if ( !event ) return; |
3789 | if ( event->isReadOnly() ) { | 3828 | if ( event->isReadOnly() ) { |
3790 | showEvent( event ); | 3829 | showEvent( event ); |
3791 | return; | 3830 | return; |
3792 | } | 3831 | } |
3793 | showEventEditor(); | 3832 | showEventEditor(); |
3794 | mEventEditor->editEvent( event , mFlagEditDescription); | 3833 | mEventEditor->editEvent( event , mFlagEditDescription); |
3795 | mEventEditor->exec(); | 3834 | mEventEditor->exec(); |
3796 | setActiveWindow(); | 3835 | setActiveWindow(); |
3797 | 3836 | ||
3798 | } | 3837 | } |
3799 | void CalendarView::editJournal( Journal *jour ) | 3838 | void CalendarView::editJournal( Journal *jour ) |
3800 | { | 3839 | { |
3801 | if ( !jour ) return; | 3840 | if ( !jour ) return; |
3802 | mDialogManager->hideSearchDialog(); | 3841 | mDialogManager->hideSearchDialog(); |
3803 | mViewManager->showJournalView(); | 3842 | mViewManager->showJournalView(); |
3804 | mNavigator->slotDaySelect( jour->dtStart().date() ); | 3843 | mNavigator->slotDaySelect( jour->dtStart().date() ); |
3805 | } | 3844 | } |
3806 | void CalendarView::editTodo( Todo *todo ) | 3845 | void CalendarView::editTodo( Todo *todo ) |
3807 | { | 3846 | { |
3808 | if ( !todo ) return; | 3847 | if ( !todo ) return; |
3809 | 3848 | ||
3810 | if ( todo->isReadOnly() ) { | 3849 | if ( todo->isReadOnly() ) { |
3811 | showTodo( todo ); | 3850 | showTodo( todo ); |
3812 | return; | 3851 | return; |
3813 | } | 3852 | } |
3814 | showTodoEditor(); | 3853 | showTodoEditor(); |
3815 | mTodoEditor->editTodo( todo ,mFlagEditDescription); | 3854 | mTodoEditor->editTodo( todo ,mFlagEditDescription); |
3816 | mTodoEditor->exec(); | 3855 | mTodoEditor->exec(); |
3817 | setActiveWindow(); | 3856 | setActiveWindow(); |
3818 | 3857 | ||
3819 | } | 3858 | } |
3820 | 3859 | ||
3821 | KOEventViewerDialog* CalendarView::getEventViewerDialog() | 3860 | KOEventViewerDialog* CalendarView::getEventViewerDialog() |
3822 | { | 3861 | { |
3823 | if ( !mEventViewerDialog ) { | 3862 | if ( !mEventViewerDialog ) { |
3824 | mEventViewerDialog = new KOEventViewerDialog(0); | 3863 | mEventViewerDialog = new KOEventViewerDialog(0); |
3825 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); | 3864 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); |
3826 | connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); | 3865 | connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); |
3827 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), | 3866 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), |
3828 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 3867 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
3829 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), | 3868 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), |
3830 | viewManager(), SLOT( showAgendaView( bool ) ) ); | 3869 | viewManager(), SLOT( showAgendaView( bool ) ) ); |
3831 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), | 3870 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), |
3832 | this, SLOT( slotViewerClosed() ) ); | 3871 | this, SLOT( slotViewerClosed() ) ); |
3833 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), | 3872 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), |
3834 | this, SLOT( todoChanged(Todo *) ) ); | 3873 | this, SLOT( todoChanged(Todo *) ) ); |
3835 | connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); | 3874 | connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); |
3836 | mEventViewerDialog->resize( 640, 480 ); | 3875 | mEventViewerDialog->resize( 640, 480 ); |
3837 | 3876 | ||
3838 | } | 3877 | } |
3839 | return mEventViewerDialog; | 3878 | return mEventViewerDialog; |
3840 | } | 3879 | } |
3841 | void CalendarView::showEvent(Event *event) | 3880 | void CalendarView::showEvent(Event *event) |
3842 | { | 3881 | { |
3843 | getEventViewerDialog()->setEvent(event); | 3882 | getEventViewerDialog()->setEvent(event); |
3844 | getEventViewerDialog()->showMe(); | 3883 | getEventViewerDialog()->showMe(); |
3845 | } | 3884 | } |
3846 | 3885 | ||
3847 | void CalendarView::showTodo(Todo *event) | 3886 | void CalendarView::showTodo(Todo *event) |
3848 | { | 3887 | { |
3849 | getEventViewerDialog()->setTodo(event); | 3888 | getEventViewerDialog()->setTodo(event); |
3850 | getEventViewerDialog()->showMe(); | 3889 | getEventViewerDialog()->showMe(); |
3851 | } | 3890 | } |
3852 | void CalendarView::showJournal( Journal *jour ) | 3891 | void CalendarView::showJournal( Journal *jour ) |
3853 | { | 3892 | { |
3854 | getEventViewerDialog()->setJournal(jour); | 3893 | getEventViewerDialog()->setJournal(jour); |
3855 | getEventViewerDialog()->showMe(); | 3894 | getEventViewerDialog()->showMe(); |
3856 | 3895 | ||
3857 | } | 3896 | } |
3858 | // void CalendarView::todoModified (Todo *event, int changed) | 3897 | // void CalendarView::todoModified (Todo *event, int changed) |
3859 | // { | 3898 | // { |
3860 | // // if (mDialogList.find (event) != mDialogList.end ()) { | 3899 | // // if (mDialogList.find (event) != mDialogList.end ()) { |
3861 | // // kdDebug() << "Todo modified and open" << endl; | 3900 | // // kdDebug() << "Todo modified and open" << endl; |
3862 | // // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; | 3901 | // // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; |
3863 | // // temp->modified (changed); | 3902 | // // temp->modified (changed); |
3864 | 3903 | ||
3865 | // // } | 3904 | // // } |
3866 | 3905 | ||
3867 | // mViewManager->updateView(); | 3906 | // mViewManager->updateView(); |
3868 | // } | 3907 | // } |
3869 | 3908 | ||
3870 | void CalendarView::appointment_show() | 3909 | void CalendarView::appointment_show() |
3871 | { | 3910 | { |
3872 | Event *anEvent = 0; | 3911 | Event *anEvent = 0; |
3873 | 3912 | ||
3874 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3913 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3875 | 3914 | ||
3876 | if (mViewManager->currentView()->isEventView()) { | 3915 | if (mViewManager->currentView()->isEventView()) { |
3877 | if ( incidence && incidence->typeID() == eventID ) { | 3916 | if ( incidence && incidence->typeID() == eventID ) { |
3878 | anEvent = static_cast<Event *>(incidence); | 3917 | anEvent = static_cast<Event *>(incidence); |
3879 | } | 3918 | } |
3880 | } | 3919 | } |
3881 | 3920 | ||
3882 | if (!anEvent) { | 3921 | if (!anEvent) { |
3883 | KNotifyClient::beep(); | 3922 | KNotifyClient::beep(); |
3884 | return; | 3923 | return; |
3885 | } | 3924 | } |
3886 | 3925 | ||
3887 | showEvent(anEvent); | 3926 | showEvent(anEvent); |
3888 | } | 3927 | } |
3889 | 3928 | ||
3890 | void CalendarView::appointment_edit() | 3929 | void CalendarView::appointment_edit() |
3891 | { | 3930 | { |
3892 | Event *anEvent = 0; | 3931 | Event *anEvent = 0; |
3893 | 3932 | ||
3894 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3933 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3895 | 3934 | ||
3896 | if (mViewManager->currentView()->isEventView()) { | 3935 | if (mViewManager->currentView()->isEventView()) { |
3897 | if ( incidence && incidence->typeID() == eventID ) { | 3936 | if ( incidence && incidence->typeID() == eventID ) { |
3898 | anEvent = static_cast<Event *>(incidence); | 3937 | anEvent = static_cast<Event *>(incidence); |
3899 | } | 3938 | } |
3900 | } | 3939 | } |
3901 | 3940 | ||
3902 | if (!anEvent) { | 3941 | if (!anEvent) { |
3903 | KNotifyClient::beep(); | 3942 | KNotifyClient::beep(); |
3904 | return; | 3943 | return; |
3905 | } | 3944 | } |
3906 | 3945 | ||
3907 | editEvent(anEvent); | 3946 | editEvent(anEvent); |
3908 | } | 3947 | } |
3909 | 3948 | ||
3910 | void CalendarView::appointment_delete() | 3949 | void CalendarView::appointment_delete() |
3911 | { | 3950 | { |
3912 | Event *anEvent = 0; | 3951 | Event *anEvent = 0; |
3913 | 3952 | ||
3914 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3953 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3915 | 3954 | ||
3916 | if (mViewManager->currentView()->isEventView()) { | 3955 | if (mViewManager->currentView()->isEventView()) { |
3917 | if ( incidence && incidence->typeID() == eventID ) { | 3956 | if ( incidence && incidence->typeID() == eventID ) { |
3918 | anEvent = static_cast<Event *>(incidence); | 3957 | anEvent = static_cast<Event *>(incidence); |
3919 | } | 3958 | } |
3920 | } | 3959 | } |
3921 | 3960 | ||
3922 | if (!anEvent) { | 3961 | if (!anEvent) { |
3923 | KNotifyClient::beep(); | 3962 | KNotifyClient::beep(); |
3924 | return; | 3963 | return; |
3925 | } | 3964 | } |
3926 | 3965 | ||
3927 | deleteEvent(anEvent); | 3966 | deleteEvent(anEvent); |
3928 | } | 3967 | } |
3929 | 3968 | ||
3930 | void CalendarView::todo_resub( Todo * parent, Todo * sub ) | 3969 | void CalendarView::todo_resub( Todo * parent, Todo * sub ) |
3931 | { | 3970 | { |
3932 | if (!sub) return; | 3971 | if (!sub) return; |
3933 | if ( sub->relatedTo() == parent ) | 3972 | if ( sub->relatedTo() == parent ) |
3934 | return; | 3973 | return; |
3935 | sub->setRelatedTo(parent); | 3974 | sub->setRelatedTo(parent); |
3936 | sub->updated(); | 3975 | sub->updated(); |
3937 | setModified(true); | 3976 | setModified(true); |
3938 | updateView(); | 3977 | updateView(); |
3939 | } | 3978 | } |
3940 | void CalendarView::todo_unsub(Todo *anTodo ) | 3979 | void CalendarView::todo_unsub(Todo *anTodo ) |
3941 | { | 3980 | { |
3942 | todo_resub( 0, anTodo ); | 3981 | todo_resub( 0, anTodo ); |
3943 | } | 3982 | } |
3944 | 3983 | ||
3945 | void CalendarView::deleteTodo(Todo *todo) | 3984 | void CalendarView::deleteTodo(Todo *todo) |
3946 | { | 3985 | { |
3947 | if (!todo) { | 3986 | if (!todo) { |
3948 | KNotifyClient::beep(); | 3987 | KNotifyClient::beep(); |
3949 | return; | 3988 | return; |
3950 | } | 3989 | } |
3951 | if (KOPrefs::instance()->mConfirm) { | 3990 | if (KOPrefs::instance()->mConfirm) { |
3952 | QString text = KGlobal::formatMessage ( todo->summary(),0 ); | 3991 | QString text = KGlobal::formatMessage ( todo->summary(),0 ); |
3953 | if (!todo->relations().isEmpty()) { | 3992 | if (!todo->relations().isEmpty()) { |
3954 | text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); | 3993 | text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); |
3955 | 3994 | ||
3956 | } | 3995 | } |
3957 | switch (msgItemDelete(i18n("Todo:") +"\n"+text)) { | 3996 | switch (msgItemDelete(i18n("Todo:") +"\n"+text)) { |
3958 | case KMessageBox::Continue: // OK | 3997 | case KMessageBox::Continue: // OK |
3959 | bool deleteT = false; | 3998 | bool deleteT = false; |
3960 | if (!todo->relations().isEmpty()) { | 3999 | if (!todo->relations().isEmpty()) { |
3961 | deleteT = removeCompletedSubTodos( todo ); | 4000 | deleteT = removeCompletedSubTodos( todo ); |
3962 | } | 4001 | } |
3963 | // deleteT == true: todo already deleted in removeCompletedSubTodos | 4002 | // deleteT == true: todo already deleted in removeCompletedSubTodos |
3964 | if ( !deleteT ) { | 4003 | if ( !deleteT ) { |
3965 | checkExternalId( todo ); | 4004 | checkExternalId( todo ); |
3966 | calendar()->deleteTodo(todo); | 4005 | calendar()->deleteTodo(todo); |
3967 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); | 4006 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); |
3968 | updateView(); | 4007 | updateView(); |
3969 | } | 4008 | } |
3970 | break; | 4009 | break; |
3971 | } // switch | 4010 | } // switch |
3972 | } else { | 4011 | } else { |
3973 | checkExternalId( todo ); | 4012 | checkExternalId( todo ); |
3974 | mCalendar->deleteTodo(todo); | 4013 | mCalendar->deleteTodo(todo); |
3975 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); | 4014 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); |
3976 | updateView(); | 4015 | updateView(); |
3977 | } | 4016 | } |
3978 | 4017 | ||
3979 | emit updateSearchDialog(); | 4018 | emit updateSearchDialog(); |
3980 | } | 4019 | } |
3981 | void CalendarView::deleteJournal(Journal *jour) | 4020 | void CalendarView::deleteJournal(Journal *jour) |
3982 | { | 4021 | { |
3983 | if (!jour) { | 4022 | if (!jour) { |
3984 | KNotifyClient::beep(); | 4023 | KNotifyClient::beep(); |
3985 | return; | 4024 | return; |
3986 | } | 4025 | } |
3987 | if (KOPrefs::instance()->mConfirm) { | 4026 | if (KOPrefs::instance()->mConfirm) { |
3988 | 4027 | ||
3989 | QString des; | 4028 | QString des; |
3990 | if ( !jour->summary().isEmpty() ) { | 4029 | if ( !jour->summary().isEmpty() ) { |
3991 | des = jour->summary(); | 4030 | des = jour->summary(); |
3992 | } else { | 4031 | } else { |
3993 | des = jour->description().left(30); | 4032 | des = jour->description().left(30); |
3994 | des = des.simplifyWhiteSpace (); | 4033 | des = des.simplifyWhiteSpace (); |
3995 | des.replace (QRegExp ("\\n"),"" ); | 4034 | des.replace (QRegExp ("\\n"),"" ); |
3996 | des.replace (QRegExp ("\\r"),"" ); | 4035 | des.replace (QRegExp ("\\r"),"" ); |
3997 | } | 4036 | } |
3998 | switch (msgItemDelete( i18n("Journal:") +"\n"+KGlobal::formatMessage ( des,0 ))) { | 4037 | switch (msgItemDelete( i18n("Journal:") +"\n"+KGlobal::formatMessage ( des,0 ))) { |
3999 | case KMessageBox::Continue: // OK | 4038 | case KMessageBox::Continue: // OK |
4000 | calendar()->deleteJournal(jour); | 4039 | calendar()->deleteJournal(jour); |
4001 | updateView(); | 4040 | updateView(); |
4002 | break; | 4041 | break; |
4003 | } // switch | 4042 | } // switch |
4004 | } else { | 4043 | } else { |
4005 | calendar()->deleteJournal(jour);; | 4044 | calendar()->deleteJournal(jour);; |
4006 | updateView(); | 4045 | updateView(); |
4007 | } | 4046 | } |
4008 | emit updateSearchDialog(); | 4047 | emit updateSearchDialog(); |
4009 | } | 4048 | } |
4010 | 4049 | ||
4011 | void CalendarView::deleteEvent(Event *anEvent) | 4050 | void CalendarView::deleteEvent(Event *anEvent) |
4012 | { | 4051 | { |
4013 | if (!anEvent) { | 4052 | if (!anEvent) { |
4014 | KNotifyClient::beep(); | 4053 | KNotifyClient::beep(); |
4015 | return; | 4054 | return; |
4016 | } | 4055 | } |
4017 | 4056 | ||
4018 | if (anEvent->doesRecur()) { | 4057 | if (anEvent->doesRecur()) { |
4019 | QDate itemDate = mViewManager->currentSelectionDate(); | 4058 | QDate itemDate = mViewManager->currentSelectionDate(); |
4020 | int km; | 4059 | int km; |
4021 | if (!itemDate.isValid()) { | 4060 | if (!itemDate.isValid()) { |
4022 | //kdDebug() << "Date Not Valid" << endl; | 4061 | //kdDebug() << "Date Not Valid" << endl; |
4023 | if (KOPrefs::instance()->mConfirm) { | 4062 | if (KOPrefs::instance()->mConfirm) { |
4024 | km = KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + | 4063 | km = KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + |
4025 | i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), | 4064 | i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), |
4026 | i18n("KO/Pi Confirmation"),i18n("Delete All")); | 4065 | i18n("KO/Pi Confirmation"),i18n("Delete All")); |
4027 | if ( km == KMessageBox::Continue ) | 4066 | if ( km == KMessageBox::Continue ) |
4028 | km = KMessageBox::No; // No = all below | 4067 | km = KMessageBox::No; // No = all below |
4029 | } else | 4068 | } else |
4030 | km = KMessageBox::No; | 4069 | km = KMessageBox::No; |
4031 | } else { | 4070 | } else { |
4032 | km = KMessageBox::warningYesNoCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + | 4071 | km = KMessageBox::warningYesNoCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + |
4033 | i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ | 4072 | i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ |
4034 | KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), | 4073 | KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), |
4035 | i18n("KO/Pi Confirmation"),i18n("Current"), | 4074 | i18n("KO/Pi Confirmation"),i18n("Current"), |
4036 | i18n("All")); | 4075 | i18n("All")); |
4037 | } | 4076 | } |
4038 | switch(km) { | 4077 | switch(km) { |
4039 | 4078 | ||
4040 | case KMessageBox::No: // Continue // all | 4079 | case KMessageBox::No: // Continue // all |
4041 | //qDebug("KMessageBox::No "); | 4080 | //qDebug("KMessageBox::No "); |
4042 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 4081 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
4043 | schedule(Scheduler::Cancel,anEvent); | 4082 | schedule(Scheduler::Cancel,anEvent); |
4044 | 4083 | ||
4045 | checkExternalId( anEvent); | 4084 | checkExternalId( anEvent); |
4046 | mCalendar->deleteEvent(anEvent); | 4085 | mCalendar->deleteEvent(anEvent); |
4047 | changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); | 4086 | changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); |
4048 | break; | 4087 | break; |
4049 | 4088 | ||
4050 | // Disabled because it does not work | 4089 | // Disabled because it does not work |
4051 | //#if 0 | 4090 | //#if 0 |
4052 | case KMessageBox::Yes: // just this one | 4091 | case KMessageBox::Yes: // just this one |
4053 | //QDate qd = mNavigator->selectedDates().first(); | 4092 | //QDate qd = mNavigator->selectedDates().first(); |
4054 | //if (!qd.isValid()) { | 4093 | //if (!qd.isValid()) { |
4055 | // kdDebug() << "no date selected, or invalid date" << endl; | 4094 | // kdDebug() << "no date selected, or invalid date" << endl; |
4056 | // KNotifyClient::beep(); | 4095 | // KNotifyClient::beep(); |
4057 | // return; | 4096 | // return; |
4058 | //} | 4097 | //} |
4059 | //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); | 4098 | //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); |
4060 | if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { | 4099 | if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { |
4061 | anEvent->addExDate(itemDate); | 4100 | anEvent->addExDate(itemDate); |
4062 | int duration = anEvent->recurrence()->duration(); | 4101 | int duration = anEvent->recurrence()->duration(); |
4063 | if ( duration > 0 ) { | 4102 | if ( duration > 0 ) { |
4064 | anEvent->recurrence()->setDuration( duration - 1 ); | 4103 | anEvent->recurrence()->setDuration( duration - 1 ); |
4065 | } | 4104 | } |
4066 | changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); | 4105 | changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); |
4067 | } | 4106 | } |
4068 | break; | 4107 | break; |
4069 | //#endif | 4108 | //#endif |
4070 | } // switch | 4109 | } // switch |
4071 | } else { | 4110 | } else { |
4072 | if (KOPrefs::instance()->mConfirm) { | 4111 | if (KOPrefs::instance()->mConfirm) { |
4073 | switch (KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + | 4112 | switch (KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + |
4074 | i18n("\nAre you sure you want\nto delete this event?"), | 4113 | i18n("\nAre you sure you want\nto delete this event?"), |
4075 | i18n("KO/Pi Confirmation"),i18n("Delete"))) { | 4114 | i18n("KO/Pi Confirmation"),i18n("Delete"))) { |
4076 | case KMessageBox::Continue: // OK | 4115 | case KMessageBox::Continue: // OK |
4077 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 4116 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
4078 | schedule(Scheduler::Cancel,anEvent); | 4117 | schedule(Scheduler::Cancel,anEvent); |
4079 | checkExternalId( anEvent); | 4118 | checkExternalId( anEvent); |
4080 | mCalendar->deleteEvent(anEvent); | 4119 | mCalendar->deleteEvent(anEvent); |
4081 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 4120 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
4082 | break; | 4121 | break; |
4083 | } // switch | 4122 | } // switch |
4084 | } else { | 4123 | } else { |
4085 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 4124 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
4086 | schedule(Scheduler::Cancel,anEvent); | 4125 | schedule(Scheduler::Cancel,anEvent); |
4087 | checkExternalId( anEvent); | 4126 | checkExternalId( anEvent); |
4088 | mCalendar->deleteEvent(anEvent); | 4127 | mCalendar->deleteEvent(anEvent); |
4089 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 4128 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
4090 | } | 4129 | } |
4091 | } // if-else | 4130 | } // if-else |
4092 | emit updateSearchDialog(); | 4131 | emit updateSearchDialog(); |
4093 | } | 4132 | } |
4094 | 4133 | ||
4095 | bool CalendarView::deleteEvent(const QString &uid) | 4134 | bool CalendarView::deleteEvent(const QString &uid) |
4096 | { | 4135 | { |
4097 | Event *ev = mCalendar->event(uid); | 4136 | Event *ev = mCalendar->event(uid); |
4098 | if (ev) { | 4137 | if (ev) { |
4099 | deleteEvent(ev); | 4138 | deleteEvent(ev); |
4100 | return true; | 4139 | return true; |
4101 | } else { | 4140 | } else { |
4102 | return false; | 4141 | return false; |
4103 | } | 4142 | } |
4104 | } | 4143 | } |
4105 | 4144 | ||
4106 | /*****************************************************************************/ | 4145 | /*****************************************************************************/ |
4107 | 4146 | ||
4108 | void CalendarView::action_mail() | 4147 | void CalendarView::action_mail() |
4109 | { | 4148 | { |
4110 | #ifndef KORG_NOMAIL | 4149 | #ifndef KORG_NOMAIL |
4111 | KOMailClient mailClient; | 4150 | KOMailClient mailClient; |
4112 | 4151 | ||
4113 | Incidence *incidence = currentSelection(); | 4152 | Incidence *incidence = currentSelection(); |
4114 | 4153 | ||
4115 | if (!incidence) { | 4154 | if (!incidence) { |
4116 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); | 4155 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); |
4117 | return; | 4156 | return; |
4118 | } | 4157 | } |
4119 | if(incidence->attendeeCount() == 0 ) { | 4158 | if(incidence->attendeeCount() == 0 ) { |
4120 | KMessageBox::sorry(this, | 4159 | KMessageBox::sorry(this, |
4121 | i18n("Can't generate mail:\nNo attendees defined.\n")); | 4160 | i18n("Can't generate mail:\nNo attendees defined.\n")); |
4122 | return; | 4161 | return; |
4123 | } | 4162 | } |
4124 | 4163 | ||
4125 | CalendarLocal cal_tmp; | 4164 | CalendarLocal cal_tmp; |
4126 | Event *event = 0; | 4165 | Event *event = 0; |
4127 | Event *ev = 0; | 4166 | Event *ev = 0; |
4128 | if ( incidence && incidence->typeID() == eventID ) { | 4167 | if ( incidence && incidence->typeID() == eventID ) { |
4129 | event = static_cast<Event *>(incidence); | 4168 | event = static_cast<Event *>(incidence); |
4130 | ev = new Event(*event); | 4169 | ev = new Event(*event); |
4131 | cal_tmp.addEvent(ev); | 4170 | cal_tmp.addEvent(ev); |
4132 | } | 4171 | } |
4133 | ICalFormat mForm(); | 4172 | ICalFormat mForm(); |
4134 | QString attachment = mForm.toString( &cal_tmp ); | 4173 | QString attachment = mForm.toString( &cal_tmp ); |
4135 | if (ev) delete(ev); | 4174 | if (ev) delete(ev); |
4136 | 4175 | ||
4137 | mailClient.mailAttendees(currentSelection(), attachment); | 4176 | mailClient.mailAttendees(currentSelection(), attachment); |
4138 | 4177 | ||
4139 | #endif | 4178 | #endif |
4140 | 4179 | ||
4141 | #if 0 | 4180 | #if 0 |
4142 | Event *anEvent = 0; | 4181 | Event *anEvent = 0; |
4143 | if (mViewManager->currentView()->isEventView()) { | 4182 | if (mViewManager->currentView()->isEventView()) { |
4144 | anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first()); | 4183 | anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first()); |
4145 | } | 4184 | } |
4146 | 4185 | ||
4147 | if (!anEvent) { | 4186 | if (!anEvent) { |
4148 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); | 4187 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); |
4149 | return; | 4188 | return; |
4150 | } | 4189 | } |
4151 | if(anEvent->attendeeCount() == 0 ) { | 4190 | if(anEvent->attendeeCount() == 0 ) { |
4152 | KMessageBox::sorry(this, | 4191 | KMessageBox::sorry(this, |
4153 | i18n("Can't generate mail:\nNo attendees defined.\n")); | 4192 | i18n("Can't generate mail:\nNo attendees defined.\n")); |
4154 | return; | 4193 | return; |
4155 | } | 4194 | } |
4156 | 4195 | ||
4157 | mailobject.emailEvent(anEvent); | 4196 | mailobject.emailEvent(anEvent); |
4158 | #endif | 4197 | #endif |
4159 | } | 4198 | } |
4160 | 4199 | ||
4161 | 4200 | ||
4162 | void CalendarView::schedule_publish(Incidence *incidence) | 4201 | void CalendarView::schedule_publish(Incidence *incidence) |
4163 | { | 4202 | { |
4164 | Event *event = 0; | 4203 | Event *event = 0; |
4165 | Todo *todo = 0; | 4204 | Todo *todo = 0; |
4166 | 4205 | ||
4167 | if (incidence == 0) { | 4206 | if (incidence == 0) { |
4168 | incidence = mViewManager->currentView()->selectedIncidences().first(); | 4207 | incidence = mViewManager->currentView()->selectedIncidences().first(); |
4169 | if (incidence == 0) { | 4208 | if (incidence == 0) { |
4170 | incidence = mTodoList->selectedIncidences().first(); | 4209 | incidence = mTodoList->selectedIncidences().first(); |
4171 | } | 4210 | } |
4172 | } | 4211 | } |
4173 | if ( incidence && incidence->typeID() == eventID ) { | 4212 | if ( incidence && incidence->typeID() == eventID ) { |
4174 | event = static_cast<Event *>(incidence); | 4213 | event = static_cast<Event *>(incidence); |
4175 | } else { | 4214 | } else { |
4176 | if ( incidence && incidence->typeID() == todoID ) { | 4215 | if ( incidence && incidence->typeID() == todoID ) { |
4177 | todo = static_cast<Todo *>(incidence); | 4216 | todo = static_cast<Todo *>(incidence); |
4178 | } | 4217 | } |
4179 | } | 4218 | } |
4180 | 4219 | ||
4181 | if (!event && !todo) { | 4220 | if (!event && !todo) { |
4182 | KMessageBox::sorry(this,i18n("No event selected.")); | 4221 | KMessageBox::sorry(this,i18n("No event selected.")); |
4183 | return; | 4222 | return; |
4184 | } | 4223 | } |
4185 | 4224 | ||
4186 | PublishDialog *publishdlg = new PublishDialog(); | 4225 | PublishDialog *publishdlg = new PublishDialog(); |
4187 | if (incidence->attendeeCount()>0) { | 4226 | if (incidence->attendeeCount()>0) { |
4188 | QPtrList<Attendee> attendees = incidence->attendees(); | 4227 | QPtrList<Attendee> attendees = incidence->attendees(); |
4189 | attendees.first(); | 4228 | attendees.first(); |
4190 | while ( attendees.current()!=0 ) { | 4229 | while ( attendees.current()!=0 ) { |
4191 | publishdlg->addAttendee(attendees.current()); | 4230 | publishdlg->addAttendee(attendees.current()); |
4192 | attendees.next(); | 4231 | attendees.next(); |
4193 | } | 4232 | } |
4194 | } | 4233 | } |
4195 | bool send = true; | 4234 | bool send = true; |
4196 | if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) { | 4235 | if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) { |
4197 | if ( publishdlg->exec() != QDialog::Accepted ) | 4236 | if ( publishdlg->exec() != QDialog::Accepted ) |
4198 | send = false; | 4237 | send = false; |
4199 | } | 4238 | } |
4200 | if ( send ) { | 4239 | if ( send ) { |
4201 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 4240 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
4202 | if ( event ) { | 4241 | if ( event ) { |
4203 | Event *ev = new Event(*event); | 4242 | Event *ev = new Event(*event); |
4204 | ev->registerObserver(0); | 4243 | ev->registerObserver(0); |
4205 | ev->clearAttendees(); | 4244 | ev->clearAttendees(); |
4206 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { | 4245 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { |
4207 | delete(ev); | 4246 | delete(ev); |
4208 | } | 4247 | } |
4209 | } else { | 4248 | } else { |
4210 | if ( todo ) { | 4249 | if ( todo ) { |
4211 | Todo *ev = new Todo(*todo); | 4250 | Todo *ev = new Todo(*todo); |
4212 | ev->registerObserver(0); | 4251 | ev->registerObserver(0); |
4213 | ev->clearAttendees(); | 4252 | ev->clearAttendees(); |
4214 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { | 4253 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { |
4215 | delete(ev); | 4254 | delete(ev); |
4216 | } | 4255 | } |
4217 | } | 4256 | } |
4218 | } | 4257 | } |
4219 | } | 4258 | } |
4220 | delete publishdlg; | 4259 | delete publishdlg; |
4221 | } | 4260 | } |
4222 | 4261 | ||
4223 | void CalendarView::schedule_request(Incidence *incidence) | 4262 | void CalendarView::schedule_request(Incidence *incidence) |
4224 | { | 4263 | { |
4225 | schedule(Scheduler::Request,incidence); | 4264 | schedule(Scheduler::Request,incidence); |
4226 | } | 4265 | } |
4227 | 4266 | ||
4228 | void CalendarView::schedule_refresh(Incidence *incidence) | 4267 | void CalendarView::schedule_refresh(Incidence *incidence) |
4229 | { | 4268 | { |
4230 | schedule(Scheduler::Refresh,incidence); | 4269 | schedule(Scheduler::Refresh,incidence); |
4231 | } | 4270 | } |
4232 | 4271 | ||
4233 | void CalendarView::schedule_cancel(Incidence *incidence) | 4272 | void CalendarView::schedule_cancel(Incidence *incidence) |
4234 | { | 4273 | { |
4235 | schedule(Scheduler::Cancel,incidence); | 4274 | schedule(Scheduler::Cancel,incidence); |
4236 | } | 4275 | } |
4237 | 4276 | ||
4238 | void CalendarView::schedule_add(Incidence *incidence) | 4277 | void CalendarView::schedule_add(Incidence *incidence) |
4239 | { | 4278 | { |
4240 | schedule(Scheduler::Add,incidence); | 4279 | schedule(Scheduler::Add,incidence); |
4241 | } | 4280 | } |
4242 | 4281 | ||
4243 | void CalendarView::schedule_reply(Incidence *incidence) | 4282 | void CalendarView::schedule_reply(Incidence *incidence) |
4244 | { | 4283 | { |
4245 | schedule(Scheduler::Reply,incidence); | 4284 | schedule(Scheduler::Reply,incidence); |
4246 | } | 4285 | } |
4247 | 4286 | ||
4248 | void CalendarView::schedule_counter(Incidence *incidence) | 4287 | void CalendarView::schedule_counter(Incidence *incidence) |
4249 | { | 4288 | { |
4250 | schedule(Scheduler::Counter,incidence); | 4289 | schedule(Scheduler::Counter,incidence); |
4251 | } | 4290 | } |
4252 | 4291 | ||
4253 | void CalendarView::schedule_declinecounter(Incidence *incidence) | 4292 | void CalendarView::schedule_declinecounter(Incidence *incidence) |
4254 | { | 4293 | { |
4255 | schedule(Scheduler::Declinecounter,incidence); | 4294 | schedule(Scheduler::Declinecounter,incidence); |
4256 | } | 4295 | } |
4257 | 4296 | ||
4258 | void CalendarView::schedule_publish_freebusy(int daysToPublish) | 4297 | void CalendarView::schedule_publish_freebusy(int daysToPublish) |
4259 | { | 4298 | { |
4260 | QDateTime start = QDateTime::currentDateTime(); | 4299 | QDateTime start = QDateTime::currentDateTime(); |
4261 | QDateTime end = start.addDays(daysToPublish); | 4300 | QDateTime end = start.addDays(daysToPublish); |
4262 | 4301 | ||
4263 | FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); | 4302 | FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); |
4264 | freebusy->setOrganizer(KOPrefs::instance()->email()); | 4303 | freebusy->setOrganizer(KOPrefs::instance()->email()); |
4265 | 4304 | ||
4266 | 4305 | ||
4267 | PublishDialog *publishdlg = new PublishDialog(); | 4306 | PublishDialog *publishdlg = new PublishDialog(); |
4268 | if ( publishdlg->exec() == QDialog::Accepted ) { | 4307 | if ( publishdlg->exec() == QDialog::Accepted ) { |
4269 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 4308 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
4270 | if (!dlg->addMessage(freebusy,Scheduler::Publish,publishdlg->addresses())) { | 4309 | if (!dlg->addMessage(freebusy,Scheduler::Publish,publishdlg->addresses())) { |
4271 | delete(freebusy); | 4310 | delete(freebusy); |
4272 | } | 4311 | } |
4273 | } | 4312 | } |
4274 | delete publishdlg; | 4313 | delete publishdlg; |
4275 | } | 4314 | } |
4276 | 4315 | ||
4277 | void CalendarView::schedule(Scheduler::Method method, Incidence *incidence) | 4316 | void CalendarView::schedule(Scheduler::Method method, Incidence *incidence) |
4278 | { | 4317 | { |
4279 | Event *event = 0; | 4318 | Event *event = 0; |
4280 | Todo *todo = 0; | 4319 | Todo *todo = 0; |
4281 | 4320 | ||
4282 | if (incidence == 0) { | 4321 | if (incidence == 0) { |
4283 | incidence = mViewManager->currentView()->selectedIncidences().first(); | 4322 | incidence = mViewManager->currentView()->selectedIncidences().first(); |
4284 | if (incidence == 0) { | 4323 | if (incidence == 0) { |
4285 | incidence = mTodoList->selectedIncidences().first(); | 4324 | incidence = mTodoList->selectedIncidences().first(); |
4286 | } | 4325 | } |
4287 | } | 4326 | } |
4288 | if ( incidence && incidence->typeID() == eventID ) { | 4327 | if ( incidence && incidence->typeID() == eventID ) { |
4289 | event = static_cast<Event *>(incidence); | 4328 | event = static_cast<Event *>(incidence); |
4290 | } | 4329 | } |
4291 | if ( incidence && incidence->typeID() == todoID ) { | 4330 | if ( incidence && incidence->typeID() == todoID ) { |
4292 | todo = static_cast<Todo *>(incidence); | 4331 | todo = static_cast<Todo *>(incidence); |
4293 | } | 4332 | } |
4294 | 4333 | ||
4295 | if (!event && !todo) { | 4334 | if (!event && !todo) { |
4296 | KMessageBox::sorry(this,i18n("No event selected.")); | 4335 | KMessageBox::sorry(this,i18n("No event selected.")); |
4297 | return; | 4336 | return; |
4298 | } | 4337 | } |
4299 | 4338 | ||
4300 | if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) { | 4339 | if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) { |
4301 | KMessageBox::sorry(this,i18n("The event has no attendees.")); | 4340 | KMessageBox::sorry(this,i18n("The event has no attendees.")); |
4302 | return; | 4341 | return; |
4303 | } | 4342 | } |
4304 | 4343 | ||
4305 | Event *ev = 0; | 4344 | Event *ev = 0; |
4306 | if (event) ev = new Event(*event); | 4345 | if (event) ev = new Event(*event); |
4307 | Todo *to = 0; | 4346 | Todo *to = 0; |
4308 | if (todo) to = new Todo(*todo); | 4347 | if (todo) to = new Todo(*todo); |
4309 | 4348 | ||
4310 | if (method == Scheduler::Reply || method == Scheduler::Refresh) { | 4349 | if (method == Scheduler::Reply || method == Scheduler::Refresh) { |
4311 | Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); | 4350 | Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); |
4312 | if (!me) { | 4351 | if (!me) { |
4313 | KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails.")); | 4352 | KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails.")); |
4314 | return; | 4353 | return; |
4315 | } | 4354 | } |
4316 | if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) { | 4355 | if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) { |
4317 | StatusDialog *statdlg = new StatusDialog(this); | 4356 | StatusDialog *statdlg = new StatusDialog(this); |
4318 | if (!statdlg->exec()==QDialog::Accepted) return; | 4357 | if (!statdlg->exec()==QDialog::Accepted) return; |
4319 | me->setStatus( statdlg->status() ); | 4358 | me->setStatus( statdlg->status() ); |
4320 | delete(statdlg); | 4359 | delete(statdlg); |
4321 | } | 4360 | } |
4322 | Attendee *menew = new Attendee(*me); | 4361 | Attendee *menew = new Attendee(*me); |
4323 | if (ev) { | 4362 | if (ev) { |
4324 | ev->clearAttendees(); | 4363 | ev->clearAttendees(); |
4325 | ev->addAttendee(menew,false); | 4364 | ev->addAttendee(menew,false); |
4326 | } else { | 4365 | } else { |
4327 | if (to) { | 4366 | if (to) { |
4328 | todo->clearAttendees(); | 4367 | todo->clearAttendees(); |
4329 | todo->addAttendee(menew,false); | 4368 | todo->addAttendee(menew,false); |
4330 | } | 4369 | } |
4331 | } | 4370 | } |
4332 | } | 4371 | } |
4333 | 4372 | ||
4334 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 4373 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
4335 | if (ev) { | 4374 | if (ev) { |
4336 | if ( !dlg->addMessage(ev,method) ) delete(ev); | 4375 | if ( !dlg->addMessage(ev,method) ) delete(ev); |
4337 | } else { | 4376 | } else { |
4338 | if (to) { | 4377 | if (to) { |
4339 | if ( !dlg->addMessage(to,method) ) delete(to); | 4378 | if ( !dlg->addMessage(to,method) ) delete(to); |
4340 | } | 4379 | } |
4341 | } | 4380 | } |
4342 | } | 4381 | } |
4343 | 4382 | ||
4344 | void CalendarView::openAddressbook() | 4383 | void CalendarView::openAddressbook() |
4345 | { | 4384 | { |
4346 | KRun::runCommand("kaddressbook"); | 4385 | KRun::runCommand("kaddressbook"); |
4347 | } | 4386 | } |
4348 | 4387 | ||
4349 | void CalendarView::setModified(bool modified) | 4388 | void CalendarView::setModified(bool modified) |
4350 | { | 4389 | { |
4351 | //qDebug("CalendarView::setModified %d ", modified); | 4390 | //qDebug("CalendarView::setModified %d ", modified); |
4352 | if ( modified ) | 4391 | if ( modified ) |
4353 | emit signalmodified(); | 4392 | emit signalmodified(); |
4354 | mModified = modified; | 4393 | mModified = modified; |
4355 | if ( mModified ) | 4394 | if ( mModified ) |
4356 | emit modifiedChanged(mModified); | 4395 | emit modifiedChanged(mModified); |
4357 | 4396 | ||
4358 | } | 4397 | } |
4359 | 4398 | ||
4360 | bool CalendarView::isReadOnly() | 4399 | bool CalendarView::isReadOnly() |
4361 | { | 4400 | { |
4362 | return mReadOnly; | 4401 | return mReadOnly; |
4363 | } | 4402 | } |
4364 | 4403 | ||
4365 | void CalendarView::setReadOnly(bool readOnly) | 4404 | void CalendarView::setReadOnly(bool readOnly) |
4366 | { | 4405 | { |
4367 | if (mReadOnly != readOnly) { | 4406 | if (mReadOnly != readOnly) { |
4368 | mReadOnly = readOnly; | 4407 | mReadOnly = readOnly; |
4369 | emit readOnlyChanged(mReadOnly); | 4408 | emit readOnlyChanged(mReadOnly); |
4370 | } | 4409 | } |
4371 | } | 4410 | } |
4372 | 4411 | ||
4373 | bool CalendarView::isModified() | 4412 | bool CalendarView::isModified() |
4374 | { | 4413 | { |
4375 | return mModified; | 4414 | return mModified; |
4376 | } | 4415 | } |
4377 | void CalendarView::slotprintSelInc() | 4416 | void CalendarView::slotprintSelInc() |
4378 | { | 4417 | { |
4379 | if ( currentSelection() == 0 ) { | 4418 | if ( currentSelection() == 0 ) { |
4380 | KMessageBox::sorry(this,i18n("There is nothing selected!")); | 4419 | KMessageBox::sorry(this,i18n("There is nothing selected!")); |
4381 | return; | 4420 | return; |
4382 | } | 4421 | } |
4383 | showIncidence(); | 4422 | showIncidence(); |
4384 | getEventViewerDialog()->print(); | 4423 | getEventViewerDialog()->print(); |
4385 | 4424 | ||
4386 | } | 4425 | } |
4387 | void CalendarView::printSetup() | 4426 | void CalendarView::printSetup() |
4388 | { | 4427 | { |
4389 | #ifndef KORG_NOPRINTER | 4428 | #ifndef KORG_NOPRINTER |
4390 | createPrinter(); | 4429 | createPrinter(); |
4391 | 4430 | ||
4392 | mCalPrinter->setupPrinter(); | 4431 | mCalPrinter->setupPrinter(); |
4393 | #endif | 4432 | #endif |
4394 | } | 4433 | } |
4395 | 4434 | ||
4396 | void CalendarView::print() | 4435 | void CalendarView::print() |
4397 | { | 4436 | { |
4398 | #ifndef KORG_NOPRINTER | 4437 | #ifndef KORG_NOPRINTER |
4399 | createPrinter(); | 4438 | createPrinter(); |
4400 | 4439 | ||
4401 | DateList tmpDateList = mNavigator->selectedDates(); | 4440 | DateList tmpDateList = mNavigator->selectedDates(); |
4402 | mCalPrinter->print(CalPrinter::Month, | 4441 | mCalPrinter->print(CalPrinter::Month, |
4403 | tmpDateList.first(), tmpDateList.last()); | 4442 | tmpDateList.first(), tmpDateList.last()); |
4404 | #endif | 4443 | #endif |
4405 | } | 4444 | } |
4406 | 4445 | ||
4407 | void CalendarView::printPreview() | 4446 | void CalendarView::printPreview() |
4408 | { | 4447 | { |
4409 | #ifndef KORG_NOPRINTER | 4448 | #ifndef KORG_NOPRINTER |
4410 | kdDebug() << "CalendarView::printPreview()" << endl; | 4449 | kdDebug() << "CalendarView::printPreview()" << endl; |
4411 | 4450 | ||
4412 | createPrinter(); | 4451 | createPrinter(); |
4413 | 4452 | ||
4414 | DateList tmpDateList = mNavigator->selectedDates(); | 4453 | DateList tmpDateList = mNavigator->selectedDates(); |
4415 | 4454 | ||
4416 | mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(), | 4455 | mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(), |
4417 | tmpDateList.last()); | 4456 | tmpDateList.last()); |
4418 | #endif | 4457 | #endif |
4419 | } | 4458 | } |
4420 | 4459 | ||
4421 | void CalendarView::exportICalendar() | 4460 | void CalendarView::exportICalendar() |
4422 | { | 4461 | { |
4423 | QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); | 4462 | QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); |
4424 | 4463 | ||
4425 | // Force correct extension | 4464 | // Force correct extension |
4426 | if (filename.right(4) != ".ics") filename += ".ics"; | 4465 | if (filename.right(4) != ".ics") filename += ".ics"; |
4427 | 4466 | ||
4428 | FileStorage storage( mCalendar, filename, new ICalFormat() ); | 4467 | FileStorage storage( mCalendar, filename, new ICalFormat() ); |
4429 | storage.save(); | 4468 | storage.save(); |
4430 | } | 4469 | } |
4431 | 4470 | ||
4432 | bool CalendarView::exportVCalendar( QString filename ) | 4471 | bool CalendarView::exportVCalendar( QString filename ) |
4433 | { | 4472 | { |
4434 | if (mCalendar->journals().count() > 0) { | 4473 | if (mCalendar->journals().count() > 0) { |
4435 | int result = KMessageBox::warningContinueCancel(this, | 4474 | int result = KMessageBox::warningContinueCancel(this, |
4436 | i18n("The journal entries can not be\nexported to a vCalendar file."), | 4475 | i18n("The journal entries can not be\nexported to a vCalendar file."), |
4437 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), | 4476 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), |
4438 | true); | 4477 | true); |
4439 | if (result != KMessageBox::Continue) return false; | 4478 | if (result != KMessageBox::Continue) return false; |
4440 | } | 4479 | } |
4441 | 4480 | ||
4442 | //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this); | 4481 | //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this); |
4443 | 4482 | ||
4444 | // Force correct extension | 4483 | // Force correct extension |
4445 | if (filename.right(4) != ".vcs") filename += ".vcs"; | 4484 | if (filename.right(4) != ".vcs") filename += ".vcs"; |
4446 | 4485 | ||
4447 | FileStorage storage( mCalendar, filename, new VCalFormat ); | 4486 | FileStorage storage( mCalendar, filename, new VCalFormat ); |
4448 | return storage.save(); | 4487 | return storage.save(); |
4449 | 4488 | ||
4450 | } | 4489 | } |
4451 | 4490 | ||
4452 | void CalendarView::eventUpdated(Incidence *) | 4491 | void CalendarView::eventUpdated(Incidence *) |
4453 | { | 4492 | { |
4454 | setModified(); | 4493 | setModified(); |
4455 | // Don't call updateView here. The code, which has caused the update of the | 4494 | // Don't call updateView here. The code, which has caused the update of the |
4456 | // event is responsible for updating the view. | 4495 | // event is responsible for updating the view. |
4457 | // updateView(); | 4496 | // updateView(); |
4458 | } | 4497 | } |
4459 | 4498 | ||
4460 | void CalendarView::adaptNavigationUnits() | 4499 | void CalendarView::adaptNavigationUnits() |
4461 | { | 4500 | { |
4462 | if (mViewManager->currentView()->isEventView()) { | 4501 | if (mViewManager->currentView()->isEventView()) { |
4463 | int days = mViewManager->currentView()->currentDateCount(); | 4502 | int days = mViewManager->currentView()->currentDateCount(); |
4464 | if (days == 1) { | 4503 | if (days == 1) { |
4465 | emit changeNavStringPrev(i18n("&Previous Day")); | 4504 | emit changeNavStringPrev(i18n("&Previous Day")); |
4466 | emit changeNavStringNext(i18n("&Next Day")); | 4505 | emit changeNavStringNext(i18n("&Next Day")); |
4467 | } else { | 4506 | } else { |
4468 | emit changeNavStringPrev(i18n("&Previous Week")); | 4507 | emit changeNavStringPrev(i18n("&Previous Week")); |
4469 | emit changeNavStringNext(i18n("&Next Week")); | 4508 | emit changeNavStringNext(i18n("&Next Week")); |
4470 | } | 4509 | } |
4471 | } | 4510 | } |
4472 | } | 4511 | } |
4473 | 4512 | ||
4474 | void CalendarView::processMainViewSelection( Incidence *incidence ) | 4513 | void CalendarView::processMainViewSelection( Incidence *incidence ) |
4475 | { | 4514 | { |
4476 | if ( incidence ) mTodoList->clearSelection(); | 4515 | if ( incidence ) mTodoList->clearSelection(); |
4477 | processIncidenceSelection( incidence ); | 4516 | processIncidenceSelection( incidence ); |
4478 | } | 4517 | } |
4479 | 4518 | ||
4480 | void CalendarView::processTodoListSelection( Incidence *incidence ) | 4519 | void CalendarView::processTodoListSelection( Incidence *incidence ) |
4481 | { | 4520 | { |
4482 | if ( incidence && mViewManager->currentView() ) { | 4521 | if ( incidence && mViewManager->currentView() ) { |
4483 | mViewManager->currentView()->clearSelection(); | 4522 | mViewManager->currentView()->clearSelection(); |
4484 | } | 4523 | } |
4485 | processIncidenceSelection( incidence ); | 4524 | processIncidenceSelection( incidence ); |
4486 | } | 4525 | } |
4487 | 4526 | ||
4488 | void CalendarView::processIncidenceSelection( Incidence *incidence ) | 4527 | void CalendarView::processIncidenceSelection( Incidence *incidence ) |
4489 | { | 4528 | { |
4490 | emit incidenceSelected( incidence ); | 4529 | emit incidenceSelected( incidence ); |
4491 | if ( incidence == mSelectedIncidence ) return; | 4530 | if ( incidence == mSelectedIncidence ) return; |
4492 | mSelectedIncidence = incidence; | 4531 | mSelectedIncidence = incidence; |
4493 | 4532 | ||
4494 | if ( incidence && incidence->typeID() == eventID ) { | 4533 | if ( incidence && incidence->typeID() == eventID ) { |
4495 | Event *event = static_cast<Event *>( incidence ); | 4534 | Event *event = static_cast<Event *>( incidence ); |
4496 | if ( event->organizer() == KOPrefs::instance()->email() ) { | 4535 | if ( event->organizer() == KOPrefs::instance()->email() ) { |
4497 | emit organizerEventsSelected( true ); | 4536 | emit organizerEventsSelected( true ); |
4498 | } else { | 4537 | } else { |
4499 | emit organizerEventsSelected(false); | 4538 | emit organizerEventsSelected(false); |
4500 | } | 4539 | } |
4501 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, | 4540 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, |
4502 | KOPrefs::instance()->email() ) ) { | 4541 | KOPrefs::instance()->email() ) ) { |
4503 | emit groupEventsSelected( true ); | 4542 | emit groupEventsSelected( true ); |
4504 | } else { | 4543 | } else { |
4505 | emit groupEventsSelected(false); | 4544 | emit groupEventsSelected(false); |
4506 | } | 4545 | } |
4507 | return; | 4546 | return; |
4508 | } else { | 4547 | } else { |
4509 | if ( incidence && incidence->typeID() == todoID ) { | 4548 | if ( incidence && incidence->typeID() == todoID ) { |
4510 | emit todoSelected( true ); | 4549 | emit todoSelected( true ); |
4511 | Todo *event = static_cast<Todo *>( incidence ); | 4550 | Todo *event = static_cast<Todo *>( incidence ); |
4512 | if ( event->organizer() == KOPrefs::instance()->email() ) { | 4551 | if ( event->organizer() == KOPrefs::instance()->email() ) { |
4513 | emit organizerEventsSelected( true ); | 4552 | emit organizerEventsSelected( true ); |
4514 | } else { | 4553 | } else { |
4515 | emit organizerEventsSelected(false); | 4554 | emit organizerEventsSelected(false); |
4516 | } | 4555 | } |
4517 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, | 4556 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, |
4518 | KOPrefs::instance()->email() ) ) { | 4557 | KOPrefs::instance()->email() ) ) { |
4519 | emit groupEventsSelected( true ); | 4558 | emit groupEventsSelected( true ); |
4520 | } else { | 4559 | } else { |
4521 | emit groupEventsSelected(false); | 4560 | emit groupEventsSelected(false); |
4522 | } | 4561 | } |
4523 | return; | 4562 | return; |
4524 | } else { | 4563 | } else { |
4525 | emit todoSelected( false ); | 4564 | emit todoSelected( false ); |
4526 | emit organizerEventsSelected(false); | 4565 | emit organizerEventsSelected(false); |
4527 | emit groupEventsSelected(false); | 4566 | emit groupEventsSelected(false); |
4528 | } | 4567 | } |
4529 | return; | 4568 | return; |
4530 | } | 4569 | } |
4531 | 4570 | ||
4532 | /* if ( incidence && incidence->typeID() == todoID ) { | 4571 | /* if ( incidence && incidence->typeID() == todoID ) { |
4533 | emit todoSelected( true ); | 4572 | emit todoSelected( true ); |
4534 | } else { | 4573 | } else { |
4535 | emit todoSelected( false ); | 4574 | emit todoSelected( false ); |
4536 | }*/ | 4575 | }*/ |
4537 | } | 4576 | } |
4538 | 4577 | ||
4539 | 4578 | ||
4540 | void CalendarView::checkClipboard() | 4579 | void CalendarView::checkClipboard() |
4541 | { | 4580 | { |
4542 | #ifndef KORG_NODND | 4581 | #ifndef KORG_NODND |
4543 | if (ICalDrag::canDecode(QApplication::clipboard()->data())) { | 4582 | if (ICalDrag::canDecode(QApplication::clipboard()->data())) { |
4544 | emit pasteEnabled(true); | 4583 | emit pasteEnabled(true); |
4545 | } else { | 4584 | } else { |
4546 | emit pasteEnabled(false); | 4585 | emit pasteEnabled(false); |
4547 | } | 4586 | } |
4548 | #endif | 4587 | #endif |
4549 | } | 4588 | } |
4550 | 4589 | ||
4551 | void CalendarView::showDates(const DateList &selectedDates) | 4590 | void CalendarView::showDates(const DateList &selectedDates) |
4552 | { | 4591 | { |
4553 | // kdDebug() << "CalendarView::selectDates()" << endl; | 4592 | // kdDebug() << "CalendarView::selectDates()" << endl; |
4554 | 4593 | ||
4555 | 4594 | ||
4556 | if ( !mBlockShowDates ) { | 4595 | if ( !mBlockShowDates ) { |
4557 | if ( mViewManager->currentView() ) { | 4596 | if ( mViewManager->currentView() ) { |
4558 | updateView( selectedDates.first(), selectedDates.last() ); | 4597 | updateView( selectedDates.first(), selectedDates.last() ); |
4559 | } else { | 4598 | } else { |
4560 | mViewManager->showAgendaView(); | 4599 | mViewManager->showAgendaView(); |
4561 | } | 4600 | } |
4562 | } | 4601 | } |
4563 | 4602 | ||
4564 | QDate date = selectedDates.first(); | 4603 | QDate date = selectedDates.first(); |
4565 | if ( ! date.isValid() ) { | 4604 | if ( ! date.isValid() ) { |
4566 | topLevelWidget()->setCaption(""); | 4605 | topLevelWidget()->setCaption(""); |
4567 | return; | 4606 | return; |
4568 | } | 4607 | } |
4569 | 4608 | ||
4570 | QString selDates; | 4609 | QString selDates; |
4571 | selDates = KGlobal::locale()->formatDate( date, true); | 4610 | selDates = KGlobal::locale()->formatDate( date, true); |
4572 | if (selectedDates.first() < selectedDates.last() ) | 4611 | if (selectedDates.first() < selectedDates.last() ) |
4573 | selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); | 4612 | selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); |
4574 | else { | 4613 | else { |
4575 | QString addString; | 4614 | QString addString; |
4576 | if ( date == QDateTime::currentDateTime().date() ) | 4615 | if ( date == QDateTime::currentDateTime().date() ) |
4577 | addString = i18n("Today"); | 4616 | addString = i18n("Today"); |
4578 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) | 4617 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) |
4579 | addString = i18n("Tomorrow"); | 4618 | addString = i18n("Tomorrow"); |
4580 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) | 4619 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) |
4581 | addString = i18n("Yesterday"); | 4620 | addString = i18n("Yesterday"); |
4582 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) | 4621 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) |
4583 | addString = i18n("Day before yesterday"); | 4622 | addString = i18n("Day before yesterday"); |
4584 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) | 4623 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) |
4585 | addString = i18n("Day after tomorrow"); | 4624 | addString = i18n("Day after tomorrow"); |
4586 | if ( !addString.isEmpty() ) { | 4625 | if ( !addString.isEmpty() ) { |
4587 | topLevelWidget()->setCaption( addString+", " + selDates ); | 4626 | topLevelWidget()->setCaption( addString+", " + selDates ); |
4588 | return; | 4627 | return; |
4589 | } | 4628 | } |
4590 | } | 4629 | } |
4591 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); | 4630 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); |
4592 | 4631 | ||
4593 | } | 4632 | } |
4594 | 4633 | ||
4595 | QPtrList<CalFilter> CalendarView::filters() | 4634 | QPtrList<CalFilter> CalendarView::filters() |
4596 | { | 4635 | { |
4597 | return mFilters; | 4636 | return mFilters; |
4598 | 4637 | ||
4599 | } | 4638 | } |
4600 | void CalendarView::editFilters() | 4639 | void CalendarView::editFilters() |
4601 | { | 4640 | { |
4602 | // kdDebug() << "CalendarView::editFilters()" << endl; | 4641 | // kdDebug() << "CalendarView::editFilters()" << endl; |
4603 | 4642 | ||
4604 | CalFilter *filter = mFilters.first(); | 4643 | CalFilter *filter = mFilters.first(); |
4605 | while(filter) { | 4644 | while(filter) { |
4606 | filter = mFilters.next(); | 4645 | filter = mFilters.next(); |
4607 | } | 4646 | } |
4608 | 4647 | ||
4609 | mDialogManager->showFilterEditDialog(&mFilters); | 4648 | mDialogManager->showFilterEditDialog(&mFilters); |
4610 | updateFilter(); | 4649 | updateFilter(); |
4611 | } | 4650 | } |
4612 | void CalendarView::toggleFilter() | 4651 | void CalendarView::toggleFilter() |
4613 | { | 4652 | { |
4614 | if ( mLeftFrame->isHidden() ) { | 4653 | if ( mLeftFrame->isHidden() ) { |
4615 | toggleExpand(); | 4654 | toggleExpand(); |
4616 | showFilter( true ); | 4655 | showFilter( true ); |
4617 | } else | 4656 | } else |
4618 | showFilter(! mCalEditView->isVisible()); | 4657 | showFilter(! mCalEditView->isVisible()); |
4619 | } | 4658 | } |
4620 | 4659 | ||
4621 | KOFilterView *CalendarView::filterView() | 4660 | KOFilterView *CalendarView::filterView() |
4622 | { | 4661 | { |
4623 | return mFilterView; | 4662 | return mFilterView; |
4624 | } | 4663 | } |
4625 | void CalendarView::selectFilter( int fil ) | 4664 | void CalendarView::selectFilter( int fil ) |
4626 | { | 4665 | { |
4627 | mFilterView->setSelectedFilter( fil ); | 4666 | mFilterView->setSelectedFilter( fil ); |
4628 | updateUnmanagedViews(); | 4667 | updateUnmanagedViews(); |
4629 | } | 4668 | } |
4630 | void CalendarView::showFilter(bool visible) | 4669 | void CalendarView::showFilter(bool visible) |
4631 | { | 4670 | { |
4632 | #if 1 | 4671 | #if 1 |
4633 | if (visible) { | 4672 | if (visible) { |
4634 | mCalEditView->readConfig(); | 4673 | mCalEditView->readConfig(); |
4635 | mCalEditView->show(); | 4674 | mCalEditView->show(); |
4636 | QValueList<int> sizes; | 4675 | QValueList<int> sizes; |
4637 | sizes = mLeftFrame->sizes(); | 4676 | sizes = mLeftFrame->sizes(); |
4638 | if ( sizes.count() == 4 && sizes[3] < 20 ) { | 4677 | if ( sizes.count() == 4 && sizes[3] < 20 ) { |
4639 | sizes.clear(); | 4678 | sizes.clear(); |
4640 | sizes << 100; | 4679 | sizes << 100; |
4641 | sizes << 0; | 4680 | sizes << 0; |
4642 | sizes << 0; | 4681 | sizes << 0; |
4643 | sizes << 100; | 4682 | sizes << 100; |
4644 | mLeftFrame->setSizes(sizes); | 4683 | mLeftFrame->setSizes(sizes); |
4645 | } | 4684 | } |
4646 | #if 0 | 4685 | #if 0 |
4647 | sizes = mLeftFrame->sizes(); | 4686 | sizes = mLeftFrame->sizes(); |
4648 | int ccc = 0; | 4687 | int ccc = 0; |
4649 | while ( ccc < sizes.count()) { | 4688 | while ( ccc < sizes.count()) { |
4650 | qDebug("size %d %d ", ccc, sizes[ccc]); | 4689 | qDebug("size %d %d ", ccc, sizes[ccc]); |
4651 | ++ccc; | 4690 | ++ccc; |
4652 | } | 4691 | } |
4653 | #endif | 4692 | #endif |
4654 | 4693 | ||
4655 | } | 4694 | } |
4656 | else { | 4695 | else { |
4657 | mCalEditView->hide(); | 4696 | mCalEditView->hide(); |
4658 | } | 4697 | } |
4659 | #else | 4698 | #else |
4660 | if (visible) mFilterView->show(); | 4699 | if (visible) mFilterView->show(); |
4661 | else mFilterView->hide(); | 4700 | else mFilterView->hide(); |
4662 | #endif | 4701 | #endif |
4663 | } | 4702 | } |
4664 | void CalendarView::toggleFilerEnabled( ) | 4703 | void CalendarView::toggleFilerEnabled( ) |
4665 | { | 4704 | { |
4666 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); | 4705 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); |
4667 | if ( !mFilterView->filtersEnabled() ) | 4706 | if ( !mFilterView->filtersEnabled() ) |
4668 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); | 4707 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); |
4669 | updateUnmanagedViews(); | 4708 | updateUnmanagedViews(); |
4670 | 4709 | ||
4671 | } | 4710 | } |
4672 | void CalendarView::updateFilter() | 4711 | void CalendarView::updateFilter() |
4673 | { | 4712 | { |
4674 | CalFilter *filter = mFilterView->selectedFilter(); | 4713 | CalFilter *filter = mFilterView->selectedFilter(); |
4675 | if (filter) { | 4714 | if (filter) { |
4676 | QString mess; | 4715 | QString mess; |
4677 | if (mFilterView->filtersEnabled()) { | 4716 | if (mFilterView->filtersEnabled()) { |
4678 | mess = i18n("Filter selected: ")+filter->name(); | 4717 | mess = i18n("Filter selected: ")+filter->name(); |
4679 | filter->setEnabled(true); | 4718 | filter->setEnabled(true); |
4680 | } | 4719 | } |
4681 | else filter->setEnabled(false); | 4720 | else filter->setEnabled(false); |
4682 | mCalendar->setFilter(filter); | 4721 | mCalendar->setFilter(filter); |
4683 | updateView(); | 4722 | updateView(); |
4684 | if ( !mess.isEmpty() ) | 4723 | if ( !mess.isEmpty() ) |
4685 | topLevelWidget()->setCaption( mess ); | 4724 | topLevelWidget()->setCaption( mess ); |
4686 | 4725 | ||
4687 | } | 4726 | } |
4688 | emit filtersUpdated(); | 4727 | emit filtersUpdated(); |
4689 | } | 4728 | } |
4690 | 4729 | ||
4691 | void CalendarView::filterEdited() | 4730 | void CalendarView::filterEdited() |
4692 | { | 4731 | { |
4693 | mFilterView->updateFilters(); | 4732 | mFilterView->updateFilters(); |
4694 | updateFilter(); | 4733 | updateFilter(); |
4695 | writeSettings(); | 4734 | writeSettings(); |
4696 | } | 4735 | } |
4697 | 4736 | ||
4698 | 4737 | ||
4699 | void CalendarView::takeOverEvent() | 4738 | void CalendarView::takeOverEvent() |
4700 | { | 4739 | { |
4701 | Incidence *incidence = currentSelection(); | 4740 | Incidence *incidence = currentSelection(); |
4702 | 4741 | ||
4703 | if (!incidence) return; | 4742 | if (!incidence) return; |
4704 | 4743 | ||
4705 | incidence->setOrganizer(KOPrefs::instance()->email()); | 4744 | incidence->setOrganizer(KOPrefs::instance()->email()); |
4706 | incidence->recreate(); | 4745 | incidence->recreate(); |
4707 | incidence->setReadOnly(false); | 4746 | incidence->setReadOnly(false); |
4708 | 4747 | ||
4709 | updateView(); | 4748 | updateView(); |
4710 | } | 4749 | } |
4711 | 4750 | ||
4712 | void CalendarView::takeOverCalendar() | 4751 | void CalendarView::takeOverCalendar() |
4713 | { | 4752 | { |
4714 | // TODO: Create Calendar::allIncidences() function and use it here | 4753 | // TODO: Create Calendar::allIncidences() function and use it here |
4715 | 4754 | ||
4716 | clearAllViews(); | 4755 | clearAllViews(); |
4717 | QPtrList<Event> events = mCalendar->events(); | 4756 | QPtrList<Event> events = mCalendar->events(); |
4718 | for(uint i=0; i<events.count(); ++i) { | 4757 | for(uint i=0; i<events.count(); ++i) { |
4719 | events.at(i)->setOrganizer(KOPrefs::instance()->email()); | 4758 | events.at(i)->setOrganizer(KOPrefs::instance()->email()); |
4720 | events.at(i)->recreate(); | 4759 | events.at(i)->recreate(); |
4721 | events.at(i)->setReadOnly(false); | 4760 | events.at(i)->setReadOnly(false); |
4722 | } | 4761 | } |
4723 | 4762 | ||
4724 | QPtrList<Todo> todos = mCalendar->todos(); | 4763 | QPtrList<Todo> todos = mCalendar->todos(); |
4725 | for(uint i=0; i<todos.count(); ++i) { | 4764 | for(uint i=0; i<todos.count(); ++i) { |
4726 | todos.at(i)->setOrganizer(KOPrefs::instance()->email()); | 4765 | todos.at(i)->setOrganizer(KOPrefs::instance()->email()); |
4727 | todos.at(i)->recreate(); | 4766 | todos.at(i)->recreate(); |
4728 | todos.at(i)->setReadOnly(false); | 4767 | todos.at(i)->setReadOnly(false); |
4729 | } | 4768 | } |
4730 | 4769 | ||
4731 | QPtrList<Journal> journals = mCalendar->journals(); | 4770 | QPtrList<Journal> journals = mCalendar->journals(); |
4732 | for(uint i=0; i<journals.count(); ++i) { | 4771 | for(uint i=0; i<journals.count(); ++i) { |
4733 | journals.at(i)->setOrganizer(KOPrefs::instance()->email()); | 4772 | journals.at(i)->setOrganizer(KOPrefs::instance()->email()); |
4734 | journals.at(i)->recreate(); | 4773 | journals.at(i)->recreate(); |
4735 | journals.at(i)->setReadOnly(false); | 4774 | journals.at(i)->setReadOnly(false); |
4736 | } | 4775 | } |
4737 | 4776 | ||
4738 | updateView(); | 4777 | updateView(); |
4739 | } | 4778 | } |
4740 | 4779 | ||
4741 | void CalendarView::showIntro() | 4780 | void CalendarView::showIntro() |
4742 | { | 4781 | { |
4743 | kdDebug() << "To be implemented." << endl; | 4782 | kdDebug() << "To be implemented." << endl; |
4744 | } | 4783 | } |
4745 | 4784 | ||
4746 | QWidgetStack *CalendarView::viewStack() | 4785 | QWidgetStack *CalendarView::viewStack() |
4747 | { | 4786 | { |
4748 | return mRightFrame; | 4787 | return mRightFrame; |
4749 | } | 4788 | } |
4750 | 4789 | ||
4751 | QWidget *CalendarView::leftFrame() | 4790 | QWidget *CalendarView::leftFrame() |
4752 | { | 4791 | { |
4753 | return ( QWidget *)mLeftFrame; | 4792 | return ( QWidget *)mLeftFrame; |
4754 | } | 4793 | } |
4755 | 4794 | ||
4756 | DateNavigator *CalendarView::dateNavigator() | 4795 | DateNavigator *CalendarView::dateNavigator() |
4757 | { | 4796 | { |
4758 | return mNavigator; | 4797 | return mNavigator; |
4759 | } | 4798 | } |
4760 | 4799 | ||
4761 | KDateNavigator* CalendarView::dateNavigatorWidget() | 4800 | KDateNavigator* CalendarView::dateNavigatorWidget() |
4762 | { | 4801 | { |
4763 | return mDateNavigator->navigatorView(); | 4802 | return mDateNavigator->navigatorView(); |
4764 | } | 4803 | } |
4765 | void CalendarView::toggleDateNavigatorWidget() | 4804 | void CalendarView::toggleDateNavigatorWidget() |
4766 | { | 4805 | { |
4767 | KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; | 4806 | KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; |
4768 | 4807 | ||
4769 | if (!KOPrefs::instance()->mShowDateNavigator ) | 4808 | if (!KOPrefs::instance()->mShowDateNavigator ) |
4770 | mDateNavigator->hide(); | 4809 | mDateNavigator->hide(); |
4771 | else | 4810 | else |
4772 | mDateNavigator->show(); | 4811 | mDateNavigator->show(); |
4773 | } | 4812 | } |
4774 | void CalendarView::addView(KOrg::BaseView *view) | 4813 | void CalendarView::addView(KOrg::BaseView *view) |
4775 | { | 4814 | { |
4776 | mViewManager->addView(view); | 4815 | mViewManager->addView(view); |
4777 | } | 4816 | } |
4778 | 4817 | ||
4779 | void CalendarView::showView(KOrg::BaseView *view) | 4818 | void CalendarView::showView(KOrg::BaseView *view) |
4780 | { | 4819 | { |
4781 | mViewManager->showView(view, mLeftFrame->isVisible()); | 4820 | mViewManager->showView(view, mLeftFrame->isVisible()); |
4782 | } | 4821 | } |
4783 | 4822 | ||
4784 | Incidence *CalendarView::currentSelection() | 4823 | Incidence *CalendarView::currentSelection() |
4785 | { | 4824 | { |
4786 | return mViewManager->currentSelection(); | 4825 | return mViewManager->currentSelection(); |
4787 | } | 4826 | } |
4788 | void CalendarView::toggleAllDaySize() | 4827 | void CalendarView::toggleAllDaySize() |
4789 | { | 4828 | { |
4790 | /* | 4829 | /* |
4791 | if ( KOPrefs::instance()->mAllDaySize > 47 ) | 4830 | if ( KOPrefs::instance()->mAllDaySize > 47 ) |
4792 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; | 4831 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; |
4793 | else | 4832 | else |
4794 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; | 4833 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; |
4795 | */ | 4834 | */ |
4796 | viewManager()->agendaView()->toggleAllDay(); | 4835 | viewManager()->agendaView()->toggleAllDay(); |
4797 | } | 4836 | } |
4798 | void CalendarView::toggleExpand() | 4837 | void CalendarView::toggleExpand() |
4799 | { | 4838 | { |
4800 | // if ( mLeftFrame->isHidden() ) { | 4839 | // if ( mLeftFrame->isHidden() ) { |
4801 | // mLeftFrame->show(); | 4840 | // mLeftFrame->show(); |
4802 | // emit calendarViewExpanded( false ); | 4841 | // emit calendarViewExpanded( false ); |
4803 | // } else { | 4842 | // } else { |
4804 | // mLeftFrame->hide(); | 4843 | // mLeftFrame->hide(); |
4805 | // emit calendarViewExpanded( true ); | 4844 | // emit calendarViewExpanded( true ); |
4806 | // } | 4845 | // } |
4807 | //qDebug(" CalendarView::toggleExpand()"); | 4846 | //qDebug(" CalendarView::toggleExpand()"); |
4808 | globalFlagBlockAgenda = 1; | 4847 | globalFlagBlockAgenda = 1; |
4809 | emit calendarViewExpanded( !mLeftFrame->isHidden() ); | 4848 | emit calendarViewExpanded( !mLeftFrame->isHidden() ); |
4810 | globalFlagBlockAgenda = 5; | 4849 | globalFlagBlockAgenda = 5; |
4811 | mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); | 4850 | mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); |
4812 | //mViewManager->showView( 0, true ); | 4851 | //mViewManager->showView( 0, true ); |
4813 | } | 4852 | } |
4814 | 4853 | ||
4815 | void CalendarView::calendarModified( bool modified, Calendar * ) | 4854 | void CalendarView::calendarModified( bool modified, Calendar * ) |
4816 | { | 4855 | { |
4817 | setModified( modified ); | 4856 | setModified( modified ); |
4818 | } | 4857 | } |
4819 | 4858 | ||
4820 | Todo *CalendarView::selectedTodo() | 4859 | Todo *CalendarView::selectedTodo() |
4821 | { | 4860 | { |
4822 | Incidence *incidence = currentSelection(); | 4861 | Incidence *incidence = currentSelection(); |
4823 | if ( incidence && incidence->typeID() == todoID ) { | 4862 | if ( incidence && incidence->typeID() == todoID ) { |
4824 | return static_cast<Todo *>( incidence ); | 4863 | return static_cast<Todo *>( incidence ); |
4825 | } | 4864 | } |
4826 | 4865 | ||
4827 | incidence = mTodoList->selectedIncidences().first(); | 4866 | incidence = mTodoList->selectedIncidences().first(); |
4828 | if ( incidence && incidence->typeID() == todoID ) { | 4867 | if ( incidence && incidence->typeID() == todoID ) { |
4829 | return static_cast<Todo *>( incidence ); | 4868 | return static_cast<Todo *>( incidence ); |
4830 | } | 4869 | } |
4831 | 4870 | ||
4832 | return 0; | 4871 | return 0; |
4833 | } | 4872 | } |
4834 | 4873 | ||
4835 | void CalendarView::showIncidence() | 4874 | void CalendarView::showIncidence() |
4836 | { | 4875 | { |
4837 | mViewerCallerIsSearchDialog = false; | 4876 | mViewerCallerIsSearchDialog = false; |
4838 | Incidence *incidence = currentSelection(); | 4877 | Incidence *incidence = currentSelection(); |
4839 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 4878 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
4840 | if ( incidence ) { | 4879 | if ( incidence ) { |
4841 | ShowIncidenceVisitor v; | 4880 | ShowIncidenceVisitor v; |
4842 | v.act( incidence, this ); | 4881 | v.act( incidence, this ); |
4843 | } | 4882 | } |
4844 | } | 4883 | } |
4845 | void CalendarView::editIncidenceDescription() | 4884 | void CalendarView::editIncidenceDescription() |
4846 | { | 4885 | { |
4847 | mFlagEditDescription = true; | 4886 | mFlagEditDescription = true; |
4848 | editIncidence(); | 4887 | editIncidence(); |
4849 | mFlagEditDescription = false; | 4888 | mFlagEditDescription = false; |
4850 | } | 4889 | } |
4851 | void CalendarView::editIncidence() | 4890 | void CalendarView::editIncidence() |
4852 | { | 4891 | { |
4853 | // qDebug("editIncidence() "); | 4892 | // qDebug("editIncidence() "); |
4854 | Incidence *incidence = currentSelection(); | 4893 | Incidence *incidence = currentSelection(); |
4855 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 4894 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
4856 | if ( incidence ) { | 4895 | if ( incidence ) { |
4857 | EditIncidenceVisitor v; | 4896 | EditIncidenceVisitor v; |
4858 | v.act( incidence, this ); | 4897 | v.act( incidence, this ); |
4859 | } | 4898 | } |
4860 | } | 4899 | } |
4861 | 4900 | ||
4862 | void CalendarView::deleteIncidence() | 4901 | void CalendarView::deleteIncidence() |
4863 | { | 4902 | { |
4864 | Incidence *incidence = currentSelection(); | 4903 | Incidence *incidence = currentSelection(); |
4865 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 4904 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
4866 | if ( incidence ) { | 4905 | if ( incidence ) { |
4867 | deleteIncidence(incidence); | 4906 | deleteIncidence(incidence); |
4868 | } | 4907 | } |
4869 | } | 4908 | } |
4870 | void CalendarView::showIncidence(QString uid) | 4909 | void CalendarView::showIncidence(QString uid) |
4871 | { | 4910 | { |
4872 | Incidence *inc = mCalendar->incidence( uid ); | 4911 | Incidence *inc = mCalendar->incidence( uid ); |
4873 | if ( inc ) | 4912 | if ( inc ) |
4874 | showIncidence( inc ); | 4913 | showIncidence( inc ); |
4875 | } | 4914 | } |
4876 | void CalendarView::showIncidence(Incidence *incidence) | 4915 | void CalendarView::showIncidence(Incidence *incidence) |
4877 | { | 4916 | { |
4878 | mViewerCallerIsSearchDialog = false; | 4917 | mViewerCallerIsSearchDialog = false; |
4879 | //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() ); | 4918 | //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() ); |
4880 | if ( sender() && mDialogManager->getSearchDialog() ) { | 4919 | if ( sender() && mDialogManager->getSearchDialog() ) { |
4881 | if ( sender () == mDialogManager->getSearchDialog()->listview() ) { | 4920 | if ( sender () == mDialogManager->getSearchDialog()->listview() ) { |
4882 | mViewerCallerIsSearchDialog = true; | 4921 | mViewerCallerIsSearchDialog = true; |
4883 | } | 4922 | } |
4884 | } | 4923 | } |
4885 | if ( incidence ) { | 4924 | if ( incidence ) { |
4886 | ShowIncidenceVisitor v; | 4925 | ShowIncidenceVisitor v; |
4887 | v.act( incidence, this ); | 4926 | v.act( incidence, this ); |
4888 | } | 4927 | } |
4889 | } | 4928 | } |
4890 | 4929 | ||
4891 | void CalendarView::editIncidence(Incidence *incidence) | 4930 | void CalendarView::editIncidence(Incidence *incidence) |
4892 | { | 4931 | { |
4893 | if ( incidence ) { | 4932 | if ( incidence ) { |
4894 | 4933 | ||
4895 | EditIncidenceVisitor v; | 4934 | EditIncidenceVisitor v; |
4896 | v.act( incidence, this ); | 4935 | v.act( incidence, this ); |
4897 | 4936 | ||
4898 | } | 4937 | } |
4899 | } | 4938 | } |
4900 | 4939 | ||
4901 | void CalendarView::deleteIncidence(Incidence *incidence) | 4940 | void CalendarView::deleteIncidence(Incidence *incidence) |
4902 | { | 4941 | { |
4903 | //qDebug(" CalendarView::deleteIncidence "); | 4942 | //qDebug(" CalendarView::deleteIncidence "); |
4904 | if ( incidence == 0 ) { | 4943 | if ( incidence == 0 ) { |
4905 | updateView(); | 4944 | updateView(); |
4906 | emit updateSearchDialog(); | 4945 | emit updateSearchDialog(); |
4907 | return; | 4946 | return; |
4908 | } | 4947 | } |
4909 | if ( incidence ) { | 4948 | if ( incidence ) { |
4910 | DeleteIncidenceVisitor v; | 4949 | DeleteIncidenceVisitor v; |
4911 | v.act( incidence, this ); | 4950 | v.act( incidence, this ); |
4912 | } | 4951 | } |
4913 | } | 4952 | } |
4914 | 4953 | ||
4915 | 4954 | ||
4916 | void CalendarView::lookForOutgoingMessages() | 4955 | void CalendarView::lookForOutgoingMessages() |
4917 | { | 4956 | { |
4918 | OutgoingDialog *ogd = mDialogManager->outgoingDialog(); | 4957 | OutgoingDialog *ogd = mDialogManager->outgoingDialog(); |
4919 | ogd->loadMessages(); | 4958 | ogd->loadMessages(); |
4920 | } | 4959 | } |
4921 | 4960 | ||
4922 | void CalendarView::lookForIncomingMessages() | 4961 | void CalendarView::lookForIncomingMessages() |
4923 | { | 4962 | { |
4924 | IncomingDialog *icd = mDialogManager->incomingDialog(); | 4963 | IncomingDialog *icd = mDialogManager->incomingDialog(); |
4925 | icd->retrieve(); | 4964 | icd->retrieve(); |
4926 | } | 4965 | } |
4927 | 4966 | ||
4928 | bool CalendarView::removeCompletedSubTodos( Todo* t ) | 4967 | bool CalendarView::removeCompletedSubTodos( Todo* t ) |
4929 | { | 4968 | { |
4930 | bool deleteTodo = true; | 4969 | bool deleteTodo = true; |
4931 | QPtrList<Incidence> subTodos; | 4970 | QPtrList<Incidence> subTodos; |
4932 | Incidence *aTodo; | 4971 | Incidence *aTodo; |
4933 | subTodos = t->relations(); | 4972 | subTodos = t->relations(); |
4934 | for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { | 4973 | for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { |
4935 | if (! removeCompletedSubTodos( (Todo*) aTodo )) | 4974 | if (! removeCompletedSubTodos( (Todo*) aTodo )) |
4936 | deleteTodo = false; | 4975 | deleteTodo = false; |
4937 | } | 4976 | } |
4938 | if ( deleteTodo ) { | 4977 | if ( deleteTodo ) { |
4939 | if ( t->isCompleted() && !t->doesRecur()) { | 4978 | if ( t->isCompleted() && !t->doesRecur()) { |
4940 | checkExternalId( t ); | 4979 | checkExternalId( t ); |
4941 | mCalendar->deleteTodo( t ); | 4980 | mCalendar->deleteTodo( t ); |
4942 | changeTodoDisplay( t,KOGlobals::EVENTDELETED ); | 4981 | changeTodoDisplay( t,KOGlobals::EVENTDELETED ); |
4943 | } | 4982 | } |
4944 | else | 4983 | else |
4945 | deleteTodo = false; | 4984 | deleteTodo = false; |
4946 | } | 4985 | } |
4947 | return deleteTodo; | 4986 | return deleteTodo; |
4948 | 4987 | ||
4949 | } | 4988 | } |
4950 | void CalendarView::purgeCompleted() | 4989 | void CalendarView::purgeCompleted() |
4951 | { | 4990 | { |
4952 | int result = KMessageBox::warningContinueCancel(this, | 4991 | int result = KMessageBox::warningContinueCancel(this, |
4953 | i18n("Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)"),i18n("Purge Todos"),i18n("Purge")); | 4992 | i18n("Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)"),i18n("Purge Todos"),i18n("Purge")); |
4954 | 4993 | ||
4955 | if (result == KMessageBox::Continue) { | 4994 | if (result == KMessageBox::Continue) { |
4956 | 4995 | ||
4957 | QPtrList<Todo> todoCal; | 4996 | QPtrList<Todo> todoCal; |
4958 | QPtrList<Todo> rootTodos; | 4997 | QPtrList<Todo> rootTodos; |
4959 | //QPtrList<Incidence> rel; | 4998 | //QPtrList<Incidence> rel; |
4960 | Todo *aTodo; | 4999 | Todo *aTodo; |
4961 | todoCal = calendar()->todos(); | 5000 | todoCal = calendar()->todos(); |
4962 | for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { | 5001 | for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { |
4963 | if ( !aTodo->relatedTo() ) | 5002 | if ( !aTodo->relatedTo() ) |
4964 | rootTodos.append( aTodo ); | 5003 | rootTodos.append( aTodo ); |
4965 | } | 5004 | } |
4966 | for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { | 5005 | for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { |
4967 | removeCompletedSubTodos( aTodo ); | 5006 | removeCompletedSubTodos( aTodo ); |
4968 | } | 5007 | } |
4969 | 5008 | ||
4970 | updateView(); | 5009 | updateView(); |
4971 | } | 5010 | } |
4972 | } | 5011 | } |
4973 | 5012 | ||
4974 | void CalendarView::slotCalendarChanged() | 5013 | void CalendarView::slotCalendarChanged() |
4975 | { | 5014 | { |
4976 | ; | 5015 | ; |
4977 | } | 5016 | } |
4978 | 5017 | ||
4979 | void CalendarView::keyPressEvent ( QKeyEvent *e) | 5018 | void CalendarView::keyPressEvent ( QKeyEvent *e) |
4980 | { | 5019 | { |
4981 | //qDebug("CalendarView::keyPressEvent "); | 5020 | //qDebug("CalendarView::keyPressEvent "); |
4982 | e->ignore(); | 5021 | e->ignore(); |
4983 | } | 5022 | } |
4984 | 5023 | ||
4985 | 5024 | ||
4986 | bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) | 5025 | bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) |
4987 | { | 5026 | { |
4988 | 5027 | ||
4989 | if ( manager != mSyncManager) | 5028 | if ( manager != mSyncManager) |
4990 | qDebug("KO: Internal error-1. SyncManager mismatch "); | 5029 | qDebug("KO: Internal error-1. SyncManager mismatch "); |
4991 | if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { | 5030 | if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { |
4992 | qDebug("KO: SyncKDE request detected!"); | 5031 | qDebug("KO: SyncKDE request detected!"); |
4993 | } | 5032 | } |
4994 | mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); | 5033 | mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); |
4995 | mCurrentSyncName = mSyncManager->getCurrentSyncName(); | 5034 | mCurrentSyncName = mSyncManager->getCurrentSyncName(); |
4996 | return syncCalendar( filename, mode ); | 5035 | return syncCalendar( filename, mode ); |
4997 | } | 5036 | } |
4998 | bool CalendarView::syncExternal(KSyncManager* manager, QString resource) | 5037 | bool CalendarView::syncExternal(KSyncManager* manager, QString resource) |
4999 | { | 5038 | { |
5000 | //mSyncManager = manager; | 5039 | //mSyncManager = manager; |
5001 | if ( manager != mSyncManager) | 5040 | if ( manager != mSyncManager) |
5002 | qDebug("KO: Internal error-2. SyncManager mismatch "); | 5041 | qDebug("KO: Internal error-2. SyncManager mismatch "); |
5003 | mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); | 5042 | mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); |
5004 | mCurrentSyncName = mSyncManager->getCurrentSyncName(); | 5043 | mCurrentSyncName = mSyncManager->getCurrentSyncName(); |
5005 | if ( resource == "sharp" ) | 5044 | if ( resource == "sharp" ) |
5006 | syncExternal( 0 ); | 5045 | syncExternal( 0 ); |
5007 | if ( resource == "phone" ) | 5046 | if ( resource == "phone" ) |
5008 | syncExternal( 1 ); | 5047 | syncExternal( 1 ); |
5009 | // pending setmodified | 5048 | // pending setmodified |
5010 | return true; | 5049 | return true; |
5011 | } | 5050 | } |
5012 | void CalendarView::setSyncManager(KSyncManager* manager) | 5051 | void CalendarView::setSyncManager(KSyncManager* manager) |
5013 | { | 5052 | { |
5014 | mSyncManager = manager; | 5053 | mSyncManager = manager; |
5015 | } | 5054 | } |
5016 | 5055 | ||
5017 | void CalendarView::removeSyncInfo( QString syncProfile) | 5056 | void CalendarView::removeSyncInfo( QString syncProfile) |
5018 | { | 5057 | { |
5019 | qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); | 5058 | qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); |
5020 | mCalendar->removeSyncInfo( syncProfile ); | 5059 | mCalendar->removeSyncInfo( syncProfile ); |
5021 | 5060 | ||
5022 | } | 5061 | } |
5023 | 5062 | ||
5024 | void CalendarView::undo_delete() | 5063 | void CalendarView::undo_delete() |
5025 | { | 5064 | { |
5026 | //qDebug("undo_delete() "); | 5065 | //qDebug("undo_delete() "); |
5027 | Incidence* undo = mCalendar->undoIncidence(); | 5066 | Incidence* undo = mCalendar->undoIncidence(); |
5028 | if ( !undo ) { | 5067 | if ( !undo ) { |
5029 | KMessageBox::sorry(this,i18n("There is nothing to undo!"), | 5068 | KMessageBox::sorry(this,i18n("There is nothing to undo!"), |
5030 | i18n("KO/Pi")); | 5069 | i18n("KO/Pi")); |
5031 | return; | 5070 | return; |
5032 | } | 5071 | } |
5033 | if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( undo->summary(),0 ) + | 5072 | if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( undo->summary(),0 ) + |
5034 | i18n("\nAre you sure you want\nto restore this?"), | 5073 | i18n("\nAre you sure you want\nto restore this?"), |
5035 | i18n("KO/Pi Confirmation"),i18n("Restore"))) { | 5074 | i18n("KO/Pi Confirmation"),i18n("Restore"))) { |
5036 | mCalendar->undoDeleteIncidence(); | 5075 | mCalendar->undoDeleteIncidence(); |
5037 | updateView(); | 5076 | updateView(); |
5038 | } | 5077 | } |
5039 | } | 5078 | } |
5040 | 5079 | ||
5041 | void CalendarView::slotViewerClosed() | 5080 | void CalendarView::slotViewerClosed() |
5042 | { | 5081 | { |
5043 | QTimer::singleShot( 50, this, SLOT ( resetFocus() ) ); | 5082 | QTimer::singleShot( 50, this, SLOT ( resetFocus() ) ); |
5044 | } | 5083 | } |
5045 | 5084 | ||
5046 | void CalendarView::resetFocus() | 5085 | void CalendarView::resetFocus() |
5047 | { | 5086 | { |
5048 | if ( mViewerCallerIsSearchDialog ) { | 5087 | if ( mViewerCallerIsSearchDialog ) { |
5049 | if ( mDialogManager->getSearchDialog()->isVisible() ){ | 5088 | if ( mDialogManager->getSearchDialog()->isVisible() ){ |
5050 | mDialogManager->getSearchDialog()->raise(); | 5089 | mDialogManager->getSearchDialog()->raise(); |
5051 | mDialogManager->getSearchDialog()->setActiveWindow(); | 5090 | mDialogManager->getSearchDialog()->setActiveWindow(); |
5052 | mDialogManager->getSearchDialog()->listview()->resetFocus(); | 5091 | mDialogManager->getSearchDialog()->listview()->resetFocus(); |
5053 | } else | 5092 | } else |
5054 | mViewerCallerIsSearchDialog = false; | 5093 | mViewerCallerIsSearchDialog = false; |
5055 | } | 5094 | } |
5056 | if ( !mViewerCallerIsSearchDialog ) { | 5095 | if ( !mViewerCallerIsSearchDialog ) { |
5057 | //mViewManager->currentView()->setFocus(); | 5096 | //mViewManager->currentView()->setFocus(); |
5058 | //qDebug("sssssssssssssssset focus "); | 5097 | //qDebug("sssssssssssssssset focus "); |
5059 | topLevelWidget()->raise(); | 5098 | topLevelWidget()->raise(); |
5060 | setActiveWindow(); | 5099 | setActiveWindow(); |
5061 | //setFocus(); | 5100 | //setFocus(); |
5062 | } | 5101 | } |
5063 | mViewerCallerIsSearchDialog = false; | 5102 | mViewerCallerIsSearchDialog = false; |
5064 | } | 5103 | } |
5065 | 5104 | ||
5066 | void CalendarView::showNextAlarms() | 5105 | void CalendarView::showNextAlarms() |
5067 | { | 5106 | { |
5068 | QString message; | 5107 | QString message; |
5069 | QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); | 5108 | QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); |
5070 | if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) { | 5109 | if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) { |
5071 | QString sum = mCalendar->nextSummary(); | 5110 | QString sum = mCalendar->nextSummary(); |
5072 | QDateTime nextA = mNextAlarmDateTime; | 5111 | QDateTime nextA = mNextAlarmDateTime; |
5073 | QDateTime cur = QDateTime::currentDateTime(); | 5112 | QDateTime cur = QDateTime::currentDateTime(); |
5074 | int secs = cur.secsTo( nextA ); | 5113 | int secs = cur.secsTo( nextA ); |
5075 | int min = secs /60; | 5114 | int min = secs /60; |
5076 | int hours = min /60; | 5115 | int hours = min /60; |
5077 | min = min % 60; | 5116 | min = min % 60; |
5078 | int days = hours /24; | 5117 | int days = hours /24; |
5079 | hours = hours % 24; | 5118 | hours = hours % 24; |
5080 | 5119 | ||
5081 | //message = i18n("The next alarm is in:\n"); | 5120 | //message = i18n("The next alarm is in:\n"); |
5082 | if ( days > 1 ) | 5121 | if ( days > 1 ) |
5083 | message += i18n("%1 days\n").arg( days ); | 5122 | message += i18n("%1 days\n").arg( days ); |
5084 | else if ( days == 1 ) | 5123 | else if ( days == 1 ) |
5085 | message += i18n("1 day\n"); | 5124 | message += i18n("1 day\n"); |
5086 | if ( hours > 1 ) | 5125 | if ( hours > 1 ) |
5087 | message += i18n("%1 hours\n").arg( hours ); | 5126 | message += i18n("%1 hours\n").arg( hours ); |
5088 | else if ( hours == 1 ) | 5127 | else if ( hours == 1 ) |
5089 | message += i18n("1 hour\n"); | 5128 | message += i18n("1 hour\n"); |
5090 | if ( min > 1 ) | 5129 | if ( min > 1 ) |
5091 | message += i18n("%1 minutes\n").arg( min ); | 5130 | message += i18n("%1 minutes\n").arg( min ); |
5092 | else if ( min == 1 ) | 5131 | else if ( min == 1 ) |
5093 | message += i18n("1 minute\n"); | 5132 | message += i18n("1 minute\n"); |
5094 | if ( message.isEmpty() ) | 5133 | if ( message.isEmpty() ) |
5095 | message = i18n("The next alarm is in\nless than one minute!"); | 5134 | message = i18n("The next alarm is in\nless than one minute!"); |
5096 | else | 5135 | else |
5097 | message = i18n("The next alarm is in:\n") + message; | 5136 | message = i18n("The next alarm is in:\n") + message; |
5098 | message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; | 5137 | message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; |
5099 | } else { | 5138 | } else { |
5100 | message = i18n("There is no next alarm."); | 5139 | message = i18n("There is no next alarm."); |
5101 | 5140 | ||
5102 | } | 5141 | } |
5103 | #ifdef DESKTOP_VERSION | 5142 | #ifdef DESKTOP_VERSION |
5104 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { | 5143 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { |
5105 | message += i18n("\nThe internal alarm notification is disabled!\n"); | 5144 | message += i18n("\nThe internal alarm notification is disabled!\n"); |
5106 | message += i18n("Enable it in the settings menu, TAB alarm."); | 5145 | message += i18n("Enable it in the settings menu, TAB alarm."); |
5107 | } | 5146 | } |
5108 | 5147 | ||
5109 | #endif | 5148 | #endif |
5110 | KMessageBox::information( this, message); | 5149 | KMessageBox::information( this, message); |
5111 | } | 5150 | } |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 77f572c..571ca11 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -1,626 +1,634 @@ | |||
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 | ||
50 | KOPrefs *KOPrefs::mInstance = 0; | 50 | KOPrefs *KOPrefs::mInstance = 0; |
51 | static KStaticDeleter<KOPrefs> insd; | 51 | static KStaticDeleter<KOPrefs> insd; |
52 | 52 | ||
53 | KOPrefs::KOPrefs() : | 53 | KOPrefs::KOPrefs() : |
54 | KPimPrefs("korganizerrc") | 54 | KPimPrefs("korganizerrc") |
55 | { | 55 | { |
56 | mGlobalUpdateDisabled = false; | 56 | mGlobalUpdateDisabled = false; |
57 | mCategoryColors.setAutoDelete(true); | 57 | mCategoryColors.setAutoDelete(true); |
58 | fillMailDefaults(); | 58 | fillMailDefaults(); |
59 | mDefaultCategoryColor = QColor(175,210,255);//196,196,196); | 59 | mDefaultCategoryColor = QColor(175,210,255);//196,196,196); |
60 | QColor defaultHolidayColor = QColor(255,0,0); | 60 | QColor defaultHolidayColor = QColor(255,0,0); |
61 | QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); | 61 | QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); |
62 | QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); | 62 | QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); |
63 | QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); | 63 | QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); |
64 | QColor defaultTodoDueTodayColor = QColor(255,220,100); | 64 | QColor defaultTodoDueTodayColor = QColor(255,220,100); |
65 | QColor defaultTodoOverdueColor = QColor(255,153,125); | 65 | QColor defaultTodoOverdueColor = QColor(255,153,125); |
66 | QColor defaultTodoRunColor = QColor(99,194,30); | 66 | QColor defaultTodoRunColor = QColor(99,194,30); |
67 | KPrefs::setCurrentGroup("General"); | 67 | KPrefs::setCurrentGroup("General"); |
68 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 68 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
69 | addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); | 69 | addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); |
70 | addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); | 70 | addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); |
71 | addItemBool("ShowIconSearch",&mShowIconSearch,true); | 71 | addItemBool("ShowIconSearch",&mShowIconSearch,true); |
72 | addItemBool("ShowIconList",&mShowIconList,true); | 72 | addItemBool("ShowIconList",&mShowIconList,true); |
73 | addItemBool("ShowIconDay1",&mShowIconDay1,true); | 73 | addItemBool("ShowIconDay1",&mShowIconDay1,true); |
74 | addItemBool("ShowIconDay5",&mShowIconDay5,true); | 74 | addItemBool("ShowIconDay5",&mShowIconDay5,true); |
75 | addItemBool("ShowIconDay6",&mShowIconDay6,true); | 75 | addItemBool("ShowIconDay6",&mShowIconDay6,true); |
76 | addItemBool("ShowIconDay7",&mShowIconDay7,true); | 76 | addItemBool("ShowIconDay7",&mShowIconDay7,true); |
77 | addItemBool("ShowIconMonth",&mShowIconMonth,true); | 77 | addItemBool("ShowIconMonth",&mShowIconMonth,true); |
78 | addItemBool("ShowIconTodoview",&mShowIconTodoview,true); | 78 | addItemBool("ShowIconTodoview",&mShowIconTodoview,true); |
79 | addItemBool("ShowIconBackFast",&mShowIconBackFast,true); | 79 | addItemBool("ShowIconBackFast",&mShowIconBackFast,true); |
80 | addItemBool("ShowIconBack",&mShowIconBack,true); | 80 | addItemBool("ShowIconBack",&mShowIconBack,true); |
81 | addItemBool("ShowIconToday",&mShowIconToday,true); | 81 | addItemBool("ShowIconToday",&mShowIconToday,true); |
82 | addItemBool("ShowIconForward",&mShowIconForward,true); | 82 | addItemBool("ShowIconForward",&mShowIconForward,true); |
83 | addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); | 83 | addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); |
84 | addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); | 84 | addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); |
85 | addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); | 85 | addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); |
86 | addItemBool("ShowIconNextDays",&mShowIconNextDays,true); | 86 | addItemBool("ShowIconNextDays",&mShowIconNextDays,true); |
87 | addItemBool("ShowIconNext",&mShowIconNext,true); | 87 | addItemBool("ShowIconNext",&mShowIconNext,true); |
88 | addItemBool("ShowIconJournal",&mShowIconJournal,true); | 88 | addItemBool("ShowIconJournal",&mShowIconJournal,true); |
89 | addItemBool("ShowIconStretch",&mShowIconStretch,true); | 89 | addItemBool("ShowIconStretch",&mShowIconStretch,true); |
90 | addItemBool("ShowIconFilter",&mShowIconFilter,false); | 90 | addItemBool("ShowIconFilter",&mShowIconFilter,false); |
91 | addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); | 91 | addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); |
92 | 92 | ||
93 | bool addIcons = false; | 93 | bool addIcons = false; |
94 | #ifdef DESKTOP_VERSION | 94 | #ifdef DESKTOP_VERSION |
95 | addIcons = true; | 95 | addIcons = true; |
96 | #endif | 96 | #endif |
97 | addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); | 97 | addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); |
98 | addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); | 98 | addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); |
99 | addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); | 99 | addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); |
100 | addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); | 100 | addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); |
101 | 101 | ||
102 | addItemInt("LastLoadedLanguage",&mOldLanguage,0); | 102 | addItemInt("LastLoadedLanguage",&mOldLanguage,0); |
103 | 103 | ||
104 | addItemBool("AskForQuit",&mAskForQuit,false); | 104 | addItemBool("AskForQuit",&mAskForQuit,false); |
105 | 105 | ||
106 | #ifndef DESKTOP_VERSION | 106 | #ifndef DESKTOP_VERSION |
107 | addItemBool("ShowFullMenu",&mShowFullMenu,false); | 107 | addItemBool("ShowFullMenu",&mShowFullMenu,false); |
108 | #else | 108 | #else |
109 | addItemBool("ShowFullMenu",&mShowFullMenu,true); | 109 | addItemBool("ShowFullMenu",&mShowFullMenu,true); |
110 | #endif | 110 | #endif |
111 | addItemBool("ToolBarHor",&mToolBarHor, true ); | 111 | addItemBool("ToolBarHor",&mToolBarHor, true ); |
112 | addItemBool("ToolBarUp",&mToolBarUp, false ); | 112 | addItemBool("ToolBarUp",&mToolBarUp, false ); |
113 | addItemBool("ToolBarHorV",&mToolBarHorV, true ); | 113 | addItemBool("ToolBarHorV",&mToolBarHorV, true ); |
114 | addItemBool("ToolBarUpV",&mToolBarUpV, false ); | 114 | addItemBool("ToolBarUpV",&mToolBarUpV, false ); |
115 | addItemBool("ToolBarHorN",&mToolBarHorN, true ); | 115 | addItemBool("ToolBarHorN",&mToolBarHorN, true ); |
116 | addItemBool("ToolBarUpN",&mToolBarUpN, false ); | 116 | addItemBool("ToolBarUpN",&mToolBarUpN, false ); |
117 | addItemBool("ToolBarHorF",&mToolBarHorF, true ); | 117 | addItemBool("ToolBarHorF",&mToolBarHorF, true ); |
118 | addItemBool("ToolBarUpF",&mToolBarUpF, false ); | 118 | addItemBool("ToolBarUpF",&mToolBarUpF, false ); |
119 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); | 119 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); |
120 | addItemBool("WhatsNextTime2Lines",&mWhatsNextTime2Lines, false ); | 120 | addItemBool("WhatsNextTime2Lines",&mWhatsNextTime2Lines, false ); |
121 | addItemInt("Whats Next Days",&mWhatsNextDays,3); | 121 | addItemInt("Whats Next Days",&mWhatsNextDays,3); |
122 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); | 122 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); |
123 | 123 | ||
124 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); | 124 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); |
125 | addItemBool("ShowCompletedTodoInAgenda",&mShowCompletedTodoInAgenda,true); | 125 | addItemBool("ShowCompletedTodoInAgenda",&mShowCompletedTodoInAgenda,true); |
126 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); | 126 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); |
127 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); | 127 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); |
128 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); | 128 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); |
129 | addItemInt("AllDay Size",&mAllDaySize,28); | 129 | addItemInt("AllDay Size",&mAllDaySize,28); |
130 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; | 130 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; |
131 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); | 131 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); |
132 | 132 | ||
133 | addItemStringList("LocationDefaults",&mLocationDefaults ); | 133 | addItemStringList("LocationDefaults",&mLocationDefaults ); |
134 | addItemStringList("EventSummary User",&mEventSummaryUser); | 134 | addItemStringList("EventSummary User",&mEventSummaryUser); |
135 | addItemStringList("TodoSummary User",&mTodoSummaryUser); | 135 | addItemStringList("TodoSummary User",&mTodoSummaryUser); |
136 | addItemStringList("JournalSummary User",&mJournalSummaryUser); | 136 | addItemStringList("JournalSummary User",&mJournalSummaryUser); |
137 | 137 | ||
138 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 138 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
139 | addItemBool("Enable Project View",&mEnableProjectView,false); | 139 | addItemBool("Enable Project View",&mEnableProjectView,false); |
140 | addItemBool("Auto Save",&mAutoSave,false); | 140 | addItemBool("Auto Save",&mAutoSave,false); |
141 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); | 141 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); |
142 | addItemBool("Confirm Deletes",&mConfirm,true); | 142 | addItemBool("Confirm Deletes",&mConfirm,true); |
143 | addItemString("Archive File",&mArchiveFile); | 143 | addItemString("Archive File",&mArchiveFile); |
144 | addItemString("Html Export File",&mHtmlExportFile, | 144 | addItemString("Html Export File",&mHtmlExportFile, |
145 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); | 145 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); |
146 | addItemBool("Html With Save",&mHtmlWithSave,false); | 146 | addItemBool("Html With Save",&mHtmlWithSave,false); |
147 | 147 | ||
148 | KPrefs::setCurrentGroup("Personal Settings"); | 148 | KPrefs::setCurrentGroup("Personal Settings"); |
149 | 149 | ||
150 | addItemInt("Mail Client",&mMailClient,MailClientKMail); | 150 | addItemInt("Mail Client",&mMailClient,MailClientKMail); |
151 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); | 151 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); |
152 | addItemBool("Bcc",&mBcc,false); | 152 | addItemBool("Bcc",&mBcc,false); |
153 | 153 | ||
154 | KPrefs::setCurrentGroup("Time & Date"); | 154 | KPrefs::setCurrentGroup("Time & Date"); |
155 | 155 | ||
156 | 156 | ||
157 | addItemInt("Default Start Time",&mStartTime,10); | 157 | addItemInt("Default Start Time",&mStartTime,10); |
158 | addItemInt("Default Duration",&mDefaultDuration,2); | 158 | addItemInt("Default Duration",&mDefaultDuration,2); |
159 | addItemInt("Default Alarm Time",&mAlarmTime,3); | 159 | addItemInt("Default Alarm Time",&mAlarmTime,3); |
160 | KPrefs::setCurrentGroup("AlarmSettings"); | 160 | KPrefs::setCurrentGroup("AlarmSettings"); |
161 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); | 161 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); |
162 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); | 162 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); |
163 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); | 163 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); |
164 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); | 164 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); |
165 | 165 | ||
166 | 166 | ||
167 | KPrefs::setCurrentGroup("Calendar"); | 167 | KPrefs::setCurrentGroup("Calendar"); |
168 | 168 | ||
169 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); | 169 | addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); |
170 | 170 | ||
171 | KPrefs::setCurrentGroup("Fonts"); | 171 | KPrefs::setCurrentGroup("Fonts"); |
172 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); | 172 | // qDebug(" KPrefs::setCurrentGroup(Fonts); "); |
173 | QFont fon = KGlobalSettings::generalFont(); | 173 | QFont fon = KGlobalSettings::generalFont(); |
174 | addItemFont("TimeBar Font",&mTimeBarFont,fon ); | 174 | addItemFont("TimeBar Font",&mTimeBarFont,fon ); |
175 | addItemFont("MonthView Font",&mMonthViewFont,fon); | 175 | addItemFont("MonthView Font",&mMonthViewFont,fon); |
176 | addItemFont("AgendaView Font",&mAgendaViewFont,fon); | 176 | addItemFont("AgendaView Font",&mAgendaViewFont,fon); |
177 | addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); | 177 | addItemFont("MarcusBains Font",&mMarcusBainsFont,fon); |
178 | addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); | 178 | addItemFont("TimeLabels Font",&mTimeLabelsFont,fon); |
179 | addItemFont("TodoView Font",&mTodoViewFont,fon); | 179 | addItemFont("TodoView Font",&mTodoViewFont,fon); |
180 | addItemFont("ListView Font",&mListViewFont,fon); | 180 | addItemFont("ListView Font",&mListViewFont,fon); |
181 | addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); | 181 | addItemFont("DateNavigator Font",&mDateNavigatorFont,fon); |
182 | addItemFont("EditBox Font",&mEditBoxFont,fon); | 182 | addItemFont("EditBox Font",&mEditBoxFont,fon); |
183 | addItemFont("JournalView Font",&mJornalViewFont,fon); | 183 | addItemFont("JournalView Font",&mJornalViewFont,fon); |
184 | addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); | 184 | addItemFont("WhatsNextView Font",&mWhatsNextFont,fon); |
185 | addItemFont("EventView Font",&mEventViewFont,fon); | 185 | addItemFont("EventView Font",&mEventViewFont,fon); |
186 | 186 | ||
187 | KPrefs::setCurrentGroup("RemoteSyncing"); | 187 | KPrefs::setCurrentGroup("RemoteSyncing"); |
188 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); | 188 | addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); |
189 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); | 189 | addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); |
190 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); | 190 | addItemBool("ShowSyncEvents",&mShowSyncEvents,false); |
191 | addItemInt("LastSyncTime",&mLastSyncTime,0); | 191 | addItemInt("LastSyncTime",&mLastSyncTime,0); |
192 | 192 | ||
193 | #ifdef _WIN32_ | 193 | #ifdef _WIN32_ |
194 | QString hdp= locateLocal("data","korganizer")+"\\\\"; | 194 | QString hdp= locateLocal("data","korganizer")+"\\\\"; |
195 | #else | 195 | #else |
196 | QString hdp= locateLocal("data","korganizer")+"/"; | 196 | QString hdp= locateLocal("data","korganizer")+"/"; |
197 | #endif | 197 | #endif |
198 | 198 | ||
199 | KPrefs::setCurrentGroup("LoadSaveFileNames"); | 199 | KPrefs::setCurrentGroup("LoadSaveFileNames"); |
200 | 200 | ||
201 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); | 201 | addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); |
202 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); | 202 | addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); |
203 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); | 203 | addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); |
204 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); | 204 | addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); |
205 | 205 | ||
206 | 206 | ||
207 | KPrefs::setCurrentGroup("Locale"); | 207 | KPrefs::setCurrentGroup("Locale"); |
208 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 208 | addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
209 | 209 | ||
210 | 210 | ||
211 | KPrefs::setCurrentGroup("Colors"); | 211 | KPrefs::setCurrentGroup("Colors"); |
212 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); | 212 | addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); |
213 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); | 213 | addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); |
214 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); | 214 | addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); |
215 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); | 215 | addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); |
216 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); | 216 | addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); |
217 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); | 217 | addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); |
218 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); | 218 | addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); |
219 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); | 219 | addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); |
220 | addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); | 220 | addItemColor("Todo running Color",&mTodoRunColor,defaultTodoRunColor); |
221 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); | 221 | addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); |
222 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); | 222 | addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); |
223 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); | 223 | addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); |
224 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); | 224 | addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); |
225 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); | 225 | addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); |
226 | addItemBool("MonthViewWeek",&mMonthViewWeek,false); | 226 | addItemBool("MonthViewWeek",&mMonthViewWeek,false); |
227 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); | 227 | addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); |
228 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); | 228 | addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); |
229 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); | 229 | addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); |
230 | addItemBool("UseAppColors",&mUseAppColors,false); | 230 | addItemBool("UseAppColors",&mUseAppColors,false); |
231 | 231 | ||
232 | 232 | ||
233 | 233 | KPrefs::setCurrentGroup("Conflicts"); | |
234 | addItemBool("EnableAutoDetect",&mDetectConflicts,true); | ||
235 | addItemBool("CheckConflictsAllDayAllDay",&mCheckConflictsAllDayAllDay,false); | ||
236 | addItemBool("CheckConflictsAllDayNonAD",&mCheckConflictsAllDayNonAD,false); | ||
237 | addItemBool("CheckConflictsNonADAllDay",&mCheckConflictsNonADAllDay,false); | ||
238 | addItemBool("CheckConflictsNonADNonAD",&mCheckConflictsNonADNonAD,true); | ||
239 | addItemString("FilterConflictEditItem", &mFilterConflictEditItem ,"nofilter" ); | ||
240 | addItemString("FilterConflictAllItem", &mFilterConflictAllItem ,"nofilter" ); | ||
241 | |||
234 | KPrefs::setCurrentGroup("Views"); | 242 | KPrefs::setCurrentGroup("Views"); |
235 | addItemBool("Block Popup Menu",&mBlockPopupMenu,false); | 243 | addItemBool("Block Popup Menu",&mBlockPopupMenu,false); |
236 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); | 244 | addItemBool("Show Date Navigator",&mShowDateNavigator,true); |
237 | addItemInt("Hour Size",&mHourSize,8); | 245 | addItemInt("Hour Size",&mHourSize,8); |
238 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); | 246 | addItemBool("Show Daily Recurrences",&mDailyRecur,true); |
239 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); | 247 | addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); |
240 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); | 248 | addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); |
241 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); | 249 | addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); |
242 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); | 250 | addItemBool("ShowShortMonthName",&mMonthShowShort,false); |
243 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); | 251 | addItemBool("ShowIconsInMonthCell",&mMonthShowIcons,true); |
244 | addItemBool("ShowTimesInMonthCell",&mMonthShowTimes,true); | 252 | addItemBool("ShowTimesInMonthCell",&mMonthShowTimes,true); |
245 | #ifdef DESKTOP_VERION | 253 | #ifdef DESKTOP_VERION |
246 | addItemBool("Enable ToolTips",&mEnableToolTips,true); | 254 | addItemBool("Enable ToolTips",&mEnableToolTips,true); |
247 | #else | 255 | #else |
248 | addItemBool("Enable ToolTips",&mEnableToolTips,false); | 256 | addItemBool("Enable ToolTips",&mEnableToolTips,false); |
249 | #endif | 257 | #endif |
250 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); | 258 | addItemBool("Enable MonthView ScrollBars",&mEnableMonthScroll,false); |
251 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); | 259 | addItemBool("Marcus Bains shows seconds",&mMarcusBainsShowSeconds,false); |
252 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); | 260 | addItemBool("Show Marcus Bains",&mMarcusBainsEnabled,true); |
253 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); | 261 | addItemBool("EditOnDoubleClick",&mEditOnDoubleClick,true); |
254 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); | 262 | addItemBool("ViewChangeHoldFullscreen",&mViewChangeHoldFullscreen,true); |
255 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); | 263 | addItemBool("ViewChangeHoldNonFullscreen",&mViewChangeHoldNonFullscreen,false); |
256 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); | 264 | addItemBool("CenterOnCurrentTime",&mCenterOnCurrentTime,false); |
257 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); | 265 | addItemBool("SetTimeToDayStartAt",&mSetTimeToDayStartAt,true); |
258 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); | 266 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); |
259 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; | 267 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; |
260 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); | 268 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); |
261 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); | 269 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); |
262 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); | 270 | addItemBool("UseHighlightLightColor",&mUseHighlightLightColor,false); |
263 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); | 271 | addItemBool("ListViewMonthTimespan",&mListViewMonthTimespan,true); |
264 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); | 272 | addItemBool("TodoViewUsesCatColors",&mTodoViewUsesCatColors,false); |
265 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); | 273 | addItemBool("TodoViewShowsPercentage",&mTodoViewShowsPercentage,false); |
266 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); | 274 | addItemBool("TodoViewUsesSmallFont",&mTodoViewUsesSmallFont,true); |
267 | addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); | 275 | addItemBool("MonthViewUsesBigFont",&mMonthViewUsesBigFont,true); |
268 | addItemBool("MonthViewWeekRowlayout",&mMonthViewWeekRowlayout,false); | 276 | addItemBool("MonthViewWeekRowlayout",&mMonthViewWeekRowlayout,false); |
269 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); | 277 | addItemBool("TodoViewUsesForegroundColor",&mTodoViewUsesForegroundColor,false); |
270 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); | 278 | addItemBool("MonthViewUsesForegroundColor",&mMonthViewUsesForegroundColor,false); |
271 | #ifdef DESKTOP_VERSION | 279 | #ifdef DESKTOP_VERSION |
272 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); | 280 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,true); |
273 | #else | 281 | #else |
274 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); | 282 | addItemBool("UseInternalAlarmNotification",&mUseInternalAlarmNotification,false); |
275 | #endif | 283 | #endif |
276 | addItemInt("Day Begins",&mDayBegins,7); | 284 | addItemInt("Day Begins",&mDayBegins,7); |
277 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); | 285 | addItemInt("Working Hours Start",&mWorkingHoursStart,8); |
278 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); | 286 | addItemInt("Working Hours End",&mWorkingHoursEnd,17); |
279 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); | 287 | addItemBool("Exclude Holidays",&mExcludeHolidays,true); |
280 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); | 288 | addItemBool("Exclude Saturdays",&mExcludeSaturdays,true); |
281 | 289 | ||
282 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); | 290 | addItemBool("Month View Uses Category Color",&mMonthViewUsesCategoryColor,false); |
283 | addItemBool("Full View Month",&mFullViewMonth,true); | 291 | addItemBool("Full View Month",&mFullViewMonth,true); |
284 | addItemBool("Full View Todo",&mFullViewTodo,true); | 292 | addItemBool("Full View Todo",&mFullViewTodo,true); |
285 | addItemBool("Quick Todo",&mEnableQuickTodo,false); | 293 | addItemBool("Quick Todo",&mEnableQuickTodo,false); |
286 | 294 | ||
287 | addItemInt("Next X Days",&mNextXDays,3); | 295 | addItemInt("Next X Days",&mNextXDays,3); |
288 | 296 | ||
289 | KPrefs::setCurrentGroup("Printer"); | 297 | KPrefs::setCurrentGroup("Printer"); |
290 | 298 | ||
291 | KPrefs::setCurrentGroup("Layout"); | 299 | KPrefs::setCurrentGroup("Layout"); |
292 | 300 | ||
293 | addItemBool("CompactDialogs",&mCompactDialogs,false); | 301 | addItemBool("CompactDialogs",&mCompactDialogs,false); |
294 | addItemBool("VerticalScreen",&mVerticalScreen,true); | 302 | addItemBool("VerticalScreen",&mVerticalScreen,true); |
295 | 303 | ||
296 | KPrefs::setCurrentGroup("KOrganizer Plugins"); | 304 | KPrefs::setCurrentGroup("KOrganizer Plugins"); |
297 | 305 | ||
298 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); | 306 | addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); |
299 | 307 | ||
300 | KPrefs::setCurrentGroup("Group Scheduling"); | 308 | KPrefs::setCurrentGroup("Group Scheduling"); |
301 | 309 | ||
302 | addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); | 310 | addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); |
303 | addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); | 311 | addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); |
304 | addItemStringList("AdditionalMails",&mAdditionalMails,""); | 312 | addItemStringList("AdditionalMails",&mAdditionalMails,""); |
305 | addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); | 313 | addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); |
306 | addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); | 314 | addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); |
307 | addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); | 315 | addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); |
308 | addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); | 316 | addItemInt("IMIP auto FreeBusy",&mIMIPAutoFreeBusy,neverAuto); |
309 | addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); | 317 | addItemInt("IMIP auto save FreeBusy",&mIMIPAutoFreeBusyReply,neverAuto); |
310 | 318 | ||
311 | KPrefs::setCurrentGroup( "Editors" ); | 319 | KPrefs::setCurrentGroup( "Editors" ); |
312 | 320 | ||
313 | addItemStringList( "EventTemplates", &mEventTemplates ); | 321 | addItemStringList( "EventTemplates", &mEventTemplates ); |
314 | addItemStringList( "TodoTemplates", &mTodoTemplates ); | 322 | addItemStringList( "TodoTemplates", &mTodoTemplates ); |
315 | 323 | ||
316 | addItemInt("DestinationPolicy",&mDestination,standardDestination); | 324 | addItemInt("DestinationPolicy",&mDestination,standardDestination); |
317 | 325 | ||
318 | KPrefs::setCurrentGroup( "ViewOptions" ); | 326 | KPrefs::setCurrentGroup( "ViewOptions" ); |
319 | addItemBool("EVshowDetails",&mEVshowDetails,true); | 327 | addItemBool("EVshowDetails",&mEVshowDetails,true); |
320 | addItemBool("EVshowCreated",&mEVshowCreated,true); | 328 | addItemBool("EVshowCreated",&mEVshowCreated,true); |
321 | addItemBool("EVshowChanged",&mEVshowChanged,true); | 329 | addItemBool("EVshowChanged",&mEVshowChanged,true); |
322 | addItemBool("WTshowDetails",&mWTshowDetails,false); | 330 | addItemBool("WTshowDetails",&mWTshowDetails,false); |
323 | addItemBool("WTshowCreated",&mWTshowCreated,false); | 331 | addItemBool("WTshowCreated",&mWTshowCreated,false); |
324 | addItemBool("WTshowChanged",&mWTshowChanged,false); | 332 | addItemBool("WTshowChanged",&mWTshowChanged,false); |
325 | mCalendars.setAutoDelete( true ); | 333 | mCalendars.setAutoDelete( true ); |
326 | } | 334 | } |
327 | 335 | ||
328 | 336 | ||
329 | KOPrefs::~KOPrefs() | 337 | KOPrefs::~KOPrefs() |
330 | { | 338 | { |
331 | if (mInstance == this) | 339 | if (mInstance == this) |
332 | mInstance = insd.setObject(0); | 340 | mInstance = insd.setObject(0); |
333 | mCalendars.setAutoDelete( true ); | 341 | mCalendars.setAutoDelete( true ); |
334 | mCalendars.clear(); | 342 | mCalendars.clear(); |
335 | //qDebug("KOPrefs::~KOPrefs() "); | 343 | //qDebug("KOPrefs::~KOPrefs() "); |
336 | } | 344 | } |
337 | 345 | ||
338 | 346 | ||
339 | KOPrefs *KOPrefs::instance() | 347 | KOPrefs *KOPrefs::instance() |
340 | { | 348 | { |
341 | if (!mInstance) { | 349 | if (!mInstance) { |
342 | mInstance = insd.setObject(new KOPrefs()); | 350 | mInstance = insd.setObject(new KOPrefs()); |
343 | mInstance->readConfig(); | 351 | mInstance->readConfig(); |
344 | } | 352 | } |
345 | 353 | ||
346 | return mInstance; | 354 | return mInstance; |
347 | } | 355 | } |
348 | 356 | ||
349 | void KOPrefs::usrSetDefaults() | 357 | void KOPrefs::usrSetDefaults() |
350 | { | 358 | { |
351 | 359 | ||
352 | } | 360 | } |
353 | 361 | ||
354 | void KOPrefs::fillMailDefaults() | 362 | void KOPrefs::fillMailDefaults() |
355 | { | 363 | { |
356 | if (mName.isEmpty()) mName = i18n("Anonymous"); | 364 | if (mName.isEmpty()) mName = i18n("Anonymous"); |
357 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); | 365 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); |
358 | } | 366 | } |
359 | 367 | ||
360 | void KOPrefs::setTimeZoneIdDefault() | 368 | void KOPrefs::setTimeZoneIdDefault() |
361 | { | 369 | { |
362 | ; | 370 | ; |
363 | } | 371 | } |
364 | 372 | ||
365 | void KOPrefs::setAllDefaults() | 373 | void KOPrefs::setAllDefaults() |
366 | { | 374 | { |
367 | setCategoryDefaults(); | 375 | setCategoryDefaults(); |
368 | mEventSummaryUser = getDefaultList() ; | 376 | mEventSummaryUser = getDefaultList() ; |
369 | mTodoSummaryUser = getDefaultList() ; | 377 | mTodoSummaryUser = getDefaultList() ; |
370 | mJournalSummaryUser = getDefaultList() ; | 378 | mJournalSummaryUser = getDefaultList() ; |
371 | mLocationDefaults = getLocationDefaultList(); | 379 | mLocationDefaults = getLocationDefaultList(); |
372 | } | 380 | } |
373 | 381 | ||
374 | void KOPrefs::setCategoryDefaults() | 382 | void KOPrefs::setCategoryDefaults() |
375 | { | 383 | { |
376 | mCustomCategories.clear(); | 384 | mCustomCategories.clear(); |
377 | mCustomCategories = getDefaultList(); | 385 | mCustomCategories = getDefaultList(); |
378 | 386 | ||
379 | QStringList::Iterator it; | 387 | QStringList::Iterator it; |
380 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 388 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
381 | setCategoryColor(*it,mDefaultCategoryColor); | 389 | setCategoryColor(*it,mDefaultCategoryColor); |
382 | } | 390 | } |
383 | } | 391 | } |
384 | QStringList KOPrefs::getLocationDefaultList() | 392 | QStringList KOPrefs::getLocationDefaultList() |
385 | { | 393 | { |
386 | QStringList retval ; | 394 | QStringList retval ; |
387 | retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") | 395 | retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") |
388 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") | 396 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") |
389 | << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") | 397 | << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") |
390 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; | 398 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; |
391 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") | 399 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") |
392 | 400 | ||
393 | retval.sort(); | 401 | retval.sort(); |
394 | return retval; | 402 | return retval; |
395 | } | 403 | } |
396 | QStringList KOPrefs::getDefaultList() | 404 | QStringList KOPrefs::getDefaultList() |
397 | { | 405 | { |
398 | QStringList retval ; | 406 | QStringList retval ; |
399 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Customer") | 407 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Customer") |
400 | << i18n("Break") | 408 | << i18n("Break") |
401 | << i18n("Family") << i18n("Favorites") << i18n("Fishing") << i18n("Gifts") | 409 | << i18n("Family") << i18n("Favorites") << i18n("Fishing") << i18n("Gifts") |
402 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") | 410 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") |
403 | << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner") << i18n("Personal") | 411 | << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner") << i18n("Personal") |
404 | << i18n("PHB") << i18n("Phone Calls") << i18n("Shopping") | 412 | << i18n("PHB") << i18n("Phone Calls") << i18n("Shopping") |
405 | << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV") | 413 | << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV") |
406 | << i18n("Vacation") ; | 414 | << i18n("Vacation") ; |
407 | retval.sort(); | 415 | retval.sort(); |
408 | //qDebug("cat %s ", retval.join("-").latin1()); | 416 | //qDebug("cat %s ", retval.join("-").latin1()); |
409 | return retval; | 417 | return retval; |
410 | } | 418 | } |
411 | // << i18n("Business Travel") << i18n("Education") << i18n("Hiking") << i18n("Hunting") << i18n("Recurring") << i18n("Personal Travel") << i18n("Speach") << i18n("Festival") << i18n("Competition")<< i18n("Party")<< i18n("Projects")<< i18n("Kids") << i18n("Special Occasion")<< i18n("Breakfast")<< i18n("Dinner") << i18n("Lunch")<< i18n("University")<< i18n("School")<< i18n("Flight")<< i18n("Key Customer") << i18n("VIP") << i18n("SyncEvent") << i18n("Cinema") | 419 | // << i18n("Business Travel") << i18n("Education") << i18n("Hiking") << i18n("Hunting") << i18n("Recurring") << i18n("Personal Travel") << i18n("Speach") << i18n("Festival") << i18n("Competition")<< i18n("Party")<< i18n("Projects")<< i18n("Kids") << i18n("Special Occasion")<< i18n("Breakfast")<< i18n("Dinner") << i18n("Lunch")<< i18n("University")<< i18n("School")<< i18n("Flight")<< i18n("Key Customer") << i18n("VIP") << i18n("SyncEvent") << i18n("Cinema") |
412 | void KOPrefs::usrReadConfig() | 420 | void KOPrefs::usrReadConfig() |
413 | { | 421 | { |
414 | config()->setGroup("General"); | 422 | config()->setGroup("General"); |
415 | 423 | ||
416 | //qDebug("KOPrefs::usrReadConfig() "); | 424 | //qDebug("KOPrefs::usrReadConfig() "); |
417 | mCustomCategories = config()->readListEntry("Custom Categories"); | 425 | mCustomCategories = config()->readListEntry("Custom Categories"); |
418 | mOldLoadedLanguage = mOldLanguage ; | 426 | mOldLoadedLanguage = mOldLanguage ; |
419 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; | 427 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; |
420 | if (mLocationDefaults.isEmpty()) { | 428 | if (mLocationDefaults.isEmpty()) { |
421 | mLocationDefaults = getLocationDefaultList(); | 429 | mLocationDefaults = getLocationDefaultList(); |
422 | } | 430 | } |
423 | 431 | ||
424 | if (mEventSummaryUser.isEmpty()) { | 432 | if (mEventSummaryUser.isEmpty()) { |
425 | mEventSummaryUser = getDefaultList() ; | 433 | mEventSummaryUser = getDefaultList() ; |
426 | } | 434 | } |
427 | if (mTodoSummaryUser.isEmpty()) { | 435 | if (mTodoSummaryUser.isEmpty()) { |
428 | mTodoSummaryUser = getDefaultList() ; | 436 | mTodoSummaryUser = getDefaultList() ; |
429 | } | 437 | } |
430 | 438 | ||
431 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); | 439 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); |
432 | 440 | ||
433 | config()->setGroup("Personal Settings"); | 441 | config()->setGroup("Personal Settings"); |
434 | mName = config()->readEntry("user_name",""); | 442 | mName = config()->readEntry("user_name",""); |
435 | mEmail = config()->readEntry("user_email",""); | 443 | mEmail = config()->readEntry("user_email",""); |
436 | fillMailDefaults(); | 444 | fillMailDefaults(); |
437 | 445 | ||
438 | config()->setGroup("Category Colors"); | 446 | config()->setGroup("Category Colors"); |
439 | QStringList::Iterator it; | 447 | QStringList::Iterator it; |
440 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 448 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
441 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); | 449 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); |
442 | 450 | ||
443 | } | 451 | } |
444 | KConfig fc (locateLocal("config","kopicalendarrc")); | 452 | KConfig fc (locateLocal("config","kopicalendarrc")); |
445 | fc.setGroup("CC"); | 453 | fc.setGroup("CC"); |
446 | int numCals = fc.readNumEntry("NumberCalendars",0 ); | 454 | int numCals = fc.readNumEntry("NumberCalendars",0 ); |
447 | mNextAvailableCalendar = 1; | 455 | mNextAvailableCalendar = 1; |
448 | if ( numCals == 0 ) { | 456 | if ( numCals == 0 ) { |
449 | KopiCalendarFile *kkf = getNewCalendar(); | 457 | KopiCalendarFile *kkf = getNewCalendar(); |
450 | kkf->isStandard = true; | 458 | kkf->isStandard = true; |
451 | kkf->mName = i18n("Standard"); | 459 | kkf->mName = i18n("Standard"); |
452 | kkf->mFileName = QDir::convertSeparators( locateLocal( "data", "korganizer/mycalendar.ics" ) ); | 460 | kkf->mFileName = QDir::convertSeparators( locateLocal( "data", "korganizer/mycalendar.ics" ) ); |
453 | } | 461 | } |
454 | while ( mNextAvailableCalendar <= numCals ) { | 462 | while ( mNextAvailableCalendar <= numCals ) { |
455 | //qDebug("Read cal #%d ", mNextAvailableCalendar ); | 463 | //qDebug("Read cal #%d ", mNextAvailableCalendar ); |
456 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); | 464 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); |
457 | KopiCalendarFile *kkf = getNewCalendar(); | 465 | KopiCalendarFile *kkf = getNewCalendar(); |
458 | kkf->isStandard = fc.readBoolEntry( prefix+"_isStandard", false ); | 466 | kkf->isStandard = fc.readBoolEntry( prefix+"_isStandard", false ); |
459 | kkf->isEnabled = fc.readBoolEntry( prefix+"_isEnabled", true); | 467 | kkf->isEnabled = fc.readBoolEntry( prefix+"_isEnabled", true); |
460 | kkf->isRelative = fc.readBoolEntry( prefix+"_isRelative", false ); | 468 | kkf->isRelative = fc.readBoolEntry( prefix+"_isRelative", false ); |
461 | kkf->isAlarmEnabled = fc.readBoolEntry( prefix+"_isAlarmEnabled", true); | 469 | kkf->isAlarmEnabled = fc.readBoolEntry( prefix+"_isAlarmEnabled", true); |
462 | kkf->isReadOnly = fc.readBoolEntry( prefix+"_isReadOnly", false); | 470 | kkf->isReadOnly = fc.readBoolEntry( prefix+"_isReadOnly", false); |
463 | kkf->mName = fc.readEntry( prefix+"_Name", "Calendar"); | 471 | kkf->mName = fc.readEntry( prefix+"_Name", "Calendar"); |
464 | kkf->mFileName = QDir::convertSeparators( fc.readEntry( prefix+"_FileName", kkf->mFileName) ); | 472 | kkf->mFileName = QDir::convertSeparators( fc.readEntry( prefix+"_FileName", kkf->mFileName) ); |
465 | kkf->mSavedFileName = QDir::convertSeparators( fc.readEntry( prefix+"_SavedFileName", kkf->mFileName) ); | 473 | kkf->mSavedFileName = QDir::convertSeparators( fc.readEntry( prefix+"_SavedFileName", kkf->mFileName) ); |
466 | kkf->mDefaultColor = fc.readColorEntry( prefix+"_Color",&mEventColor); | 474 | kkf->mDefaultColor = fc.readColorEntry( prefix+"_Color",&mEventColor); |
467 | if ( kkf->mCalNumber == 1 ) { | 475 | if ( kkf->mCalNumber == 1 ) { |
468 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); | 476 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); |
469 | } | 477 | } |
470 | //qDebug("NAME %s %s", kkf->mName.latin1(), i18n("Birthdays").latin1() ); | 478 | //qDebug("NAME %s %s", kkf->mName.latin1(), i18n("Birthdays").latin1() ); |
471 | if ( kkf->mName == i18n("Birthdays") ) { | 479 | if ( kkf->mName == i18n("Birthdays") ) { |
472 | kkf->mFileName = locateLocal( "data", "korganizer/birthdays.ics" ); | 480 | kkf->mFileName = locateLocal( "data", "korganizer/birthdays.ics" ); |
473 | } | 481 | } |
474 | if ( kkf->isRelative ) | 482 | if ( kkf->isRelative ) |
475 | kkf->mFileName = QDir::convertSeparators( KGlobalSettings::calendarDir() + kkf->mSavedFileName ); | 483 | kkf->mFileName = QDir::convertSeparators( KGlobalSettings::calendarDir() + kkf->mSavedFileName ); |
476 | } | 484 | } |
477 | 485 | ||
478 | KPimPrefs::usrReadConfig(); | 486 | KPimPrefs::usrReadConfig(); |
479 | } | 487 | } |
480 | 488 | ||
481 | KopiCalendarFile * KOPrefs::getCalendar( int num ) | 489 | KopiCalendarFile * KOPrefs::getCalendar( int num ) |
482 | { | 490 | { |
483 | return mDefCalColors[num-1]; | 491 | return mDefCalColors[num-1]; |
484 | } | 492 | } |
485 | 493 | ||
486 | KopiCalendarFile * KOPrefs::getNewCalendar() | 494 | KopiCalendarFile * KOPrefs::getNewCalendar() |
487 | { | 495 | { |
488 | KopiCalendarFile * kkf = new KopiCalendarFile(); | 496 | KopiCalendarFile * kkf = new KopiCalendarFile(); |
489 | kkf->mCalNumber = mNextAvailableCalendar; | 497 | kkf->mCalNumber = mNextAvailableCalendar; |
490 | mDefCalColors.resize( mNextAvailableCalendar ); | 498 | mDefCalColors.resize( mNextAvailableCalendar ); |
491 | mDefCalColors[mNextAvailableCalendar-1] = kkf; | 499 | mDefCalColors[mNextAvailableCalendar-1] = kkf; |
492 | ++mNextAvailableCalendar; | 500 | ++mNextAvailableCalendar; |
493 | kkf->mDefaultColor = mEventColor; | 501 | kkf->mDefaultColor = mEventColor; |
494 | kkf->mName = i18n("New Calendar"); | 502 | kkf->mName = i18n("New Calendar"); |
495 | mCalendars.append( kkf ); | 503 | mCalendars.append( kkf ); |
496 | return kkf; | 504 | return kkf; |
497 | } | 505 | } |
498 | void KOPrefs::deleteCalendar( int num ) | 506 | void KOPrefs::deleteCalendar( int num ) |
499 | { | 507 | { |
500 | KopiCalendarFile * kkf = mCalendars.first(); | 508 | KopiCalendarFile * kkf = mCalendars.first(); |
501 | while ( kkf ) { | 509 | while ( kkf ) { |
502 | if ( kkf->mCalNumber == num ) { | 510 | if ( kkf->mCalNumber == num ) { |
503 | qDebug("KOPrefs::deleteCalendar %d ", num ); | 511 | qDebug("KOPrefs::deleteCalendar %d ", num ); |
504 | mCalendars.remove( kkf ); | 512 | mCalendars.remove( kkf ); |
505 | delete kkf; | 513 | delete kkf; |
506 | return; | 514 | return; |
507 | } | 515 | } |
508 | kkf = mCalendars.next(); | 516 | kkf = mCalendars.next(); |
509 | } | 517 | } |
510 | } | 518 | } |
511 | int KOPrefs::getCalendarID( const QString & name ) | 519 | int KOPrefs::getCalendarID( const QString & name ) |
512 | { | 520 | { |
513 | KopiCalendarFile * kkf = mCalendars.first(); | 521 | KopiCalendarFile * kkf = mCalendars.first(); |
514 | while ( kkf ) { | 522 | while ( kkf ) { |
515 | if ( name == kkf->mName) | 523 | if ( name == kkf->mName) |
516 | return kkf->mCalNumber; | 524 | return kkf->mCalNumber; |
517 | kkf = mCalendars.next(); | 525 | kkf = mCalendars.next(); |
518 | } | 526 | } |
519 | return 1; | 527 | return 1; |
520 | } | 528 | } |
521 | QString KOPrefs::calName( int calNum) const | 529 | QString KOPrefs::calName( int calNum) const |
522 | { | 530 | { |
523 | return (mDefCalColors[calNum-1])->mName; | 531 | return (mDefCalColors[calNum-1])->mName; |
524 | } | 532 | } |
525 | QColor KOPrefs::defaultColor( int calNum ) const | 533 | QColor KOPrefs::defaultColor( int calNum ) const |
526 | { | 534 | { |
527 | if ( calNum == 1 ) return mEventColor; | 535 | if ( calNum == 1 ) return mEventColor; |
528 | return (mDefCalColors[calNum-1])->mDefaultColor; | 536 | return (mDefCalColors[calNum-1])->mDefaultColor; |
529 | } | 537 | } |
530 | void KOPrefs::usrWriteConfig() | 538 | void KOPrefs::usrWriteConfig() |
531 | { | 539 | { |
532 | config()->setGroup("General"); | 540 | config()->setGroup("General"); |
533 | config()->writeEntry("Custom Categories",mCustomCategories); | 541 | config()->writeEntry("Custom Categories",mCustomCategories); |
534 | 542 | ||
535 | config()->setGroup("Personal Settings"); | 543 | config()->setGroup("Personal Settings"); |
536 | config()->writeEntry("user_name",mName); | 544 | config()->writeEntry("user_name",mName); |
537 | config()->writeEntry("user_email",mEmail); | 545 | config()->writeEntry("user_email",mEmail); |
538 | 546 | ||
539 | config()->setGroup("Category Colors"); | 547 | config()->setGroup("Category Colors"); |
540 | QDictIterator<QColor> it(mCategoryColors); | 548 | QDictIterator<QColor> it(mCategoryColors); |
541 | while (it.current()) { | 549 | while (it.current()) { |
542 | config()->writeEntry(it.currentKey(),*(it.current())); | 550 | config()->writeEntry(it.currentKey(),*(it.current())); |
543 | ++it; | 551 | ++it; |
544 | } | 552 | } |
545 | KConfig fc (locateLocal("config","kopicalendarrc")); | 553 | KConfig fc (locateLocal("config","kopicalendarrc")); |
546 | fc.setGroup("CC"); | 554 | fc.setGroup("CC"); |
547 | fc.deleteGroup( "CC"); | 555 | fc.deleteGroup( "CC"); |
548 | fc.setGroup("CC"); | 556 | fc.setGroup("CC"); |
549 | fc.writeEntry("NumberCalendars",mCalendars.count()); | 557 | fc.writeEntry("NumberCalendars",mCalendars.count()); |
550 | int numCal = 1; | 558 | int numCal = 1; |
551 | int writeCal = 0; | 559 | int writeCal = 0; |
552 | while ( numCal < mNextAvailableCalendar ) { | 560 | while ( numCal < mNextAvailableCalendar ) { |
553 | KopiCalendarFile * kkf = mCalendars.first(); | 561 | KopiCalendarFile * kkf = mCalendars.first(); |
554 | while ( kkf ) { | 562 | while ( kkf ) { |
555 | //qDebug("cal num %d %d ", kkf->mCalNumber, numCal); | 563 | //qDebug("cal num %d %d ", kkf->mCalNumber, numCal); |
556 | if ( kkf->mCalNumber == numCal ) { | 564 | if ( kkf->mCalNumber == numCal ) { |
557 | ++writeCal; | 565 | ++writeCal; |
558 | //qDebug("Write calendar %d %d ", numCal , writeCal); | 566 | //qDebug("Write calendar %d %d ", numCal , writeCal); |
559 | QString prefix = "Cal_" + QString::number( writeCal ); | 567 | QString prefix = "Cal_" + QString::number( writeCal ); |
560 | fc.writeEntry( prefix+"_isStandard", kkf->isStandard ); | 568 | fc.writeEntry( prefix+"_isStandard", kkf->isStandard ); |
561 | fc.writeEntry( prefix+"_isEnabled", kkf->isEnabled ); | 569 | fc.writeEntry( prefix+"_isEnabled", kkf->isEnabled ); |
562 | fc.writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled ); | 570 | fc.writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled ); |
563 | fc.writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); | 571 | fc.writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); |
564 | fc.writeEntry( prefix+"_isRelative", kkf->isRelative ); | 572 | fc.writeEntry( prefix+"_isRelative", kkf->isRelative ); |
565 | fc.writeEntry( prefix+"_Name", kkf->mName); | 573 | fc.writeEntry( prefix+"_Name", kkf->mName); |
566 | fc.writeEntry( prefix+"_FileName", kkf->mFileName); | 574 | fc.writeEntry( prefix+"_FileName", kkf->mFileName); |
567 | fc.writeEntry( prefix+"_SavedFileName", kkf->mSavedFileName); | 575 | fc.writeEntry( prefix+"_SavedFileName", kkf->mSavedFileName); |
568 | fc.writeEntry( prefix+"_Color",kkf->mDefaultColor); | 576 | fc.writeEntry( prefix+"_Color",kkf->mDefaultColor); |
569 | } | 577 | } |
570 | kkf = mCalendars.next(); | 578 | kkf = mCalendars.next(); |
571 | } | 579 | } |
572 | ++numCal; | 580 | ++numCal; |
573 | } | 581 | } |
574 | fc.sync(); | 582 | fc.sync(); |
575 | KPimPrefs::usrWriteConfig(); | 583 | KPimPrefs::usrWriteConfig(); |
576 | } | 584 | } |
577 | 585 | ||
578 | void KOPrefs::setCategoryColor(QString cat,const QColor & color) | 586 | void KOPrefs::setCategoryColor(QString cat,const QColor & color) |
579 | { | 587 | { |
580 | mCategoryColors.replace(cat,new QColor(color)); | 588 | mCategoryColors.replace(cat,new QColor(color)); |
581 | } | 589 | } |
582 | 590 | ||
583 | QColor *KOPrefs::categoryColor(QString cat) | 591 | QColor *KOPrefs::categoryColor(QString cat) |
584 | { | 592 | { |
585 | QColor *color = 0; | 593 | QColor *color = 0; |
586 | 594 | ||
587 | if (!cat.isEmpty()) color = mCategoryColors[cat]; | 595 | if (!cat.isEmpty()) color = mCategoryColors[cat]; |
588 | 596 | ||
589 | if (color) return color; | 597 | if (color) return color; |
590 | else return &mDefaultCategoryColor; | 598 | else return &mDefaultCategoryColor; |
591 | } | 599 | } |
592 | 600 | ||
593 | void KOPrefs::setFullName(const QString &name) | 601 | void KOPrefs::setFullName(const QString &name) |
594 | { | 602 | { |
595 | mName = name; | 603 | mName = name; |
596 | } | 604 | } |
597 | 605 | ||
598 | void KOPrefs::setEmail(const QString &email) | 606 | void KOPrefs::setEmail(const QString &email) |
599 | { | 607 | { |
600 | //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); | 608 | //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); |
601 | mEmail = email; | 609 | mEmail = email; |
602 | } | 610 | } |
603 | 611 | ||
604 | QString KOPrefs::fullName() | 612 | QString KOPrefs::fullName() |
605 | { | 613 | { |
606 | if (mEmailControlCenter) { | 614 | if (mEmailControlCenter) { |
607 | KEMailSettings settings; | 615 | KEMailSettings settings; |
608 | return settings.getSetting(KEMailSettings::RealName); | 616 | return settings.getSetting(KEMailSettings::RealName); |
609 | } else { | 617 | } else { |
610 | return mName; | 618 | return mName; |
611 | } | 619 | } |
612 | } | 620 | } |
613 | 621 | ||
614 | QString KOPrefs::email() | 622 | QString KOPrefs::email() |
615 | { | 623 | { |
616 | if (mEmailControlCenter) { | 624 | if (mEmailControlCenter) { |
617 | KEMailSettings settings; | 625 | KEMailSettings settings; |
618 | return settings.getSetting(KEMailSettings::EmailAddress); | 626 | return settings.getSetting(KEMailSettings::EmailAddress); |
619 | } else { | 627 | } else { |
620 | return mEmail; | 628 | return mEmail; |
621 | } | 629 | } |
622 | } | 630 | } |
623 | KConfig* KOPrefs::getConfig() | 631 | KConfig* KOPrefs::getConfig() |
624 | { | 632 | { |
625 | return config(); | 633 | return config(); |
626 | } | 634 | } |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 9749ba3..576edf9 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -1,365 +1,374 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,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 KOPREFS_H | 23 | #ifndef KOPREFS_H |
24 | #define KOPREFS_H | 24 | #define KOPREFS_H |
25 | 25 | ||
26 | 26 | ||
27 | #include <libkdepim/kpimprefs.h> | 27 | #include <libkdepim/kpimprefs.h> |
28 | #include <qdict.h> | 28 | #include <qdict.h> |
29 | #include <qdir.h> | 29 | #include <qdir.h> |
30 | #include <qobject.h> | 30 | #include <qobject.h> |
31 | 31 | ||
32 | class KConfig; | 32 | class KConfig; |
33 | class QFont; | 33 | class QFont; |
34 | class QColor; | 34 | class QColor; |
35 | class QStringList; | 35 | class QStringList; |
36 | 36 | ||
37 | #define VIEW_WN_VIEW 1 | 37 | #define VIEW_WN_VIEW 1 |
38 | #define VIEW_NX_VIEW 2 | 38 | #define VIEW_NX_VIEW 2 |
39 | #define VIEW_J_VIEW 3 | 39 | #define VIEW_J_VIEW 3 |
40 | #define VIEW_A_VIEW 4 | 40 | #define VIEW_A_VIEW 4 |
41 | #define VIEW_ML_VIEW 5 | 41 | #define VIEW_ML_VIEW 5 |
42 | #define VIEW_M_VIEW 6 | 42 | #define VIEW_M_VIEW 6 |
43 | #define VIEW_L_VIEW 7 | 43 | #define VIEW_L_VIEW 7 |
44 | #define VIEW_T_VIEW 8 | 44 | #define VIEW_T_VIEW 8 |
45 | 45 | ||
46 | class KopiCalendarFile : public QObject | 46 | class KopiCalendarFile : public QObject |
47 | { | 47 | { |
48 | public: | 48 | public: |
49 | KopiCalendarFile( ) : QObject( ) | 49 | KopiCalendarFile( ) : QObject( ) |
50 | { | 50 | { |
51 | isStandard = false; | 51 | isStandard = false; |
52 | isEnabled = true; | 52 | isEnabled = true; |
53 | isAlarmEnabled = true; | 53 | isAlarmEnabled = true; |
54 | isReadOnly = false; | 54 | isReadOnly = false; |
55 | mName = "Calendar"; | 55 | mName = "Calendar"; |
56 | mFileName = QDir::homeDirPath() + "/icalfile.ics"; | 56 | mFileName = QDir::homeDirPath() + "/icalfile.ics"; |
57 | mSavedFileName = "icalfile.ics"; | 57 | mSavedFileName = "icalfile.ics"; |
58 | mCalNumber = 0; | 58 | mCalNumber = 0; |
59 | mDefaultColor = Qt::red; | 59 | mDefaultColor = Qt::red; |
60 | mErrorOnLoad = false; | 60 | mErrorOnLoad = false; |
61 | isRelative = false; | 61 | isRelative = false; |
62 | } | 62 | } |
63 | bool isStandard; | 63 | bool isStandard; |
64 | bool isEnabled; | 64 | bool isEnabled; |
65 | bool isAlarmEnabled; | 65 | bool isAlarmEnabled; |
66 | bool isReadOnly; | 66 | bool isReadOnly; |
67 | bool mErrorOnLoad; | 67 | bool mErrorOnLoad; |
68 | QString mName; | 68 | QString mName; |
69 | QString mFileName; | 69 | QString mFileName; |
70 | QString mSavedFileName; | 70 | QString mSavedFileName; |
71 | bool isRelative; | 71 | bool isRelative; |
72 | int mCalNumber; | 72 | int mCalNumber; |
73 | QColor mDefaultColor; | 73 | QColor mDefaultColor; |
74 | QDateTime mLoadDt; | 74 | QDateTime mLoadDt; |
75 | }; | 75 | }; |
76 | class KOPrefs : public KPimPrefs | 76 | class KOPrefs : public KPimPrefs |
77 | { | 77 | { |
78 | public: | 78 | public: |
79 | enum { FormatVCalendar, FormatICalendar }; | 79 | enum { FormatVCalendar, FormatICalendar }; |
80 | enum { MailClientKMail, MailClientSendmail }; | 80 | enum { MailClientKMail, MailClientSendmail }; |
81 | enum { IMIPDummy, IMIPKMail }; | 81 | enum { IMIPDummy, IMIPKMail }; |
82 | enum { IMIPOutbox, IMIPdirectsend }; | 82 | enum { IMIPOutbox, IMIPdirectsend }; |
83 | enum { neverAuto, addressbookAuto, selectedAuto }; | 83 | enum { neverAuto, addressbookAuto, selectedAuto }; |
84 | enum { standardDestination, askDestination }; | 84 | enum { standardDestination, askDestination }; |
85 | 85 | ||
86 | virtual ~KOPrefs(); | 86 | virtual ~KOPrefs(); |
87 | 87 | ||
88 | /** Get instance of KOPrefs. It is made sure that there is only one | 88 | /** Get instance of KOPrefs. It is made sure that there is only one |
89 | instance. */ | 89 | instance. */ |
90 | static KOPrefs *instance(); | 90 | static KOPrefs *instance(); |
91 | 91 | ||
92 | /** Set preferences to default values */ | 92 | /** Set preferences to default values */ |
93 | void usrSetDefaults(); | 93 | void usrSetDefaults(); |
94 | 94 | ||
95 | /** Read preferences from config file */ | 95 | /** Read preferences from config file */ |
96 | void usrReadConfig(); | 96 | void usrReadConfig(); |
97 | 97 | ||
98 | /** Write preferences to config file */ | 98 | /** Write preferences to config file */ |
99 | void usrWriteConfig(); | 99 | void usrWriteConfig(); |
100 | void setCategoryDefaults(); | 100 | void setCategoryDefaults(); |
101 | void setAllDefaults(); | 101 | void setAllDefaults(); |
102 | KopiCalendarFile * getNewCalendar(); | 102 | KopiCalendarFile * getNewCalendar(); |
103 | KopiCalendarFile * getCalendar( int ); | 103 | KopiCalendarFile * getCalendar( int ); |
104 | void deleteCalendar( int ); | 104 | void deleteCalendar( int ); |
105 | QColor defaultColor( int ) const; | 105 | QColor defaultColor( int ) const; |
106 | QString calName( int ) const; | 106 | QString calName( int ) const; |
107 | int getCalendarID( const QString & name ); | 107 | int getCalendarID( const QString & name ); |
108 | protected: | 108 | protected: |
109 | void setTimeZoneIdDefault(); | 109 | void setTimeZoneIdDefault(); |
110 | 110 | ||
111 | /** Fill empty mail fields with default values. */ | 111 | /** Fill empty mail fields with default values. */ |
112 | void fillMailDefaults(); | 112 | void fillMailDefaults(); |
113 | 113 | ||
114 | private: | 114 | private: |
115 | /** Constructor disabled for public. Use instance() to create a KOPrefs | 115 | /** Constructor disabled for public. Use instance() to create a KOPrefs |
116 | object. */ | 116 | object. */ |
117 | KOPrefs(); | 117 | KOPrefs(); |
118 | 118 | ||
119 | static KOPrefs *mInstance; | 119 | static KOPrefs *mInstance; |
120 | QStringList getDefaultList(); | 120 | QStringList getDefaultList(); |
121 | QStringList getLocationDefaultList(); | 121 | QStringList getLocationDefaultList(); |
122 | public: | 122 | public: |
123 | // preferences data | 123 | // preferences data |
124 | KConfig* getConfig(); | 124 | KConfig* getConfig(); |
125 | void setFullName(const QString &); | 125 | void setFullName(const QString &); |
126 | QString fullName(); | 126 | QString fullName(); |
127 | void setEmail(const QString &); | 127 | void setEmail(const QString &); |
128 | QString email(); | 128 | QString email(); |
129 | 129 | ||
130 | QString mAdditional; | 130 | QString mAdditional; |
131 | 131 | ||
132 | bool mEmailControlCenter; | 132 | bool mEmailControlCenter; |
133 | 133 | ||
134 | bool mBcc; | 134 | bool mBcc; |
135 | bool mAutoSave; | 135 | bool mAutoSave; |
136 | int mAutoSaveInterval; | 136 | int mAutoSaveInterval; |
137 | bool mConfirm; | 137 | bool mConfirm; |
138 | 138 | ||
139 | bool mEnableGroupScheduling; | 139 | bool mEnableGroupScheduling; |
140 | bool mEnableProjectView; | 140 | bool mEnableProjectView; |
141 | 141 | ||
142 | int mDefaultFormat; | 142 | int mDefaultFormat; |
143 | int mMailClient; | 143 | int mMailClient; |
144 | 144 | ||
145 | int mStartTime; | 145 | int mStartTime; |
146 | int mDefaultDuration; | 146 | int mDefaultDuration; |
147 | int mAlarmTime; | 147 | int mAlarmTime; |
148 | 148 | ||
149 | int mWorkingHoursStart; | 149 | int mWorkingHoursStart; |
150 | int mWorkingHoursEnd; | 150 | int mWorkingHoursEnd; |
151 | bool mExcludeHolidays; | 151 | bool mExcludeHolidays; |
152 | bool mExcludeSaturdays; | 152 | bool mExcludeSaturdays; |
153 | bool mMarcusBainsShowSeconds; | 153 | bool mMarcusBainsShowSeconds; |
154 | 154 | ||
155 | QFont mTimeBarFont; | 155 | QFont mTimeBarFont; |
156 | QFont mMonthViewFont; | 156 | QFont mMonthViewFont; |
157 | QFont mAgendaViewFont; | 157 | QFont mAgendaViewFont; |
158 | QFont mMarcusBainsFont; | 158 | QFont mMarcusBainsFont; |
159 | QFont mTimeLabelsFont; | 159 | QFont mTimeLabelsFont; |
160 | QFont mTodoViewFont; | 160 | QFont mTodoViewFont; |
161 | QFont mListViewFont; | 161 | QFont mListViewFont; |
162 | QFont mDateNavigatorFont; | 162 | QFont mDateNavigatorFont; |
163 | QFont mEditBoxFont; | 163 | QFont mEditBoxFont; |
164 | QFont mJornalViewFont; | 164 | QFont mJornalViewFont; |
165 | QFont mWhatsNextFont; | 165 | QFont mWhatsNextFont; |
166 | QFont mEventViewFont; | 166 | QFont mEventViewFont; |
167 | 167 | ||
168 | 168 | ||
169 | 169 | ||
170 | 170 | ||
171 | QColor mHolidayColor; | 171 | QColor mHolidayColor; |
172 | QColor mHighlightColor; | 172 | QColor mHighlightColor; |
173 | QColor mEventColor; | 173 | QColor mEventColor; |
174 | QColor mTodoDoneColor; | 174 | QColor mTodoDoneColor; |
175 | QColor mAgendaBgColor; | 175 | QColor mAgendaBgColor; |
176 | QColor mWorkingHoursColor; | 176 | QColor mWorkingHoursColor; |
177 | QColor mTodoDueTodayColor; | 177 | QColor mTodoDueTodayColor; |
178 | QColor mTodoOverdueColor; | 178 | QColor mTodoOverdueColor; |
179 | QColor mTodoRunColor; | 179 | QColor mTodoRunColor; |
180 | QColor mMonthViewEvenColor; | 180 | QColor mMonthViewEvenColor; |
181 | QColor mMonthViewOddColor; | 181 | QColor mMonthViewOddColor; |
182 | QColor mMonthViewHolidayColor; | 182 | QColor mMonthViewHolidayColor; |
183 | bool mMonthViewUsesDayColors; | 183 | bool mMonthViewUsesDayColors; |
184 | bool mMonthViewSatSunTog; | 184 | bool mMonthViewSatSunTog; |
185 | bool mMonthViewWeek; | 185 | bool mMonthViewWeek; |
186 | bool mMonthViewWeekRowlayout; | 186 | bool mMonthViewWeekRowlayout; |
187 | QColor mAppColor1; | 187 | QColor mAppColor1; |
188 | QColor mAppColor2; | 188 | QColor mAppColor2; |
189 | bool mUseAppColors; | 189 | bool mUseAppColors; |
190 | 190 | ||
191 | int mDayBegins; | 191 | int mDayBegins; |
192 | int mHourSize; | 192 | int mHourSize; |
193 | int mAllDaySize; | 193 | int mAllDaySize; |
194 | bool mShowFullMenu; | 194 | bool mShowFullMenu; |
195 | bool mDailyRecur; | 195 | bool mDailyRecur; |
196 | bool mWeeklyRecur; | 196 | bool mWeeklyRecur; |
197 | bool mMonthDailyRecur; | 197 | bool mMonthDailyRecur; |
198 | bool mMonthWeeklyRecur; | 198 | bool mMonthWeeklyRecur; |
199 | bool mMonthShowIcons; | 199 | bool mMonthShowIcons; |
200 | bool mMonthShowTimes; | 200 | bool mMonthShowTimes; |
201 | bool mMonthShowShort; | 201 | bool mMonthShowShort; |
202 | bool mEnableToolTips; | 202 | bool mEnableToolTips; |
203 | bool mEnableMonthScroll; | 203 | bool mEnableMonthScroll; |
204 | bool mFullViewMonth; | 204 | bool mFullViewMonth; |
205 | bool mMonthViewUsesCategoryColor; | 205 | bool mMonthViewUsesCategoryColor; |
206 | bool mFullViewTodo; | 206 | bool mFullViewTodo; |
207 | bool mShowCompletedTodo; | 207 | bool mShowCompletedTodo; |
208 | bool mMarcusBainsEnabled; | 208 | bool mMarcusBainsEnabled; |
209 | int mNextXDays; | 209 | int mNextXDays; |
210 | int mWhatsNextDays; | 210 | int mWhatsNextDays; |
211 | bool mWhatsNextTime2Lines; | 211 | bool mWhatsNextTime2Lines; |
212 | int mWhatsNextPrios; | 212 | int mWhatsNextPrios; |
213 | bool mEnableQuickTodo; | 213 | bool mEnableQuickTodo; |
214 | 214 | ||
215 | bool mCompactDialogs; | 215 | bool mCompactDialogs; |
216 | bool mVerticalScreen; | 216 | bool mVerticalScreen; |
217 | 217 | ||
218 | bool mShowIconNewTodo; | 218 | bool mShowIconNewTodo; |
219 | bool mShowIconNewEvent; | 219 | bool mShowIconNewEvent; |
220 | bool mShowIconSearch; | 220 | bool mShowIconSearch; |
221 | bool mShowIconList; | 221 | bool mShowIconList; |
222 | bool mShowIconDay1; | 222 | bool mShowIconDay1; |
223 | bool mShowIconDay5; | 223 | bool mShowIconDay5; |
224 | bool mShowIconDay6; | 224 | bool mShowIconDay6; |
225 | bool mShowIconDay7; | 225 | bool mShowIconDay7; |
226 | bool mShowIconMonth; | 226 | bool mShowIconMonth; |
227 | bool mShowIconTodoview; | 227 | bool mShowIconTodoview; |
228 | bool mShowIconBackFast; | 228 | bool mShowIconBackFast; |
229 | bool mShowIconBack; | 229 | bool mShowIconBack; |
230 | bool mShowIconToday; | 230 | bool mShowIconToday; |
231 | bool mShowIconForward; | 231 | bool mShowIconForward; |
232 | bool mShowIconForwardFast; | 232 | bool mShowIconForwardFast; |
233 | bool mShowIconWhatsThis; | 233 | bool mShowIconWhatsThis; |
234 | bool mShowIconWeekNum; | 234 | bool mShowIconWeekNum; |
235 | bool mShowIconNextDays; | 235 | bool mShowIconNextDays; |
236 | bool mShowIconNext; | 236 | bool mShowIconNext; |
237 | bool mShowIconJournal; | 237 | bool mShowIconJournal; |
238 | bool mShowIconFilter; | 238 | bool mShowIconFilter; |
239 | bool mShowIconOnetoolbar; | 239 | bool mShowIconOnetoolbar; |
240 | bool mShowIconNavigator; | 240 | bool mShowIconNavigator; |
241 | bool mShowIconAllday; | 241 | bool mShowIconAllday; |
242 | bool mShowIconFilterview; | 242 | bool mShowIconFilterview; |
243 | bool mShowIconToggleFull; | 243 | bool mShowIconToggleFull; |
244 | 244 | ||
245 | bool mShowIconStretch; | 245 | bool mShowIconStretch; |
246 | 246 | ||
247 | bool mToolBarHor; | 247 | bool mToolBarHor; |
248 | bool mToolBarUp; | 248 | bool mToolBarUp; |
249 | bool mToolBarHorV; | 249 | bool mToolBarHorV; |
250 | bool mToolBarUpV; | 250 | bool mToolBarUpV; |
251 | bool mToolBarHorN; | 251 | bool mToolBarHorN; |
252 | bool mToolBarUpN; | 252 | bool mToolBarUpN; |
253 | bool mToolBarHorF; | 253 | bool mToolBarHorF; |
254 | bool mToolBarUpF; | 254 | bool mToolBarUpF; |
255 | bool mToolBarMiniIcons; | 255 | bool mToolBarMiniIcons; |
256 | 256 | ||
257 | bool mAskForQuit; | 257 | bool mAskForQuit; |
258 | bool mUsePassWd; | 258 | bool mUsePassWd; |
259 | bool mShowSyncEvents; | 259 | bool mShowSyncEvents; |
260 | bool mShowTodoInAgenda; | 260 | bool mShowTodoInAgenda; |
261 | bool mShowCompletedTodoInAgenda; | 261 | bool mShowCompletedTodoInAgenda; |
262 | bool mShowTimeInAgenda; | 262 | bool mShowTimeInAgenda; |
263 | bool mHideNonStartedTodos; | 263 | bool mHideNonStartedTodos; |
264 | 264 | ||
265 | bool mBlockPopupMenu; | 265 | bool mBlockPopupMenu; |
266 | 266 | ||
267 | int mLastSyncTime; | 267 | int mLastSyncTime; |
268 | void setCategoryColor(QString cat,const QColor & color); | 268 | void setCategoryColor(QString cat,const QColor & color); |
269 | QColor *categoryColor(QString cat); | 269 | QColor *categoryColor(QString cat); |
270 | 270 | ||
271 | QString mArchiveFile; | 271 | QString mArchiveFile; |
272 | QString mHtmlExportFile; | 272 | QString mHtmlExportFile; |
273 | bool mHtmlWithSave; | 273 | bool mHtmlWithSave; |
274 | 274 | ||
275 | QStringList mSelectedPlugins; | 275 | QStringList mSelectedPlugins; |
276 | 276 | ||
277 | QString mLastImportFile; | 277 | QString mLastImportFile; |
278 | QString mLastVcalFile; | 278 | QString mLastVcalFile; |
279 | QString mLastSaveFile; | 279 | QString mLastSaveFile; |
280 | QString mLastLoadFile; | 280 | QString mLastLoadFile; |
281 | 281 | ||
282 | 282 | ||
283 | QString mDefaultAlarmFile; | 283 | QString mDefaultAlarmFile; |
284 | int mIMIPScheduler; | 284 | int mIMIPScheduler; |
285 | int mIMIPSend; | 285 | int mIMIPSend; |
286 | QStringList mAdditionalMails; | 286 | QStringList mAdditionalMails; |
287 | int mIMIPAutoRefresh; | 287 | int mIMIPAutoRefresh; |
288 | int mIMIPAutoInsertReply; | 288 | int mIMIPAutoInsertReply; |
289 | int mIMIPAutoInsertRequest; | 289 | int mIMIPAutoInsertRequest; |
290 | int mIMIPAutoFreeBusy; | 290 | int mIMIPAutoFreeBusy; |
291 | int mIMIPAutoFreeBusyReply; | 291 | int mIMIPAutoFreeBusyReply; |
292 | 292 | ||
293 | QStringList mTodoTemplates; | 293 | QStringList mTodoTemplates; |
294 | QStringList mEventTemplates; | 294 | QStringList mEventTemplates; |
295 | 295 | ||
296 | int mDestination; | 296 | int mDestination; |
297 | 297 | ||
298 | 298 | ||
299 | bool mEditOnDoubleClick; | 299 | bool mEditOnDoubleClick; |
300 | bool mViewChangeHoldFullscreen; | 300 | bool mViewChangeHoldFullscreen; |
301 | bool mViewChangeHoldNonFullscreen; | 301 | bool mViewChangeHoldNonFullscreen; |
302 | bool mCenterOnCurrentTime; | 302 | bool mCenterOnCurrentTime; |
303 | bool mSetTimeToDayStartAt; | 303 | bool mSetTimeToDayStartAt; |
304 | bool mHighlightCurrentDay; | 304 | bool mHighlightCurrentDay; |
305 | bool mUseHighlightLightColor; | 305 | bool mUseHighlightLightColor; |
306 | bool mListViewMonthTimespan; | 306 | bool mListViewMonthTimespan; |
307 | bool mWNViewShowsParents; | 307 | bool mWNViewShowsParents; |
308 | bool mWNViewShowsPast; | 308 | bool mWNViewShowsPast; |
309 | bool mWNViewShowLocation; | 309 | bool mWNViewShowLocation; |
310 | bool mTodoViewShowsPercentage; | 310 | bool mTodoViewShowsPercentage; |
311 | bool mTodoViewUsesCatColors; | 311 | bool mTodoViewUsesCatColors; |
312 | bool mMonthViewUsesBigFont; | 312 | bool mMonthViewUsesBigFont; |
313 | bool mTodoViewUsesSmallFont; | 313 | bool mTodoViewUsesSmallFont; |
314 | bool mTodoViewUsesForegroundColor; | 314 | bool mTodoViewUsesForegroundColor; |
315 | bool mMonthViewUsesForegroundColor; | 315 | bool mMonthViewUsesForegroundColor; |
316 | 316 | ||
317 | bool mHightlightDateTimeEdit; | 317 | bool mHightlightDateTimeEdit; |
318 | bool mShortDateInViewer; | 318 | bool mShortDateInViewer; |
319 | 319 | ||
320 | bool mShowDateNavigator; | 320 | bool mShowDateNavigator; |
321 | 321 | ||
322 | QStringList mLocationDefaults; | 322 | QStringList mLocationDefaults; |
323 | QStringList mEventSummaryUser; | 323 | QStringList mEventSummaryUser; |
324 | QStringList mTodoSummaryUser; | 324 | QStringList mTodoSummaryUser; |
325 | QStringList mJournalSummaryUser; | 325 | QStringList mJournalSummaryUser; |
326 | 326 | ||
327 | bool mUseInternalAlarmNotification; | 327 | bool mUseInternalAlarmNotification; |
328 | int mAlarmPlayBeeps; | 328 | int mAlarmPlayBeeps; |
329 | int mAlarmSuspendTime; | 329 | int mAlarmSuspendTime; |
330 | int mAlarmSuspendCount; | 330 | int mAlarmSuspendCount; |
331 | int mAlarmBeepInterval; | 331 | int mAlarmBeepInterval; |
332 | int mOldLanguage; | 332 | int mOldLanguage; |
333 | int mOldLoadedLanguage; | 333 | int mOldLoadedLanguage; |
334 | 334 | ||
335 | 335 | ||
336 | QString mActiveSyncPort; | 336 | QString mActiveSyncPort; |
337 | QString mActiveSyncIP; | 337 | QString mActiveSyncIP; |
338 | 338 | ||
339 | // settings for eventviewer | 339 | // settings for eventviewer |
340 | bool mEVshowDetails; | 340 | bool mEVshowDetails; |
341 | bool mEVshowCreated; | 341 | bool mEVshowCreated; |
342 | bool mEVshowChanged; | 342 | bool mEVshowChanged; |
343 | bool mWTshowDetails; | 343 | bool mWTshowDetails; |
344 | bool mWTshowCreated; | 344 | bool mWTshowCreated; |
345 | bool mWTshowChanged; | 345 | bool mWTshowChanged; |
346 | 346 | ||
347 | int mCurrentDisplayedView; | 347 | int mCurrentDisplayedView; |
348 | QPtrList<KopiCalendarFile> mCalendars; | 348 | QPtrList<KopiCalendarFile> mCalendars; |
349 | int mNextAvailableCalendar; | 349 | int mNextAvailableCalendar; |
350 | bool mGlobalUpdateDisabled; | 350 | bool mGlobalUpdateDisabled; |
351 | 351 | ||
352 | |||
353 | bool mDetectConflicts; | ||
354 | bool mCheckConflictsAllDayAllDay; | ||
355 | bool mCheckConflictsAllDayNonAD; | ||
356 | bool mCheckConflictsNonADAllDay; | ||
357 | bool mCheckConflictsNonADNonAD; | ||
358 | QString mFilterConflictEditItem; | ||
359 | QString mFilterConflictAllItem; | ||
360 | |||
352 | private: | 361 | private: |
353 | QDict<QColor> mCategoryColors; | 362 | QDict<QColor> mCategoryColors; |
354 | QArray<KopiCalendarFile*> mDefCalColors; | 363 | QArray<KopiCalendarFile*> mDefCalColors; |
355 | QColor mDefaultCategoryColor; | 364 | QColor mDefaultCategoryColor; |
356 | 365 | ||
357 | QFont mDefaultTimeBarFont; | 366 | QFont mDefaultTimeBarFont; |
358 | QFont mDefaultViewFont; | 367 | QFont mDefaultViewFont; |
359 | QFont mDefaultMonthViewFont; | 368 | QFont mDefaultMonthViewFont; |
360 | 369 | ||
361 | QString mName; | 370 | QString mName; |
362 | QString mEmail; | 371 | QString mEmail; |
363 | }; | 372 | }; |
364 | 373 | ||
365 | #endif | 374 | #endif |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 9e2378a..bbdf508 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -1,1552 +1,1604 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,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 <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qlabel.h> | 25 | #include <qlabel.h> |
26 | #include <qgroupbox.h> | 26 | #include <qgroupbox.h> |
27 | #include <qbuttongroup.h> | 27 | #include <qbuttongroup.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qfont.h> | 29 | #include <qfont.h> |
30 | #include <qslider.h> | 30 | #include <qslider.h> |
31 | #include <qfile.h> | 31 | #include <qfile.h> |
32 | #include <qtextstream.h> | 32 | #include <qtextstream.h> |
33 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
34 | #include <qvbox.h> | 34 | #include <qvbox.h> |
35 | #include <qhbox.h> | 35 | #include <qhbox.h> |
36 | #include <qregexp.h> | 36 | #include <qregexp.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qdatetime.h> | 38 | #include <qdatetime.h> |
39 | #include <qcheckbox.h> | 39 | #include <qcheckbox.h> |
40 | #include <qradiobutton.h> | 40 | #include <qradiobutton.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qstrlist.h> | 42 | #include <qstrlist.h> |
43 | #include <qapplication.h> | 43 | #include <qapplication.h> |
44 | 44 | ||
45 | #include <kcolorbutton.h> | 45 | #include <kcolorbutton.h> |
46 | #include <kdebug.h> | 46 | #include <kdebug.h> |
47 | #include <klocale.h> | 47 | #include <klocale.h> |
48 | #include <kglobal.h> | 48 | #include <kglobal.h> |
49 | #include <kfontdialog.h> | 49 | #include <kfontdialog.h> |
50 | #include <kfiledialog.h> | 50 | #include <kfiledialog.h> |
51 | #include <kmessagebox.h> | 51 | #include <kmessagebox.h> |
52 | #include <kcolordialog.h> | 52 | #include <kcolordialog.h> |
53 | #include <kiconloader.h> | 53 | #include <kiconloader.h> |
54 | #include <kemailsettings.h> | 54 | #include <kemailsettings.h> |
55 | #include <kstandarddirs.h> | 55 | #include <kstandarddirs.h> |
56 | #include <kglobalsettings.h> | 56 | #include <kglobalsettings.h> |
57 | 57 | ||
58 | #include <kurlrequester.h> | 58 | #include <kurlrequester.h> |
59 | #include <klineedit.h> | 59 | #include <klineedit.h> |
60 | 60 | ||
61 | #if defined(USE_SOLARIS) | 61 | #if defined(USE_SOLARIS) |
62 | #include <sys/param.h> | 62 | #include <sys/param.h> |
63 | 63 | ||
64 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" | 64 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" |
65 | #define INITFILE "/etc/default/init" | 65 | #define INITFILE "/etc/default/init" |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #include "koprefs.h" | 68 | #include "koprefs.h" |
69 | 69 | ||
70 | #include "koprefsdialog.h" | 70 | #include "koprefsdialog.h" |
71 | #include "kpimglobalprefs.h" | 71 | #include "kpimglobalprefs.h" |
72 | 72 | ||
73 | 73 | ||
74 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 74 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
75 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 75 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
76 | { | 76 | { |
77 | 77 | ||
78 | setFont( KGlobalSettings::generalMaxFont() ); | 78 | setFont( KGlobalSettings::generalMaxFont() ); |
79 | setCaption( i18n("Preferences - some settings need a restart (nr)")); | 79 | setCaption( i18n("Preferences - some settings need a restart (nr)")); |
80 | mCategoryDict.setAutoDelete(true); | 80 | mCategoryDict.setAutoDelete(true); |
81 | 81 | ||
82 | KGlobal::locale()->insertCatalogue("timezones"); | 82 | KGlobal::locale()->insertCatalogue("timezones"); |
83 | mSpacingHint = spacingHintSmall(); | 83 | mSpacingHint = spacingHintSmall(); |
84 | mMarginHint = marginHintSmall(); | 84 | mMarginHint = marginHintSmall(); |
85 | #ifndef DESKTOP_VERSION | 85 | #ifndef DESKTOP_VERSION |
86 | if ( QApplication::desktop()->height() == 480 ) | 86 | if ( QApplication::desktop()->height() == 480 ) |
87 | hideButtons(); | 87 | hideButtons(); |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | setupMainTab(); | 90 | setupMainTab(); |
91 | // setupLocaleTab(); | 91 | // setupLocaleTab(); |
92 | //setupTimeZoneTab(); | 92 | //setupTimeZoneTab(); |
93 | setupTimeTab(); | 93 | setupTimeTab(); |
94 | //setupLocaleDateTab(); | 94 | //setupLocaleDateTab(); |
95 | setupFontsTab(); | 95 | setupFontsTab(); |
96 | setupColorsTab(); | 96 | setupColorsTab(); |
97 | setupViewsTab(); | 97 | setupViewsTab(); |
98 | //setupSyncTab(); | 98 | //setupSyncTab(); |
99 | //setupSyncAlgTab(); | 99 | //setupSyncAlgTab(); |
100 | //setupPrinterTab(); | 100 | //setupPrinterTab(); |
101 | //setupGroupSchedulingTab(); | 101 | //setupGroupSchedulingTab(); |
102 | //setupGroupAutomationTab(); | 102 | //setupGroupAutomationTab(); |
103 | 103 | ||
104 | 104 | ||
105 | } | 105 | } |
106 | 106 | ||
107 | 107 | ||
108 | KOPrefsDialog::~KOPrefsDialog() | 108 | KOPrefsDialog::~KOPrefsDialog() |
109 | { | 109 | { |
110 | } | 110 | } |
111 | void KOPrefsDialog::setupGlobalTab() | 111 | void KOPrefsDialog::setupGlobalTab() |
112 | { | 112 | { |
113 | 113 | ||
114 | 114 | ||
115 | } | 115 | } |
116 | void KOPrefsDialog::setupLocaleDateTab() | 116 | void KOPrefsDialog::setupLocaleDateTab() |
117 | { | 117 | { |
118 | #if 0 | 118 | #if 0 |
119 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 119 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
120 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 120 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
121 | topLayout->setSpacing(mSpacingHint); | 121 | topLayout->setSpacing(mSpacingHint); |
122 | topLayout->setMargin(mMarginHint); | 122 | topLayout->setMargin(mMarginHint); |
123 | int iii = 0; | 123 | int iii = 0; |
124 | 124 | ||
125 | 125 | ||
126 | KPrefsDialogWidRadios *syncPrefsGroup = | 126 | KPrefsDialogWidRadios *syncPrefsGroup = |
127 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 127 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
128 | QString format; | 128 | QString format; |
129 | if ( QApplication::desktop()->width() < 480 ) | 129 | if ( QApplication::desktop()->width() < 480 ) |
130 | format = "(%d.%m.%Y)"; | 130 | format = "(%d.%m.%Y)"; |
131 | else | 131 | else |
132 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 132 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
133 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 133 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
134 | if ( QApplication::desktop()->width() < 480 ) | 134 | if ( QApplication::desktop()->width() < 480 ) |
135 | format = "(%m.%d.%Y)"; | 135 | format = "(%m.%d.%Y)"; |
136 | else | 136 | else |
137 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 137 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
138 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 138 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
139 | if ( QApplication::desktop()->width() < 480 ) | 139 | if ( QApplication::desktop()->width() < 480 ) |
140 | format = "(%Y-%m-%d)"; | 140 | format = "(%Y-%m-%d)"; |
141 | else | 141 | else |
142 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 142 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
143 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 143 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
144 | syncPrefsGroup->addRadio(i18n("User defined")); | 144 | syncPrefsGroup->addRadio(i18n("User defined")); |
145 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 145 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
146 | ++iii; | 146 | ++iii; |
147 | ++iii; | 147 | ++iii; |
148 | QLabel * lab; | 148 | QLabel * lab; |
149 | mUserDateFormatLong = new QLineEdit(topFrame); | 149 | mUserDateFormatLong = new QLineEdit(topFrame); |
150 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 150 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
151 | topLayout->addWidget(lab ,iii,0); | 151 | topLayout->addWidget(lab ,iii,0); |
152 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 152 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
153 | ++iii; | 153 | ++iii; |
154 | mUserDateFormatShort = new QLineEdit(topFrame); | 154 | mUserDateFormatShort = new QLineEdit(topFrame); |
155 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 155 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
156 | topLayout->addWidget(lab ,iii,0); | 156 | topLayout->addWidget(lab ,iii,0); |
157 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 157 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
158 | ++iii; | 158 | ++iii; |
159 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 159 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
160 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 160 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
161 | ++iii; | 161 | ++iii; |
162 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 162 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
163 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 163 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
164 | ++iii; | 164 | ++iii; |
165 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 165 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
166 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 166 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
167 | ++iii; | 167 | ++iii; |
168 | #endif | 168 | #endif |
169 | 169 | ||
170 | } | 170 | } |
171 | 171 | ||
172 | void KOPrefsDialog::setupLocaleTab() | 172 | void KOPrefsDialog::setupLocaleTab() |
173 | { | 173 | { |
174 | #if 0 | 174 | #if 0 |
175 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 175 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
176 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 176 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
177 | topLayout->setSpacing(mSpacingHint); | 177 | topLayout->setSpacing(mSpacingHint); |
178 | topLayout->setMargin(mMarginHint); | 178 | topLayout->setMargin(mMarginHint); |
179 | int iii = 0; | 179 | int iii = 0; |
180 | KPrefsDialogWidRadios *syncPrefsGroup = | 180 | KPrefsDialogWidRadios *syncPrefsGroup = |
181 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 181 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
182 | syncPrefsGroup->addRadio(i18n("English")); | 182 | syncPrefsGroup->addRadio(i18n("English")); |
183 | syncPrefsGroup->addRadio(i18n("German")); | 183 | syncPrefsGroup->addRadio(i18n("German")); |
184 | syncPrefsGroup->addRadio(i18n("French")); | 184 | syncPrefsGroup->addRadio(i18n("French")); |
185 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 185 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
186 | if ( QApplication::desktop()->width() < 300 ) | 186 | if ( QApplication::desktop()->width() < 300 ) |
187 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 187 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
188 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 188 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
189 | ++iii; | 189 | ++iii; |
190 | 190 | ||
191 | syncPrefsGroup = | 191 | syncPrefsGroup = |
192 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 192 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
193 | if ( QApplication::desktop()->width() > 300 ) | 193 | if ( QApplication::desktop()->width() > 300 ) |
194 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 194 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
195 | syncPrefsGroup->addRadio(i18n("24:00")); | 195 | syncPrefsGroup->addRadio(i18n("24:00")); |
196 | syncPrefsGroup->addRadio(i18n("12:00am")); | 196 | syncPrefsGroup->addRadio(i18n("12:00am")); |
197 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 197 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
198 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 198 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
199 | ++iii; | 199 | ++iii; |
200 | KPrefsDialogWidBool *sb; | 200 | KPrefsDialogWidBool *sb; |
201 | if ( QApplication::desktop()->width() < 300 ) { | 201 | if ( QApplication::desktop()->width() < 300 ) { |
202 | sb = | 202 | sb = |
203 | addWidBool(i18n("Week starts on Sunday"), | 203 | addWidBool(i18n("Week starts on Sunday"), |
204 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 204 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
205 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 205 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
206 | ++iii; | 206 | ++iii; |
207 | sb = | 207 | sb = |
208 | addWidBool(i18n("Use short date in (WN/E) view"), | 208 | addWidBool(i18n("Use short date in (WN/E) view"), |
209 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 209 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
210 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 210 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
211 | } | 211 | } |
212 | else { | 212 | else { |
213 | QWidget * hb = new QWidget( topFrame ); | 213 | QWidget * hb = new QWidget( topFrame ); |
214 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 214 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
215 | sb = | 215 | sb = |
216 | addWidBool(i18n("Week starts on Sunday"), | 216 | addWidBool(i18n("Week starts on Sunday"), |
217 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 217 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
218 | hbLayout->addWidget(sb->checkBox() ); | 218 | hbLayout->addWidget(sb->checkBox() ); |
219 | sb = | 219 | sb = |
220 | addWidBool(i18n("Use short date in (WN/E) view"), | 220 | addWidBool(i18n("Use short date in (WN/E) view"), |
221 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 221 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
222 | hbLayout->addWidget(sb->checkBox() ); | 222 | hbLayout->addWidget(sb->checkBox() ); |
223 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 223 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
224 | 224 | ||
225 | } | 225 | } |
226 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION | 226 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION |
227 | #if 0 | 227 | #if 0 |
228 | ++iii; | 228 | ++iii; |
229 | sb = | 229 | sb = |
230 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 230 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
231 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 231 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
232 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 232 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
233 | #endif | 233 | #endif |
234 | #endif | 234 | #endif |
235 | } | 235 | } |
236 | 236 | ||
237 | void KOPrefsDialog::setupMainTab() | 237 | void KOPrefsDialog::setupMainTab() |
238 | { | 238 | { |
239 | QFrame *topFrame = addPage(i18n("General"),0,0); | 239 | QFrame *topFrame = addPage(i18n("General"),0,0); |
240 | // DesktopIcon("identity",KIcon::SizeMedium)); | 240 | // DesktopIcon("identity",KIcon::SizeMedium)); |
241 | 241 | ||
242 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 242 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
243 | topLayout->setSpacing(mSpacingHint); | 243 | topLayout->setSpacing(mSpacingHint); |
244 | topLayout->setMargin(mMarginHint); | 244 | topLayout->setMargin(mMarginHint); |
245 | 245 | ||
246 | // KPrefsDialogWidBool *emailControlCenter = | 246 | // KPrefsDialogWidBool *emailControlCenter = |
247 | // addWidBool(i18n("&Use email settings from Control Center"), | 247 | // addWidBool(i18n("&Use email settings from Control Center"), |
248 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 248 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
249 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 249 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
250 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 250 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
251 | // SLOT(toggleEmailSettings(bool))); | 251 | // SLOT(toggleEmailSettings(bool))); |
252 | 252 | ||
253 | mNameEdit = new QLineEdit(topFrame); | 253 | mNameEdit = new QLineEdit(topFrame); |
254 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 254 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
255 | topLayout->addWidget(mNameLabel,0,0); | 255 | topLayout->addWidget(mNameLabel,0,0); |
256 | topLayout->addWidget(mNameEdit,0,1); | 256 | topLayout->addWidget(mNameEdit,0,1); |
257 | 257 | ||
258 | mEmailEdit = new QLineEdit(topFrame); | 258 | mEmailEdit = new QLineEdit(topFrame); |
259 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 259 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
260 | topLayout->addWidget(mEmailLabel,1,0); | 260 | topLayout->addWidget(mEmailLabel,1,0); |
261 | topLayout->addWidget(mEmailEdit,1,1); | 261 | topLayout->addWidget(mEmailEdit,1,1); |
262 | KPrefsDialogWidBool *wb; | 262 | KPrefsDialogWidBool *wb; |
263 | 263 | ||
264 | 264 | ||
265 | 265 | ||
266 | KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), | 266 | KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), |
267 | &(KOPrefs::instance()->mShowFullMenu),topFrame); | 267 | &(KOPrefs::instance()->mShowFullMenu),topFrame); |
268 | topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); | 268 | topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); |
269 | 269 | ||
270 | 270 | ||
271 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), | 271 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), |
272 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); | 272 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); |
273 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); | 273 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); |
274 | 274 | ||
275 | 275 | ||
276 | KPrefsDialogWidBool *verticalScreen = | 276 | KPrefsDialogWidBool *verticalScreen = |
277 | addWidBool(i18n("Vertical screen layout(Needs restart)"), | 277 | addWidBool(i18n("Vertical screen layout(Needs restart)"), |
278 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 278 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
279 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 279 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
280 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); | 280 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); |
281 | 281 | ||
282 | 282 | ||
283 | int iii = 5; | 283 | int iii = 5; |
284 | widbool = addWidBool(i18n("Block popup until mouse button release"), | 284 | widbool = addWidBool(i18n("Block popup until mouse button release"), |
285 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); | 285 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); |
286 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); | 286 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); |
287 | ++iii; | 287 | ++iii; |
288 | if ( QApplication::desktop()->height() <= 240 ) { | 288 | if ( QApplication::desktop()->height() <= 240 ) { |
289 | topFrame = addPage(i18n("General") +" 2",0,0); | 289 | topFrame = addPage(i18n("General") +" 2",0,0); |
290 | topLayout = new QGridLayout(topFrame,4,2); | 290 | topLayout = new QGridLayout(topFrame,4,2); |
291 | topLayout->setSpacing(2); | 291 | topLayout->setSpacing(2); |
292 | topLayout->setMargin(3); | 292 | topLayout->setMargin(3); |
293 | iii = 0; | 293 | iii = 0; |
294 | } | 294 | } |
295 | QHBox *dummy = new QHBox(topFrame); | 295 | QHBox *dummy = new QHBox(topFrame); |
296 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 296 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
297 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 297 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
298 | 298 | ||
299 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); | 299 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); |
300 | 300 | ||
301 | ++iii; | 301 | ++iii; |
302 | 302 | ||
303 | 303 | ||
304 | // KPrefsDialogWidBool *bcc = | 304 | // KPrefsDialogWidBool *bcc = |
305 | // addWidBool(i18n("Send copy to owner when mailing events"), | 305 | // addWidBool(i18n("Send copy to owner when mailing events"), |
306 | // &(KOPrefs::instance()->mBcc),topFrame); | 306 | // &(KOPrefs::instance()->mBcc),topFrame); |
307 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 307 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
308 | 308 | ||
309 | 309 | ||
310 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 310 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
311 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 311 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
312 | 312 | ||
313 | // addWidBool(i18n("Enable automatic saving of calendar"), | 313 | // addWidBool(i18n("Enable automatic saving of calendar"), |
314 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 314 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
315 | 315 | ||
316 | QHBox *intervalBox = new QHBox(topFrame); | 316 | QHBox *intervalBox = new QHBox(topFrame); |
317 | // intervalBox->setSpacing(mSpacingHint); | 317 | // intervalBox->setSpacing(mSpacingHint); |
318 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); | 318 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); |
319 | ++iii; | 319 | ++iii; |
320 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 320 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
321 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 321 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
322 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 322 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
323 | /* | 323 | /* |
324 | QHBox * agendasize = new QHBox ( topFrame ); | 324 | QHBox * agendasize = new QHBox ( topFrame ); |
325 | 325 | ||
326 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 326 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
327 | 327 | ||
328 | 328 | ||
329 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 329 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
330 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 330 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
331 | */ | 331 | */ |
332 | 332 | ||
333 | 333 | ||
334 | KPrefsDialogWidBool *ask = | 334 | KPrefsDialogWidBool *ask = |
335 | addWidBool(i18n("Ask for quit when closing KO/Pi"), | 335 | addWidBool(i18n("Ask for quit when closing KO/Pi"), |
336 | &(KOPrefs::instance()->mAskForQuit),topFrame); | 336 | &(KOPrefs::instance()->mAskForQuit),topFrame); |
337 | topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1); | 337 | topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1); |
338 | ++iii; | 338 | ++iii; |
339 | 339 | ||
340 | 340 | ||
341 | /* | 341 | /* |
342 | KPrefsDialogWidBool *confirmCheck = | 342 | KPrefsDialogWidBool *confirmCheck = |
343 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), | 343 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), |
344 | topFrame); | 344 | topFrame); |
345 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); | 345 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); |
346 | 346 | ||
347 | 347 | ||
348 | mEnableGroupScheduling = | 348 | mEnableGroupScheduling = |
349 | addWidBool(i18n("Enable group scheduling"), | 349 | addWidBool(i18n("Enable group scheduling"), |
350 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); | 350 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); |
351 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); | 351 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); |
352 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), | 352 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), |
353 | SLOT(warningGroupScheduling())); | 353 | SLOT(warningGroupScheduling())); |
354 | 354 | ||
355 | mEnableProjectView = | 355 | mEnableProjectView = |
356 | addWidBool(i18n("Enable project view"), | 356 | addWidBool(i18n("Enable project view"), |
357 | &(KOPrefs::instance()->mEnableProjectView),topFrame); | 357 | &(KOPrefs::instance()->mEnableProjectView),topFrame); |
358 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); | 358 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); |
359 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), | 359 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), |
360 | SLOT(warningProjectView())); | 360 | SLOT(warningProjectView())); |
361 | 361 | ||
362 | // Can't be disabled anymore | 362 | // Can't be disabled anymore |
363 | mEnableGroupScheduling->checkBox()->hide(); | 363 | mEnableGroupScheduling->checkBox()->hide(); |
364 | 364 | ||
365 | // Disable setting, because this feature now becomes stable | 365 | // Disable setting, because this feature now becomes stable |
366 | mEnableProjectView->checkBox()->hide(); | 366 | mEnableProjectView->checkBox()->hide(); |
367 | 367 | ||
368 | KPrefsDialogWidRadios *defaultFormatGroup = | 368 | KPrefsDialogWidRadios *defaultFormatGroup = |
369 | addWidRadios(i18n("Default Calendar Format"), | 369 | addWidRadios(i18n("Default Calendar Format"), |
370 | &(KOPrefs::instance()->mDefaultFormat),topFrame); | 370 | &(KOPrefs::instance()->mDefaultFormat),topFrame); |
371 | defaultFormatGroup->addRadio(i18n("vCalendar")); | 371 | defaultFormatGroup->addRadio(i18n("vCalendar")); |
372 | defaultFormatGroup->addRadio(i18n("iCalendar")); | 372 | defaultFormatGroup->addRadio(i18n("iCalendar")); |
373 | 373 | ||
374 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); | 374 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); |
375 | 375 | ||
376 | // Default format unconditionally is iCalendar | 376 | // Default format unconditionally is iCalendar |
377 | defaultFormatGroup->groupBox()->hide(); | 377 | defaultFormatGroup->groupBox()->hide(); |
378 | 378 | ||
379 | KPrefsDialogWidRadios *mailClientGroup = | 379 | KPrefsDialogWidRadios *mailClientGroup = |
380 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), | 380 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), |
381 | topFrame); | 381 | topFrame); |
382 | mailClientGroup->addRadio(i18n("KMail")); | 382 | mailClientGroup->addRadio(i18n("KMail")); |
383 | mailClientGroup->addRadio(i18n("Sendmail")); | 383 | mailClientGroup->addRadio(i18n("Sendmail")); |
384 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); | 384 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); |
385 | 385 | ||
386 | KPrefsDialogWidBool *htmlsave = | 386 | KPrefsDialogWidBool *htmlsave = |
387 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), | 387 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), |
388 | topFrame); | 388 | topFrame); |
389 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 389 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
390 | 390 | ||
391 | KPrefsDialogWidRadios *destinationGroup = | 391 | KPrefsDialogWidRadios *destinationGroup = |
392 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 392 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
393 | topFrame); | 393 | topFrame); |
394 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 394 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
395 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 395 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
396 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 396 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
397 | 397 | ||
398 | topLayout->setRowStretch(14,1); | 398 | topLayout->setRowStretch(14,1); |
399 | */ | 399 | */ |
400 | } | 400 | } |
401 | 401 | ||
402 | 402 | ||
403 | void KOPrefsDialog::setupTimeTab() | 403 | void KOPrefsDialog::setupTimeTab() |
404 | { | 404 | { |
405 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 405 | QFrame *topFrame = addPage(i18n("Time"),0,0); |
406 | // DesktopIcon("clock",KIcon::SizeMedium)); | 406 | // DesktopIcon("clock",KIcon::SizeMedium)); |
407 | 407 | ||
408 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 408 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
409 | topLayout->setSpacing(mSpacingHint); | 409 | topLayout->setSpacing(mSpacingHint); |
410 | topLayout->setMargin(mMarginHint); | 410 | topLayout->setMargin(mMarginHint); |
411 | 411 | ||
412 | QHBox *dummy = new QHBox(topFrame); | 412 | QHBox *dummy = new QHBox(topFrame); |
413 | KPrefsDialogWidTime *dayBegins = | 413 | KPrefsDialogWidTime *dayBegins = |
414 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 414 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
415 | dummy); | 415 | dummy); |
416 | //topLayout->addWidget(dayBegins->label(),2,0); | 416 | //topLayout->addWidget(dayBegins->label(),2,0); |
417 | 417 | ||
418 | //topLayout->addWidget(dayBegins->spinBox(),2,1); | 418 | //topLayout->addWidget(dayBegins->spinBox(),2,1); |
419 | topLayout->addMultiCellWidget(dummy,0,0,0,1); | 419 | topLayout->addMultiCellWidget(dummy,0,0,0,1); |
420 | 420 | ||
421 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), | 421 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), |
422 | topFrame),1,0); | 422 | topFrame),1,0); |
423 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); | 423 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); |
424 | mStartTimeSpin->setSuffix(":00"); | 424 | mStartTimeSpin->setSuffix(":00"); |
425 | topLayout->addWidget(mStartTimeSpin,1,1); | 425 | topLayout->addWidget(mStartTimeSpin,1,1); |
426 | 426 | ||
427 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), | 427 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), |
428 | topFrame),2,0); | 428 | topFrame),2,0); |
429 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); | 429 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); |
430 | mDefaultDurationSpin->setSuffix(":00"); | 430 | mDefaultDurationSpin->setSuffix(":00"); |
431 | topLayout->addWidget(mDefaultDurationSpin,2,1); | 431 | topLayout->addWidget(mDefaultDurationSpin,2,1); |
432 | 432 | ||
433 | QStringList alarmList; | 433 | QStringList alarmList; |
434 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") | 434 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") |
435 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; | 435 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; |
436 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 436 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
437 | 3,0); | 437 | 3,0); |
438 | mAlarmTimeCombo = new QComboBox(topFrame); | 438 | mAlarmTimeCombo = new QComboBox(topFrame); |
439 | mAlarmTimeCombo->insertStringList(alarmList); | 439 | mAlarmTimeCombo->insertStringList(alarmList); |
440 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 440 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
441 | int iii = 4; | 441 | int iii = 4; |
442 | if ( QApplication::desktop()->height() <= 240 ) { | 442 | if ( QApplication::desktop()->height() <= 240 ) { |
443 | topFrame = addPage(i18n("Time") +" 2",0,0); | 443 | topFrame = addPage(i18n("Time") +" 2",0,0); |
444 | topLayout = new QGridLayout(topFrame,1,2); | 444 | topLayout = new QGridLayout(topFrame,1,2); |
445 | topLayout->setSpacing(2); | 445 | topLayout->setSpacing(2); |
446 | topLayout->setMargin(3); | 446 | topLayout->setMargin(3); |
447 | iii = 0; | 447 | iii = 0; |
448 | } | 448 | } |
449 | 449 | ||
450 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 450 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, |
451 | i18n("Working Hours"), | 451 | i18n("Working Hours"), |
452 | topFrame); | 452 | topFrame); |
453 | topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1); | 453 | topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1); |
454 | workingHoursGroup->layout()->setSpacing( 0 ); | 454 | workingHoursGroup->layout()->setSpacing( 0 ); |
455 | workingHoursGroup->layout()->setMargin( 4 ); | 455 | workingHoursGroup->layout()->setMargin( 4 ); |
456 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 456 | QHBox *workStartBox = new QHBox(workingHoursGroup); |
457 | // workStartBox->setMargin( 0 ); | 457 | // workStartBox->setMargin( 0 ); |
458 | addWidTime(i18n("Daily starting hour:"), | 458 | addWidTime(i18n("Daily starting hour:"), |
459 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 459 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
460 | 460 | ||
461 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 461 | QHBox *workEndBox = new QHBox(workingHoursGroup); |
462 | //workEndBox->setMargin( 0 ); | 462 | //workEndBox->setMargin( 0 ); |
463 | addWidTime(i18n("Daily ending hour:"), | 463 | addWidTime(i18n("Daily ending hour:"), |
464 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 464 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
465 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 465 | QVBox *excludeBox = new QVBox(workingHoursGroup); |
466 | //excludeBox->setMargin( 0 ); | 466 | //excludeBox->setMargin( 0 ); |
467 | addWidBool(i18n("Exclude holidays"), | 467 | addWidBool(i18n("Exclude holidays"), |
468 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 468 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
469 | 469 | ||
470 | addWidBool(i18n("Exclude Saturdays"), | 470 | addWidBool(i18n("Exclude Saturdays"), |
471 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); | 471 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); |
472 | 472 | ||
473 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), | 473 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), |
474 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), | 474 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), |
475 | // topFrame); | 475 | // topFrame); |
476 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); | 476 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); |
477 | 477 | ||
478 | // topLayout->setRowStretch(6,1); | 478 | // topLayout->setRowStretch(6,1); |
479 | } | 479 | } |
480 | 480 | ||
481 | 481 | ||
482 | void KOPrefsDialog::setupViewsTab() | 482 | void KOPrefsDialog::setupViewsTab() |
483 | { | 483 | { |
484 | 484 | ||
485 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 485 | QFrame *topFrame = addPage(i18n("Views"),0,0); |
486 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 486 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
487 | 487 | ||
488 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 488 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); |
489 | topLayout->setSpacing(mSpacingHint); | 489 | topLayout->setSpacing(mSpacingHint); |
490 | topLayout->setMargin(mMarginHint); | 490 | topLayout->setMargin(mMarginHint); |
491 | 491 | ||
492 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 492 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
493 | // topLayout->addLayout(dayBeginsLayout,0,0); | 493 | // topLayout->addLayout(dayBeginsLayout,0,0); |
494 | 494 | ||
495 | // KPrefsDialogWidTime *dayBegins = | 495 | // KPrefsDialogWidTime *dayBegins = |
496 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 496 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
497 | // topFrame); | 497 | // topFrame); |
498 | // dayBeginsLayout->addWidget(dayBegins->label()); | 498 | // dayBeginsLayout->addWidget(dayBegins->label()); |
499 | // dayBeginsLayout->addStretch(1); | 499 | // dayBeginsLayout->addStretch(1); |
500 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 500 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
501 | 501 | ||
502 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 502 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
503 | // topLayout->addLayout(nextDaysLayout,1,0); | 503 | // topLayout->addLayout(nextDaysLayout,1,0); |
504 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); | 504 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); |
505 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); | 505 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); |
506 | // nextDaysLayout->addStretch(1); | 506 | // nextDaysLayout->addStretch(1); |
507 | // nextDaysLayout->addWidget(mNextXDaysSpin); | 507 | // nextDaysLayout->addWidget(mNextXDaysSpin); |
508 | 508 | ||
509 | 509 | ||
510 | int ii = 0; | 510 | int ii = 0; |
511 | KPrefsDialogWidBool *dummy = | 511 | KPrefsDialogWidBool *dummy = |
512 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), | 512 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), |
513 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); | 513 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); |
514 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 514 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
515 | 515 | ||
516 | 516 | ||
517 | 517 | ||
518 | 518 | ||
519 | 519 | ||
520 | 520 | ||
521 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 521 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
522 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 522 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
523 | //topLayout->setRowStretch(11,1); | 523 | //topLayout->setRowStretch(11,1); |
524 | 524 | ||
525 | 525 | ||
526 | 526 | ||
527 | 527 | ||
528 | #if 0 | 528 | #if 0 |
529 | 529 | ||
530 | topFrame = addPage(i18n("ViewChange"),0,0); | 530 | topFrame = addPage(i18n("ViewChange"),0,0); |
531 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 531 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
532 | 532 | ||
533 | topLayout = new QGridLayout(topFrame,6,1); | 533 | topLayout = new QGridLayout(topFrame,6,1); |
534 | topLayout->setSpacing(mSpacingHint); | 534 | topLayout->setSpacing(mSpacingHint); |
535 | topLayout->setMargin(mMarginHint); | 535 | topLayout->setMargin(mMarginHint); |
536 | ii = 0; | 536 | ii = 0; |
537 | 537 | ||
538 | #endif | 538 | #endif |
539 | 539 | ||
540 | dummy = | 540 | dummy = |
541 | addWidBool(i18n("Hold fullscreen on view change"), | 541 | addWidBool(i18n("Hold fullscreen on view change"), |
542 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); | 542 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); |
543 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 543 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
544 | 544 | ||
545 | dummy = | 545 | dummy = |
546 | addWidBool(i18n("Hold non-fullscreen on view change"), | 546 | addWidBool(i18n("Hold non-fullscreen on view change"), |
547 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 547 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
548 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 548 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
549 | 549 | ||
550 | 550 | ||
551 | 551 | ||
552 | KPrefsDialogWidBool *fullViewMonth = | 552 | KPrefsDialogWidBool *fullViewMonth = |
553 | addWidBool(i18n("Next days view uses full window"), | 553 | addWidBool(i18n("Next days view uses full window"), |
554 | &(KOPrefs::instance()->mFullViewMonth),topFrame); | 554 | &(KOPrefs::instance()->mFullViewMonth),topFrame); |
555 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); | 555 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); |
556 | 556 | ||
557 | 557 | ||
558 | KPrefsDialogWidBool *fullViewTodo = | 558 | KPrefsDialogWidBool *fullViewTodo = |
559 | addWidBool(i18n("Event list view uses full window"), | 559 | addWidBool(i18n("Event list view uses full window"), |
560 | &(KOPrefs::instance()->mFullViewTodo),topFrame); | 560 | &(KOPrefs::instance()->mFullViewTodo),topFrame); |
561 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); | 561 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); |
562 | dummy = | 562 | dummy = |
563 | addWidBool(i18n("Listview uses monthly timespan"), | 563 | addWidBool(i18n("Listview uses monthly timespan"), |
564 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); | 564 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); |
565 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 565 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
566 | dummy = | 566 | dummy = |
567 | addWidBool(i18n("Highlight selection in Time Edit"), | 567 | addWidBool(i18n("Highlight selection in Time Edit"), |
568 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); | 568 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); |
569 | topLayout->addWidget( dummy->checkBox(), ii++,0); | 569 | topLayout->addWidget( dummy->checkBox(), ii++,0); |
570 | 570 | ||
571 | KPrefsDialogWidBool *dailyRecur = | 571 | KPrefsDialogWidBool *dailyRecur = |
572 | addWidBool(i18n("Show events that recur daily in date nav."), | 572 | addWidBool(i18n("Show events that recur daily in date nav."), |
573 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 573 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
574 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 574 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
575 | 575 | ||
576 | KPrefsDialogWidBool *weeklyRecur = | 576 | KPrefsDialogWidBool *weeklyRecur = |
577 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 577 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
578 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 578 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
579 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 579 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
580 | 580 | ||
581 | #ifdef DESKTOP_VERSION | 581 | #ifdef DESKTOP_VERSION |
582 | KPrefsDialogWidBool *enableToolTips = | 582 | KPrefsDialogWidBool *enableToolTips = |
583 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | 583 | addWidBool(i18n("Enable tooltips displaying summary of ev."), |
584 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 584 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
585 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 585 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
586 | #endif | 586 | #endif |
587 | // ********************************************************* | 587 | // ********************************************************* |
588 | 588 | ||
589 | topFrame = addPage(i18n("Agenda View"),0,0); | 589 | topFrame = addPage(i18n("Agenda View"),0,0); |
590 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 590 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
591 | 591 | ||
592 | topLayout = new QGridLayout(topFrame,5,1); | 592 | topLayout = new QGridLayout(topFrame,5,1); |
593 | topLayout->setSpacing(mSpacingHint); | 593 | topLayout->setSpacing(mSpacingHint); |
594 | topLayout->setMargin(mMarginHint); | 594 | topLayout->setMargin(mMarginHint); |
595 | ii = 0; | 595 | ii = 0; |
596 | 596 | ||
597 | 597 | ||
598 | dummy = | 598 | dummy = |
599 | addWidBool(i18n("Show time in agenda items"), | 599 | addWidBool(i18n("Show time in agenda items"), |
600 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); | 600 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); |
601 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 601 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
602 | 602 | ||
603 | dummy = | 603 | dummy = |
604 | addWidBool(i18n("Highlight current day in agenda"), | 604 | addWidBool(i18n("Highlight current day in agenda"), |
605 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 605 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
606 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 606 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
607 | 607 | ||
608 | dummy = | 608 | dummy = |
609 | addWidBool(i18n("Use light color for highlight current day"), | 609 | addWidBool(i18n("Use light color for highlight current day"), |
610 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 610 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
611 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 611 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
612 | 612 | ||
613 | 613 | ||
614 | KPrefsDialogWidBool *marcusBainsEnabled = | 614 | KPrefsDialogWidBool *marcusBainsEnabled = |
615 | addWidBool(i18n("Show current time"), | 615 | addWidBool(i18n("Show current time"), |
616 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 616 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
617 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 617 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
618 | 618 | ||
619 | 619 | ||
620 | dummy = | 620 | dummy = |
621 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), | 621 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), |
622 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); | 622 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); |
623 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 623 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
624 | 624 | ||
625 | dummy = | 625 | dummy = |
626 | addWidBool(i18n("Set agenda to current time on change"), | 626 | addWidBool(i18n("Set agenda to current time on change"), |
627 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); | 627 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); |
628 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 628 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
629 | 629 | ||
630 | 630 | ||
631 | dummy = | 631 | dummy = |
632 | addWidBool(i18n("Allday Agenda view shows todos"), | 632 | addWidBool(i18n("Allday Agenda view shows todos"), |
633 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | 633 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); |
634 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 634 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
635 | 635 | ||
636 | 636 | ||
637 | 637 | ||
638 | dummy = | 638 | dummy = |
639 | addWidBool(i18n("Agenda view shows completed todos"), | 639 | addWidBool(i18n("Agenda view shows completed todos"), |
640 | &(KOPrefs::instance()->mShowCompletedTodoInAgenda),topFrame); | 640 | &(KOPrefs::instance()->mShowCompletedTodoInAgenda),topFrame); |
641 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 641 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
642 | 642 | ||
643 | 643 | ||
644 | 644 | ||
645 | 645 | ||
646 | 646 | ||
647 | topFrame = addPage(i18n("Month View"),0,0); | 647 | topFrame = addPage(i18n("Month View"),0,0); |
648 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 648 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
649 | 649 | ||
650 | topLayout = new QGridLayout(topFrame,5,1); | 650 | topLayout = new QGridLayout(topFrame,5,1); |
651 | topLayout->setSpacing(mSpacingHint); | 651 | topLayout->setSpacing(mSpacingHint); |
652 | topLayout->setMargin(mMarginHint); | 652 | topLayout->setMargin(mMarginHint); |
653 | ii = 0; | 653 | ii = 0; |
654 | QLabel *lab; | 654 | QLabel *lab; |
655 | QHBox *habo = new QHBox( topFrame ); | 655 | QHBox *habo = new QHBox( topFrame ); |
656 | if ( QApplication::desktop()->width() <= 480 ) { | 656 | if ( QApplication::desktop()->width() <= 480 ) { |
657 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 657 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
658 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 658 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
659 | ii++; | 659 | ii++; |
660 | } else { | 660 | } else { |
661 | new QLabel ( i18n("Show events that recur "), habo ); | 661 | new QLabel ( i18n("Show events that recur "), habo ); |
662 | } | 662 | } |
663 | dailyRecur = | 663 | dailyRecur = |
664 | addWidBool(i18n("daily"), | 664 | addWidBool(i18n("daily"), |
665 | &(KOPrefs::instance()->mMonthDailyRecur),habo); | 665 | &(KOPrefs::instance()->mMonthDailyRecur),habo); |
666 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 666 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
667 | 667 | ||
668 | weeklyRecur = | 668 | weeklyRecur = |
669 | addWidBool(i18n("weekly"), | 669 | addWidBool(i18n("weekly"), |
670 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 670 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
671 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 671 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
672 | ii++; | 672 | ii++; |
673 | 673 | ||
674 | 674 | ||
675 | habo = new QHBox( topFrame ); | 675 | habo = new QHBox( topFrame ); |
676 | if ( QApplication::desktop()->width() <= 480 ) { | 676 | if ( QApplication::desktop()->width() <= 480 ) { |
677 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 677 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
678 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 678 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
679 | ii++; | 679 | ii++; |
680 | 680 | ||
681 | } else { | 681 | } else { |
682 | new QLabel ( i18n("Show in every cell "), habo ); | 682 | new QLabel ( i18n("Show in every cell "), habo ); |
683 | } | 683 | } |
684 | weeklyRecur = | 684 | weeklyRecur = |
685 | addWidBool(i18n("short month"), | 685 | addWidBool(i18n("short month"), |
686 | &(KOPrefs::instance()->mMonthShowShort),habo); | 686 | &(KOPrefs::instance()->mMonthShowShort),habo); |
687 | weeklyRecur = | 687 | weeklyRecur = |
688 | addWidBool(i18n("icons"), | 688 | addWidBool(i18n("icons"), |
689 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 689 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
690 | weeklyRecur = | 690 | weeklyRecur = |
691 | addWidBool(i18n("times"), | 691 | addWidBool(i18n("times"), |
692 | &(KOPrefs::instance()->mMonthShowTimes),habo); | 692 | &(KOPrefs::instance()->mMonthShowTimes),habo); |
693 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 693 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
694 | ii++; | 694 | ii++; |
695 | #ifdef DESKTOP_VERSION | 695 | #ifdef DESKTOP_VERSION |
696 | KPrefsDialogWidBool *enableMonthScroll = | 696 | KPrefsDialogWidBool *enableMonthScroll = |
697 | addWidBool(i18n("Enable scrollbars in month view cells"), | 697 | addWidBool(i18n("Enable scrollbars in month view cells"), |
698 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 698 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
699 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 699 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
700 | #endif | 700 | #endif |
701 | dummy = | 701 | dummy = |
702 | addWidBool(i18n("Week view mode uses bigger font"), | 702 | addWidBool(i18n("Week view mode uses bigger font"), |
703 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); | 703 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); |
704 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 704 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
705 | dummy = | 705 | dummy = |
706 | addWidBool(i18n("Week view mode uses row layout"), | 706 | addWidBool(i18n("Week view mode uses row layout"), |
707 | &(KOPrefs::instance()->mMonthViewWeekRowlayout),topFrame); | 707 | &(KOPrefs::instance()->mMonthViewWeekRowlayout),topFrame); |
708 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 708 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
709 | dummy = | 709 | dummy = |
710 | addWidBool(i18n("Show Sat/Sun together"), | 710 | addWidBool(i18n("Show Sat/Sun together"), |
711 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 711 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
712 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 712 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
713 | 713 | ||
714 | KPrefsDialogWidBool *coloredCategoriesInMonthView = | 714 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
715 | addWidBool(i18n("Month view uses category colors"), | 715 | addWidBool(i18n("Month view uses category colors"), |
716 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 716 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
717 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 717 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
718 | 718 | ||
719 | dummy = | 719 | dummy = |
720 | addWidBool(i18n("Category colors are applied to text"), | 720 | addWidBool(i18n("Category colors are applied to text"), |
721 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 721 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
722 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 722 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
723 | 723 | ||
724 | 724 | ||
725 | 725 | ||
726 | if ( QApplication::desktop()->height() <= 240 ) { | 726 | if ( QApplication::desktop()->height() <= 240 ) { |
727 | topFrame = addPage(i18n("Month View") +" 2",0,0); | 727 | topFrame = addPage(i18n("Month View") +" 2",0,0); |
728 | topLayout = new QGridLayout(topFrame,4,1); | 728 | topLayout = new QGridLayout(topFrame,4,1); |
729 | topLayout->setSpacing(2); | 729 | topLayout->setSpacing(2); |
730 | topLayout->setMargin(1); | 730 | topLayout->setMargin(1); |
731 | ii = 0; | 731 | ii = 0; |
732 | } | 732 | } |
733 | 733 | ||
734 | 734 | ||
735 | coloredCategoriesInMonthView = | 735 | coloredCategoriesInMonthView = |
736 | addWidBool(i18n("Month view uses day colors"), | 736 | addWidBool(i18n("Month view uses day colors"), |
737 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 737 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
738 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 738 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
739 | 739 | ||
740 | KPrefsDialogWidColor *holidayColor = | 740 | KPrefsDialogWidColor *holidayColor = |
741 | addWidColor(i18n("Day color odd months"), | 741 | addWidColor(i18n("Day color odd months"), |
742 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 742 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
743 | topLayout->addWidget(holidayColor->label(),ii,0); | 743 | topLayout->addWidget(holidayColor->label(),ii,0); |
744 | topLayout->addWidget(holidayColor->button(),ii++,1); | 744 | topLayout->addWidget(holidayColor->button(),ii++,1); |
745 | 745 | ||
746 | holidayColor = | 746 | holidayColor = |
747 | addWidColor(i18n("Day color even months"), | 747 | addWidColor(i18n("Day color even months"), |
748 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 748 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
749 | topLayout->addWidget(holidayColor->label(),ii,0); | 749 | topLayout->addWidget(holidayColor->label(),ii,0); |
750 | topLayout->addWidget(holidayColor->button(),ii++,1); | 750 | topLayout->addWidget(holidayColor->button(),ii++,1); |
751 | 751 | ||
752 | 752 | ||
753 | holidayColor = | 753 | holidayColor = |
754 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 754 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
755 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 755 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
756 | topLayout->addWidget(holidayColor->label(),ii,0); | 756 | topLayout->addWidget(holidayColor->label(),ii,0); |
757 | topLayout->addWidget(holidayColor->button(),ii++,1); | 757 | topLayout->addWidget(holidayColor->button(),ii++,1); |
758 | // *********************** What'sNext View | 758 | // *********************** What'sNext View |
759 | topFrame = addPage(i18n("What's Next View"),0,0); | 759 | topFrame = addPage(i18n("What's Next View"),0,0); |
760 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 760 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
761 | 761 | ||
762 | topLayout = new QGridLayout(topFrame,4,1); | 762 | topLayout = new QGridLayout(topFrame,4,1); |
763 | topLayout->setSpacing(mSpacingHint); | 763 | topLayout->setSpacing(mSpacingHint); |
764 | topLayout->setMargin(mMarginHint); | 764 | topLayout->setMargin(mMarginHint); |
765 | ii = 0; | 765 | ii = 0; |
766 | 766 | ||
767 | 767 | ||
768 | QHBox* hdummy = new QHBox(topFrame); | 768 | QHBox* hdummy = new QHBox(topFrame); |
769 | new QLabel(i18n("Days in What's Next:"),hdummy); | 769 | new QLabel(i18n("Days in What's Next:"),hdummy); |
770 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); | 770 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); |
771 | 771 | ||
772 | topLayout->addWidget(hdummy,ii++,0); | 772 | topLayout->addWidget(hdummy,ii++,0); |
773 | 773 | ||
774 | QHBox *prioBox = new QHBox(topFrame); | 774 | QHBox *prioBox = new QHBox(topFrame); |
775 | // intervalBox->setSpacing(mSpacingHint); | 775 | // intervalBox->setSpacing(mSpacingHint); |
776 | topLayout->addWidget(prioBox,ii++,0); | 776 | topLayout->addWidget(prioBox,ii++,0); |
777 | 777 | ||
778 | QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); | 778 | QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); |
779 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 779 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
780 | if ( QApplication::desktop()->width() < 300 ) | 780 | if ( QApplication::desktop()->width() < 300 ) |
781 | mPrioSpin->setFixedWidth( 40 ); | 781 | mPrioSpin->setFixedWidth( 40 ); |
782 | KPrefsDialogWidBool *passwdk = | 782 | KPrefsDialogWidBool *passwdk = |
783 | 783 | ||
784 | addWidBool(i18n("Show times on two lines"), | 784 | addWidBool(i18n("Show times on two lines"), |
785 | &(KOPrefs::instance()->mWhatsNextTime2Lines),topFrame); | 785 | &(KOPrefs::instance()->mWhatsNextTime2Lines),topFrame); |
786 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 786 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
787 | passwdk = | 787 | passwdk = |
788 | 788 | ||
789 | addWidBool(i18n("Show events that are done"), | 789 | addWidBool(i18n("Show events that are done"), |
790 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); | 790 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); |
791 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 791 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
792 | passwdk = | 792 | passwdk = |
793 | addWidBool(i18n("Show parent To-Do's"), | 793 | addWidBool(i18n("Show parent To-Do's"), |
794 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 794 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |
795 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 795 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
796 | 796 | ||
797 | passwdk = | 797 | passwdk = |
798 | addWidBool(i18n("Show location"), | 798 | addWidBool(i18n("Show location"), |
799 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 799 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
800 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 800 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
801 | 801 | ||
802 | 802 | ||
803 | passwdk = | 803 | passwdk = |
804 | addWidBool(i18n("Use short date in WN+Event view"), | 804 | addWidBool(i18n("Use short date in WN+Event view"), |
805 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 805 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
806 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 806 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
807 | 807 | ||
808 | 808 | ||
809 | 809 | ||
810 | 810 | ||
811 | // *********************** Todo View | 811 | // *********************** Todo View |
812 | 812 | ||
813 | topFrame = addPage(i18n("Todo View"),0,0); | 813 | topFrame = addPage(i18n("Todo View"),0,0); |
814 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 814 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
815 | 815 | ||
816 | topLayout = new QGridLayout(topFrame,4,1); | 816 | topLayout = new QGridLayout(topFrame,4,1); |
817 | topLayout->setSpacing(mSpacingHint); | 817 | topLayout->setSpacing(mSpacingHint); |
818 | topLayout->setMargin(mMarginHint); | 818 | topLayout->setMargin(mMarginHint); |
819 | ii = 0; | 819 | ii = 0; |
820 | dummy = | 820 | dummy = |
821 | addWidBool(i18n("Hide not running Todos in To-do view"), | 821 | addWidBool(i18n("Hide not running Todos in To-do view"), |
822 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); | 822 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); |
823 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 823 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
824 | 824 | ||
825 | 825 | ||
826 | KPrefsDialogWidBool *showCompletedTodo = | 826 | KPrefsDialogWidBool *showCompletedTodo = |
827 | addWidBool(i18n("To-do view shows completed Todos"), | 827 | addWidBool(i18n("To-do view shows completed Todos"), |
828 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 828 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
829 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 829 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
830 | dummy = | 830 | dummy = |
831 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 831 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
832 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 832 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
833 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 833 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
834 | 834 | ||
835 | dummy = | 835 | dummy = |
836 | addWidBool(i18n("Small To-do view uses smaller font"), | 836 | addWidBool(i18n("Small To-do view uses smaller font"), |
837 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 837 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
838 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 838 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
839 | 839 | ||
840 | 840 | ||
841 | 841 | ||
842 | dummy = | 842 | dummy = |
843 | addWidBool(i18n("Todo view uses category colors"), | 843 | addWidBool(i18n("Todo view uses category colors"), |
844 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 844 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
845 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 845 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
846 | 846 | ||
847 | 847 | ||
848 | QWidget* wid = new QWidget( topFrame ); | 848 | QWidget* wid = new QWidget( topFrame ); |
849 | // Todo run today color | 849 | // Todo run today color |
850 | KPrefsDialogWidColor *todoRunColor = | 850 | KPrefsDialogWidColor *todoRunColor = |
851 | addWidColor(i18n("Color for running todos:"), | 851 | addWidColor(i18n("Color for running todos:"), |
852 | &(KOPrefs::instance()->mTodoRunColor),wid); | 852 | &(KOPrefs::instance()->mTodoRunColor),wid); |
853 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 853 | QHBoxLayout *widLayout = new QHBoxLayout(wid); |
854 | widLayout->addWidget( todoRunColor->label() ); | 854 | widLayout->addWidget( todoRunColor->label() ); |
855 | widLayout->addWidget( todoRunColor->button() ); | 855 | widLayout->addWidget( todoRunColor->button() ); |
856 | topLayout->addWidget(wid,ii++,0); | 856 | topLayout->addWidget(wid,ii++,0); |
857 | 857 | ||
858 | wid = new QWidget( topFrame ); | 858 | wid = new QWidget( topFrame ); |
859 | // Todo due today color | 859 | // Todo due today color |
860 | KPrefsDialogWidColor *todoDueTodayColor = | 860 | KPrefsDialogWidColor *todoDueTodayColor = |
861 | addWidColor(i18n("Todo due today color:"), | 861 | addWidColor(i18n("Todo due today color:"), |
862 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 862 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
863 | widLayout = new QHBoxLayout(wid); | 863 | widLayout = new QHBoxLayout(wid); |
864 | widLayout->addWidget( todoDueTodayColor->label() ); | 864 | widLayout->addWidget( todoDueTodayColor->label() ); |
865 | widLayout->addWidget( todoDueTodayColor->button() ); | 865 | widLayout->addWidget( todoDueTodayColor->button() ); |
866 | topLayout->addWidget(wid,ii++,0); | 866 | topLayout->addWidget(wid,ii++,0); |
867 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 867 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
868 | 868 | ||
869 | // Todo overdue color | 869 | // Todo overdue color |
870 | wid = new QWidget( topFrame ); | 870 | wid = new QWidget( topFrame ); |
871 | widLayout = new QHBoxLayout(wid); | 871 | widLayout = new QHBoxLayout(wid); |
872 | KPrefsDialogWidColor *todoOverdueColor = | 872 | KPrefsDialogWidColor *todoOverdueColor = |
873 | addWidColor(i18n("Todo overdue color:"), | 873 | addWidColor(i18n("Todo overdue color:"), |
874 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 874 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
875 | widLayout->addWidget(todoOverdueColor->label()); | 875 | widLayout->addWidget(todoOverdueColor->label()); |
876 | widLayout->addWidget(todoOverdueColor->button()); | 876 | widLayout->addWidget(todoOverdueColor->button()); |
877 | topLayout->addWidget(wid,ii++,0); | 877 | topLayout->addWidget(wid,ii++,0); |
878 | 878 | ||
879 | dummy = | 879 | dummy = |
880 | addWidBool(i18n("Colors are applied to text"), | 880 | addWidBool(i18n("Colors are applied to text"), |
881 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 881 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
882 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 882 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
883 | 883 | ||
884 | 884 | ||
885 | 885 | ||
886 | topFrame = addPage(i18n("View Options"),0,0); | 886 | topFrame = addPage(i18n("View Options"),0,0); |
887 | 887 | ||
888 | topLayout = new QGridLayout(topFrame,4,1); | 888 | topLayout = new QGridLayout(topFrame,4,1); |
889 | topLayout->setSpacing(mSpacingHint); | 889 | topLayout->setSpacing(mSpacingHint); |
890 | topLayout->setMargin(mMarginHint); | 890 | topLayout->setMargin(mMarginHint); |
891 | ii = 0; | 891 | ii = 0; |
892 | 892 | ||
893 | dummy = | 893 | dummy = |
894 | addWidBool(i18n("Show Sync Events"), | 894 | addWidBool(i18n("Show Sync Events"), |
895 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 895 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
896 | topLayout->addWidget(dummy->checkBox(), ii++,0); | 896 | topLayout->addWidget(dummy->checkBox(), ii++,0); |
897 | 897 | ||
898 | lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); | 898 | lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); |
899 | topLayout->addWidget(lab ,ii++,0); | 899 | topLayout->addWidget(lab ,ii++,0); |
900 | 900 | ||
901 | dummy = addWidBool(i18n("Details"), | 901 | dummy = addWidBool(i18n("Details"), |
902 | &(KOPrefs::instance()->mEVshowDetails),topFrame); | 902 | &(KOPrefs::instance()->mEVshowDetails),topFrame); |
903 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 903 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
904 | dummy = addWidBool(i18n("Created time"), | 904 | dummy = addWidBool(i18n("Created time"), |
905 | &(KOPrefs::instance()->mEVshowCreated),topFrame); | 905 | &(KOPrefs::instance()->mEVshowCreated),topFrame); |
906 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 906 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
907 | dummy = addWidBool(i18n("Last modified time"), | 907 | dummy = addWidBool(i18n("Last modified time"), |
908 | &(KOPrefs::instance()->mEVshowChanged),topFrame); | 908 | &(KOPrefs::instance()->mEVshowChanged),topFrame); |
909 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 909 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
910 | 910 | ||
911 | 911 | ||
912 | lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); | 912 | lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); |
913 | topLayout->addWidget(lab ,ii++,0); | 913 | topLayout->addWidget(lab ,ii++,0); |
914 | 914 | ||
915 | dummy = addWidBool(i18n("Details"), | 915 | dummy = addWidBool(i18n("Details"), |
916 | &(KOPrefs::instance()->mWTshowDetails),topFrame); | 916 | &(KOPrefs::instance()->mWTshowDetails),topFrame); |
917 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 917 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
918 | dummy = addWidBool(i18n("Created time"), | 918 | dummy = addWidBool(i18n("Created time"), |
919 | &(KOPrefs::instance()->mWTshowCreated),topFrame); | 919 | &(KOPrefs::instance()->mWTshowCreated),topFrame); |
920 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 920 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
921 | dummy = addWidBool(i18n("Last modified time"), | 921 | dummy = addWidBool(i18n("Last modified time"), |
922 | &(KOPrefs::instance()->mWTshowChanged),topFrame); | 922 | &(KOPrefs::instance()->mWTshowChanged),topFrame); |
923 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 923 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
924 | 924 | ||
925 | topFrame = addPage(i18n("Conflict detection"),0,0); | ||
926 | |||
927 | topLayout = new QGridLayout(topFrame,2,1); | ||
928 | topLayout->setSpacing(mSpacingHint); | ||
929 | topLayout->setMargin(mMarginHint); | ||
930 | ii = 0; | ||
931 | dummy = addWidBool(i18n("Enable conflict detection"), | ||
932 | &(KOPrefs::instance()->mDetectConflicts),topFrame); | ||
933 | topLayout->addWidget(dummy->checkBox(), ii++,0); | ||
934 | topFrame = new QFrame( topFrame ); | ||
935 | topLayout->addWidget(topFrame ,ii++,0); | ||
936 | topLayout = new QGridLayout(topFrame,4,1); | ||
937 | connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) ); | ||
938 | topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an <b>edited event</b> with other <b>existing events</b> for overlapping. You can define which events are checked:"), topFrame ) , ii++,0); | ||
939 | topLayout->addWidget( new QLabel ( i18n("Filter for the edited event"), topFrame ) , ii++,0); | ||
940 | mFilterEditItem = new QComboBox( topFrame ); | ||
941 | topLayout->addWidget(mFilterEditItem,ii++,0); | ||
942 | topLayout->addWidget( new QLabel ( i18n("Filter for other existing events"), topFrame ) , ii++,0); | ||
943 | mFilterAllItem = new QComboBox( topFrame ); | ||
944 | topLayout->addWidget(mFilterAllItem,ii++,0); | ||
945 | dummy = addWidBool(i18n("Check Allday with Allday"), | ||
946 | &(KOPrefs::instance()->mCheckConflictsAllDayAllDay),topFrame); | ||
947 | topLayout->addWidget(dummy->checkBox(), ii++,0); | ||
948 | dummy = addWidBool(i18n("Check Allday with NonAllday"), | ||
949 | &(KOPrefs::instance()->mCheckConflictsAllDayNonAD),topFrame); | ||
950 | topLayout->addWidget(dummy->checkBox(), ii++,0); | ||
951 | dummy = addWidBool(i18n("Check NonAllday with Allday"), | ||
952 | &(KOPrefs::instance()->mCheckConflictsNonADAllDay),topFrame); | ||
953 | topLayout->addWidget(dummy->checkBox(), ii++,0); | ||
954 | dummy = addWidBool(i18n("Check NonAllday with NonAllday"), | ||
955 | &(KOPrefs::instance()->mCheckConflictsNonADNonAD),topFrame); | ||
956 | topLayout->addWidget(dummy->checkBox(), ii++,0); | ||
957 | |||
958 | |||
959 | |||
925 | 960 | ||
926 | topFrame = addPage(i18n("Alarm"),0,0); | 961 | topFrame = addPage(i18n("Alarm"),0,0); |
927 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 962 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
928 | 963 | ||
929 | topLayout = new QGridLayout(topFrame,2,1); | 964 | topLayout = new QGridLayout(topFrame,2,1); |
930 | topLayout->setSpacing(mSpacingHint); | 965 | topLayout->setSpacing(mSpacingHint); |
931 | topLayout->setMargin(mMarginHint); | 966 | topLayout->setMargin(mMarginHint); |
932 | int iii = 0; | 967 | int iii = 0; |
933 | 968 | ||
934 | dummy = | 969 | dummy = |
935 | addWidBool(i18n("Use internal alarm notification"), | 970 | addWidBool(i18n("Use internal alarm notification"), |
936 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 971 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
937 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 972 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
938 | 973 | ||
939 | if ( QApplication::desktop()->height() > 240 ) { | 974 | if ( QApplication::desktop()->height() > 240 ) { |
940 | 975 | ||
941 | lab = new QLabel( i18n("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"), topFrame); | 976 | lab = new QLabel( i18n("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"), topFrame); |
942 | 977 | ||
943 | topLayout->addWidget(lab ,iii++,0); | 978 | topLayout->addWidget(lab ,iii++,0); |
944 | } | 979 | } |
945 | #ifndef DESKTOP_VERSION | 980 | #ifndef DESKTOP_VERSION |
946 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 981 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
947 | #else | 982 | #else |
948 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 983 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
949 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 984 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
950 | #endif | 985 | #endif |
951 | 986 | ||
952 | QHBox* dummyBox = new QHBox(topFrame); | 987 | QHBox* dummyBox = new QHBox(topFrame); |
953 | new QLabel(i18n("Play beeps count:"),dummyBox); | 988 | new QLabel(i18n("Play beeps count:"),dummyBox); |
954 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 989 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
955 | topLayout->addWidget(dummyBox,iii++,0); | 990 | topLayout->addWidget(dummyBox,iii++,0); |
956 | 991 | ||
957 | dummyBox = new QHBox(topFrame); | 992 | dummyBox = new QHBox(topFrame); |
958 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 993 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
959 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 994 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
960 | topLayout->addWidget(dummyBox,iii++,0); | 995 | topLayout->addWidget(dummyBox,iii++,0); |
961 | 996 | ||
962 | dummyBox = new QHBox(topFrame); | 997 | dummyBox = new QHBox(topFrame); |
963 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 998 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
964 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 999 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
965 | topLayout->addWidget(dummyBox,iii++,0); | 1000 | topLayout->addWidget(dummyBox,iii++,0); |
966 | 1001 | ||
967 | dummyBox = new QHBox(topFrame); | 1002 | dummyBox = new QHBox(topFrame); |
968 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 1003 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
969 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 1004 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
970 | topLayout->addWidget(dummyBox,iii++,0); | 1005 | topLayout->addWidget(dummyBox,iii++,0); |
971 | 1006 | ||
972 | 1007 | ||
973 | 1008 | ||
974 | QHBox* hbo = new QHBox ( topFrame ); | 1009 | QHBox* hbo = new QHBox ( topFrame ); |
975 | mDefaultAlarmFile = new QLineEdit(hbo); | 1010 | mDefaultAlarmFile = new QLineEdit(hbo); |
976 | QPushButton * loadTemplate = new QPushButton(hbo); | 1011 | QPushButton * loadTemplate = new QPushButton(hbo); |
977 | QPixmap icon; | 1012 | QPixmap icon; |
978 | if ( QApplication::desktop()->width() < 321 ) | 1013 | if ( QApplication::desktop()->width() < 321 ) |
979 | icon = SmallIcon("fileimport16"); | 1014 | icon = SmallIcon("fileimport16"); |
980 | else | 1015 | else |
981 | icon = SmallIcon("fileimport"); | 1016 | icon = SmallIcon("fileimport"); |
982 | loadTemplate->setIconSet (icon ) ; | 1017 | loadTemplate->setIconSet (icon ) ; |
983 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); | 1018 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); |
984 | int size = loadTemplate->sizeHint().height(); | 1019 | int size = loadTemplate->sizeHint().height(); |
985 | loadTemplate->setFixedSize( size, size ); | 1020 | loadTemplate->setFixedSize( size, size ); |
986 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); | 1021 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); |
987 | // topLayout->addWidget(lab ,iii++,0); | 1022 | // topLayout->addWidget(lab ,iii++,0); |
988 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); | 1023 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); |
989 | topLayout->addWidget(lab ,iii++,0); | 1024 | topLayout->addWidget(lab ,iii++,0); |
990 | topLayout->addWidget(hbo,iii++,0); | 1025 | topLayout->addWidget(hbo,iii++,0); |
991 | // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); | 1026 | // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); |
992 | 1027 | ||
993 | // topLayout->addWidget(lab ,iii++,0); | 1028 | // topLayout->addWidget(lab ,iii++,0); |
994 | // #ifndef DESKTOP_VERSION | 1029 | // #ifndef DESKTOP_VERSION |
995 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 1030 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
996 | // #else | 1031 | // #else |
997 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 1032 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
998 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 1033 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
999 | // #endif | 1034 | // #endif |
1000 | 1035 | ||
1001 | 1036 | ||
1002 | } | 1037 | } |
1003 | 1038 | ||
1004 | void KOPrefsDialog::selectSoundFile() | 1039 | void KOPrefsDialog::selectSoundFile() |
1005 | { | 1040 | { |
1006 | QString fileName = mDefaultAlarmFile->text(); | 1041 | QString fileName = mDefaultAlarmFile->text(); |
1007 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); | 1042 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); |
1008 | if ( fileName.length() > 0 ) | 1043 | if ( fileName.length() > 0 ) |
1009 | mDefaultAlarmFile->setText( fileName ); | 1044 | mDefaultAlarmFile->setText( fileName ); |
1010 | } | 1045 | } |
1011 | void KOPrefsDialog::setupFontsTab() | 1046 | void KOPrefsDialog::setupFontsTab() |
1012 | { | 1047 | { |
1013 | 1048 | ||
1014 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 1049 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
1015 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 1050 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
1016 | 1051 | ||
1017 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 1052 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
1018 | topLayout->setSpacing(1); | 1053 | topLayout->setSpacing(1); |
1019 | topLayout->setMargin(3); | 1054 | topLayout->setMargin(3); |
1020 | KPrefsDialogWidFont * tVFont; | 1055 | KPrefsDialogWidFont * tVFont; |
1021 | int i = 0; | 1056 | int i = 0; |
1022 | KPrefsDialogWidFont *timeLabelsFont = | 1057 | KPrefsDialogWidFont *timeLabelsFont = |
1023 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), | 1058 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), |
1024 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); | 1059 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); |
1025 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 1060 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
1026 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 1061 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
1027 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 1062 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
1028 | ++i; | 1063 | ++i; |
1029 | 1064 | ||
1030 | 1065 | ||
1031 | timeLabelsFont = | 1066 | timeLabelsFont = |
1032 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), | 1067 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), |
1033 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); | 1068 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); |
1034 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 1069 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
1035 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 1070 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
1036 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 1071 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
1037 | ++i; | 1072 | ++i; |
1038 | 1073 | ||
1039 | KPrefsDialogWidFont *timeBarFont = | 1074 | KPrefsDialogWidFont *timeBarFont = |
1040 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), | 1075 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), |
1041 | &(KOPrefs::instance()->mTimeBarFont),topFrame); | 1076 | &(KOPrefs::instance()->mTimeBarFont),topFrame); |
1042 | topLayout->addWidget(timeBarFont->label(),i,0); | 1077 | topLayout->addWidget(timeBarFont->label(),i,0); |
1043 | topLayout->addWidget(timeBarFont->preview(),i,1); | 1078 | topLayout->addWidget(timeBarFont->preview(),i,1); |
1044 | topLayout->addWidget(timeBarFont->button(),i,2); | 1079 | topLayout->addWidget(timeBarFont->button(),i,2); |
1045 | ++i; | 1080 | ++i; |
1046 | 1081 | ||
1047 | 1082 | ||
1048 | KPrefsDialogWidFont *marcusBainsFont = | 1083 | KPrefsDialogWidFont *marcusBainsFont = |
1049 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), | 1084 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), |
1050 | &(KOPrefs::instance()->mMarcusBainsFont),topFrame); | 1085 | &(KOPrefs::instance()->mMarcusBainsFont),topFrame); |
1051 | topLayout->addWidget(marcusBainsFont->label(),i,0); | 1086 | topLayout->addWidget(marcusBainsFont->label(),i,0); |
1052 | topLayout->addWidget(marcusBainsFont->preview(),i,1); | 1087 | topLayout->addWidget(marcusBainsFont->preview(),i,1); |
1053 | topLayout->addWidget(marcusBainsFont->button(),i,2); | 1088 | topLayout->addWidget(marcusBainsFont->button(),i,2); |
1054 | ++i; | 1089 | ++i; |
1055 | 1090 | ||
1056 | tVFont = | 1091 | tVFont = |
1057 | addWidFont(i18n("Summary"),i18n("Event Viewer:"), | 1092 | addWidFont(i18n("Summary"),i18n("Event Viewer:"), |
1058 | &(KOPrefs::instance()->mEventViewFont),topFrame); | 1093 | &(KOPrefs::instance()->mEventViewFont),topFrame); |
1059 | topLayout->addWidget(tVFont->label(),i,0); | 1094 | topLayout->addWidget(tVFont->label(),i,0); |
1060 | topLayout->addWidget(tVFont->preview(),i,1); | 1095 | topLayout->addWidget(tVFont->preview(),i,1); |
1061 | topLayout->addWidget(tVFont->button(),i,2); | 1096 | topLayout->addWidget(tVFont->button(),i,2); |
1062 | ++i; | 1097 | ++i; |
1063 | 1098 | ||
1064 | 1099 | ||
1065 | 1100 | ||
1066 | tVFont = | 1101 | tVFont = |
1067 | addWidFont(i18n("Details"),i18n("EditorBox:"), | 1102 | addWidFont(i18n("Details"),i18n("EditorBox:"), |
1068 | &(KOPrefs::instance()->mEditBoxFont),topFrame); | 1103 | &(KOPrefs::instance()->mEditBoxFont),topFrame); |
1069 | topLayout->addWidget(tVFont->label(),i,0); | 1104 | topLayout->addWidget(tVFont->label(),i,0); |
1070 | topLayout->addWidget(tVFont->preview(),i,1); | 1105 | topLayout->addWidget(tVFont->preview(),i,1); |
1071 | topLayout->addWidget(tVFont->button(),i,2); | 1106 | topLayout->addWidget(tVFont->button(),i,2); |
1072 | ++i; | 1107 | ++i; |
1073 | 1108 | ||
1074 | 1109 | ||
1075 | 1110 | ||
1076 | topLayout->setColStretch(1,1); | 1111 | topLayout->setColStretch(1,1); |
1077 | topLayout->setRowStretch(4,1); | 1112 | topLayout->setRowStretch(4,1); |
1078 | 1113 | ||
1079 | 1114 | ||
1080 | i = 0; | 1115 | i = 0; |
1081 | topFrame = addPage(i18n("View Fonts"),0, | 1116 | topFrame = addPage(i18n("View Fonts"),0, |
1082 | DesktopIcon("fonts",KIcon::SizeMedium)); | 1117 | DesktopIcon("fonts",KIcon::SizeMedium)); |
1083 | 1118 | ||
1084 | topLayout = new QGridLayout(topFrame,7,3); | 1119 | topLayout = new QGridLayout(topFrame,7,3); |
1085 | topLayout->setSpacing(1); | 1120 | topLayout->setSpacing(1); |
1086 | topLayout->setMargin(3); | 1121 | topLayout->setMargin(3); |
1087 | 1122 | ||
1088 | tVFont = | 1123 | tVFont = |
1089 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), | 1124 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), |
1090 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); | 1125 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); |
1091 | topLayout->addWidget(tVFont->label(),i,0); | 1126 | topLayout->addWidget(tVFont->label(),i,0); |
1092 | topLayout->addWidget(tVFont->preview(),i,1); | 1127 | topLayout->addWidget(tVFont->preview(),i,1); |
1093 | topLayout->addWidget(tVFont->button(),i,2); | 1128 | topLayout->addWidget(tVFont->button(),i,2); |
1094 | ++i; | 1129 | ++i; |
1095 | KPrefsDialogWidFont *agendaViewFont = | 1130 | KPrefsDialogWidFont *agendaViewFont = |
1096 | addWidFont(i18n("Event text"),i18n("Agenda view:"), | 1131 | addWidFont(i18n("Event text"),i18n("Agenda view:"), |
1097 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); | 1132 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); |
1098 | topLayout->addWidget(agendaViewFont->label(),i,0); | 1133 | topLayout->addWidget(agendaViewFont->label(),i,0); |
1099 | topLayout->addWidget(agendaViewFont->preview(),i,1); | 1134 | topLayout->addWidget(agendaViewFont->preview(),i,1); |
1100 | topLayout->addWidget(agendaViewFont->button(),i,2); | 1135 | topLayout->addWidget(agendaViewFont->button(),i,2); |
1101 | ++i; | 1136 | ++i; |
1102 | 1137 | ||
1103 | 1138 | ||
1104 | KPrefsDialogWidFont *monthViewFont = | 1139 | KPrefsDialogWidFont *monthViewFont = |
1105 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), | 1140 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), |
1106 | i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); | 1141 | i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); |
1107 | topLayout->addWidget(monthViewFont->label(),i,0); | 1142 | topLayout->addWidget(monthViewFont->label(),i,0); |
1108 | topLayout->addWidget(monthViewFont->preview(),i,1); | 1143 | topLayout->addWidget(monthViewFont->preview(),i,1); |
1109 | topLayout->addWidget(monthViewFont->button(),i,2); | 1144 | topLayout->addWidget(monthViewFont->button(),i,2); |
1110 | ++i; | 1145 | ++i; |
1111 | 1146 | ||
1112 | 1147 | ||
1113 | KPrefsDialogWidFont *lVFont = | 1148 | KPrefsDialogWidFont *lVFont = |
1114 | addWidFont(i18n("Event"),i18n("List View:"), | 1149 | addWidFont(i18n("Event"),i18n("List View:"), |
1115 | &(KOPrefs::instance()->mListViewFont),topFrame); | 1150 | &(KOPrefs::instance()->mListViewFont),topFrame); |
1116 | topLayout->addWidget(lVFont->label(),i,0); | 1151 | topLayout->addWidget(lVFont->label(),i,0); |
1117 | topLayout->addWidget(lVFont->preview(),i,1); | 1152 | topLayout->addWidget(lVFont->preview(),i,1); |
1118 | topLayout->addWidget(lVFont->button(),i,2); | 1153 | topLayout->addWidget(lVFont->button(),i,2); |
1119 | ++i; | 1154 | ++i; |
1120 | 1155 | ||
1121 | 1156 | ||
1122 | tVFont = | 1157 | tVFont = |
1123 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), | 1158 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), |
1124 | &(KOPrefs::instance()->mTodoViewFont),topFrame); | 1159 | &(KOPrefs::instance()->mTodoViewFont),topFrame); |
1125 | topLayout->addWidget(tVFont->label(),i,0); | 1160 | topLayout->addWidget(tVFont->label(),i,0); |
1126 | topLayout->addWidget(tVFont->preview(),i,1); | 1161 | topLayout->addWidget(tVFont->preview(),i,1); |
1127 | topLayout->addWidget(tVFont->button(),i,2); | 1162 | topLayout->addWidget(tVFont->button(),i,2); |
1128 | ++i; | 1163 | ++i; |
1129 | 1164 | ||
1130 | 1165 | ||
1131 | tVFont = | 1166 | tVFont = |
1132 | addWidFont(i18n("Today"),i18n("JournalView:"), | 1167 | addWidFont(i18n("Today"),i18n("JournalView:"), |
1133 | &(KOPrefs::instance()->mJornalViewFont),topFrame); | 1168 | &(KOPrefs::instance()->mJornalViewFont),topFrame); |
1134 | topLayout->addWidget(tVFont->label(),i,0); | 1169 | topLayout->addWidget(tVFont->label(),i,0); |
1135 | topLayout->addWidget(tVFont->preview(),i,1); | 1170 | topLayout->addWidget(tVFont->preview(),i,1); |
1136 | topLayout->addWidget(tVFont->button(),i,2); | 1171 | topLayout->addWidget(tVFont->button(),i,2); |
1137 | ++i; | 1172 | ++i; |
1138 | 1173 | ||
1139 | 1174 | ||
1140 | 1175 | ||
1141 | 1176 | ||
1142 | topLayout->setColStretch(1,1); | 1177 | topLayout->setColStretch(1,1); |
1143 | topLayout->setRowStretch(4,1); | 1178 | topLayout->setRowStretch(4,1); |
1144 | 1179 | ||
1145 | 1180 | ||
1146 | 1181 | ||
1147 | 1182 | ||
1148 | } | 1183 | } |
1149 | 1184 | ||
1150 | void KOPrefsDialog::setupColorsTab() | 1185 | void KOPrefsDialog::setupColorsTab() |
1151 | { | 1186 | { |
1152 | QFrame *topFrame = addPage(i18n("Colors"),0,0); | 1187 | QFrame *topFrame = addPage(i18n("Colors"),0,0); |
1153 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1188 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1154 | 1189 | ||
1155 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1190 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1156 | // topLayout->setSpacing(mSpacingHint); | 1191 | // topLayout->setSpacing(mSpacingHint); |
1157 | // topLayout->setMargin(mMarginHint); | 1192 | // topLayout->setMargin(mMarginHint); |
1158 | 1193 | ||
1159 | topLayout->setSpacing(2); | 1194 | topLayout->setSpacing(2); |
1160 | topLayout->setMargin(3); | 1195 | topLayout->setMargin(3); |
1161 | 1196 | ||
1162 | int ii = 1; | 1197 | int ii = 1; |
1163 | QGroupBox *categoryGroup ; | 1198 | QGroupBox *categoryGroup ; |
1164 | 1199 | ||
1165 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), | 1200 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), |
1166 | topFrame); | 1201 | topFrame); |
1167 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); | 1202 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); |
1168 | 1203 | ||
1169 | mCategoryCombo = new QComboBox(categoryGroup); | 1204 | mCategoryCombo = new QComboBox(categoryGroup); |
1170 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1205 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1171 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); | 1206 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); |
1172 | 1207 | ||
1173 | mCategoryButton = new KColorButton(categoryGroup); | 1208 | mCategoryButton = new KColorButton(categoryGroup); |
1174 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); | 1209 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); |
1175 | updateCategoryColor(); | 1210 | updateCategoryColor(); |
1176 | 1211 | ||
1177 | 1212 | ||
1178 | // Holiday Color | 1213 | // Holiday Color |
1179 | 1214 | ||
1180 | KPrefsDialogWidColor *holidayColor = | 1215 | KPrefsDialogWidColor *holidayColor = |
1181 | addWidColor(i18n("Holiday color:"), | 1216 | addWidColor(i18n("Holiday color:"), |
1182 | &(KOPrefs::instance()->mHolidayColor),topFrame); | 1217 | &(KOPrefs::instance()->mHolidayColor),topFrame); |
1183 | topLayout->addWidget(holidayColor->label(),ii,0); | 1218 | topLayout->addWidget(holidayColor->label(),ii,0); |
1184 | topLayout->addWidget(holidayColor->button(),ii++,1); | 1219 | topLayout->addWidget(holidayColor->button(),ii++,1); |
1185 | 1220 | ||
1186 | // Highlight Color | 1221 | // Highlight Color |
1187 | KPrefsDialogWidColor *highlightColor = | 1222 | KPrefsDialogWidColor *highlightColor = |
1188 | addWidColor(i18n("Highlight color:"), | 1223 | addWidColor(i18n("Highlight color:"), |
1189 | &(KOPrefs::instance()->mHighlightColor),topFrame); | 1224 | &(KOPrefs::instance()->mHighlightColor),topFrame); |
1190 | topLayout->addWidget(highlightColor->label(),ii,0); | 1225 | topLayout->addWidget(highlightColor->label(),ii,0); |
1191 | topLayout->addWidget(highlightColor->button(),ii++,1); | 1226 | topLayout->addWidget(highlightColor->button(),ii++,1); |
1192 | 1227 | ||
1193 | // Event color | 1228 | // Event color |
1194 | KPrefsDialogWidColor *eventColor = | 1229 | KPrefsDialogWidColor *eventColor = |
1195 | addWidColor(i18n("Default event color:"), | 1230 | addWidColor(i18n("Default event color:"), |
1196 | &(KOPrefs::instance()->mEventColor),topFrame); | 1231 | &(KOPrefs::instance()->mEventColor),topFrame); |
1197 | topLayout->addWidget(eventColor->label(),ii,0); | 1232 | topLayout->addWidget(eventColor->label(),ii,0); |
1198 | topLayout->addWidget(eventColor->button(),ii++,1); | 1233 | topLayout->addWidget(eventColor->button(),ii++,1); |
1199 | eventColor = | 1234 | eventColor = |
1200 | addWidColor(i18n("Default todo done color:"), | 1235 | addWidColor(i18n("Default todo done color:"), |
1201 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); | 1236 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); |
1202 | topLayout->addWidget(eventColor->label(),ii,0); | 1237 | topLayout->addWidget(eventColor->label(),ii,0); |
1203 | topLayout->addWidget(eventColor->button(),ii++,1); | 1238 | topLayout->addWidget(eventColor->button(),ii++,1); |
1204 | 1239 | ||
1205 | if ( QApplication::desktop()->height() <= 240 ) { | 1240 | if ( QApplication::desktop()->height() <= 240 ) { |
1206 | topFrame = addPage(i18n("Colors") +" 2",0,0); | 1241 | topFrame = addPage(i18n("Colors") +" 2",0,0); |
1207 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1242 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1208 | 1243 | ||
1209 | topLayout = new QGridLayout(topFrame,5,2); | 1244 | topLayout = new QGridLayout(topFrame,5,2); |
1210 | // topLayout->setSpacing(mSpacingHint); | 1245 | // topLayout->setSpacing(mSpacingHint); |
1211 | // topLayout->setMargin(mMarginHint); | 1246 | // topLayout->setMargin(mMarginHint); |
1212 | 1247 | ||
1213 | topLayout->setSpacing(2); | 1248 | topLayout->setSpacing(2); |
1214 | topLayout->setMargin(3); | 1249 | topLayout->setMargin(3); |
1215 | } | 1250 | } |
1216 | 1251 | ||
1217 | 1252 | ||
1218 | // agenda view background color | 1253 | // agenda view background color |
1219 | KPrefsDialogWidColor *agendaBgColor = | 1254 | KPrefsDialogWidColor *agendaBgColor = |
1220 | addWidColor(i18n("Agenda view background color:"), | 1255 | addWidColor(i18n("Agenda view background color:"), |
1221 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); | 1256 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); |
1222 | topLayout->addWidget(agendaBgColor->label(),ii,0); | 1257 | topLayout->addWidget(agendaBgColor->label(),ii,0); |
1223 | topLayout->addWidget(agendaBgColor->button(),ii++,1); | 1258 | topLayout->addWidget(agendaBgColor->button(),ii++,1); |
1224 | 1259 | ||
1225 | // working hours color | 1260 | // working hours color |
1226 | KPrefsDialogWidColor *workingHoursColor = | 1261 | KPrefsDialogWidColor *workingHoursColor = |
1227 | addWidColor(i18n("Working hours color:"), | 1262 | addWidColor(i18n("Working hours color:"), |
1228 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); | 1263 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); |
1229 | topLayout->addWidget(workingHoursColor->label(),ii,0); | 1264 | topLayout->addWidget(workingHoursColor->label(),ii,0); |
1230 | topLayout->addWidget(workingHoursColor->button(),ii++,1); | 1265 | topLayout->addWidget(workingHoursColor->button(),ii++,1); |
1231 | 1266 | ||
1232 | KPrefsDialogWidBool *sb = | 1267 | KPrefsDialogWidBool *sb = |
1233 | addWidBool(i18n("Use colors for application:"), | 1268 | addWidBool(i18n("Use colors for application:"), |
1234 | &(KOPrefs::instance()->mUseAppColors),topFrame); | 1269 | &(KOPrefs::instance()->mUseAppColors),topFrame); |
1235 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); | 1270 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); |
1236 | 1271 | ||
1237 | ii++; | 1272 | ii++; |
1238 | KPrefsDialogWidColor * workingHoursColor1 = | 1273 | KPrefsDialogWidColor * workingHoursColor1 = |
1239 | addWidColor(i18n("Buttons, menus, etc.:"), | 1274 | addWidColor(i18n("Buttons, menus, etc.:"), |
1240 | &(KOPrefs::instance()->mAppColor1),topFrame); | 1275 | &(KOPrefs::instance()->mAppColor1),topFrame); |
1241 | topLayout->addWidget(workingHoursColor1->label(),ii,0); | 1276 | topLayout->addWidget(workingHoursColor1->label(),ii,0); |
1242 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); | 1277 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); |
1243 | 1278 | ||
1244 | KPrefsDialogWidColor * workingHoursColor2 = | 1279 | KPrefsDialogWidColor * workingHoursColor2 = |
1245 | addWidColor(i18n("Frames, labels, etc.:"), | 1280 | addWidColor(i18n("Frames, labels, etc.:"), |
1246 | &(KOPrefs::instance()->mAppColor2),topFrame); | 1281 | &(KOPrefs::instance()->mAppColor2),topFrame); |
1247 | topLayout->addWidget(workingHoursColor2->label(),ii,0); | 1282 | topLayout->addWidget(workingHoursColor2->label(),ii,0); |
1248 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); | 1283 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); |
1249 | 1284 | ||
1250 | 1285 | ||
1251 | 1286 | ||
1252 | } | 1287 | } |
1253 | 1288 | ||
1254 | void KOPrefsDialog::setCategoryColor() | 1289 | void KOPrefsDialog::setCategoryColor() |
1255 | { | 1290 | { |
1256 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); | 1291 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); |
1257 | } | 1292 | } |
1258 | 1293 | ||
1259 | void KOPrefsDialog::updateCategoryColor() | 1294 | void KOPrefsDialog::updateCategoryColor() |
1260 | { | 1295 | { |
1261 | QString cat = mCategoryCombo->currentText(); | 1296 | QString cat = mCategoryCombo->currentText(); |
1262 | QColor *color = mCategoryDict.find(cat); | 1297 | QColor *color = mCategoryDict.find(cat); |
1263 | if (!color) { | 1298 | if (!color) { |
1264 | color = KOPrefs::instance()->categoryColor(cat); | 1299 | color = KOPrefs::instance()->categoryColor(cat); |
1265 | } | 1300 | } |
1266 | if (color) { | 1301 | if (color) { |
1267 | mCategoryButton->setColor(*color); | 1302 | mCategoryButton->setColor(*color); |
1268 | } | 1303 | } |
1269 | } | 1304 | } |
1270 | 1305 | ||
1271 | void KOPrefsDialog::setupPrinterTab() | 1306 | void KOPrefsDialog::setupPrinterTab() |
1272 | { | 1307 | { |
1273 | mPrinterTab = addPage(i18n("Printing"),0, | 1308 | mPrinterTab = addPage(i18n("Printing"),0, |
1274 | DesktopIcon("fileprint",KIcon::SizeMedium)); | 1309 | DesktopIcon("fileprint",KIcon::SizeMedium)); |
1275 | 1310 | ||
1276 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); | 1311 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); |
1277 | topLayout->setSpacing(mSpacingHint); | 1312 | topLayout->setSpacing(mSpacingHint); |
1278 | topLayout->setMargin(mMarginHint); | 1313 | topLayout->setMargin(mMarginHint); |
1279 | 1314 | ||
1280 | topLayout->setRowStretch(4,1); | 1315 | topLayout->setRowStretch(4,1); |
1281 | } | 1316 | } |
1282 | 1317 | ||
1283 | void KOPrefsDialog::setupGroupSchedulingTab() | 1318 | void KOPrefsDialog::setupGroupSchedulingTab() |
1284 | { | 1319 | { |
1285 | #if 0 | 1320 | #if 0 |
1286 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, | 1321 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, |
1287 | DesktopIcon("personal",KIcon::SizeMedium)); | 1322 | DesktopIcon("personal",KIcon::SizeMedium)); |
1288 | 1323 | ||
1289 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 1324 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
1290 | topLayout->setSpacing(mSpacingHint); | 1325 | topLayout->setSpacing(mSpacingHint); |
1291 | topLayout->setMargin(mMarginHint); | 1326 | topLayout->setMargin(mMarginHint); |
1292 | 1327 | ||
1293 | #if 0 | 1328 | #if 0 |
1294 | KPrefsDialogWidRadios *schedulerGroup = | 1329 | KPrefsDialogWidRadios *schedulerGroup = |
1295 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), | 1330 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), |
1296 | topFrame); | 1331 | topFrame); |
1297 | schedulerGroup->addRadio("Dummy"); // Only for debugging | 1332 | schedulerGroup->addRadio("Dummy"); // Only for debugging |
1298 | schedulerGroup->addRadio(i18n("Mail client")); | 1333 | schedulerGroup->addRadio(i18n("Mail client")); |
1299 | 1334 | ||
1300 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); | 1335 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); |
1301 | #endif | 1336 | #endif |
1302 | 1337 | ||
1303 | KPrefsDialogWidRadios *sendGroup = | 1338 | KPrefsDialogWidRadios *sendGroup = |
1304 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), | 1339 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), |
1305 | topFrame); | 1340 | topFrame); |
1306 | sendGroup->addRadio(i18n("Send to outbox")); | 1341 | sendGroup->addRadio(i18n("Send to outbox")); |
1307 | sendGroup->addRadio(i18n("Send directly")); | 1342 | sendGroup->addRadio(i18n("Send directly")); |
1308 | 1343 | ||
1309 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); | 1344 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); |
1310 | 1345 | ||
1311 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); | 1346 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); |
1312 | mAMails = new QListView(topFrame); | 1347 | mAMails = new QListView(topFrame); |
1313 | mAMails->addColumn(i18n("Email"),300); | 1348 | mAMails->addColumn(i18n("Email"),300); |
1314 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); | 1349 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); |
1315 | 1350 | ||
1316 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); | 1351 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); |
1317 | aEmailsEdit = new QLineEdit(topFrame); | 1352 | aEmailsEdit = new QLineEdit(topFrame); |
1318 | aEmailsEdit->setEnabled(false); | 1353 | aEmailsEdit->setEnabled(false); |
1319 | topLayout->addWidget(aEmailsEdit,4,1); | 1354 | topLayout->addWidget(aEmailsEdit,4,1); |
1320 | 1355 | ||
1321 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); | 1356 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); |
1322 | topLayout->addWidget(add,5,0); | 1357 | topLayout->addWidget(add,5,0); |
1323 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); | 1358 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); |
1324 | topLayout->addWidget(del,5,1); | 1359 | topLayout->addWidget(del,5,1); |
1325 | 1360 | ||
1326 | //topLayout->setRowStretch(2,1); | 1361 | //topLayout->setRowStretch(2,1); |
1327 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); | 1362 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); |
1328 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); | 1363 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); |
1329 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); | 1364 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); |
1330 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); | 1365 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); |
1331 | #endif | 1366 | #endif |
1332 | } | 1367 | } |
1333 | 1368 | ||
1334 | void KOPrefsDialog::setupGroupAutomationTab() | 1369 | void KOPrefsDialog::setupGroupAutomationTab() |
1335 | { | 1370 | { |
1336 | return; | 1371 | return; |
1337 | QFrame *topFrame = addPage(i18n("Group Automation"),0, | 1372 | QFrame *topFrame = addPage(i18n("Group Automation"),0, |
1338 | DesktopIcon("personal",KIcon::SizeMedium)); | 1373 | DesktopIcon("personal",KIcon::SizeMedium)); |
1339 | 1374 | ||
1340 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); | 1375 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); |
1341 | topLayout->setSpacing(mSpacingHint); | 1376 | topLayout->setSpacing(mSpacingHint); |
1342 | topLayout->setMargin(mMarginHint); | 1377 | topLayout->setMargin(mMarginHint); |
1343 | 1378 | ||
1344 | KPrefsDialogWidRadios *autoRefreshGroup = | 1379 | KPrefsDialogWidRadios *autoRefreshGroup = |
1345 | addWidRadios(i18n("Auto Send Refresh"), | 1380 | addWidRadios(i18n("Auto Send Refresh"), |
1346 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); | 1381 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); |
1347 | autoRefreshGroup->addRadio(i18n("Never")); | 1382 | autoRefreshGroup->addRadio(i18n("Never")); |
1348 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); | 1383 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); |
1349 | //autoRefreshGroup->addRadio(i18n("selected emails")); | 1384 | //autoRefreshGroup->addRadio(i18n("selected emails")); |
1350 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); | 1385 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); |
1351 | 1386 | ||
1352 | KPrefsDialogWidRadios *autoInsertGroup = | 1387 | KPrefsDialogWidRadios *autoInsertGroup = |
1353 | addWidRadios(i18n("Auto Insert IMIP Replies"), | 1388 | addWidRadios(i18n("Auto Insert IMIP Replies"), |
1354 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); | 1389 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); |
1355 | autoInsertGroup->addRadio(i18n("Never")); | 1390 | autoInsertGroup->addRadio(i18n("Never")); |
1356 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); | 1391 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); |
1357 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1392 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1358 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); | 1393 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); |
1359 | 1394 | ||
1360 | KPrefsDialogWidRadios *autoRequestGroup = | 1395 | KPrefsDialogWidRadios *autoRequestGroup = |
1361 | addWidRadios(i18n("Auto Insert IMIP Requests"), | 1396 | addWidRadios(i18n("Auto Insert IMIP Requests"), |
1362 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); | 1397 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); |
1363 | autoRequestGroup->addRadio(i18n("Never")); | 1398 | autoRequestGroup->addRadio(i18n("Never")); |
1364 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); | 1399 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); |
1365 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1400 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1366 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); | 1401 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); |
1367 | 1402 | ||
1368 | KPrefsDialogWidRadios *autoFreeBusyGroup = | 1403 | KPrefsDialogWidRadios *autoFreeBusyGroup = |
1369 | addWidRadios(i18n("Auto Send FreeBusy Information"), | 1404 | addWidRadios(i18n("Auto Send FreeBusy Information"), |
1370 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); | 1405 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); |
1371 | autoFreeBusyGroup->addRadio(i18n("Never")); | 1406 | autoFreeBusyGroup->addRadio(i18n("Never")); |
1372 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); | 1407 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); |
1373 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1408 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1374 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); | 1409 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); |
1375 | 1410 | ||
1376 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = | 1411 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = |
1377 | addWidRadios(i18n("Auto Save FreeBusy Replies"), | 1412 | addWidRadios(i18n("Auto Save FreeBusy Replies"), |
1378 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); | 1413 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); |
1379 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); | 1414 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); |
1380 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); | 1415 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); |
1381 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1416 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1382 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); | 1417 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); |
1383 | } | 1418 | } |
1384 | 1419 | ||
1385 | void KOPrefsDialog::showPrinterTab() | 1420 | void KOPrefsDialog::showPrinterTab() |
1386 | { | 1421 | { |
1387 | showPage(pageIndex(mPrinterTab)); | 1422 | showPage(pageIndex(mPrinterTab)); |
1388 | } | 1423 | } |
1389 | 1424 | ||
1390 | 1425 | ||
1391 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, | 1426 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, |
1392 | const QStringList *tags) | 1427 | const QStringList *tags) |
1393 | { | 1428 | { |
1394 | if (tags) { | 1429 | if (tags) { |
1395 | int i = tags->findIndex(text); | 1430 | int i = tags->findIndex(text); |
1396 | if (i > 0) combo->setCurrentItem(i); | 1431 | if (i > 0) combo->setCurrentItem(i); |
1397 | } else { | 1432 | } else { |
1398 | for(int i=0;i<combo->count();++i) { | 1433 | for(int i=0;i<combo->count();++i) { |
1399 | if (combo->text(i) == text) { | 1434 | if (combo->text(i) == text) { |
1400 | combo->setCurrentItem(i); | 1435 | combo->setCurrentItem(i); |
1401 | break; | 1436 | break; |
1402 | } | 1437 | } |
1403 | } | 1438 | } |
1404 | } | 1439 | } |
1405 | } | 1440 | } |
1406 | 1441 | ||
1407 | void KOPrefsDialog::usrReadConfig() | 1442 | void KOPrefsDialog::usrReadConfig() |
1408 | { | 1443 | { |
1409 | 1444 | ||
1410 | mNameEdit->setText(KOPrefs::instance()->fullName()); | 1445 | mNameEdit->setText(KOPrefs::instance()->fullName()); |
1411 | mEmailEdit->setText(KOPrefs::instance()->email()); | 1446 | mEmailEdit->setText(KOPrefs::instance()->email()); |
1412 | 1447 | ||
1413 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); | 1448 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); |
1414 | 1449 | ||
1415 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); | 1450 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); |
1416 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); | 1451 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); |
1417 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); | 1452 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); |
1418 | 1453 | ||
1419 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); | 1454 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); |
1420 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); | 1455 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); |
1421 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); | 1456 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); |
1422 | // mAMails->clear(); | 1457 | // mAMails->clear(); |
1423 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); | 1458 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); |
1424 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { | 1459 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { |
1425 | // QListViewItem *item = new QListViewItem(mAMails); | 1460 | // QListViewItem *item = new QListViewItem(mAMails); |
1426 | // item->setText(0,*it); | 1461 | // item->setText(0,*it); |
1427 | // mAMails->insertItem(item); | 1462 | // mAMails->insertItem(item); |
1428 | // } | 1463 | // } |
1429 | 1464 | ||
1430 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); | 1465 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); |
1431 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); | 1466 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); |
1432 | updateCategories(); | 1467 | updateCategories(); |
1433 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); | 1468 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); |
1434 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); | 1469 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); |
1435 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); | 1470 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); |
1436 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); | 1471 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); |
1437 | mCatDefaultColor = KOPrefs::instance()->mEventColor; | 1472 | mCatDefaultColor = KOPrefs::instance()->mEventColor; |
1473 | |||
1474 | |||
1475 | KConfig cfgko(locateLocal("config","korganizerrc")); | ||
1476 | cfgko.setGroup("General"); | ||
1477 | QStringList temp = cfgko.readListEntry("CalendarFilters"); | ||
1478 | temp.prepend(i18n("No Filter") ); | ||
1479 | mFilterEditItem->insertStringList( temp ); | ||
1480 | mFilterAllItem->insertStringList( temp ); | ||
1481 | int index = temp.findIndex( KOPrefs::instance()->mFilterConflictEditItem ); | ||
1482 | if ( index >= 0 ) | ||
1483 | mFilterEditItem->setCurrentItem( index ); | ||
1484 | index = temp.findIndex( KOPrefs::instance()->mFilterConflictAllItem ); | ||
1485 | if ( index >= 0 ) | ||
1486 | mFilterAllItem->setCurrentItem( index ); | ||
1438 | } | 1487 | } |
1439 | 1488 | ||
1440 | 1489 | ||
1441 | void KOPrefsDialog::usrWriteConfig() | 1490 | void KOPrefsDialog::usrWriteConfig() |
1442 | { | 1491 | { |
1443 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); | 1492 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); |
1444 | KOPrefs::instance()->setFullName(mNameEdit->text()); | 1493 | KOPrefs::instance()->setFullName(mNameEdit->text()); |
1445 | KOPrefs::instance()->setEmail(mEmailEdit->text()); | 1494 | KOPrefs::instance()->setEmail(mEmailEdit->text()); |
1446 | 1495 | ||
1447 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); | 1496 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); |
1448 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); | 1497 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); |
1449 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); | 1498 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); |
1450 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); | 1499 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); |
1451 | if ( mCatDefaultColor != KOPrefs::instance()->mEventColor ) { | 1500 | if ( mCatDefaultColor != KOPrefs::instance()->mEventColor ) { |
1452 | QStringList cat = KOPrefs::instance()->mCustomCategories; | 1501 | QStringList cat = KOPrefs::instance()->mCustomCategories; |
1453 | int iii = 0; | 1502 | int iii = 0; |
1454 | while ( iii < cat.count() ) { | 1503 | while ( iii < cat.count() ) { |
1455 | if ( *KOPrefs::instance()->categoryColor( cat[ iii ] ) == mCatDefaultColor ) | 1504 | if ( *KOPrefs::instance()->categoryColor( cat[ iii ] ) == mCatDefaultColor ) |
1456 | KOPrefs::instance()->setCategoryColor( cat[ iii ], KOPrefs::instance()->mEventColor ); | 1505 | KOPrefs::instance()->setCategoryColor( cat[ iii ], KOPrefs::instance()->mEventColor ); |
1457 | ++iii; | 1506 | ++iii; |
1458 | } | 1507 | } |
1459 | } | 1508 | } |
1460 | QDictIterator<QColor> it(mCategoryDict); | 1509 | QDictIterator<QColor> it(mCategoryDict); |
1461 | while (it.current()) { | 1510 | while (it.current()) { |
1462 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); | 1511 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); |
1463 | ++it; | 1512 | ++it; |
1464 | } | 1513 | } |
1465 | 1514 | ||
1466 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); | 1515 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); |
1467 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); | 1516 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); |
1468 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); | 1517 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); |
1469 | 1518 | ||
1470 | KOPrefs::instance()->mAdditionalMails.clear(); | 1519 | KOPrefs::instance()->mAdditionalMails.clear(); |
1471 | // QListViewItem *item; | 1520 | // QListViewItem *item; |
1472 | // item = mAMails->firstChild(); | 1521 | // item = mAMails->firstChild(); |
1473 | // while (item) | 1522 | // while (item) |
1474 | // { | 1523 | // { |
1475 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); | 1524 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); |
1476 | // item = item->nextSibling(); | 1525 | // item = item->nextSibling(); |
1477 | // } | 1526 | // } |
1478 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); | 1527 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); |
1479 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; | 1528 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; |
1480 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; | 1529 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; |
1481 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; | 1530 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; |
1531 | |||
1532 | KOPrefs::instance()->mFilterConflictEditItem = mFilterEditItem->currentText(); | ||
1533 | KOPrefs::instance()->mFilterConflictAllItem = mFilterAllItem->currentText(); | ||
1482 | } | 1534 | } |
1483 | 1535 | ||
1484 | void KOPrefsDialog::updateCategories() | 1536 | void KOPrefsDialog::updateCategories() |
1485 | { | 1537 | { |
1486 | mCategoryCombo->clear(); | 1538 | mCategoryCombo->clear(); |
1487 | mCategoryDict.clear(); | 1539 | mCategoryDict.clear(); |
1488 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1540 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1489 | updateCategoryColor(); | 1541 | updateCategoryColor(); |
1490 | } | 1542 | } |
1491 | 1543 | ||
1492 | void KOPrefsDialog::toggleEmailSettings(bool on) | 1544 | void KOPrefsDialog::toggleEmailSettings(bool on) |
1493 | { | 1545 | { |
1494 | if (on) { | 1546 | if (on) { |
1495 | mEmailEdit->setEnabled(false); | 1547 | mEmailEdit->setEnabled(false); |
1496 | mNameEdit->setEnabled(false); | 1548 | mNameEdit->setEnabled(false); |
1497 | mEmailLabel->setEnabled(false); | 1549 | mEmailLabel->setEnabled(false); |
1498 | mNameLabel->setEnabled(false); | 1550 | mNameLabel->setEnabled(false); |
1499 | 1551 | ||
1500 | KEMailSettings settings; | 1552 | KEMailSettings settings; |
1501 | mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); | 1553 | mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); |
1502 | mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); | 1554 | mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); |
1503 | } else { | 1555 | } else { |
1504 | mEmailEdit->setEnabled(true); | 1556 | mEmailEdit->setEnabled(true); |
1505 | mNameEdit->setEnabled(true); | 1557 | mNameEdit->setEnabled(true); |
1506 | mEmailLabel->setEnabled(true); | 1558 | mEmailLabel->setEnabled(true); |
1507 | mNameLabel->setEnabled(true); | 1559 | mNameLabel->setEnabled(true); |
1508 | } | 1560 | } |
1509 | } | 1561 | } |
1510 | 1562 | ||
1511 | void KOPrefsDialog::addItem() | 1563 | void KOPrefsDialog::addItem() |
1512 | { | 1564 | { |
1513 | // aEmailsEdit->setEnabled(true); | 1565 | // aEmailsEdit->setEnabled(true); |
1514 | // QListViewItem *item = new QListViewItem(mAMails); | 1566 | // QListViewItem *item = new QListViewItem(mAMails); |
1515 | // mAMails->insertItem(item); | 1567 | // mAMails->insertItem(item); |
1516 | // mAMails->setSelected(item,true); | 1568 | // mAMails->setSelected(item,true); |
1517 | // aEmailsEdit->setText(i18n("(EmptyEmail)")); | 1569 | // aEmailsEdit->setText(i18n("(EmptyEmail)")); |
1518 | } | 1570 | } |
1519 | 1571 | ||
1520 | void KOPrefsDialog::removeItem() | 1572 | void KOPrefsDialog::removeItem() |
1521 | { | 1573 | { |
1522 | // QListViewItem *item; | 1574 | // QListViewItem *item; |
1523 | // item = mAMails->selectedItem(); | 1575 | // item = mAMails->selectedItem(); |
1524 | // if (!item) return; | 1576 | // if (!item) return; |
1525 | // mAMails->takeItem(item); | 1577 | // mAMails->takeItem(item); |
1526 | // item = mAMails->selectedItem(); | 1578 | // item = mAMails->selectedItem(); |
1527 | // if (!item) { | 1579 | // if (!item) { |
1528 | // aEmailsEdit->setText(""); | 1580 | // aEmailsEdit->setText(""); |
1529 | // aEmailsEdit->setEnabled(false); | 1581 | // aEmailsEdit->setEnabled(false); |
1530 | // } | 1582 | // } |
1531 | // if (mAMails->childCount() == 0) { | 1583 | // if (mAMails->childCount() == 0) { |
1532 | // aEmailsEdit->setEnabled(false); | 1584 | // aEmailsEdit->setEnabled(false); |
1533 | // } | 1585 | // } |
1534 | } | 1586 | } |
1535 | 1587 | ||
1536 | void KOPrefsDialog::updateItem() | 1588 | void KOPrefsDialog::updateItem() |
1537 | { | 1589 | { |
1538 | // QListViewItem *item; | 1590 | // QListViewItem *item; |
1539 | // item = mAMails->selectedItem(); | 1591 | // item = mAMails->selectedItem(); |
1540 | // if (!item) return; | 1592 | // if (!item) return; |
1541 | // item->setText(0,aEmailsEdit->text()); | 1593 | // item->setText(0,aEmailsEdit->text()); |
1542 | } | 1594 | } |
1543 | 1595 | ||
1544 | void KOPrefsDialog::updateInput() | 1596 | void KOPrefsDialog::updateInput() |
1545 | { | 1597 | { |
1546 | // QListViewItem *item; | 1598 | // QListViewItem *item; |
1547 | // item = mAMails->selectedItem(); | 1599 | // item = mAMails->selectedItem(); |
1548 | // if (!item) return; | 1600 | // if (!item) return; |
1549 | // aEmailsEdit->setEnabled(true); | 1601 | // aEmailsEdit->setEnabled(true); |
1550 | // aEmailsEdit->setText(item->text(0)); | 1602 | // aEmailsEdit->setText(item->text(0)); |
1551 | } | 1603 | } |
1552 | 1604 | ||
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h index baa6cf9..ee7a7aa 100644 --- a/korganizer/koprefsdialog.h +++ b/korganizer/koprefsdialog.h | |||
@@ -1,155 +1,157 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,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 _KOPREFSDIALOG_H | 23 | #ifndef _KOPREFSDIALOG_H |
24 | #define _KOPREFSDIALOG_H | 24 | #define _KOPREFSDIALOG_H |
25 | 25 | ||
26 | #include <qframe.h> | 26 | #include <qframe.h> |
27 | #include <qdict.h> | 27 | #include <qdict.h> |
28 | #include <qcolor.h> | 28 | #include <qcolor.h> |
29 | #include <qlistview.h> | 29 | #include <qlistview.h> |
30 | 30 | ||
31 | #include <kdialogbase.h> | 31 | #include <kdialogbase.h> |
32 | 32 | ||
33 | #include <libkdepim/kprefsdialog.h> | 33 | #include <libkdepim/kprefsdialog.h> |
34 | #include <libkdepim/kdateedit.h> | 34 | #include <libkdepim/kdateedit.h> |
35 | #include <kcmconfigs/kdepimconfigwidget.h> | 35 | #include <kcmconfigs/kdepimconfigwidget.h> |
36 | 36 | ||
37 | class KColorButton; | 37 | class KColorButton; |
38 | class QSpinBox; | 38 | class QSpinBox; |
39 | class QSlider; | 39 | class QSlider; |
40 | class KURLRequester; | 40 | class KURLRequester; |
41 | class QComboBox; | 41 | class QComboBox; |
42 | class QLineEdit; | 42 | class QLineEdit; |
43 | class QStringList; | 43 | class QStringList; |
44 | 44 | ||
45 | /** Dialog to change the korganizer configuration. | 45 | /** Dialog to change the korganizer configuration. |
46 | */ | 46 | */ |
47 | class KOPrefsDialog : public KPrefsDialog | 47 | class KOPrefsDialog : public KPrefsDialog |
48 | { | 48 | { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | public: | 50 | public: |
51 | /** Initialize dialog and pages */ | 51 | /** Initialize dialog and pages */ |
52 | KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false); | 52 | KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false); |
53 | ~KOPrefsDialog(); | 53 | ~KOPrefsDialog(); |
54 | 54 | ||
55 | public slots: | 55 | public slots: |
56 | void showPrinterTab(); | 56 | void showPrinterTab(); |
57 | 57 | ||
58 | /** Update controls for categories */ | 58 | /** Update controls for categories */ |
59 | void updateCategories(); | 59 | void updateCategories(); |
60 | protected slots: | 60 | protected slots: |
61 | void selectSoundFile(); | 61 | void selectSoundFile(); |
62 | void setCategoryColor(); | 62 | void setCategoryColor(); |
63 | void updateCategoryColor(); | 63 | void updateCategoryColor(); |
64 | void toggleEmailSettings(bool); | 64 | void toggleEmailSettings(bool); |
65 | 65 | ||
66 | //additional emails | 66 | //additional emails |
67 | void addItem(); | 67 | void addItem(); |
68 | void removeItem(); | 68 | void removeItem(); |
69 | void updateItem(); | 69 | void updateItem(); |
70 | void updateInput(); | 70 | void updateInput(); |
71 | 71 | ||
72 | protected: | 72 | protected: |
73 | void usrReadConfig(); | 73 | void usrReadConfig(); |
74 | void usrWriteConfig(); | 74 | void usrWriteConfig(); |
75 | void setupGlobalTab(); | 75 | void setupGlobalTab(); |
76 | 76 | ||
77 | void setupMainTab(); | 77 | void setupMainTab(); |
78 | void setupTimeTab(); | 78 | void setupTimeTab(); |
79 | void setupLocaleTab(); | 79 | void setupLocaleTab(); |
80 | void setupLocaleDateTab(); | 80 | void setupLocaleDateTab(); |
81 | void setupFontsTab(); | 81 | void setupFontsTab(); |
82 | void setupColorsTab(); | 82 | void setupColorsTab(); |
83 | void setupViewsTab(); | 83 | void setupViewsTab(); |
84 | void setupDisplayTab(); | 84 | void setupDisplayTab(); |
85 | void setupPrinterTab(); | 85 | void setupPrinterTab(); |
86 | void setupGroupSchedulingTab(); | 86 | void setupGroupSchedulingTab(); |
87 | void setupGroupAutomationTab(); | 87 | void setupGroupAutomationTab(); |
88 | 88 | ||
89 | void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); | 89 | void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); |
90 | 90 | ||
91 | 91 | ||
92 | private: | 92 | private: |
93 | QColor mCatDefaultColor; | 93 | QColor mCatDefaultColor; |
94 | KPrefsDialogWidBool *mEnableGroupScheduling; | 94 | KPrefsDialogWidBool *mEnableGroupScheduling; |
95 | KPrefsDialogWidBool *mEnableProjectView; | 95 | KPrefsDialogWidBool *mEnableProjectView; |
96 | 96 | ||
97 | QFrame *mPrinterTab; | 97 | QFrame *mPrinterTab; |
98 | 98 | ||
99 | QLineEdit *nameEdit; | 99 | QLineEdit *nameEdit; |
100 | QLineEdit *emailEdit; | 100 | QLineEdit *emailEdit; |
101 | 101 | ||
102 | QComboBox *timeCombo; | 102 | QComboBox *timeCombo; |
103 | QComboBox *tzCombo; | 103 | QComboBox *tzCombo; |
104 | 104 | ||
105 | // widgets holding preferences data | 105 | // widgets holding preferences data |
106 | QLineEdit *mNameEdit; | 106 | QLineEdit *mNameEdit; |
107 | QLineEdit *mEmailEdit; | 107 | QLineEdit *mEmailEdit; |
108 | QLabel *mNameLabel; | 108 | QLabel *mNameLabel; |
109 | QLabel *mEmailLabel; | 109 | QLabel *mEmailLabel; |
110 | QLineEdit *mAdditionalEdit; | 110 | QLineEdit *mAdditionalEdit; |
111 | QSpinBox *mAutoSaveIntervalSpin; | 111 | QSpinBox *mAutoSaveIntervalSpin; |
112 | QSpinBox *mPrioSpin; | 112 | QSpinBox *mPrioSpin; |
113 | // QListView *mAMails; | 113 | // QListView *mAMails; |
114 | QLineEdit *aEmailsEdit; | 114 | QLineEdit *aEmailsEdit; |
115 | 115 | ||
116 | QComboBox *mTimeZoneCombo; | 116 | QComboBox *mTimeZoneCombo; |
117 | QStringList tzonenames; | 117 | QStringList tzonenames; |
118 | QSpinBox *mStartTimeSpin; | 118 | QSpinBox *mStartTimeSpin; |
119 | QSpinBox *mDefaultDurationSpin; | 119 | QSpinBox *mDefaultDurationSpin; |
120 | QComboBox *mAlarmTimeCombo; | 120 | QComboBox *mAlarmTimeCombo; |
121 | 121 | ||
122 | QComboBox *mCategoryCombo; | 122 | QComboBox *mCategoryCombo; |
123 | KColorButton *mCategoryButton; | 123 | KColorButton *mCategoryButton; |
124 | QDict<QColor> mCategoryDict; | 124 | QDict<QColor> mCategoryDict; |
125 | 125 | ||
126 | QSlider *mHourSizeSlider; | 126 | QSlider *mHourSizeSlider; |
127 | 127 | ||
128 | QSpinBox *mNextXDaysSpin; | 128 | QSpinBox *mNextXDaysSpin; |
129 | QSpinBox *mWhatsNextSpin; | 129 | QSpinBox *mWhatsNextSpin; |
130 | 130 | ||
131 | QLineEdit * mRemoteIPEdit; | 131 | QLineEdit * mRemoteIPEdit; |
132 | QLineEdit * mRemoteUser; | 132 | QLineEdit * mRemoteUser; |
133 | QLineEdit * mRemotePassWd; | 133 | QLineEdit * mRemotePassWd; |
134 | QLineEdit * mRemoteFile; | 134 | QLineEdit * mRemoteFile; |
135 | QLineEdit * mLocalTempFile; | 135 | QLineEdit * mLocalTempFile; |
136 | QWidget* mSetupSyncAlgTab; | 136 | QWidget* mSetupSyncAlgTab; |
137 | QLineEdit * mUserDateFormatLong; | 137 | QLineEdit * mUserDateFormatLong; |
138 | QLineEdit * mUserDateFormatShort; | 138 | QLineEdit * mUserDateFormatShort; |
139 | 139 | ||
140 | QSpinBox *mTimezoneOffsetSpin; | 140 | QSpinBox *mTimezoneOffsetSpin; |
141 | QSpinBox *mDaylightsavingStart; | 141 | QSpinBox *mDaylightsavingStart; |
142 | QSpinBox *mDaylightsavingEnd; | 142 | QSpinBox *mDaylightsavingEnd; |
143 | KDateEdit* mStartDateSavingEdit; | 143 | KDateEdit* mStartDateSavingEdit; |
144 | KDateEdit* mEndDateSavingEdit; | 144 | KDateEdit* mEndDateSavingEdit; |
145 | QSpinBox * mAlarmPlayBeeps; | 145 | QSpinBox * mAlarmPlayBeeps; |
146 | QSpinBox * mAlarmSuspendTime; | 146 | QSpinBox * mAlarmSuspendTime; |
147 | QSpinBox * mAlarmSuspendCount; | 147 | QSpinBox * mAlarmSuspendCount; |
148 | QSpinBox * mAlarmBeepInterval; | 148 | QSpinBox * mAlarmBeepInterval; |
149 | 149 | ||
150 | QComboBox * mFilterEditItem, *mFilterAllItem; | ||
151 | |||
150 | QLineEdit * mDefaultAlarmFile; | 152 | QLineEdit * mDefaultAlarmFile; |
151 | int mSpacingHint; | 153 | int mSpacingHint; |
152 | int mMarginHint; | 154 | int mMarginHint; |
153 | }; | 155 | }; |
154 | 156 | ||
155 | #endif | 157 | #endif |